From 0e0b56dfa739c633a9a6fadaec506da600d92c0e Mon Sep 17 00:00:00 2001 From: Igor Date: Sun, 1 Jul 2018 09:51:22 +0300 Subject: [PATCH 01/10] Fix TypeError: r.all_db_fields[] --- src/app/services/DatabaseStructure.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/services/DatabaseStructure.js b/src/app/services/DatabaseStructure.js index e58e77a0..4e4f7d93 100644 --- a/src/app/services/DatabaseStructure.js +++ b/src/app/services/DatabaseStructure.js @@ -36,14 +36,18 @@ class DatabaseStructure { { this.all_fields[item.database+'.'+item.table]=[]; } - if (!this.all_db_fields[item.database]) + + // TypeError: r.all_db_fields[e.database][e.table].push is not a function + if (!_.isArray(this.all_db_fields[item.database])) { this.all_db_fields[item.database]=[]; } - if (!this.all_db_fields[item.database][item.table]) + + if (!_.isArray(this.all_db_fields[item.database][item.table])) { this.all_db_fields[item.database][item.table]=[]; } + this.all_db_fields[item.database][item.table].push(item); this.all_fields[item.database+'.'+item.table].push({ name:item.name,type: item.type,active:true }); From 47b711409f7e86554535ee7c6aa406290f0f1139 Mon Sep 17 00:00:00 2001 From: igor Date: Sun, 1 Jul 2018 10:14:28 +0300 Subject: [PATCH 02/10] 18.07.1 --- bower.json | 2 +- package.json | 2 +- src/app/login/login.html | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bower.json b/bower.json index b649941b..8e5bea89 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "Tabix", - "version": "18.06.1", + "version": "18.07.1", "dependencies": { "angular-animate": "1.6.6", "angular-aria": "1.5.9", diff --git a/package.json b/package.json index 1dc99a36..d035c562 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Tabix", - "version": "18.06.1", + "version": "18.07.1", "license": "Apache-2.0", "homepage": "https://tabix.io", "repository": { diff --git a/src/app/login/login.html b/src/app/login/login.html index 36cbd1e2..d2dc6713 100644 --- a/src/app/login/login.html +++ b/src/app/login/login.html @@ -126,24 +126,24 @@ -
+ - - Server Version < 1.1.54276 - + + + -
-
- Experimental:  - - HTTP Base auth - - - Include Credentials - -
+ + + + + + + + + +
From 05e8c9f33569e6d732334ec9b1830a05a578f1f5 Mon Sep 17 00:00:00 2001 From: igor Date: Sun, 1 Jul 2018 10:16:56 +0300 Subject: [PATCH 03/10] 18.07.1 --- build/assets/images/TabixBeta2018.png | Bin 0 -> 78945 bytes .../assets/plotly-toolpanel/fonts/unified.eot | Bin 0 -> 34696 bytes .../assets/plotly-toolpanel/fonts/unified.svg | 167 + .../assets/plotly-toolpanel/fonts/unified.ttf | Bin 0 -> 34532 bytes .../plotly-toolpanel/fonts/unified.woff | Bin 0 -> 22204 bytes .../static/css/images/jstree.png | Bin 0 -> 5838 bytes .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 260 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 251 bytes .../css/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../css/images/ui-bg_flat_0_ffffff_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_flat_100_000000_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 104 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 125 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 3762 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 90 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 129 bytes .../ui-bg_highlight-soft_75_ffffff_1x100.png | Bin 0 -> 105 bytes .../ui-bg_inset-soft_95_fef1ec_1x100.png | Bin 0 -> 123 bytes .../css/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_228ef1_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4369 bytes .../css/images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes build/index.html | 4 +- build/scripts/app.js | 5252 +---------------- build/styles/app.css | 10 +- 38 files changed, 276 insertions(+), 5157 deletions(-) create mode 100644 build/assets/images/TabixBeta2018.png create mode 100644 build/assets/plotly-toolpanel/fonts/unified.eot create mode 100644 build/assets/plotly-toolpanel/fonts/unified.svg create mode 100644 build/assets/plotly-toolpanel/fonts/unified.ttf create mode 100644 build/assets/plotly-toolpanel/fonts/unified.woff create mode 100755 build/assets/plotly-toolpanel/static/css/images/jstree.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_0_ffffff_40x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_100_000000_40x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_10_000000_40x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_75_ffffff_40x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_65_ffffff_1x400.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_75_dadada_1x400.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_75_ffffff_1x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_222222_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_228ef1_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_2e83ff_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_454545_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_888888_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_cd0a0a_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_ef8c08_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_ffd27a_256x240.png create mode 100755 build/assets/plotly-toolpanel/static/css/images/ui-icons_ffffff_256x240.png diff --git a/build/assets/images/TabixBeta2018.png b/build/assets/images/TabixBeta2018.png new file mode 100644 index 0000000000000000000000000000000000000000..a41ee9e878fa9853eb36bc80546b8683d8c36e0b GIT binary patch literal 78945 zcmZs?Ral#CyDgf8;4Lo2rMMTjLU4C?io3f8C{UnSad$72;x45~i@UqKyX}1QpWnRJ zo@<>XIZ5)o_qctGCqh|K>MaT(3IG6jD*LV&%x0uc!T0CIqgxQM!! z;ZYW{mw`ro|Ld#&Nn+u?AVg-dP9cGl8J-CZYT}Fl#z=y#~9$j62yD#14&HDANTc zL#d6Cwg2Z05{BHiV@}mmQ_1^({r`U*iu@2vXloHJ8bnb*{|=71K)*7KA#@$eK<%a+ zLZJ$xl;%4lFN6@gf8nvfw8EfA%!bqfs^I!4q^+d&BMw~X5s{97KN+dInO|)dnqAS7 zTXhgWz5Tx)H>i!mn8eGwR((eK|86h6s@Rg8hQJd;mnb*FcJ!Luf5N z@;(y%Q7mP3N%4MzB2i@usrTaI|F%97_&b~<`S+Tvf`2VGCI_NaZmKOWe4owaf`KX; zp0wAbCr{F|M{%4viE~;+xA;Fuo`ph(%27ER?Fqx;7~s^Sp|o-DScBuC5j6>_fE^`d zC>u1FHB3alc!UZ{2lW7vfQ}GXvYk*aVAk5ZX7$_i7}~Xobnxt^v^Fcw3663#;O6m(nr|Q zaD;Q&kP9O*ym~HlGY^lG|8|FY3UZ99icDcqz828|8(@sYXwErG=~$dgaGy@f;c(&l z5?VKZ5GS@5P`x$REhA&Ae0TO}(Rk8f=K)Li@qhd7DUvo~wx?aC*}qtlTOwcao=7H9 zX^bOd>`qag389pinH3_5vIVYA8peQ(%SX^#DZGHPFO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C!bA*op+rW8IH7xv6Bf!`0q`f#?)!%_qM?d++7L3?CDZMY1QI=1xN_)=pgE-;&DwC1kR6d!ieuE zur{=PGuik4*jTuZjL~+KzfBYne6ATLMhIKqnJ2DkqpvAa_>(hD7J0$pO(BmDiQzNn zPAoPo=6H`h;az+0nE$AYonC`CYdI%y4R^h3-#yI&^6OhV7XbkIQIb=at(LY7|9|bv Ba=8Ei literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/fonts/unified.eot b/build/assets/plotly-toolpanel/fonts/unified.eot new file mode 100644 index 0000000000000000000000000000000000000000..483e83828b24d4044b53d95404ac8efc6be4b10a GIT binary patch literal 34696 zcmeFa378yLeJ@(4_O18s>SeaxYZlGcJ>9L*+SX=CmXKs?#_~QRX|zitk4BO$3~mSP z*w_SPW8q+y2?WBm3^4>S*CAm7gn%#3Or`@Z)0hwcyr75Sa|#eu2Gz2@a- z{|sR-;#WNY54p;IiTt8?&mTBCdy6lnz76k>?-wete%z%ObG zuGSlWF1WoAey`(x0zZ_{y82sBio6NGW%Qv|;}U6X|6SMEMX44_pc*bTL}`T=Q0C1- zL9p?xwfsITd_wprd*HR&jPXV89;R#IHV|b%0fnQ-U9ZmKLo@OCkFT&%PZ}d(% z)ZjXX5eea)uEVX-iSf6XkQZWtg*Yxxfq6=ERcQA{m)(UoYD2pqvqO05_;_9X=JTsC zuj$I17g{bpOVEGw@U07%32TJ4!a8BSutB(7*of9{7OoJs2wR0W2vyW;sW6IuUoNZ= zRtl?x)xtJmyRZXG_bTBwVW-d`bP8QUTF3}lA%|KPgre}9sAad%BlHS=!V;k$OL!2A zcvvV2Wno092xG#HSm;*^yM${{Zy7U96*Sb?5KOeu#+vpE0gOio{SpzPXt{&FN?`V- zgf_JCTH!k3df^7)CiLl~uv^#za54qJvR^m=z;OtDcSJaf-kcVWW2^|A%mT=q5>5-Z z2)7Dngf|Iq6y7Y{E;NKYgx?U}f*E(GaF=kmaF6gd;a=fB;qAh23GWc@7v3p6AiP&N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zkZvg87;nmnQ~Ql02T#oMEaW58s3SG`$gM}F_fK2Lre}Gf{RfW+7TrgALUZwb#s?>s z*&g1|6YBInxTmaE`%w2|>hY=R4~PtH!C*fV)#$~-eYeYF4R!DA;+7~FaM$jKAZ z@yTNvy`dC!_Q2H9sT2C-vB@L1o;XMjRCjWAN}jxB>V&*!`uMG0MW!&wGyS_KXHJB8 zMNZ64?m<8GqwqSxYxpc2WRCIlcyHiJK0Ki zA-mGveo87+N69p_GL4pc@aXaBnOSvaY7eG^J~MUd;ECyDCzKPIeN!?jHKU(6d2n{m zNf1CT}%n zCyyNN$Go5Q?Vm#T^`DrUoy8Qj_RR2kyk~M|uZ7#xZ2!!`{Rd`Sc^;YCH*0y>b8id` z6?O8sOj+rBruX+#c0R0vsTmAjKh0Z(Ds{qIEU|xBg%2W_R7KvbVf6%(?K$wjinx}X zhG8HIqO{GYRIE6K7lk#4aUIiGb?jn0qHqgNfW(rsAhF>JoCDsBU6MsSGjWpfoA<_9 z1?zxJW52@5ylA11U`5vykEYi-DN3Z66kX=%cvwWUbAC(&%h*+51}ze$c?#O8{u0%O z19~fCx#ZLuSUub$HrL8qE4Mz#1Y+?;J#4`!G9fy*&(?zvdqGGwfr%+7q0FI!(QOGb zMy<5SNf0xzMS{P$;UNFw><#A`dlch6_w)Y!i=6M*kDt@{ E2WGIz(*OVf literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/fonts/unified.svg b/build/assets/plotly-toolpanel/fonts/unified.svg new file mode 100644 index 00000000..784b6804 --- /dev/null +++ b/build/assets/plotly-toolpanel/fonts/unified.svg @@ -0,0 +1,167 @@ + + + +Generated by Fontastic.me + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/assets/plotly-toolpanel/fonts/unified.ttf b/build/assets/plotly-toolpanel/fonts/unified.ttf new file mode 100644 index 0000000000000000000000000000000000000000..ae1142fe14b4ca30d082058bf07d3e3b55e62453 GIT binary patch literal 34532 zcmeFa378yLeJ@(4_O17>>SeaxYZlGcJ>9KcZEcoh2}!nQyxTL9M!Ph!G?Hv#a64cJ zunES-!oe&P5(w8ai6MZw4ha(=1h_btYp|aaJ6t6YLTs=J1VVVwzQ6yeo{{XpO}^y5 z?|U!btM0Bkb@uhYpVI;p1R)?a1xeVkapSISrzU^;9znSKOYrTyeEo)v!jpoE_mAK` zv;C^!^7hYceUl)tYw$j?=jhb&2mblCgdm7N#qZwzQzwtV@(OYi?w&)qzW>N=`@Z_v zZ{H~hD)Kx1^8?dUd(F$w{TafZ$FFt(9&(NS0{O-9UN~@c_SQgJeH-2%!*A1(nLSg& zTfY4XK~Ua|_q9i-ZapsiTzVYtrHG$7Hg$CR%KqQ|Ye9I!7vT4%<1;5`J7at97KA%C z34(UDKyAZs>sQ|T=*^*(KNc(z9)j?VcRupB3(r?jx@d5JUGRf>8txntg;##@%1=du z=fu;tZ!-6plRhD&xerBW+^^A&!9;=GCn$o>wz7TjyS)AUv5*qb8c|S;c1)xUFFFNb z$G#1Fg@%y5u$o1UnMkK;h3&P>{=s5h{5ekAMScv2C6qu(pSA|Z0 zblKf_qc(I3GCPE)j*s8PZ@jP?^O~;g1)=TYvjqJ&58sAxnXpz^C#)AX2pfgVg-vMf z7U2qEtFTRYolrx)mI}+z?<<6r!YX04utwM}>=1SeR|;1Nw+p+3E}>iK5i&wn$O(DW zvM7{x_g+8HQ7!Z~SgTjz7EQ|=FLRqK?V?tFJ7j6yhTe}Xh=<-dQw_LGx+v{rerOTGDSh;HTn(aGwUU}8+ySlo2 zGTB_dP%Qnr*W1@Wuw-y(cx1F(8LN)pG;#Gc*GjUYYPw-sb|4rEN20N~<0g`+bVuiP z*WYksyP*FUJi0Mgu0#KQMYtgRBa_(y_Fi^Dw8gS`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^TNC>dZd4r>%DTQ1@f%@#&f4 zsMGNSGsmWN%6|~G32{ed@8HQ(C#ZGy!aFKB9h#k)IWl|j_~4$IqsOOCOa~U;cTb%> zxW||}H9K>1&(x7=^X$yb(ZQn!kDWScaOd$Or%p=8r;cg#hEmko1Jg&RPwG?0rjFcp z@*p`--Kp7WdFs~blk%RK zm@4VJ4xsz|2nVL8W{*xC_glE{;H-Rd>hwZ;r`qW*W>?-jNJ(YtD4B*fr32sgu*v?9_gFc6#b)5Cea7_pzyi z{!CD2PfVRWpv|5+NYzzO9iw42c<0kxuuh=?Q+o$7k)~DOtzhy_&nSE@YA2>=PGDxr z6mCu(!(02=?_FC;Xif;Oq zqKdSgr;ckU5AHuU^S_EXo1BJWAPR#Bh5SI(6{ql`u;wt1V~7r_P)2O|r@oS(c?MK?dI>O7l#1GW|KKjR1HX=cVM_8pJ)) zBeok8yw`0Y9RZf?v||gRcnZ@^Lz+DV8Wby4lYpssL5ZQAvrSHlMveAZlVUP(%PB}Y zN?wjxvvbj6W*oxOmlA^_oo0Hp`&x2yB)79i8z#IjGalO}HLLk)LG4y)DA*q$mWH)d zg7&N#_7&SK%MKU!cU=ih zQlgG-w1ADAomWhxx-H!VhoJS1Md-b`F{n6riOvAf;~d03syTSqm1xlTCp74))ezQ^ s@s^*Ur@#1UxxAt98wtMRhK=L1lQ;Yp5^+wRxu5s%UmSeDe*7H9KjIU&O#lD@ literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/fonts/unified.woff b/build/assets/plotly-toolpanel/fonts/unified.woff new file mode 100644 index 0000000000000000000000000000000000000000..27c18ad4806ad35cb4e74007102206da88e4665d GIT binary patch literal 22204 zcmV)oK%BpKPew*hR8&s@09L#J3jhEB0E2V@0RR91000000000000000000000000( zMn)h2009U908z^T0DMPjrE>^IMpR7z08-Qd000^Q0010yVECFxL`6mb08;P(0015U z001BW%K!vVQ!g?A08{C$=N=3w1auw3lV~8c5M!!w63ByrR8Rs5h!PCM zvMk%Onl&1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y^Z)B=6O?y|8#_p{*xn1WR8RdhG>gA^h?8nWpPeVPovYPPjP+JXB_J4iDw5{ zzAV>>H)C=3g(FI{aww}|QG1w`S=6Xo$XAIPWk#bkdO&uS7}YS1&a-kD)Qcs5bVvJ12a-p6Q+CK!}hRREZ!?D6?4 zzF8WjSC4Q>%gf8L$<)>GXv(P_(5yoC!hOgOUS9;TELNT3=wgl#<`8*-0jI`M%Q#ZK z|Hmi*Eu+Rm4N5ALc98$};n$QGqHZqsDHl8Bd=JY&R>RzeL~eK?`@QU;3FHj5$SUCu zdg$3RDzcDN!XCs52cpzuAq_I797y|T>)-JwAr5jzTn544-4F{BQ&?6KmYu^~8V0hs z0smr;4!|6R&n^DS-m8QEv>SPB*^nYJHAgf{OA#sh96fI2CWce6Q1vY*VQY%f7K^>NV zbqy_hIuXPx$!CN#S&gwjx(8Faz=5C5na~%(Qk(RswLng4IQ4MmF_E!<(0!^ zk?thTjdUkA;tcm-z+s0|jxS*U<=lfU;rEEzgQ1y%4*pE Y0dM9SuaVfLuK)l507*qoM6N<$f?OS1S^xk5 literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100755 index 0000000000000000000000000000000000000000..954e22dbd99e8c6dd7091335599abf2d10bf8003 GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEr#)R9Ln2z=UU%d=WFXS=@V?HT z#xG*`>Yvsgk=}99w^d^D^d*@m74oMo<%#FcopJf?u00-~YVKV2wzrI*_R6;UORMea zBFVSEnN~eiVA6V&z`E)YLz5Aok^D)In}Yn=OzDpgR5Wv0XfT8pOkmV{sKAJ-PO9#T zZK}IXj&Q-V!U)!LcB_3K0&C*{ literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_diagonals-thick_20_666666_40x40.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100755 index 0000000000000000000000000000000000000000..64ece5707d91a6edf9fad4bfcce0c4dbcafcf58d GIT binary patch literal 251 zcmVbvPcjKS|RKP(6sDcCAB(_QB%0978a<$Ah$!b|E zwn;|HO0i8cQj@~)s!ajF0S002ovPDHLkV1oEp BYH0uf literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100755 index 0000000000000000000000000000000000000000..5b5dab2ab7b1c50dea9cfe73dc5a269a92d2d4b4 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FscKIb$B>N1x91EQ4=4yQ7#`R^ z$vje}bP0l+XkK DSH>_4 literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_0_ffffff_40x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_0_ffffff_40x100.png new file mode 100755 index 0000000000000000000000000000000000000000..ac8b229af950c29356abf64a6c4aa894575445f0 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQYz+E8 zPo9&<{J;c_6SHRil>2s{Zw^OT)6@jj2u|u!(plXsM>LJD`vD!n;OXk;vd$@?2>^GI BH@yG= literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_100_000000_40x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_100_000000_40x100.png new file mode 100755 index 0000000000000000000000000000000000000000..abdc01082bf3534eafecc5819d28c9574d44ea89 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQY-ImG zFPf9b{J;c_6SHRK%WcbN_hZpM=(Ry;4Rxv2@@2Y=$K57eF$X$=!PC{xWt~$(69B)$ BI)4BF literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_10_000000_40x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_10_000000_40x100.png new file mode 100755 index 0000000000000000000000000000000000000000..abdc01082bf3534eafecc5819d28c9574d44ea89 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQY-ImG zFPf9b{J;c_6SHRK%WcbN_hZpM=(Ry;4Rxv2@@2Y=$K57eF$X$=!PC{xWt~$(69B)$ BI)4BF literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_75_ffffff_40x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100755 index 0000000000000000000000000000000000000000..ac8b229af950c29356abf64a6c4aa894575445f0 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQYz+E8 zPo9&<{J;c_6SHRil>2s{Zw^OT)6@jj2u|u!(plXsM>LJD`vD!n;OXk;vd$@?2>^GI BH@yG= literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_100_f6f6f6_1x400.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100755 index 0000000000000000000000000000000000000000..9b383f4d2eab09c0f2a739d6b232c32934bc620b GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnour1U*q978O6-yYw{%b*}|_(02F z@qbE9)0CJMo;*v*PWv`Vh2h6EmG8IS-Cm{3U~` zFlmZ}YMcJY=eo?o%*@I?2`NblNeMudl#t?z UEim$g7SJdLPgg&ebxsLQ09~*s;{X5v literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_65_ffffff_1x400.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100755 index 0000000000000000000000000000000000000000..42ccba269b6e91bef12ad0fa18be651b5ef0ee68 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnouqzpV=978O6-=0?FV^9z|eBtf= z|7WztIJ;WT>{+tN>ySr~=F{k$>;_x^_y?afmf9pRKH0)6?eSP?3s5hEr>mdKI;Vst E0O;M1& literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_75_dadada_1x400.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_glass_75_dadada_1x400.png new file mode 100755 index 0000000000000000000000000000000000000000..5a46b47cb16631068aee9e0bd61269fc4e95e5cd GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnouq|7{B978O6lPf+wIa#m9#>Unb zm^4K~wN3Zq+uP{vDV26o)#~38k_!`W=^oo1w6ixmPC4R1b Tyd6G3lNdZ*{an^LB{Ts5`idse literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100755 index 0000000000000000000000000000000000000000..39d5824d6af5456f1e89fc7847ea3599ea5fd815 GIT binary patch literal 3762 zcmb_eYgiKKwx-=Q?Pdi0+w!yaC|_1uvA>yaxz|iX3eBv#HR0ASmSVIKMS&kf`CSAV4g0DJLgPkRO79xj%J<(hH6`bTGj zrr^$JeiHJI?;s&<5pRw-^kj}=E;X0OX+pgz+f5GVt0NQv_gbu0>-8J+F$O>HpW?Lx z+YFO`CV&6VV9fsEwG#js0_-|v*!ujZ*M=jfo457?0Do-z<^}+8bI+qk+W~+$zz%Z& z;L7&@&ns`l8Ofh*WdU0pO%RP^?Xa_h7I}7K#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R9emzpxwsRXmj zfc}pI#oRCB7Y1;t=*58Gsv7x3PGuW^spn6V&dWf#?*TQ0(|*rr=EeE1o~y1wyQi%)e*oX6iX@$m0F1RtKUT0vgg!8^fWhYLqS zF@EOpFld7>f^kprb~YwMq=^<e|gw?QFyf8ck|ZC^>)3c`b$^C>jCB4Fne_1e$Cqt=4Ud#K~~8Nfa91W zwk17&D?X?4FRzR+5qCiIqPf0};K4$tW$}l~A?u_E=JSe;*f_DO>r{z=U4_<)dY)M! z7O#mizC+GN&#;)k)vkBUS@fZesb{v?YuFlCPRjsT5bxB4@+sqdq}xvvBhTngZ(N1LUCS-ei=5sgE-Tbc z7HK+A_O23MP@sUoc?I?*ZB|F)&%us|2O$#G7V$6z zq>G%6!cu7OEf+_#^A=23Hd6Db9-yK*NQ#S+kjJI7 zhLiLz{>zKKtHH>H;B-cALzj`>@+-~?X2aP7ypf9WMf8q0m)wS!Nkf+&R&&zEjFOUx zlq^>v#VAq}=)?dKRMe+010g9O;qAiaTA4dV+==mw%i3Re)DwZ$Wd5CK1m4Ivy&&Ef zO8W!SpcgA>zfTGAE!{IPJMhdZ`T4{K#7ndDT8K2&*jf=J8O>H*iDJ}ZK}z|$C3U62 z$nZhk4v$QIYzMaV+0`B8S!=9RSYzi*QG#tp>ZY|lY_`}A-zI7)(tV$B9G-tC#zt8m zre~pD7oIFkmIAM=s zw+Iili%nSC?yks)t~q4lTlZW(#5^yUV@+^KvIuQzZDO^*TBz!j#nX%*uiW|{x9q0w literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100755 index 0000000000000000000000000000000000000000..f1273672d253263b7564e9e21d69d7d9d0b337d9 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l%l7LV~E7mxPQ=F85a&M@g_{ d|GeK{$Y5lo%PMu^>wln`44$rjF6*2UngE4^EGqy2 literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_75_ffffff_1x100.png b/build/assets/plotly-toolpanel/static/css/images/ui-bg_highlight-soft_75_ffffff_1x100.png new file mode 100755 index 0000000000000000000000000000000000000000..cb5a7944bb9bb96b80f193cc75e58e63486eb6ca GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l!2#x&(>I(bnPsF%Uh)z4*}Q$iB} DU4S{Ou}E*`%9 zKPdOkfrN+ZlHSt7(uY{3{#;wiJb&Ugx1>W4qtrSDm(4hFaaY-$3p3x|sIU3`%J?Qj YcLn#R=pC)AfTl5cy85}Sb4q9e0MP_2(*OVf literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-icons_222222_256x240.png b/build/assets/plotly-toolpanel/static/css/images/ui-icons_222222_256x240.png new file mode 100755 index 0000000000000000000000000000000000000000..b273ff111d219c9b9a8b96d57683d0075fb7871a GIT binary patch literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~GmPmYTG^FX}c% zlGE{DS1Q;~I7-6ze&TN@+F-xsI6sd%SwK#*O5K|pDRZqEy< zJg0Nd8F@!OxqElm`~U#piM22@u@8B<moyKE%ct`B(jysxK+1m?G)UyIFs1t0}L zemGR&?jGaM1YQblj?v&@0iXS#fi-VbR9zLEnHLP?xQ|=%Ihrc7^yPWR!tW$yH!zrw z#I2}_!JnT^(qk)VgJr`NGdPtT^dmQIZc%=6nTAyJDXk+^3}wUOilJuwq>s=T_!9V) zr1)DT6VQ2~rgd@!Jlrte3}}m~j}juCS`J4(d-5+e-3@EzzTJNCE2z)w(kJ90z*QE) zBtnV@4mM>jTrZZ*$01SnGov0&=A-JrX5Ge%Pce1Vj}=5YQqBD^W@n4KmFxxpFK`uH zP;(xKV+6VJ2|g+?_Lct7`uEl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rd9>-<_ANs0n3?-Ic*6&ytb@H~?0E(*d>T5n z-HiH2jsDf6uWhID%#n>SzOqrFCPDfUcu5QPd?<(=w6pv1BE#nsxS{n!UnC9qAha1< z;3cpZ9A-e$+Y)%b;w@!!YRA9p%Kf9IHGGg^{+p`mh;q8i7}&e@V3EQaMsItEMS&=X plT@$;k0WcB_jb;cn%_Idz4HO$QU*abf4}+wi?e96N>fbq{{i|W0@(ln literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-icons_228ef1_256x240.png b/build/assets/plotly-toolpanel/static/css/images/ui-icons_228ef1_256x240.png new file mode 100755 index 0000000000000000000000000000000000000000..a641a371afa0fbb08ba599dc7ddf14b9bfc3c84f GIT binary patch literal 4369 zcmd^?`8O2)_s3^phOrG}UnfiUEn8(9QW1?MNkxXVDEpFin2{xWrLx5kBC;k~Gmw z<@?HsG!Qg3zaV+-xQ3ldtad!U<6iGz_enGH*2akP_r)o1D&8p^5M)_c8IIj6Wy*7HJo&CBLuo~nj>(63pZzO(Vv^ZuB3 zMYigjkwA;FEy|G}1jpiMj6|NTm7Uyiw=@FDE*nX<>jR!W@9XIyf%$Fd*J5*D0Z0Lm z9}ZQxyT|x5ftNy?V>EbJz-K>bV9gs9RaXUP<^=;e?&Fqxj;6{ieR-a-@HycA1KMKhql8GOmcxwZ?_-(3hMK^^a*(gaFvBH ziIC!fgH4$W*NbKIaY&T?%&13``KbD@S-0`xQ%v3TV+B!;RC7O!+1a9QCA$H@3tR;k z)SSoR7(s4)f{zM}eWgFN{(ZH5d1O}l)f$ruT!)Q&NImXyZsTzOf9TwctcSfr+M)aJ z5otO+$jvm-P4)ykH)x|cO5xeb>?!`qGw$(>&axqLL6yoB${vsMXgL_-bz@2J_tS92 zdvZG-+vKl@K4Vr(EL{WQt@Z+Ea-hxX0}nTSZxnpi^#Kn8Ox8FgIS|hc}KJQ4tm*HO16ui{(O9} z1YN)GjiQt6fGq`Cj+^`zUf?8hk^(T{{cOQGWFP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h)rzQqLHMX2^IkuK7FB!kI40s$|CY7~ zNX^{_UjN8}L%Med;|+=4RNTMozn8KT;2tb77bUPCmioh+rZBfIiM6f_P34cQ__o1G zWqQp3VL~~pE5?qODf%iiQQ3f42YF@09tQ*$4v_EKUx;t1KCPCBtgqg z@+Tn;O)a0uky_%jm+WjNB?=~VyH>V#L!*=l*@OS6SVyt_UEH&NA=?V2stHPyKkVNy z&jg<#cjros){#ji)dK z%)We0L_478=HZ8-@xnwsKrWs8)x`MB;(Y`Cmu2c-&SH(vN-F(*e`l?c%+l$|y_AJJ zhcDGnwLvN+bu;_sX|1AiePhx@u&%P$hf*xE+O=~D?_(_KGWQ!158YL-y9$*6mmPo;Rp*Dl5lm-mVM2i`h- zM@nxv590_tvMwPD_{l=b$iOm|+|S{D9&P%zeT$GgX6Akl-tfUF>tL@Ld!B&{pN39t zH>3Vhqkr}2Yul+jb7UiouWVGPNsxX7Ueba+9|~dz?d*QM$ng0DZfO0`7fAy?2yMm| zcnRzUhZ&IcwgjH9cuU!w+VStYa{p*)4IgBf|E8)sqMYtB2KH_}SfsFq(c9i(Q6S3U oBo%DI*Kv;w;*%(i9W@e{{5C=l}o! literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-icons_2e83ff_256x240.png b/build/assets/plotly-toolpanel/static/css/images/ui-icons_2e83ff_256x240.png new file mode 100755 index 0000000000000000000000000000000000000000..09d1cdc856c292c4ab6dd818c7543ac0828bd616 GIT binary patch literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcu#tBo!IbqU=l7VaSrbQrTh%5m}S08Obh0 zGL{*mi8RK}U~J#s@6Y%1S9~7lb?$xLU+y{go_o*h`AW1wUF3v{Kmh;%r@5J_9RL9Q zdj+hqg8o{9`K7(TZrR4t{=9O`!T-(~c=yEWZ{eswJJe->5bP8)t4;f(Y*i_HU*sLM z2=7-8guZ}@*(HhVC)Mqgr$3T8?#a(hu& z?Kzuw!O%PM>AicSW`_U(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^pm-ZS#^5dkG{u zzv;l&B$NYcegSqAnjnPN1?17VUQbPummcWry((85IFB(pFQNGN{hhN$Fv?~l_fr?| z9=%dK(+;kZ(8=mwptjwC-ikBD$Z{l2++~*8wq5ynF<+PNlZI7ba5V#fg~L}kE;UH5 zJ;{P(`G{tNl&z5rUiH~e{I>GT8~9&*(J;Myx9z5P!db!F8RTII^I7c)HU=ss*bYB` zgwiIMZ_q>KEC$4lFm+Afvu6^$X1jm1rB*4H)-EIO5Rvz_p24?OkJ zovD4{-1KA6*oL?a;3qR7GZRB!cE5oAdA#M@{w+fGgsJ-lSmQ^-?8E&Q%tbmjd=@gZ z(}Mg*jsDf6Z)|7s%@9pc-tuw5W&zqUXjv2bVkC%-X?O3F72W4EsIl#1e>Mdz=X4k*_>VxCu_2?jjg16N*5fwC-36OW&;Sz}@jMn}hgJdEd pO;bST+>R{W-aENZYk%(=^(_R5N$LmL{Qc?!%+I4tt4z=_{|902Wu5>4 literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-icons_454545_256x240.png b/build/assets/plotly-toolpanel/static/css/images/ui-icons_454545_256x240.png new file mode 100755 index 0000000000000000000000000000000000000000..59bd45b907c4fd965697774ce8c5fc6b2fd9c105 GIT binary patch literal 4369 zcmd^?`8O2)_s3^p#%>toqJ#RmwV2==ic*rz7lOw=eaq=H~;_ux21)-Jpcgw zdj+hrf&W^f<%Qk9Zpqf#;jH;N^Z%VA?R|9mZ{esQd(2F=?y+!`XZ5CR?ue=UdHIfUDFM*m15I;g=VN2jw zQW9?wOhDI#+P0|`@JQoC3!pu=AzGMtYB>V&?8(2>_B5_p`1Sb1t{^|J%bZYv09RS? zQ*dcs7}$)taJ@vX0E<96P{ur)Eygr{&ALyNoMP%_94m}=qFVT)&CeG1DBBMLUSKP^ zp%%Q3$MEtKll)X*+$)3O_3x`4%cHY0uhy7U;5x^Ir}X1)mv&B%|A)@A$a>f}tP{5X z9-gkti`YyT+hk9)cZW7fAQhjT%$X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CldDJYE$m(qYv3q7>}1R7?iZW7>$~*%zKaC| z=$N?ME$>#+%T&MZC`dW1wUl6Z)JgyCn~V%K&i0H|iwE%$>xsZW3tTfZxIUePci@p;cRu|d=ItIwF z1clVHy{hH?@SD|(Zfqi^0DQ1hczHN7xq85h)rzQqLHMX2^IkuK7FB!kI40s$|CY7~ zNX^{_UjN8}L%Med;|+=4RNTMozn8KT;2tb77bUPCmioh+rZBfIiM6f_P34cQ__o1G zWqQp3VL~~pE5?qODf%iiQQ3f42YF@09tQ*$4v_EKUx;t1KCPCBtgqg z@+Tn;O)a0uky_%jm+WjNB?=~VyH>V#L!*=l*@OS6SVyt_UEH&NA=?V2stHPyKkVNy z&jg<#cjros){#ji)dK z%)We0L_478=HZ8-@xnwsKrWs8)x`MB;(Y`Cmu2c-&SH(vN-F(*e`l?c%+l$|y_AJJ zhcDGnwLvN+bu;_sX|1AiePhx@u&%P$hf*xE+O=~D?_(_KGWQ!158YL-y9$*6mmPo;Rp*Dl5lm-mVM2i`h- zM@nxv590_tvMwPD_{l=b$iOm|+|S{D9&P%zeT$GgX6Akl-tfUF>tL@Ld!B&{pN39t zH>3Vhqkr}2Yul+jb7UiouWVGPNsxX7Ueba+9|~dz?d*QM$ng0DZfO0`7fAy?2yMm| zcnRzUhZ&IcwgjH9cuU!w+VStYa{p*)4IgBf|E8)sqMYtB2KH_}SfsFq(c9i(Q6S3U oBo%DI*Kv;w;*%(i9W@f3_WCF#rGn literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-icons_cd0a0a_256x240.png b/build/assets/plotly-toolpanel/static/css/images/ui-icons_cd0a0a_256x240.png new file mode 100755 index 0000000000000000000000000000000000000000..2ab019b73ec11a485fa09378f3a0e155194f6a5d GIT binary patch literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcwz5Nh&gy7G+@45H9p05OJ)J0CH2owMSaGIN$+5!N; z<11j56?ANg=9hMl-IBGX-T8hf$N$b*H?$f4X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wa$C0(mdpqYz&F>xK-uVD=DT5%Jzh8ZT#aXmjr70%*{{RacS`YvL literal 0 HcmV?d00001 diff --git a/build/assets/plotly-toolpanel/static/css/images/ui-icons_ffd27a_256x240.png b/build/assets/plotly-toolpanel/static/css/images/ui-icons_ffd27a_256x240.png new file mode 100755 index 0000000000000000000000000000000000000000..e117effa3dca24e7978cfc5f8b967f661e81044f GIT binary patch literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcwz5Nh&g=McJ3E!;CE1E0ryV5Ro;>nvtvt zk&I==Xd;cVGZ@>q_xtnx{1u%7-D)N|5YqOB>i;(bZ#o62{J2Y9&^D3~R^$o+X? zwbxAEIb)xwCwK3TSR4QVym6N1rVgPmmt0caryBUceHP_&u}{?^Jn7f0PT$#h>UDqI zr!q(F&1jJ2_!jxdAB<)7H$foI*2zuncvu;;$SoU7br=AiJ@4=BC4vNO>DS`&UIB=K z;2)0F*t^FBvVfPuT4FVMSwUw%Xksjyl+;#*DDy%=ocFOyzDLvLR(`zCSOuJ=?FWYn z5ZD!UaoF>-$@=Vt?a&;UQYM$Oqe0ZB?Je?8ZnMxDe&uzzs*zlHd)V58nfJPc8S^({_4bj5HQ_B&EXHWj6wx@B;!mr04b_Mx)UFL)W7`V!c zpMp#C!a!!sh3h491y}^qfimXVY%!+sYu0_DWoJMqpN(FR9LM#jdZ{vJzEck`P^9(1N=4J za9%u4$2J8TAkUaJk_FX%iHuv#svL_mMmp{SR}ifc#ZcXv%CFsT?*>N^6r(%D?1YnU zAaT?UZGlOna6UXXs0m)3YDp}d%hb@)@Y!lK_A&D6{OPlNnj zYY*$b>vnRzL8=CDbQSi!DL3D!P^xhNtwrYByo?h-&OvQZYJ6ka{Re# zSc0ry_d(K$_Q2M{Y^O~DOK(szDOnMi_*h_Rx%eSRxA%n|FuC&=F=)B z_Qsgmj8g!GA+LZOX)gOW}vbo9|l8QW3iYw9qCD{o~xt^HIU>;dV5MJgc0#uHTA z80%Ee_r;G`GUjss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bm!g%dDvlCf(St$kVofvH90|9yl-gmvRvcKS&Ye9DdoTK@2m}iSvC{3m%4E0 z@TJD7c1V?!URM7+t?f3)%{X(6JXg~A9TvGQyX6n(^Yt0NX;>vDPcr~mICPooLWA_` z<1A>FuXr|C)dtDr*PQt%Xs5WePWUB&gBj$zZ#BIY%?jDdpbSA-PV0`dGf^oa_Jp}Z zlrGV7oe`#B^+nPIQ`ZDJeJas=ru#=*YL#+n?Go}f33>1GsZ{TTy2bdBihj}mz*mp! zOzn%{WgLM=*CpiuKUs*GnHa{B$2siJqfNi|Z;|rH%stM*8b26kAMCYY&NHwPGtlYn z7UVx_^sgR$Z8x27foS63FCPt|gtcG_ zy#@C|!VQV~TY}G5e57qp?F4jRxqq~@h6^?-cvD>ySwVLl2m7=gERtEn>Fw_@ND%pO oiVC*mbz<%I+0K1Z`+LWvZ$3~$+A!Gm?^hpSc@||}WrmLVKLvuzv;Y7A literal 0 HcmV?d00001 diff --git a/build/index.html b/build/index.html index 31547718..188a8705 100644 --- a/build/index.html +++ b/build/index.html @@ -1,3 +1,3 @@ -Tabix.io

\ No newline at end of file +
\ No newline at end of file diff --git a/build/scripts/app.js b/build/scripts/app.js index d6877f7e..6e1da8a7 100644 --- a/build/scripts/app.js +++ b/build/scripts/app.js @@ -11,7 +11,7 @@ * * Date: 2017-03-20T18:59Z */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function i(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"===n||me.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return me.isFunction(t)?me.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return se.call(t,e)>-1!==n}):Ee.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return me.each(e.match(Re)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&me.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&me.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),me.ready()}function h(){this.expando=me.expando+h.uid++}function f(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:Pe.test(e)?JSON.parse(e):e}function p(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Be,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n=f(n)}catch(r){}Ne.set(e,t,n)}else n=void 0;return n}function m(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return me.css(e,t,"")},l=s(),c=n&&n[3]||(me.cssNumber[t]?"":"px"),u=(me.cssNumber[t]||"px"!==c&&+l)&&ze.exec(me.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do o=o||".5",u/=o,me.style(e,t,u+c);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function g(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ve[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ve[i]=r,r)}function _(e,t){for(var n,i,r=[],o=0,a=e.length;a>o;o++)i=e[o],i.style&&(n=i.style.display,t?("none"===n&&(r[o]=Fe.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&je(i)&&(r[o]=g(i))):"none"!==n&&(r[o]="none",Fe.set(i,"display",n)));for(o=0;a>o;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&r(e,t)?me.merge([e],n):n}function y(e,t){for(var n=0,i=e.length;i>n;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function b(e,t,n,i,r){for(var o,a,s,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;p>f;f++)if(o=e[f],o||0===o)if("object"===me.type(o))me.merge(h,o.nodeType?[o]:o);else if(Xe.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(Ge.exec(o)||["",""])[1].toLowerCase(),l=Ke[s]||Ke._default,a.innerHTML=l[1]+me.htmlPrefilter(o)+l[2],u=l[0];u--;)a=a.lastChild;me.merge(h,a.childNodes),a=d.firstChild,a.textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&me.inArray(o,i)>-1)r&&r.push(o);else if(c=me.contains(o.ownerDocument,o),a=v(d.appendChild(o),"script"),c&&y(a),n)for(u=0;o=a[u++];)Ye.test(o.type||"")&&n.push(o);return d}function w(){return!0}function x(){return!1}function C(){try{return ne.activeElement}catch(e){}}function k(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)k(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=x;else if(!r)return e;return 1===o&&(a=r,r=function(e){return me().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=me.guid++)),e.each(function(){me.event.add(this,t,r,i,n)})}function E(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?me(">tbody",e)[0]||e:e}function A(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function S(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function T(e,t){var n,i,r,o,a,s,l,c;if(1===t.nodeType){if(Fe.hasData(e)&&(o=Fe.access(e),a=Fe.set(t,o),c=o.events)){delete a.handle,a.events={};for(r in c)for(n=0,i=c[r].length;i>n;n++)me.event.add(t,r,c[r][n])}Ne.hasData(e)&&(s=Ne.access(e),l=me.extend({},s),Ne.set(t,l))}}function M(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function D(e,t,i,r){t=oe.apply([],t);var o,a,s,l,c,u,d=0,h=e.length,f=h-1,p=t[0],m=me.isFunction(p);if(m||h>1&&"string"==typeof p&&!fe.checkClone&&it.test(p))return e.each(function(n){var o=e.eq(n);m&&(t[0]=p.call(this,n,o.html())),D(o,t,i,r)});if(h&&(o=b(t,e[0].ownerDocument,!1,e,r),a=o.firstChild,1===o.childNodes.length&&(o=a),a||r)){for(s=me.map(v(o,"script"),A),l=s.length;h>d;d++)c=o,d!==f&&(c=me.clone(c,!0,!0),l&&me.merge(s,v(c,"script"))),i.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,me.map(s,S),d=0;l>d;d++)c=s[d],Ye.test(c.type||"")&&!Fe.access(c,"globalEval")&&me.contains(u,c)&&(c.src?me._evalUrl&&me._evalUrl(c.src):n(c.textContent.replace(ot,""),u))}return e}function R(e,t,n){for(var i,r=t?me.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||me.cleanData(v(i)),i.parentNode&&(n&&me.contains(i.ownerDocument,i)&&y(v(i,"script")),i.parentNode.removeChild(i));return e}function $(e,t,n){var i,r,o,a,s=e.style;return n=n||lt(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||me.contains(e.ownerDocument,e)||(a=me.style(e,t)),!fe.pixelMarginRight()&&st.test(a)&&at.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function O(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function I(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ft.length;n--;)if(e=ft[n]+t,e in pt)return e}function L(e){var t=me.cssProps[e];return t||(t=me.cssProps[e]=I(e)||e),t}function F(e,t,n){var i=ze.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function N(e,t,n,i,r){var o,a=0;for(o=n===(i?"border":"content")?4:"width"===t?1:0;4>o;o+=2)"margin"===n&&(a+=me.css(e,n+qe[o],!0,r)),i?("content"===n&&(a-=me.css(e,"padding"+qe[o],!0,r)),"margin"!==n&&(a-=me.css(e,"border"+qe[o]+"Width",!0,r))):(a+=me.css(e,"padding"+qe[o],!0,r),"padding"!==n&&(a+=me.css(e,"border"+qe[o]+"Width",!0,r)));return a}function P(e,t,n){var i,r=lt(e),o=$(e,t,r),a="border-box"===me.css(e,"boxSizing",!1,r);return st.test(o)?o:(i=a&&(fe.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),o=parseFloat(o)||0,o+N(e,t,n||(a?"border":"content"),i,r)+"px")}function B(e,t,n,i,r){return new B.prototype.init(e,t,n,i,r)}function H(){gt&&(ne.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(H):e.setTimeout(H,me.fx.interval),me.fx.tick())}function z(){return e.setTimeout(function(){mt=void 0}),mt=me.now()}function q(e,t){var n,i=0,r={height:e};for(t=t?1:0;4>i;i+=2-t)n=qe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function j(e,t,n){for(var i,r=(U.tweeners[t]||[]).concat(U.tweeners["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function W(e,t,n){var i,r,o,a,s,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&je(e),g=Fe.get(e,"fxshow");n.queue||(a=me._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,me.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(r=t[i],_t.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||me.style(e,i)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(f)){d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],c=g&&g.display,null==c&&(c=Fe.get(e,"display")),u=me.css(e,"display"),"none"===u&&(c?u=c:(_([e],!0),c=e.style.display||c,u=me.css(e,"display"),_([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===me.css(e,"float")&&(l||(h.done(function(){p.display=c}),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in f)l||(g?"hidden"in g&&(m=g.hidden):g=Fe.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&_([e],!0),h.done(function(){m||_([e]),Fe.remove(e,"fxshow");for(i in f)me.style(e,i,f[i])})),l=j(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}}function V(e,t){var n,i,r,o,a;for(n in e)if(i=me.camelCase(n),r=t[i],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=me.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function U(e,t,n){var i,r,o=0,a=U.prefilters.length,s=me.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=mt||z(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),1>o&&l?n:(l||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:mt||z(),duration:n.duration,tweens:[],createTween:function(t,n){var i=me.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(V(u,c.opts.specialEasing);a>o;o++)if(i=U.prefilters[o].call(c,e,u,c.opts))return me.isFunction(i.stop)&&(me._queueHooks(c.elem,c.opts.queue).stop=me.proxy(i.stop,i)),i;return me.map(u,j,c),me.isFunction(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),me.fx.timer(me.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}function G(e){var t=e.match(Re)||[];return t.join(" ")}function Y(e){return e.getAttribute&&e.getAttribute("class")||""}function K(e,t,n,i){var r;if(Array.isArray(t))me.each(t,function(t,r){n||Tt.test(e)?i(e,r):K(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==me.type(t))i(e,t);else for(r in t)K(e+"["+r+"]",t[r],n,i)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(Re)||[];if(me.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Z(e,t,n,i){function r(s){var l;return o[s]=!0,me.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===Ht;return r(t.dataTypes[0])||!o["*"]&&r("*")}function Q(e,t){var n,i,r=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&me.extend(!0,e,i),e}function J(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function ee(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=c[l+" "+o]||c["* "+o],!a)for(r in c)if(s=r.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[r]:c[r]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var te=[],ne=e.document,ie=Object.getPrototypeOf,re=te.slice,oe=te.concat,ae=te.push,se=te.indexOf,le={},ce=le.toString,ue=le.hasOwnProperty,de=ue.toString,he=de.call(Object),fe={},pe="3.2.1",me=function(e,t){return new me.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_e=/^-ms-/,ve=/-([a-z])/g,ye=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:pe,constructor:me,length:0,toArray:function(){return re.call(this)},get:function(e){return null==e?re.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:te.sort,splice:te.splice},me.extend=me.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||me.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(c&&i&&(me.isPlainObject(i)||(r=Array.isArray(i)))?(r?(r=!1,o=n&&Array.isArray(n)?n:[]):o=n&&me.isPlainObject(n)?n:{},a[t]=me.extend(c,o,i)):void 0!==i&&(a[t]=i));return a},me.extend({expando:"jQuery"+(pe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return e&&"[object Object]"===ce.call(e)?(t=ie(e))?(n=ue.call(t,"constructor")&&t.constructor,"function"==typeof n&&de.call(n)===he):!0:!1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(_e,"ms-").replace(ve,ye)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;n>r&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?me.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;r>a;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e)?(i=re.call(arguments,2),r=function(){return e.apply(t||this,i.concat(re.call(arguments)))},r.guid=e.guid=e.guid||me.guid++,r):void 0},now:Date.now,support:fe}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=te[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var be=/*! +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function i(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"===n||me.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return me.isFunction(t)?me.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return se.call(t,e)>-1!==n}):Ee.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return me.each(e.match(Re)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&me.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&me.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),me.ready()}function h(){this.expando=me.expando+h.uid++}function f(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:Ne.test(e)?JSON.parse(e):e}function p(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Be,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n=f(n)}catch(r){}Pe.set(e,t,n)}else n=void 0;return n}function m(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return me.css(e,t,"")},l=s(),c=n&&n[3]||(me.cssNumber[t]?"":"px"),u=(me.cssNumber[t]||"px"!==c&&+l)&&ze.exec(me.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do o=o||".5",u/=o,me.style(e,t,u+c);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function g(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ve[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ve[i]=r,r)}function _(e,t){for(var n,i,r=[],o=0,a=e.length;a>o;o++)i=e[o],i.style&&(n=i.style.display,t?("none"===n&&(r[o]=Fe.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&je(i)&&(r[o]=g(i))):"none"!==n&&(r[o]="none",Fe.set(i,"display",n)));for(o=0;a>o;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&r(e,t)?me.merge([e],n):n}function y(e,t){for(var n=0,i=e.length;i>n;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function b(e,t,n,i,r){for(var o,a,s,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;p>f;f++)if(o=e[f],o||0===o)if("object"===me.type(o))me.merge(h,o.nodeType?[o]:o);else if(Xe.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(Ge.exec(o)||["",""])[1].toLowerCase(),l=Ke[s]||Ke._default,a.innerHTML=l[1]+me.htmlPrefilter(o)+l[2],u=l[0];u--;)a=a.lastChild;me.merge(h,a.childNodes),a=d.firstChild,a.textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&me.inArray(o,i)>-1)r&&r.push(o);else if(c=me.contains(o.ownerDocument,o),a=v(d.appendChild(o),"script"),c&&y(a),n)for(u=0;o=a[u++];)Ye.test(o.type||"")&&n.push(o);return d}function w(){return!0}function x(){return!1}function C(){try{return ne.activeElement}catch(e){}}function k(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)k(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=x;else if(!r)return e;return 1===o&&(a=r,r=function(e){return me().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=me.guid++)),e.each(function(){me.event.add(this,t,r,i,n)})}function E(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?me(">tbody",e)[0]||e:e}function A(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function S(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function T(e,t){var n,i,r,o,a,s,l,c;if(1===t.nodeType){if(Fe.hasData(e)&&(o=Fe.access(e),a=Fe.set(t,o),c=o.events)){delete a.handle,a.events={};for(r in c)for(n=0,i=c[r].length;i>n;n++)me.event.add(t,r,c[r][n])}Pe.hasData(e)&&(s=Pe.access(e),l=me.extend({},s),Pe.set(t,l))}}function M(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function D(e,t,i,r){t=oe.apply([],t);var o,a,s,l,c,u,d=0,h=e.length,f=h-1,p=t[0],m=me.isFunction(p);if(m||h>1&&"string"==typeof p&&!fe.checkClone&&it.test(p))return e.each(function(n){var o=e.eq(n);m&&(t[0]=p.call(this,n,o.html())),D(o,t,i,r)});if(h&&(o=b(t,e[0].ownerDocument,!1,e,r),a=o.firstChild,1===o.childNodes.length&&(o=a),a||r)){for(s=me.map(v(o,"script"),A),l=s.length;h>d;d++)c=o,d!==f&&(c=me.clone(c,!0,!0),l&&me.merge(s,v(c,"script"))),i.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,me.map(s,S),d=0;l>d;d++)c=s[d],Ye.test(c.type||"")&&!Fe.access(c,"globalEval")&&me.contains(u,c)&&(c.src?me._evalUrl&&me._evalUrl(c.src):n(c.textContent.replace(ot,""),u))}return e}function R(e,t,n){for(var i,r=t?me.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||me.cleanData(v(i)),i.parentNode&&(n&&me.contains(i.ownerDocument,i)&&y(v(i,"script")),i.parentNode.removeChild(i));return e}function O(e,t,n){var i,r,o,a,s=e.style;return n=n||lt(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||me.contains(e.ownerDocument,e)||(a=me.style(e,t)),!fe.pixelMarginRight()&&st.test(a)&&at.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function $(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function I(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ft.length;n--;)if(e=ft[n]+t,e in pt)return e}function L(e){var t=me.cssProps[e];return t||(t=me.cssProps[e]=I(e)||e),t}function F(e,t,n){var i=ze.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function P(e,t,n,i,r){var o,a=0;for(o=n===(i?"border":"content")?4:"width"===t?1:0;4>o;o+=2)"margin"===n&&(a+=me.css(e,n+qe[o],!0,r)),i?("content"===n&&(a-=me.css(e,"padding"+qe[o],!0,r)),"margin"!==n&&(a-=me.css(e,"border"+qe[o]+"Width",!0,r))):(a+=me.css(e,"padding"+qe[o],!0,r),"padding"!==n&&(a+=me.css(e,"border"+qe[o]+"Width",!0,r)));return a}function N(e,t,n){var i,r=lt(e),o=O(e,t,r),a="border-box"===me.css(e,"boxSizing",!1,r);return st.test(o)?o:(i=a&&(fe.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),o=parseFloat(o)||0,o+P(e,t,n||(a?"border":"content"),i,r)+"px")}function B(e,t,n,i,r){return new B.prototype.init(e,t,n,i,r)}function H(){gt&&(ne.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(H):e.setTimeout(H,me.fx.interval),me.fx.tick())}function z(){return e.setTimeout(function(){mt=void 0}),mt=me.now()}function q(e,t){var n,i=0,r={height:e};for(t=t?1:0;4>i;i+=2-t)n=qe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function j(e,t,n){for(var i,r=(U.tweeners[t]||[]).concat(U.tweeners["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function W(e,t,n){var i,r,o,a,s,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&je(e),g=Fe.get(e,"fxshow");n.queue||(a=me._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,me.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(r=t[i],_t.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||me.style(e,i)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(f)){d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],c=g&&g.display,null==c&&(c=Fe.get(e,"display")),u=me.css(e,"display"),"none"===u&&(c?u=c:(_([e],!0),c=e.style.display||c,u=me.css(e,"display"),_([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===me.css(e,"float")&&(l||(h.done(function(){p.display=c}),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in f)l||(g?"hidden"in g&&(m=g.hidden):g=Fe.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&_([e],!0),h.done(function(){m||_([e]),Fe.remove(e,"fxshow");for(i in f)me.style(e,i,f[i])})),l=j(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}}function V(e,t){var n,i,r,o,a;for(n in e)if(i=me.camelCase(n),r=t[i],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=me.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function U(e,t,n){var i,r,o=0,a=U.prefilters.length,s=me.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=mt||z(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),1>o&&l?n:(l||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:mt||z(),duration:n.duration,tweens:[],createTween:function(t,n){var i=me.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(V(u,c.opts.specialEasing);a>o;o++)if(i=U.prefilters[o].call(c,e,u,c.opts))return me.isFunction(i.stop)&&(me._queueHooks(c.elem,c.opts.queue).stop=me.proxy(i.stop,i)),i;return me.map(u,j,c),me.isFunction(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),me.fx.timer(me.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}function G(e){var t=e.match(Re)||[];return t.join(" ")}function Y(e){return e.getAttribute&&e.getAttribute("class")||""}function K(e,t,n,i){var r;if(Array.isArray(t))me.each(t,function(t,r){n||Tt.test(e)?i(e,r):K(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==me.type(t))i(e,t);else for(r in t)K(e+"["+r+"]",t[r],n,i)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(Re)||[];if(me.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Z(e,t,n,i){function r(s){var l;return o[s]=!0,me.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===Ht;return r(t.dataTypes[0])||!o["*"]&&r("*")}function Q(e,t){var n,i,r=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&me.extend(!0,e,i),e}function J(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function ee(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=c[l+" "+o]||c["* "+o],!a)for(r in c)if(s=r.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[r]:c[r]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var te=[],ne=e.document,ie=Object.getPrototypeOf,re=te.slice,oe=te.concat,ae=te.push,se=te.indexOf,le={},ce=le.toString,ue=le.hasOwnProperty,de=ue.toString,he=de.call(Object),fe={},pe="3.2.1",me=function(e,t){return new me.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_e=/^-ms-/,ve=/-([a-z])/g,ye=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:pe,constructor:me,length:0,toArray:function(){return re.call(this)},get:function(e){return null==e?re.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:te.sort,splice:te.splice},me.extend=me.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||me.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(c&&i&&(me.isPlainObject(i)||(r=Array.isArray(i)))?(r?(r=!1,o=n&&Array.isArray(n)?n:[]):o=n&&me.isPlainObject(n)?n:{},a[t]=me.extend(c,o,i)):void 0!==i&&(a[t]=i));return a},me.extend({expando:"jQuery"+(pe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return e&&"[object Object]"===ce.call(e)?(t=ie(e))?(n=ue.call(t,"constructor")&&t.constructor,"function"==typeof n&&de.call(n)===he):!0:!1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(_e,"ms-").replace(ve,ye)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;n>r&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?me.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;r>a;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e)?(i=re.call(arguments,2),r=function(){return e.apply(t||this,i.concat(re.call(arguments)))},r.guid=e.guid=e.guid||me.guid++,r):void 0},now:Date.now,support:fe}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=te[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var be=/*! * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * @@ -21,24 +21,24 @@ * * Date: 2016-08-08 */ -function(e){function t(e,t,n,i){var r,o,a,s,l,c,u,h=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:z)!==O&&$(t),t=t||O,L)){if(11!==p&&(l=_e.exec(e)))if(r=l[1]){if(9===p){if(!(a=t.getElementById(r)))return n;if(a.id===r)return n.push(a),n}else if(h&&(a=h.getElementById(r))&&B(t,a)&&a.id===r)return n.push(a),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&x.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(r)),n}if(x.qsa&&!U[e+" "]&&(!F||!F.test(e))){if(1!==p)h=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(we,xe):t.setAttribute("id",s=H),c=A(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);u=c.join(","),h=ve.test(e)&&d(t.parentNode)||t}if(u)try{return Q.apply(n,h.querySelectorAll(u)),n}catch(m){}finally{s===H&&t.removeAttribute("id")}}}return T(e.replace(se,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[H]=!0,e}function r(e){var t=O.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ke(t)===e:t.disabled===e:"label"in t?t.disabled===e:!1}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function d(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function h(){}function f(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=t.next,o=r||i,a=n&&"parentNode"===o,s=j++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,r);return!1}:function(t,n,l){var c,u,d,h=[q,s];if(l){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||a)if(d=t[H]||(t[H]={}),u=d[t.uniqueID]||(d[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[o])&&c[0]===q&&c[1]===s)return h[2]=c[2];if(u[o]=h,h[2]=e(t,n,l))return!0}return!1}}function m(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function _(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),c&&t.push(s));return a}function v(e,t,n,r,o,a){return r&&!r[H]&&(r=v(r)),o&&!o[H]&&(o=v(o,a)),i(function(i,a,s,l){var c,u,d,h=[],f=[],p=a.length,m=i||g(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?m:_(m,h,e,s,l),y=n?o||(i?e:p||r)?[]:a:v;if(n&&n(v,y,s,l),r)for(c=_(y,f),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[f[u]]=!(v[f[u]]=d));if(i){if(o||e){if(o){for(c=[],u=y.length;u--;)(d=y[u])&&c.push(v[u]=d);o(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=o?ee(i,d):h[u])>-1&&(i[c]=!(a[c]=d))}}else y=_(y===a?y.splice(p,y.length):y),o?o(null,a,y,l):Q.apply(a,y)})}function y(e){for(var t,n,i,r=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),c=p(function(e){return ee(t,e)>-1},a,!0),u=[function(e,n,i){var r=!o&&(i||n!==M)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];r>s;s++)if(n=C.relative[e[s].type])u=[p(m(u),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[H]){for(i=++s;r>i&&!C.relative[e[i].type];i++);return v(s>1&&m(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,i>s&&y(e.slice(s,i)),r>i&&y(e=e.slice(i)),r>i&&f(e))}u.push(n)}return m(u)}function b(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,c){var u,d,h,f=0,p="0",m=i&&[],g=[],v=M,y=i||o&&C.find.TAG("*",c),b=q+=null==v?1:Math.random()||.1,w=y.length;for(c&&(M=a===O||a||c);p!==w&&null!=(u=y[p]);p++){if(o&&u){for(d=0,a||u.ownerDocument===O||($(u),s=!L);h=e[d++];)if(h(u,a||O,s)){l.push(u);break}c&&(q=b)}r&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=p,r&&p!==f){for(d=0;h=n[d++];)h(m,g,a,s);if(i){if(f>0)for(;p--;)m[p]||g[p]||(g[p]=X.call(l));g=_(g)}Q.apply(l,g),c&&!i&&g.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(q=b,M=v),m};return r?i(a):a}var w,x,C,k,E,A,S,T,M,D,R,$,O,I,L,F,N,P,B,H="sizzle"+1*new Date,z=e.document,q=0,j=0,W=n(),V=n(),U=n(),G=function(e,t){return e===t&&(R=!0),0},Y={}.hasOwnProperty,K=[],X=K.pop,Z=K.push,Q=K.push,J=K.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",oe=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),he=new RegExp("^"+ie+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,_e=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,xe=function(e,t){return t?"\x00"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){$()},ke=p(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(K=J.call(z.childNodes),z.childNodes),K[z.childNodes.length].nodeType}catch(Ee){Q={apply:K.length?function(e,t){Z.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},$=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:z;return i!==O&&9===i.nodeType&&i.documentElement?(O=i,I=O.documentElement,L=!E(O),z!==O&&(n=O.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild(O.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(O.getElementsByClassName),x.getById=r(function(e){return I.appendChild(e).id=H,!O.getElementsByName||!O.getElementsByName(H).length}),x.getById?(C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){return e.getAttribute("id")===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var n,i,r,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),C.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=x.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&L?t.getElementsByClassName(e):void 0},N=[],F=[],(x.qsa=ge.test(O.querySelectorAll))&&(r(function(e){I.appendChild(e).innerHTML="
",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||F.push(".#.+[+~]")}),r(function(e){e.innerHTML="";var t=O.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&F.push(":enabled",":disabled"),I.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(x.matchesSelector=ge.test(P=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&r(function(e){x.disconnectedMatch=P.call(e,"*"),P.call(e,"[s!='']:x"),N.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),N=N.length&&new RegExp(N.join("|")),t=ge.test(I.compareDocumentPosition),B=t||ge.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return R=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===O||e.ownerDocument===z&&B(z,e)?-1:t===O||t.ownerDocument===z&&B(z,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return R=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!r||!o)return e===O?-1:t===O?1:r?-1:o?1:D?ee(D,e)-ee(D,t):0;if(r===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===z?-1:l[i]===z?1:0},O):O},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==O&&$(e),n=n.replace(ue,"='$1']"),x.matchesSelector&&L&&!U[n+" "]&&(!N||!N.test(n))&&(!F||!F.test(n)))try{var i=P.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,O,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==O&&$(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==O&&$(e);var n=C.attrHandle[t.toLowerCase()],i=n&&Y.call(C.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==i?i:x.attributes||!L?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(we,xe)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(R=!x.detectDuplicates,D=!x.sortStable&&e.slice(0),e.sort(G),R){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return D=null,e},k=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=k(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=A(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,_=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(o){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===_:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&v){for(h=g,d=h[H]||(h[H]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===q&&c[1],y=f&&c[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(y=f=0)||p.pop();)if(1===h.nodeType&&++y&&h===t){u[e]=[q,f,y];break}}else if(v&&(h=t,d=h[H]||(h[H]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===q&&c[1],y=f),y===!1)for(;(h=++f&&h&&h[m]||(y=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==_:1!==h.nodeType)||!++y||(v&&(d=h[H]||(h[H]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),u[e]=[q,y]),h!==t)););return y-=r,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(e,n){var r,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[H]?o(n):o.length>1?(r=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=ee(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(se,"$1"));return r[H]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ye,be),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,be).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&C.relative[o[1].type]){if(t=(C.find.ID(a.matches[0].replace(ye,be),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=fe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!C.relative[s=a.type]);)if((l=C.find[s])&&(i=l(a.matches[0].replace(ye,be),ve.test(o[0].type)&&d(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&f(o),!e)return Q.apply(n,i),n;break}}return(c||S(e,u))(i,t,!L,n,!t||ve.test(e)&&d(t.parentNode)||t),n},x.sortStable=H.split("").sort(G).join("")===H,x.detectDuplicates=!!R,$(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition(O.createElement("fieldset"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);me.find=be,me.expr=be.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=be.uniqueSort,me.text=be.getText,me.isXMLDoc=be.isXML,me.contains=be.contains,me.escapeSelector=be.escape;var we=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&me(e).is(n))break;i.push(e)}return i},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ce=me.expr.match.needsContext,ke=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ee=/^.[^:#\[\.,]*$/;me.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?me.find.matchesSelector(i,e)?[i]:[]:me.find.matches(e,me.grep(t,function(e){return 1===e.nodeType}))},me.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(me(e).filter(function(){for(t=0;i>t;t++)if(me.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;i>t;t++)me.find(e,r[t],n);return i>1?me.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Ce.test(e)?me(e):e||[],!1).length}});var Ae,Se=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Te=me.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Se.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),ke.test(i[1])&&me.isPlainObject(t))for(i in t)me.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=ne.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):me.isFunction(e)?void 0!==n.ready?n.ready(e):e(me):me.makeArray(e,this)};Te.prototype=me.fn,Ae=me(ne);var Me=/^(?:parents|prev(?:Until|All))/,De={children:!0,contents:!0,next:!0,prev:!0};me.fn.extend({has:function(e){var t=me(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(me.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],a="string"!=typeof e&&me(e);if(!Ce.test(e))for(;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&me.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?me.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(me(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(me.uniqueSort(me.merge(this.get(),me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,n){return we(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,n){return we(e,"nextSibling",n)},prevUntil:function(e,t,n){return we(e,"previousSibling",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),me.merge([],e.childNodes))}},function(e,t){me.fn[e]=function(n,i){var r=me.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=me.filter(i,r)),this.length>1&&(De[e]||me.uniqueSort(r),Me.test(e)&&r.reverse()),this.pushStack(r)}});var Re=/[^\x20\t\r\n\f]+/g;me.Callbacks=function(e){e="string"==typeof e?s(e):me.extend({},e);var t,n,i,r,o=[],a=[],l=-1,c=function(){for(r=r||e.once,i=t=!0;a.length;l=-1)for(n=a.shift();++l-1;)o.splice(n,1),l>=n&&l--}),this},has:function(e){return e?me.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=a=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},me.extend({Deferred:function(t){var n=[["notify","progress",me.Callbacks("memory"),me.Callbacks("memory"),2],["resolve","done",me.Callbacks("once memory"),me.Callbacks("once memory"),0,"resolved"],["reject","fail",me.Callbacks("once memory"),me.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return r.then(null,e)},pipe:function(){var e=arguments;return me.Deferred(function(t){me.each(n,function(n,i){var r=me.isFunction(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,i,r){function o(t,n,i,r){return function(){var s=this,u=arguments,d=function(){var e,d;if(!(a>t)){if(e=i.apply(s,u),e===n.promise())throw new TypeError("Thenable self-resolution");d=e&&("object"==typeof e||"function"==typeof e)&&e.then,me.isFunction(d)?r?d.call(e,o(a,n,l,r),o(a,n,c,r)):(a++,d.call(e,o(a,n,l,r),o(a,n,c,r),o(a,n,l,n.notifyWith))):(i!==l&&(s=void 0,u=[e]),(r||n.resolveWith)(s,u))}},h=r?d:function(){try{d()}catch(e){me.Deferred.exceptionHook&&me.Deferred.exceptionHook(e,h.stackTrace),t+1>=a&&(i!==c&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?h():(me.Deferred.getStackHook&&(h.stackTrace=me.Deferred.getStackHook()),e.setTimeout(h))}}var a=0;return me.Deferred(function(e){n[0][3].add(o(0,e,me.isFunction(r)?r:l,e.notifyWith)),n[1][3].add(o(0,e,me.isFunction(t)?t:l)),n[2][3].add(o(0,e,me.isFunction(i)?i:c))}).promise()},promise:function(e){return null!=e?me.extend(e,r):r}},o={};return me.each(n,function(e,t){var a=t[2],s=t[5];r[t[1]]=a.add,s&&a.add(function(){i=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=re.call(arguments),o=me.Deferred(),a=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?re.call(arguments):n,--t||o.resolveWith(i,r)}};if(1>=t&&(u(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||me.isFunction(r[n]&&r[n].then)))return o.then();for(;n--;)u(r[n],a(n),o.reject);return o.promise()}});var $e=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;me.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&$e.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},me.readyException=function(t){e.setTimeout(function(){throw t})};var Oe=me.Deferred();me.fn.ready=function(e){return Oe.then(e)["catch"](function(e){me.readyException(e)}),this},me.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--me.readyWait:me.isReady)||(me.isReady=!0,e!==!0&&--me.readyWait>0||Oe.resolveWith(ne,[me]))}}),me.ready.then=Oe.then,"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(me.ready):(ne.addEventListener("DOMContentLoaded",d),e.addEventListener("load",d));var Ie=function(e,t,n,i,r,o,a){var s=0,l=e.length,c=null==n;if("object"===me.type(n)){r=!0;for(s in n)Ie(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,me.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(me(e),n)})),t))for(;l>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:c?t.call(e):l?t(e[0],n):o},Le=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};h.uid=1,h.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Le(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[me.camelCase(t)]=n;else for(i in t)r[me.camelCase(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][me.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){Array.isArray(t)?t=t.map(me.camelCase):(t=me.camelCase(t),t=t in i?[t]:t.match(Re)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||me.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!me.isEmptyObject(t)}};var Fe=new h,Ne=new h,Pe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Be=/[A-Z]/g;me.extend({hasData:function(e){return Ne.hasData(e)||Fe.hasData(e)},data:function(e,t,n){return Ne.access(e,t,n)},removeData:function(e,t){Ne.remove(e,t)},_data:function(e,t,n){return Fe.access(e,t,n)},_removeData:function(e,t){Fe.remove(e,t)}}),me.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=Ne.get(o),1===o.nodeType&&!Fe.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=me.camelCase(i.slice(5)),p(o,i,r[i])));Fe.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){Ne.set(this,e)}):Ie(this,function(t){var n;if(o&&void 0===t){if(n=Ne.get(o,e),void 0!==n)return n;if(n=p(o,e),void 0!==n)return n}else this.each(function(){Ne.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ne.remove(this,e)})}}),me.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=Fe.get(e,t),n&&(!i||Array.isArray(n)?i=Fe.access(e,t,me.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),i=n.length,r=n.shift(),o=me._queueHooks(e,t),a=function(){me.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:me.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ye=/^$|\/(?:java|ecma)script/i,Ke={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead, -Ke.th=Ke.td;var Xe=/<|&#?\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement("div")),n=ne.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),fe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",fe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ze=ne.documentElement,Qe=/^key/,Je=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;me.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,c,u,d,h,f,p,m,g=Fe.get(e);if(g)for(n.handler&&(o=n,n=o.handler,r=o.selector),r&&me.find.matchesSelector(Ze,r),n.guid||(n.guid=me.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return"undefined"!=typeof me&&me.event.triggered!==t.type?me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Re)||[""],c=t.length;c--;)s=et.exec(t[c])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f&&(d=me.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=me.event.special[f]||{},u=me.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&me.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||(h=l[f]=[],h.delegateCount=0,d.setup&&d.setup.call(e,i,p,a)!==!1||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),me.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,c,u,d,h,f,p,m,g=Fe.hasData(e)&&Fe.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Re)||[""],c=t.length;c--;)if(s=et.exec(t[c])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f){for(d=me.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)u=h[o],!r&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));a&&!h.length&&(d.teardown&&d.teardown.call(e,p,g.handle)!==!1||me.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)me.event.remove(e,f+t[c],n,i,!0);me.isEmptyObject(l)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,a,s=me.event.fix(e),l=new Array(arguments.length),c=(Fe.get(this,"events")||{})[s.type]||[],u=me.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(o=[],a={},n=0;l>n;n++)i=t[n],r=i.selector+" ",void 0===a[r]&&(a[r]=i.needsContext?me(r,this).index(c)>-1:me.find(r,this,null,[c]).length),a[r]&&o.push(i);o.length&&s.push({elem:c,handlers:o})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,nt=/\s*$/g;me.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=me.contains(e.ownerDocument,e);if(!(fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(a=v(s),o=v(e),i=0,r=o.length;r>i;i++)M(o[i],a[i]);if(t)if(n)for(o=o||v(e),a=a||v(s),i=0,r=o.length;r>i;i++)T(o[i],a[i]);else T(e,s);return a=v(s,"script"),a.length>0&&y(a,!l&&v(e,"script")),s},cleanData:function(e){for(var t,n,i,r=me.event.special,o=0;void 0!==(n=e[o]);o++)if(Le(n)){if(t=n[Fe.expando]){if(t.events)for(i in t.events)r[i]?me.event.remove(n,i):me.removeEvent(n,i,t.handle);n[Fe.expando]=void 0}n[Ne.expando]&&(n[Ne.expando]=void 0)}}}),me.fn.extend({detach:function(e){return R(this,e,!0)},remove:function(e){return R(this,e)},text:function(e){return Ie(this,function(e){return void 0===e?me.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=E(this,e);t.appendChild(e)}})},prepend:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=E(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(me.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return Ie(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!nt.test(e)&&!Ke[(Ge.exec(e)||["",""])[1].toLowerCase()]){e=me.htmlPrefilter(e);try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(me.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return D(this,arguments,function(t){var n=this.parentNode;me.inArray(this,e)<0&&(me.cleanData(v(this)),n&&n.replaceChild(t,this))},e)}}),me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){me.fn[e]=function(e){for(var n,i=[],r=me(e),o=r.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),me(r[a])[t](n),ae.apply(i,n.get());return this.pushStack(i)}});var at=/^margin/,st=new RegExp("^("+He+")(?!px)[a-z%]+$","i"),lt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Ze.appendChild(a);var t=e.getComputedStyle(s);n="1%"!==t.top,o="2px"===t.marginLeft,i="4px"===t.width,s.style.marginRight="50%",r="4px"===t.marginRight,Ze.removeChild(a),s=null}}var n,i,r,o,a=ne.createElement("div"),s=ne.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),me.extend(fe,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),i},pixelMarginRight:function(){return t(),r},reliableMarginLeft:function(){return t(),o}}))}();var ct=/^(none|table(?!-c[ea]).+)/,ut=/^--/,dt={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},ft=["Webkit","Moz","ms"],pt=ne.createElement("div").style;me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=me.camelCase(t),l=ut.test(t),c=e.style;return l||(t=L(s)),a=me.cssHooks[t]||me.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:c[t]:(o=typeof n,"string"===o&&(r=ze.exec(n))&&r[1]&&(n=m(e,t,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(me.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n)),void 0)}},css:function(e,t,n,i){var r,o,a,s=me.camelCase(t),l=ut.test(t);return l||(t=L(s)),a=me.cssHooks[t]||me.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=$(e,t,i)),"normal"===r&&t in ht&&(r=ht[t]),""===n||n?(o=parseFloat(r),n===!0||isFinite(o)?o||0:r):r}}),me.each(["height","width"],function(e,t){me.cssHooks[t]={get:function(e,n,i){return n?!ct.test(me.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?P(e,t,i):We(e,dt,function(){return P(e,t,i)}):void 0},set:function(e,n,i){var r,o=i&<(e),a=i&&N(e,t,i,"border-box"===me.css(e,"boxSizing",!1,o),o);return a&&(r=ze.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=me.css(e,t)),F(e,n,a)}}}),me.cssHooks.marginLeft=O(fe.reliableMarginLeft,function(e,t){return t?(parseFloat($(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),me.each({margin:"",padding:"",border:"Width"},function(e,t){me.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+qe[i]+t]=o[i]||o[i-2]||o[0];return r}},at.test(e)||(me.cssHooks[e+t].set=F)}),me.fn.extend({css:function(e,t){return Ie(this,function(e,t,n){var i,r,o={},a=0;if(Array.isArray(t)){for(i=lt(e),r=t.length;r>a;a++)o[t[a]]=me.css(e,t[a],!1,i);return o}return void 0!==n?me.style(e,t,n):me.css(e,t)},e,t,arguments.length>1)}}),me.Tween=B,B.prototype={constructor:B,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(me.cssNumber[n]?"":"px")},cur:function(){var e=B.propHooks[this.prop];return e&&e.get?e.get(this):B.propHooks._default.get(this)},run:function(e){var t,n=B.propHooks[this.prop];return this.options.duration?this.pos=t=me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[me.cssProps[e.prop]]&&!me.cssHooks[e.prop]?e.elem[e.prop]=e.now:me.style(e.elem,e.prop,e.now+e.unit)}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},me.fx=B.prototype.init,me.fx.step={};var mt,gt,_t=/^(?:toggle|show|hide)$/,vt=/queueHooks$/;me.Animation=me.extend(U,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){me.isFunction(e)?(t=e,e=["*"]):e=e.match(Re);for(var n,i=0,r=e.length;r>i;i++)n=e[i],U.tweeners[n]=U.tweeners[n]||[],U.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?U.prefilters.unshift(e):U.prefilters.push(e)}}),me.speed=function(e,t,n){var i=e&&"object"==typeof e?me.extend({},e):{complete:n||!n&&t||me.isFunction(e)&&e,duration:e,easing:n&&t||t&&!me.isFunction(t)&&t};return me.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in me.fx.speeds?i.duration=me.fx.speeds[i.duration]:i.duration=me.fx.speeds._default),(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){me.isFunction(i.old)&&i.old.call(this),i.queue&&me.dequeue(this,i.queue)},i},me.fn.extend({fadeTo:function(e,t,n,i){return this.filter(je).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=me.isEmptyObject(e),o=me.speed(t,n,i),a=function(){var t=U(this,me.extend({},e),o);(r||Fe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=me.timers,a=Fe.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&vt.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&me.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Fe.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=me.timers,a=i?i.length:0;for(n.finish=!0,me.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),me.each(["toggle","show","hide"],function(e,t){var n=me.fn[t];me.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,i,r)}}),me.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){me.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),me.timers=[],me.fx.tick=function(){var e,t=0,n=me.timers;for(mt=me.now();t1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?me.prop(e,t,n):(1===o&&me.isXMLDoc(e)||(r=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void me.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=me.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Re);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return t===!1?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=bt[t]||me.find.attr;bt[t]=function(e,t,i){var r,o,a=t.toLowerCase();return i||(o=bt[a],bt[a]=r,r=null!=n(e,t,i)?a:null,bt[a]=o),r}});var wt=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return Ie(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&me.isXMLDoc(e)||(t=me.propFix[t]||t,r=me.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=me.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.optSelected||(me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.propFix[this.toLowerCase()]=this}),me.fn.extend({addClass:function(e){var t,n,i,r,o,a,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).addClass(e.call(this,t,Y(this)))});if("string"==typeof e&&e)for(t=e.match(Re)||[];n=this[l++];)if(r=Y(n),i=1===n.nodeType&&" "+G(r)+" "){for(a=0;o=t[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=G(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,o,a,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).removeClass(e.call(this,t,Y(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Re)||[];n=this[l++];)if(r=Y(n),i=1===n.nodeType&&" "+G(r)+" "){for(a=0;o=t[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");s=G(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):me.isFunction(e)?this.each(function(n){me(this).toggleClass(e.call(this,n,Y(this),t),t)}):this.each(function(){var t,i,r,o;if("string"===n)for(i=0,r=me(this),o=e.match(Re)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(void 0===e||"boolean"===n)&&(t=Y(this),t&&Fe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Fe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+G(Y(n))+" ").indexOf(t)>-1)return!0;return!1}});var Ct=/\r/g;me.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=me.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,me(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=me.map(r,function(e){return null==e?"":e+""})),t=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=me.valHooks[r.type]||me.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Ct,""):null==n?"":n)}}}),me.extend({valHooks:{option:{get:function(e){var t=me.find.attr(e,"value");return null!=t?t:G(me.text(e))}},select:{get:function(e){var t,n,i,o=e.options,a=e.selectedIndex,s="select-one"===e.type,l=s?null:[],c=s?a+1:o.length;for(i=0>a?c:s?a:0;c>i;i++)if(n=o[i],(n.selected||i===a)&&!n.disabled&&(!n.parentNode.disabled||!r(n.parentNode,"optgroup"))){if(t=me(n).val(),s)return t;l.push(t)}return l},set:function(e,t){for(var n,i,r=e.options,o=me.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=me.inArray(me.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]={set:function(e,t){return Array.isArray(t)?e.checked=me.inArray(me(e).val(),t)>-1:void 0}},fe.checkOn||(me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var kt=/^(?:focusinfocus|focusoutblur)$/;me.extend(me.event,{trigger:function(t,n,i,r){var o,a,s,l,c,u,d,h=[i||ne],f=ue.call(t,"type")?t.type:t,p=ue.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||ne,3!==i.nodeType&&8!==i.nodeType&&!kt.test(f+me.event.triggered)&&(f.indexOf(".")>-1&&(p=f.split("."),f=p.shift(),p.sort()),c=f.indexOf(":")<0&&"on"+f,t=t[me.expando]?t:new me.Event(f,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:me.makeArray(n,[t]),d=me.event.special[f]||{},r||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!r&&!d.noBubble&&!me.isWindow(i)){for(l=d.delegateType||f,kt.test(l+f)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(i.ownerDocument||ne)&&h.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)t.type=o>1?l:d.bindType||f,u=(Fe.get(a,"events")||{})[t.type]&&Fe.get(a,"handle"),u&&u.apply(a,n),u=c&&a[c],u&&u.apply&&Le(a)&&(t.result=u.apply(a,n),t.result===!1&&t.preventDefault());return t.type=f,r||t.isDefaultPrevented()||d._default&&d._default.apply(h.pop(),n)!==!1||!Le(i)||c&&me.isFunction(i[f])&&!me.isWindow(i)&&(s=i[c],s&&(i[c]=null),me.event.triggered=f,i[f](),me.event.triggered=void 0,s&&(i[c]=s)),t.result}},simulate:function(e,t,n){var i=me.extend(new me.Event,n,{type:e,isSimulated:!0});me.event.trigger(i,null,t)}}),me.fn.extend({trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?me.event.trigger(e,t,n,!0):void 0}}),me.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),fe.focusin="onfocusin"in e,fe.focusin||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){me.event.simulate(t,e.target,me.event.fix(e))};me.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Fe.access(i,t);r||i.addEventListener(e,n,!0),Fe.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Fe.access(i,t)-1;r?Fe.access(i,t,r):(i.removeEventListener(e,n,!0),Fe.remove(i,t))}}});var Et=e.location,At=me.now(),St=/\?/;me.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(i){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&me.error("Invalid XML: "+t),n};var Tt=/\[\]$/,Mt=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;me.param=function(e,t){var n,i=[],r=function(e,t){var n=me.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){r(this.name,this.value)});else for(n in e)K(n,e[n],t,r);return i.join("&")},me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&Rt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!Ue.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:Array.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}}):{name:t.name,value:n.replace(Mt,"\r\n")}}).get()}});var $t=/%20/g,Ot=/#.*$/,It=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nt=/^(?:GET|HEAD)$/,Pt=/^\/\//,Bt={},Ht={},zt="*/".concat("*"),qt=ne.createElement("a");qt.href=Et.href,me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:Ft.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Q(Q(e,me.ajaxSettings),t):Q(me.ajaxSettings,e)},ajaxPrefilter:X(Bt),ajaxTransport:X(Ht),ajax:function(t,n){function i(t,n,i,s){var c,h,f,b,w,x=n;u||(u=!0,l&&e.clearTimeout(l),r=void 0,a=s||"",C.readyState=t>0?4:0,c=t>=200&&300>t||304===t,i&&(b=J(p,C,i)),b=ee(p,b,C,c),c?(p.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(me.lastModified[o]=w),w=C.getResponseHeader("etag"),w&&(me.etag[o]=w)),204===t||"HEAD"===p.type?x="nocontent":304===t?x="notmodified":(x=b.state,h=b.data,f=b.error,c=!f)):(f=x,(t||!x)&&(x="error",0>t&&(t=0))),C.status=t,C.statusText=(n||x)+"",c?_.resolveWith(m,[h,x,C]):_.rejectWith(m,[C,x,f]),C.statusCode(y),y=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?h:f]),v.fireWith(m,[C,x]),d&&(g.trigger("ajaxComplete",[C,p]),--me.active||me.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,o,a,s,l,c,u,d,h,f,p=me.ajaxSetup({},n),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?me(m):me.event,_=me.Deferred(),v=me.Callbacks("once memory"),y=p.statusCode||{},b={},w={},x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Lt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),i(0,t),this}};if(_.promise(C),p.url=((t||p.url||Et.href)+"").replace(Pt,Et.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Re)||[""],null==p.crossDomain){c=ne.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=qt.protocol+"//"+qt.host!=c.protocol+"//"+c.host}catch(k){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=me.param(p.data,p.traditional)),Z(Bt,p,n,C),u)return C;d=me.event&&p.global,d&&0===me.active++&&me.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nt.test(p.type),o=p.url.replace(Ot,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace($t,"+")):(f=p.url.slice(o.length),p.data&&(o+=(St.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(o=o.replace(It,"$1"),f=(St.test(o)?"&":"?")+"_="+At++ +f),p.url=o+f),p.ifModified&&(me.lastModified[o]&&C.setRequestHeader("If-Modified-Since",me.lastModified[o]),me.etag[o]&&C.setRequestHeader("If-None-Match",me.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]);for(h in p.headers)C.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(p.beforeSend.call(m,C,p)===!1||u))return C.abort();if(x="abort",v.add(p.complete),C.done(p.success),C.fail(p.error),r=Z(Ht,p,n,C)){if(C.readyState=1,d&&g.trigger("ajaxSend",[C,p]),u)return C;p.async&&p.timeout>0&&(l=e.setTimeout(function(){C.abort("timeout")},p.timeout));try{u=!1,r.send(b,i)}catch(k){if(u)throw k;i(-1,k)}}else i(-1,"No Transport");return C},getJSON:function(e,t,n){return me.get(e,t,n,"json")},getScript:function(e,t){return me.get(e,void 0,t,"script")}}),me.each(["get","post"],function(e,t){me[t]=function(e,n,i,r){return me.isFunction(n)&&(r=r||i,i=n,n=void 0),me.ajax(me.extend({url:e,type:t,dataType:r,data:n,success:i},me.isPlainObject(e)&&e))}}),me._evalUrl=function(e){return me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},me.fn.extend({wrapAll:function(e){var t;return this[0]&&(me.isFunction(e)&&(e=e.call(this[0])),t=me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return me.isFunction(e)?this.each(function(t){me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=me.isFunction(e);return this.each(function(n){me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){me(this).replaceWith(this.childNodes)}),this}}),me.expr.pseudos.hidden=function(e){return!me.expr.pseudos.visible(e); -},me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},me.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var jt={0:200,1223:204},Wt=me.ajaxSettings.xhr();fe.cors=!!Wt&&"withCredentials"in Wt,fe.ajax=Wt=!!Wt,me.ajaxTransport(function(t){var n,i;return fe.cors||Wt&&!t.crossDomain?{send:function(r,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);n=function(e){return function(){n&&(n=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(jt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),i=s.onerror=n("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}:void 0}),me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return me.globalEval(e),e}}}),me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=me("
\ No newline at end of file +
\ No newline at end of file diff --git a/build/scripts/app-7efaabb9c1.js b/build/scripts/app-7efaabb9c1.js deleted file mode 100644 index 1162227a..00000000 --- a/build/scripts/app-7efaabb9c1.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t

404 not found

Back
'),e.put("app/base/addVarsDialog.html",'

Mango (Fruit)

Add var (no space)
TextIntDateCode
CloseAdd
'),e.put("app/base/base.html",'
Open table
'),e.put("app/base/breadcrumbs.html",''),e.put("app/base/header.html",'
Requirements Chrome! Dashboard SQL Metrics & Processes Settings Help Sign out [{{user}}]
'),e.put("app/base/helpDialogLogin.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

* Work only in "Google chrome" version up 55

* Clickhouse server version up v1.1.54164

* Not readonly CH user




https://tabix.ioOk
'),e.put("app/base/helpDialogRu.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

ClickHouse Manual


Tabix.IO Manual

Hot keys

⌘ + Enter

Exec current query

⌘ + Shift + Enter

Exec all query

⌘ + Y

Drop current line

⌘ + ⇧ + F

Reformat

⌘ + ⇧ + Plus|Minus

свернуть все/развернуть

⌘ + Right|Left

переключает вкладки

⌘ + ⌥ + Up|Down

Copy lines Up/Down

⌥ + Up|Down

Move lines Up/Down

Ctrl + K

Remove to line end

⌘ + Backspace

Remove to linestart

Ace Editor Default Keyboard Shortcuts

DrawChart

DrawChart

DrawMap

DrawMap

https://tabix.ioOk
'),e.put("app/base/sidebar.html",''),e.put("app/base/sidebarhelper.html",'

{{ hist }}

'),e.put("app/dash/dash.html",'
favorite

{{vars.dash.title}}

favoritePinSave


Apply
'),e.put("app/dash/dashsidebar.html",'
'),e.put("app/dev/edit.html",'
'),e.put("app/dev/plot.html",'openEditorWidget
code:
{{code}}
'),e.put("app/login/login.html",'
Requirements Chrome or Chromium engine Browser! Requirements & helpUi Theme{{theme.title}}
'),e.put("app/metrics/dialog.kill.html",'

Kill query

{{ q.elapsed }}

{{ q.query }}

{{ q.bytes_read }}

{{ q.hash }}

Cancel
'),e.put("app/metrics/metrics.html",'Processes
Overview
Metrics
'),e.put("app/metrics/metricschart.html",'

Metrics

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+(\'sec\')}}{{interval}}system.eventsRefreshReset
'),e.put("app/metrics/overview.html",'

Overview

'),e.put("app/metrics/processes.html",'

Processes

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+\'sec\'}}Select/Read onlyLog ModeClusterRefreshResetKILL Query
'),e.put("app/panels/sendtodashboard.html",'
Send to dashboard
ApplicationWebsite


AppendBottom





CloseApply
'),e.put("app/panels/share.html",'
Share


Can refresh dataPassword protectSupport variablesBoardJsonTSVCSV
CloseApply
'), -e.put("app/preference/preference.html",'

Preference & settings

{{theme}}{{theme}}Save sessionLive AutocompletionDisable auto-helpDisable hotKey left+rightUse WrapModeShow invisible charsApply
'),e.put("app/render/WidgetsList.html",'
{{::w.title}}
'),e.put("app/sql/PlotlyEditor.tmpl.html",'
PlotLy JavaScript editor ( alpha )

Tab One

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi.

Tab Two

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor, orci enim rutrum enim, vel tempor sapien arcu a tellus. Vivamus convallis sodales ante varius gravida. Curabitur a purus vel augue ultrices ultricies id a nisl. Nullam malesuada consequat diam, a facilisis tortor volutpat et. Sed urna dolor, aliquet vitae posuere vulputate, euismod ac lorem. Sed felis risus, pulvinar at interdum quis, vehicula sed odio. Phasellus in enim venenatis, iaculis tortor eu, bibendum ante. Donec ac tellus dictum neque volutpat blandit. Praesent efficitur faucibus risus, ac auctor purus porttitor vitae. Phasellus ornare dui nec orci posuere, nec luctus mauris semper.

Morbi viverra, ante vel aliquet tincidunt, leo dolor pharetra quam, at semper massa orci nec magna. Donec posuere nec sapien sed laoreet. Etiam cursus nunc in condimentum facilisis. Etiam in tempor tortor. Vivamus faucibus egestas enim, at convallis diam pulvinar vel. Cras ac orci eget nisi maximus cursus. Nunc urna libero, viverra sit amet nisl at, hendrerit tempor turpis. Maecenas facilisis convallis mi vel tempor. Nullam vitae nunc leo. Cras sed nisl consectetur, rhoncus sapien sit amet, tempus sapien.

Integer turpis erat, porttitor vitae mi faucibus, laoreet interdum tellus. Curabitur posuere molestie dictum. Morbi eget congue risus, quis rhoncus quam. Suspendisse vitae hendrerit erat, at posuere mi. Cras eu fermentum nunc. Sed id ante eu orci commodo volutpat non ac est. Praesent ligula diam, congue eu enim scelerisque, finibus commodo lectus.

Close
'),e.put("app/sql/renderResult.html",'
{{resultContainer.cellsCalc}}{{::tableData.data.progressQuery}}CSV with headersCSV without headersTSV with headersTSV without headersPinnedTable
Draw
'),e.put("app/sql/showDialogUpload.html",'

Upload CSV to View

'),e.put("app/sql/sql.html",'
{{tab.name + (tab.changed ? \' *\' : \'\')}}
Make snippetAutoFormatExpandCollapseCollapse All
{{tab.buttonTitle}}Run current ⌘ + ⏎Full screenSave{{item.name}}Query log
USE {{::dbb.name}}{{vars.LastStatistics.elapsed| number:2}} sec.| {{vars.LastStatistics.rows_read| number}} rows.| {{vars.LastStatistics.bytes_read|filesize}}
..... {{tab.progress.query}}
'),e.put("app/table/table-container.html",'

{{vars.currentDatabase}} {{vars.currentTable}}

Structure
NameTypeDefault typeValueSizeCompress
{{$index + 1}}{{field[key]}}
Information
1Size{{vars.statistics.size}}
2Size,bytes{{vars.statistics.sizeBytes}}
3First row{{vars.statistics.minDate}}
4Last row{{vars.statistics.maxDate}}

SHOW CREATE TABLE
{{vars.createtable}}
Data
Data From {{vars.offset}} To {{vars.offset + vars.limit}}
No data
'),e.put("app/table/table.html",'
')}]),function(e,t){function a(e,t){var a=t.dbName,n=t.tableName;e.vars={dbName:a,tableName:n}}e.module(t.app.name).controller("TableController",a),a.$inject=["$scope","$stateParams"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.tablewidget={},t.vars={columns:{},ugrid:{},sortColumn:!1,isDark:i.isDark(),createtable:{},data:null,grid:null,limit:100,offset:0,statistics:{},loading:!0,isRawStatistics:!1,rawstatistics:"",scrollConfig:{autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},t.initContainer=function(){a.$watch("currentTable",function(e){e&&(t.vars.currentTable=a.currentTable,t.vars.currentDatabase=a.currentDatabase,t.init())})},t.onAfterInit=function(){},t.updateHandTable=function(){l.getInstance("hotTableContain").render()},t.initOnGo=function(){t.$parent.vars&&(o.get("tableSiedenav")&&s("tableSiedenav").close(),t.vars.currentTable=t.$parent.vars.tableName,t.vars.currentDatabase=t.$parent.vars.dbName,t.init())},t.load=function(){console.warn("LOAD DATA! IN TABLES"),t.vars.data=-1,n.fetchQuery("\n select * from "+t.vars.currentDatabase+"."+t.vars.currentTable+" limit "+t.vars.offset+", "+t.vars.limit+"\n ").then(function(e){var a="ch";t.tablewidget=new WidgetTable(new DataProvider(e,a)),t.vars.loading=!1},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.calcRawSize=function(){t.vars.isRawStatistics=!0,n.fetchQuery("SELECT any(ignore(*)) FROM "+t.vars.currentDatabase+"."+t.vars.currentTable+" SAMPLE 1 / 10000 ").then(function(e){t.vars.rawstatistics=e.statistics},function(e){t.vars.rawstatistics=e.data})},t.init=function(){t.vars.loading=!0,t.vars.createtable="N/A",n.fetchQuery("SHOW CREATE TABLE "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(e){t.vars.createtable=window.sqlFormatter.format(e.data[0].statement)}),n.fetchQuery("SELECT table, formatReadableSize(sum(bytes)) as size, sum(bytes) as sizeBytes, min(min_date) as minDate, max(max_date) as maxDate FROM system.parts WHERE database = '"+t.vars.currentDatabase+"' AND ( table = '"+t.vars.currentTable+"' OR table = '"+t.vars.currentTable+"_sharded' ) GROUP BY table ").then(function(e){return t.vars.statistics=e&&e.data.length&&e.data[0]||{}}),n.fetchQuery("SELECT * FROM system.columns WHERE database='"+t.vars.currentDatabase+"' AND table='"+t.vars.currentTable+"'").then(function(a){n.fetchQuery("describe table "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(n){_.map(n.data,function(t){var n=_.find(a.data,{name:t.name});return _.merge(t,n),t.size="-",t.ratio="-",!e.isUndefined(t.default_kind)&&e.isUndefined(t.default_type)&&(t.default_type=t.default_kind),t.data_compressed_bytes&&(t.size=numbro(t.data_compressed_bytes).format("0.0 b")+" / "+numbro(t.data_uncompressed_bytes).format("0.0 b"),t.ratio=numbro(parseInt(t.data_uncompressed_bytes)/parseInt(t.data_compressed_bytes)).format("0.0")),t}),t.vars.columns=n,t.vars.sortColumn=!1;var i=0;n.data.forEach(function(e){3>i&&("Date"==e.type&&(t.vars.sortColumn=e.name),"DateTime"==e.type&&(t.vars.sortColumn=e.name)),i+=1}),t.load()})})},t.loadNext=function(){t.vars.loading=!0,t.vars.offset+=t.vars.limit,t.load()},t.loadPrev=function(){t.vars.offset>0&&(t.vars.loading=!0,t.vars.offset-=t.vars.limit,t.load())}}e.module(t.app.name).controller("TableContainerController",a),a.$inject=["$scope","$rootScope","API","ThemeService","$stateParams","$mdSidenav","$mdComponentRegistry","hotRegisterer"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -window.global_delimiter=";;",window.aceJSRules={builtinFunctions:[],lang:"en",dictionaries:[],fieldsList:[],tables:[]},function(e,t){function a(t,a,n,i,r,s,o,l,c,d,u,m,h,p,g){var b="sqlHistory2",f="saveTabs",v="sessionData",y=255;t.AceEditorInLoad=!1,t.vars={EditorIsInit:!1,sqlHistory:i.get(b)||[],dictionaries:[],isDictionariesLoad:!1,tabs:[],enableLiveAutocompletion:h.get("liveAutocompletion"),disableAutohelp:h.get("disableAutohelp"),disableHotKeyCmdLeft:h.get("disableHotKeyCmdLeft"),saveTabs:i.get(f)||!0,LastStatistics:!1,delimiters:[{name:";; Double",delimiter:";;"},{name:"; Single",delimiter:";"}],databasesList:[],searchQueryOnServer:"",currentTab:{},selectedTab:0,formats:[{name:"Table",sql:" format JSON",render:"html"},{name:"JSON compact",sql:" format JSONCompact"}],db:null,limitTimes:h.get("limitTimes"),limitRows:h.get("limitRows"),fontSize:h.get("fontSize"),theme:h.get("editorTheme")},t.vars.delimiter=i.get("delimiter")||";;",t.vars.format=t.vars.formats[0],t.vars.themes=["ambiance","eclipse","mono_industrial","tomorrow_night_blue","chaos","github","monokai","tomorrow_night_bright","chrome","idle_fingers","pastel_on_dark","tomorrow_night_eighties","clouds","iplastic","solarized_dark","tomorrow_night","clouds_midnight","katzenmilch","solarized_light","twilight","cobalt","kr_theme","sqlserver","vibrant_ink","crimson_editor","kuroir","terminal","xcode","dawn","merbivore","textmate","dreamweaver","merbivore_soft","tomorrow"],n.onbeforeunload=function(e){if(""!==t.vars.currentTab.sql&&"localhost"!=location.hostname){var a="Do you want to leave this page?";return"undefined"==typeof e&&(e=window.event),e&&(e.returnValue=a),a}};var w=t.$on("$stateChangeStart",function(e){var a="Do you want to leave this page?";e.defaultPrevented||""===t.vars.currentTab||confirm(a)||e.preventDefault()}),k=function(){if(t.vars.saveTabs){var e=t.vars.tabs.map(function(e){return e.editor?e.sql=e.editor.getValue():e.sql="",{name:e.name,sql:e.sql,buttonTitle:e.buttonTitle,format:e.format,delimiter:e.delimiter,results:[],editor:null,selectedResultTab:0}});i.set(v,e),console.info("Save session , localStorageService.set(SQL_SESSION_KEY)")}};t.$watch("$root.isInitDatabaseStructure",function(){t.vars.EditorIsInit=a.isInitDatabaseStructure}),t.InitDatabaseStructure=function(){console.warn(">>>>>>>>>>>>>>>InitDatabaseStructure<<<<<<<",a.isInitDatabaseStructure)},t.executeQuery=function(a,n,i){var s="result_overflow_mode=throw";t.vars.currentTab.loading=!0,t.vars.limitRows&&(s+="&max_result_rows="+t.vars.limitRows),t.vars.limitTimes&&(s+="&timeout_overflow_mode=throw&max_execution_time="+t.vars.limitTimes);var o=a.sql.replace(/(\r\n|\n|\r)$/gm,"").substr(0,130);t.vars.currentTab.progress.query=o;var d="";a.qid&&(d=" /*TABIX_QUERY_ID_"+a.qid+"*/ "),r.fetchQuery(d+a.sql,!0,a.format,s).then(function(r){try{var s=r;e.isObject(r)||(r={data:s,meta:null,rows:null,statistics:null}),r.error=!1,r.query=a,r.countAllQuery=n.length;var l={time:moment().format("HH:mm:ss")};e.isObject(r.statistics)&&Object.assign(l,r.statistics),l.query=o,_.isArray(t.vars.currentTab.statistics)&&t.vars.currentTab.statistics.push(l),t.vars.LastStatistics=l;var c=new DataProvider(r,"ch");c.progressQuery=o,i.widgets.tables.push(new WidgetTable(c)),"drawCommand"in a&&a.drawCommand.length?(c.countAll=a.drawCommand.length>r.countAllQuery?a.drawCommand.length:r.countAllQuery,console.info("query.drawCommand",a.drawCommand),a.drawCommand.forEach(function(e){i.widgets.draw.push(new WidgetDraw(c,e))})):i.widgets.draw.push(new WidgetDraw(c,!1)),i.data.push(a),t.$applyAsync(),a.index+1-1&&r>-1&&t.vars.currentTab.editor.gotoLine(s,r),console.log("move cursor to",s,r)}var d="ch";console.warn("ERROR",n);var u=new DataProvider(n,d);i.data.push(a),i.widgets.tables.push(new WidgetTable(u)),t.finalizeResult(i)})},t.renderResult=function(e){},t.finalizeResult=function(e){if(t.vars.currentTab.loading=!1,t.vars.currentTab.progress=!1,e.data.find(function(e){return e.keyword&&-1!=["DROP","CREATE","ALTER"].indexOf(e.keyword.toUpperCase())})&&l.show(l.simple().content("Press `Reload Structure` for reload").theme(c.theme).position("bottom right")),t.$applyAsync(),t.vars.currentTab.statistics[0]){var a=DataProvider.convertArrayToDataProvider(t.vars.currentTab.statistics,"statistics");a.sort="time",a.sortOrder="desc",e.widgets.stats.push(new WidgetTable(a,!1))}},t.execute=function(n,s){t.$applyAsync(),console.groupCollapsed("Execute query"),t.vars.LastStatistics=!1,s.sql=s.editor.getValue();var o=s.sql,d=0,m=s.editor,h=[],p=m.getSelectedText();e.isUndefined(s.selectedTabResultIndex)&&(s.selectedTabResultIndex=0);var b={data:[],time:u("date")(new Date,"HH:mm:ss"),pinned:!1,widgets:{tables:[],pivot:[],draw:[],stats:[]}};if(""!==p&&null!==p&&(o=p),console.info("[EDITOR TEXT]> ",o),""===o||null===o)return void l.show(l.simple().content("SQL query is empty").theme(c.theme).position("bottom right"));s.results=[b],k();var f=window.global_delimiter;f||(f=";;"),m.session.$mode.splitByTokens(o,"constant.character.escape",f).forEach(function(t){if(!("current"==n&&d>0)){var s=[],o=t.sql;if(!(o.length<5)){if("current"==n&&!p){var l=m.selection.getCursor();if(!l||e.isUndefined(l))return;var c=t.range.compare(l.row,l.column);if(0!==c)return}var u=o.trim();-1==a.sqlLog.indexOf(u)&&(a.sqlLog.unshift(u),a.sqlLog.length>y&&a.sqlLog.splice(0,y),i.set("sqlLog",a.sqlLog));var b=m.session.$mode.replaceVars(o,g.get());o=b.sql;b.vars;if(console.log("replacedVars",b),m.session.$mode.findTokens(o,"invalid.illegal",!0)){var f=m.session.$mode.splitByTokens(o,"invalid.illegal",!0);o=f[0].sql,f.forEach(function(t){if(e.isDefined(t.keyword)&&t.keyword){var a=/DRAW_(\w+)/gim,n=a.exec(t.keyword);n&&n[1]&&s.push({drawtype:n[1].toLowerCase(),code:t.sql})}})}console.info("[SQL]>",o),s&&console.info("[DRAW]>",s);var v=null,w=!1,k=!1,x=null,C=m.session.$mode.findTokens(o,"storage",!0),S=m.session.$mode.findTokens(o,"keyword",!0);C.hasOwnProperty("value")?(v=!1,k=C.value):(v=" FORMAT JSON ",w=!0),S.hasOwnProperty("value")&&(x=S.value),"select"!=x&&"with"!=x&&(v=!1,w=!1),h.push({sql:o,index:d,format:v,setedformat:w,keyword:x,storage:k,drawCommand:s,itemRange:t.range,qid:r.makeQueryId()}),d++}}}),console.groupEnd("Execute query"),h.length&&(t.vars.currentTab.progress={},t.vars.currentTab.statistics||(t.vars.currentTab.statistics=[]),t.executeQuery(h[0],h,b))},t.setTheme=function(e){t.vars.theme=e,t.vars.tabs.forEach(function(t){return t.editor.setTheme("ace/theme/"+e)}),i.set("editorTheme",e)},t.reloadCache=function(){console.log("reloadCache"),r.resetDatabaseStructure(),l.show(l.simple().content("Reload page - for reset cache").theme(c.theme).position("bottom right"))},t.selectDatabase=function(e,a){e&&(r.setDatabase(e),t.vars.db!=e&&(t.vars.db=e,t.AceEditorInLoad||(t.aceLoadDatabaseFields(),t.aceApply(!1))))},t.insertWordInEditor=function(e){var a=t.vars.currentTab.editor,n=a.getCursorPosition();n.column+=e.length,a.clearSelection(),a.insert(e),t.vars.currentTab.sql=a.getValue(),d(function(){a.focus(),a.moveCursorToPosition(n)})},t.aceLoadDatabaseFields=function(){var e=t.vars.db;window.aceJSRules.fieldsList=[],r.databaseStructure(function(t){window.aceJSRules.fieldsList=t.getAllFieldsInDatabase(e)})},t.aceLoadDatabaseStructure=function(){var e=t.vars.db;window.aceJSRules.tables=[],r.databaseStructure(function(a){t.vars.databasesList=a.getDatabases(),Object.keys(a.getUniqueDatabaseTables()).forEach(function(e){window.aceJSRules.tables.push(e)}),window.aceJSRules.fieldsList=a.getAllFieldsInDatabase(e)})},t.loadInAce=function(e){e.session.setMode({path:"ace/mode/clickhouse"});for(var t in window.aceJSRules.builtinFunctions){var a=window.aceJSRules.builtinFunctions[t];e.session.$mode.$highlightRules.addCompletionsFunctions(a)}e.session.$mode.$highlightRules.addArrayCompletions(window.aceJSRules.tables,"[table]","table");for(var n in window.aceJSRules.dictionaries){var i=window.aceJSRules.dictionaries[n];e.session.$mode.$highlightRules.addCompletionsDictionaries(i)}for(var r in window.aceJSRules.fieldsList){var s=window.aceJSRules.fieldsList[r];e.session.$mode.$highlightRules.addCompletionsTableFiled(s)}var o=g.getCompletions(),l=p.getCompletions();e.session.$mode.$highlightRules.addArrayCompletions(o,"[var]","var"),e.session.$mode.$highlightRules.addArrayCompletions(l,"[snippet]","snippet"),e.session.bgTokenizer.start(0)},t.aceApply=function(e){e?(console.log(""),t.loadInAce(e)):t.vars.tabs.forEach(function(e){e.editor&&(console.log(""),t.loadInAce(e.editor))}),a.$watch("currentDatabase",t.selectDatabase)},t.changeRootSelectDatabase=function(e){a.currentDatabase!=e&&(a.currentDatabase=e)},t.aceLoadDictionaries=function(){t.vars.isDictionariesLoad||(window.aceJSRules.dictionaries=[],t.vars.dictionaries=[],window.aceJSRules.builtinFunctions=[],t.vars.isDictionariesLoad=!0,r.databaseStructure(function(e){e.getFunctions().forEach(function(e){if(window.aceJSRules.builtinFunctions.push({name:e.name,isaggr:e.is_aggregate,score:101,comb:!1,origin:e.name}),e.is_aggregate){var t={name:e.name+"If",isaggr:e.is_aggregate,score:3,comb:"If",origin:e.name};window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"Array",isaggr:e.is_aggregate,score:2,comb:"Array",origin:e.name},window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"State",isaggr:e.is_aggregate,score:1,comb:"State",origin:e.name},window.aceJSRules.builtinFunctions.push(t)}}),e.getDictionaries().forEach(function(e){var a=e.name;a=a.replace(/^.*\./gm,""),"news"!=a&&(a=a.replace(/s$/gm,"")),a=a?a.toLowerCase()+"_id":"ID";var n="dictGet"+e["attribute.types"]+"('"+e.name+"','"+e["attribute.names"]+"',to"+e.key+"( "+a+" ) ) AS "+e["attribute.names"]+",";window.aceJSRules.dictionaries.push({dic:n,title:"dic_"+e.name+"."+e["attribute.names"]}),t.vars.dictionaries.push({dic:n,title:e.name+"."+e["attribute.names"]+" as "+e["attribute.types"]})})}))};for(var x=function(e){t.vars.tabs.length>=e&&(t.vars.currentTab=t.vars.tabs[e],t.vars.selectedTab=e,d(function(){t.vars.currentTab.editor.focus()}))},C=function(){t.vars.selectedTab>0&&x(t.vars.selectedTab-1)},S=function(){t.vars.selectedTabD;D++)A(D);m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+right":"ctrl+right",callback:S}),m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+left":"ctrl+left",callback:C}),m.add({combo:"ctrl+shift+f",callback:T}),t.aceLoaded=function(e){t.editorVisiable=!1,d(function(){t.editorVisiable=!0,t.AceEditorInLoad=!0,a.currentDatabase&&t.selectDatabase(a.currentDatabase),t.aceLoadDictionaries(),t.aceLoadDatabaseStructure(),t.aceLoadDatabaseFields();var n=t.vars.tabs.find(function(e){return!e.editor})||t.vars.currentTab;n.editor=e,e.$blockScrolling=1/0,e.setOptions({fontSize:t.vars.fontSize+"px",enableBasicAutocompletion:!0,behavioursEnabled:!0,wrapBehavioursEnabled:!0,highlightSelectedWord:!0,showGutter:!0,enableLiveAutocompletion:t.vars.enableLiveAutocompletion,liveAutocompletionDelay:500,liveAutocompletionThreshold:1}),e.setTheme("ace/theme/"+t.vars.theme),e.session.setUseWrapMode(h.get("useWrapMode")),e.commands.addCommand({name:"runCurrentCommand",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:function(){t.execute("current",n)}}),e.commands.addCommand({name:"removeLiness",bindKey:{win:"Ctrl-Y",mac:"Cmd-Y"},exec:function(e){e.removeLines()}}),e.commands.addCommand({name:"collapseAll",bindKey:{win:"Ctrl-Shift--",mac:"Command+Shift+-"},exec:function(e){e.session.$mode.collapseAll(e.session)}}),e.commands.addCommand({name:"unfold",bindKey:{win:"Ctrl-Shift-+",mac:"Command+Shift+="},exec:function(e){e.session.unfold()}}),e.commands.addCommand({name:"runAllCommand",bindKey:{win:"Shift-Ctrl-Enter",mac:"Shift-Command-Enter"},exec:function(){t.execute("all",n)}});for(var i=function(t){e.commands.addCommand({name:"selecttab"+t,bindKey:{win:"Ctrl-Shift-"+(t+1),mac:"Command-Shift-"+(t+1)},exec:function(){return x(t)}})},r=0;9>r;r++)i(r);e.commands.addCommand({name:"selectnexttab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Right":"Ctrl-Right",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Right":"Command-Right"},exec:S}),e.commands.addCommand({name:"selectprevtab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Left":"Ctrl-Left",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Left":"Command-Left"},exec:C}),e.commands.addCommand({name:"formatcode",bindKey:{win:"Ctrl-Shift-F",mac:"Command-Shift-F"},exec:T}),e.setValue(n.sql),e.clearSelection(),e.focus(),e.selection.moveTo(0,0),e.on("changeSelection",function(){d(function(){n.buttonTitle=""!==e.getSelectedText()?"Run selected ⌘ + ⏎":"Run all ⇧ + ⌘ + ⏎",n.originalSql&&(n.changed=n.originalSql!=n.sql)})}),t.AceEditorInLoad=!1,t.aceApply(e)},100)},t.save=function(e,a){return o.show(o.prompt().title("Save SQL as?").placeholder("Title").initialValue(e.name).targetEvent(a).ok("Save").cancel("")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n?(t.vars.sqlHistory[n].sql=e.sql,t.vars.sqlHistory[n].name=a):t.vars.sqlHistory.push({sql:e.sql,name:a}),e.originalSql=e.sql,e.name=a,i.set(b,t.vars.sqlHistory),k()})},t.load=function(e){t.vars.currentTab.sql=e.sql,t.vars.currentTab.originalSql=e.sql,t.vars.currentTab.name=e.name,t.vars.currentTab.editor.setValue(e.sql),t.aceApply(t.vars.currentTab.editor)},t.getExportData=function(t){return t.data.data.map(function(t){return Object.keys(t).map(function(a){return e.isArray(t[a])?t[a].join(", "):t[a]})})},t.getExportHeaders=function(e){return e.data.meta.map(function(e){return e.name})},t.addTab=function(){t.vars.currentTab={name:"new SQL",sql:"",buttonTitle:"Run ⌘ + ⏎",format:{},editor:null,results:[],selectedResultTab:0},t.vars.tabs.push(t.vars.currentTab),k()},t.changeTab=function(e){k(),t.vars.currentTab=e},t.removeTab=function(e,a){a.stopPropagation();var n=function(){t.vars.tabs.splice(t.vars.tabs.indexOf(e),1),t.vars.tabs.length==t.vars.selectedTab&&t.vars.selectedTab--};e.changed?o.show(o.confirm().title("SQL was changed. Save it before exit?").targetEvent(a).ok("Yes").cancel("No")).then(function(){var a=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=a&&(t.vars.sqlHistory[a].sql=e.sql,t.vars.sqlHistory[a].name=e.name),i.set(b,t.vars.sqlHistory),n()},n):n()},t.removeResult=function(e,t,a){},a.$on("handleBroadcastUpdateVarsAndSnippets",function(e,a){t.aceApply()}),a.$on("handleBroadcastCalcSumCells",function(e,a){_.isObject(t.vars.currentTab.results[0])&&(t.vars.currentTab.results[0].cellsCalc=a,t.$applyAsync())}),a.$on("handleBroadcastInsertInActive",function(e,a){a.value&&t.insertWordInEditor(" "+a.value+" ")}),t.toggleSidenav=function(e){s(e).toggle()},t.removeHistory=function(e,a){a.preventDefault();var n=t.vars.sqlHistory.indexOf(e);-1!=n&&o.show(o.confirm().title("Delete "+e.name+"?").targetEvent(a).ok("Yes").cancel("No")).then(function(){t.vars.sqlHistory.splice(n,1),i.set(b,t.vars.sqlHistory)})},t.setSql=function(e){t.vars.currentTab.sql=e,t.toggleSidenav("log"),t.vars.currentTab.editor.setValue(e),d(function(){return t.vars.currentTab.editor.focus()},500)},t.changeTabName=function(e,a){a.stopPropagation(),o.show(o.prompt().title("Title tab").placeholder("title").initialValue(e.name).targetEvent(a).ok("Apply").cancel("Cancel")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n&&(e.originalSql=e.sql,t.vars.sqlHistory[n].name=a,i.set(b,t.vars.sqlHistory)),e.name=a,k()})},t.vars.saveTabs?(t.vars.tabs=i.get(v),_.isArray(t.vars.tabs)||(t.vars.tabs=[]),t.vars.tabs.length>0?d(function(){return t.vars.currentTab=t.vars.tabs[0]},500):t.addTab()):(i.set(v,[]),t.addTab()),t.$on("$destroy",function(){r.setDatabase(a.currentDatabase),w(),n.onbeforeunload=null}),t.rightAceMenuList=[],t.showDialogUpload=function(t,a){function n(e,t){e.vars={UploadCsv:{content:null,header:!0,headerVisible:!0,separator:",",separatorVisible:!0,result:null,encoding:"ISO-8859-1",encodingVisible:!0,uploadButtonLabel:"Upload",callback:function(e){t.hide()}}},e.$watch("vars.UploadCsv.result",function(e){e&&t.hide(e)}),e.hide=function(){t.hide()},e.cancel=function(){t.cancel()}}n.$inject=["$scope","$mdDialog"],o.show({controller:n,templateUrl:"app/sql/showDialogUpload.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0}).then(function(e){if(e&&t&&t.tables){var a=DataProvider.convertArrayToDataProvider(e,"csv");t.tables.push(new WidgetTable(a))}},function(){})},t.rightMenuProcess=function(e){t.vars.currentTab.sql=t.vars.currentTab.editor.getValue();var a=t.vars.currentTab.editor.session;if(t.vars.currentTab.editor.resize(),"Snippet"==e){var n=t.vars.currentTab.editor.getSelectedText();n&&(p.add(n),t.aceApply())}else"AutoFormat"==e?T():"Expand"==e?a.unfold():"Collapse All"==e?a.$mode.collapseAll(a):"Collapse"==e&&a.foldAll();t.vars.currentTab.editor.focus()}}e.module(t.app.name).controller("SqlController",a),a.$inject=["$scope","$rootScope","$window","localStorageService","API","$mdSidenav","$mdDialog","$mdToast","ThemeService","$timeout","$filter","hotkeys","Preference","Snippets","Variables"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors - */ -function(e,t,a){function n(t,a,n,i,r,s,o,l,c,d,u){function m(e,t){this.apply=function(){l.show(l.simple().content("Share OK, link in clipboard").theme(c.theme).position("top right")),e&&e.close()},this.close=function(){e&&e.close()}}function h(e,t){this.apply=function(){l.show(l.simple().content("Add to dashboard - OK").theme(c.theme).position("top right")),e&&e.close()},this.close=function(){e&&e.close()}}t.tabsRender=!0,t.vars={rsw:0,uiTheme:c.themeObject,isChartReady:!1,staticGrid:!0,stackType:"false",isDark:c.isDark(),active:{table:!1,pivot:!1,draw:!1}},t.staticGrid=!0,t.gridStackOptions={cellHeight:200,verticalMargin:3,disableDrag:!0},t.switchStaticGrid=function(){t.vars.staticGrid=!t.vars.staticGrid,t.staticGrid=t.vars.staticGrid,console.info("staticGrid",t.staticGrid)},t.shareResult=function(){var t=u.newPanelPosition().absolute().right().top();u.open({controller:m,templateUrl:"app/panels/share.html",attachTo:e.element(document.body),position:t,panelClass:"demo-dialog-example",trapFocus:!0,zIndex:150,clickOutsideToClose:!0,clickEscapeToClose:!0,hasBackdrop:!0,controllerAs:"ctrl",locals:{$widget:""}})},t.SendToDashboard=function(t,a){var n=u.newPanelPosition().absolute().right().top();u.open({controller:h,templateUrl:"app/panels/sendtodashboard.html",attachTo:e.element(document.body),position:n,panelClass:"demo-dialog-example",trapFocus:!0,zIndex:150,clickOutsideToClose:!0,clickEscapeToClose:!0,hasBackdrop:!0,controllerAs:"ctrl",locals:{$widget:t}})},t.initNoTabs=function(){t.vars.active.table=!0,t.vars.active.draw=!0,t.vars.active.pivot=!0},t.initTableTab=function(){t.vars.active.table=!0},t.initDrawTab=function(){t.vars.active.draw=!0},t.onResizeStop=function(){},t.openEditor=function(a){o.show({controller:PlotlyEditorController,templateUrl:"app/sql/PlotlyEditor.tmpl.html",parent:e.element(document.body),locals:{w:a}}).then(function(e){t.status='You said the information was "'+e+'".'},function(){t.status="You cancelled the dialog."})},t.openEditorPlotLy=function(e){console.log("openEditorPlotLy",e),t.openEditor(e)},t.initPivotTab=function(){t.vars.active.pivot=!0}}e.module(t.app.name).controller("RenderCtrl",n),n.$inject=["$scope","$rootScope","$window","localStorageService","API","$mdSidenav","$mdDialog","$mdToast","ThemeService","$timeout","$mdPanel"]}(angular,smi2,window.$),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar, SMI2 LLC and other contributors - */ -function(e,t){function a(e){var t=this,a={date:"calendar",text:"message-text-outline","int":"numeric",code:"cow"};this.vars={},this.getIcon=function(e){return a[e]},this.constructor=function(){var a=e.get("UserVariables");_.isObject(a)||(a={});for(var n in a){var i=a[n];t.vars[n]={id:n,name:i.name,title:i.name,value:i.value,typeEdit:"text",type:i.type,icon:t.getIcon(i.type)}}},this.constructor(),this.drop=function(e){delete t.vars[e]},this.update=function(e){console.info("Update value",e),t.apply()},this.getCompletions=function(){var e=[];for(var a in t.vars){var n=t.vars[a];e.push("$"+n.name)}return e},this.get=function(){return t.vars},this.addVar=function(e,a,n){var i=a;t.vars[i]={id:i,name:a,title:a,value:n,typeEdit:"text",type:e,icon:t.getIcon(e)},t.apply()},this.apply=function(){var a={};_.forEach(t.vars,function(e,t){var n={id:e.id,name:e.title,type:e.type,value:e.value};a[e.id]=n}),e.set("UserVariables",a)}}e.module(t.app.name).service("Variables",a),a.$inject=["localStorageService"]}(angular,smi2),function(e,t){function a(t,a){var n=t.get("themeName")||"dark",i=[{isDark:!1,name:"light",title:"Light theme"},{isDark:!0,name:"dark",title:"Dark theme"}],r=i.find(function(e){return e.name==n})||i[1];return r.isDark&&e.element("body").addClass("dark"),this.isDark=function(){return r.isDark},this.get=function(){return r},{isDark:function(){return r.isDark},list:i,set:function(e){console.warn(e,n),e!=n&&(console.log("localStorageService.set('themeName', ",e),t.set("themeName",e),a.reload(),window.location.reload())},get:function(){},theme:r.name,themeObject:r}}e.module(t.app.name).service("ThemeService",a),a.$inject=["localStorageService","$state"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar/SMI2 LLC and other contributors - */ -function(e,t){function a(e){var t=this;this.snippets={},this.constructor=function(){var a=e.get("UserSnippets");_.isObject(a)||(a={});for(var n in a){var i=a[n];t.snippets[n]={id:n,code:i.code,dt:i.dt}}console.log("UserSnippets",t.snippets)},this.constructor(),this.getCompletions=function(){var e=[];for(var a in t.snippets){var n=t.snippets[a];e.push(n.code)}return e},this.getSnippets=function(){return t.snippets},this.drop=function(e){delete t.snippets[e]},this.update=function(e){console.info("Update value",e),t.apply()},this.hashCode=function(e){return e.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)},this.add=function(e){e=e.trim();var a="SQL_"+Math.abs(t.hashCode(e));console.log("UserSnippets",e,a),t.snippets[a]={id:a,code:e,dt:Date.now()},t.apply()},this.apply=function(){var a={};_.forEach(t.snippets,function(e,t){var n={id:e.id,code:e.code,dt:e.dt};a[e.id]=n}),e.set("UserSnippets",a)}}e.module(t.app.name).service("Snippets",a),a.$inject=["localStorageService"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){function a(e,t){var a=this,n={limitRows:5e3,limitTimes:5,fontSize:14,editorTheme:"cobalt",theme:"dark",saveTabs:!0,liveAutocompletion:!0,disableAutohelp:!1,disableHotKeyCmdLeft:!0,delimiter:";;",liveAutocompletionDelay:500,liveAutocompletionThreshold:1,useWrapMode:!0,showInvisibles:!1},i=["ligth","dark"],r=["ambiance","eclipse","mono_industrial","tomorrow_night_blue","chaos","github","monokai","tomorrow_night_bright","chrome","idle_fingers","pastel_on_dark","tomorrow_night_eighties","clouds","iplastic","solarized_dark","tomorrow_night","clouds_midnight","katzenmilch","solarized_light","twilight","cobalt","kr_theme","sqlserver","vibrant_ink","crimson_editor","kuroir","terminal","xcode","dawn","merbivore","textmate","dreamweaver","merbivore_soft","tomorrow","dracula"];this.current={},this.constructor=function(){var t=e.get("UserPreference");a.current=_.merge(n,t)},this.constructor(),this.getThemes=function(){return i},this.getEditorThemes=function(){return r},this.apply=function(e){_.forEach(e,function(e,t){a.set(t,e)}),a.save()},this.save=function(){console.log("localStorageService,set",a.current),e.set("UserPreference",a.current)},this.getCurrentState=function(){return a.current},this.get=function(e){return n[e]},this.set=function(e,t){("limitRows"==e||"limitTimes"==e||"fontSize"==e||"liveAutocompletionDelay"==e||"liveAutocompletionThreshold"==e)&&(t=parseInt(t)),a.current[e]=t}}e.module(t.app.name).service("Preference",a),a.$inject=["localStorageService","ThemeService"]}(angular,smi2),function(e,t){function a(e,t){return{responseError:function(a){return 401==a.status&&t.get("$state").go("login"),e.reject(a)}}}e.module(t.app.name).service("HttpInterceptor",a),a.$inject=["$q","$injector"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){function a(t,a,n,i,r){var s=this,o="currentBaseConfig",l=new DatabaseStructure,c=null,d={},u=n.get(o);u&&(u.host||u.tabix)&&(d=u),this.setConnection=function(t){n.set(o,t),d=e.copy(t)},this.isAuthorized=function(){return s.isTabixServer()?d&&d.tabix?d.tabix.server:!1:d?d.host:!1},this.clear=function(){c=null,d={},n.set(o,{}),l=new DatabaseStructure},this.hashCode=function(e){return e.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)},this.DS_CacheKey=function(){var e="_databaseStructure:"+JSON.stringify(d);return e=s.hashCode(e)},this.DS_storeCache=function(e,t,a,i,r){var o={columns:e,tables:t,databases:a,dictionaries:i,functions:r,ttl:Date.now()};return n.set(s.DS_CacheKey(),o)},this.DS_fetchFromCache=function(){var e=n.get(s.DS_CacheKey());if(!e||!e.ttl)return!1;var t=(Date.now()-e.ttl)/36e5;return t>1.5?!1:e&&e.functions&&e.functions.length>1?(l.init(e.columns,e.tables,e.databases,e.dictionaries,e.functions),!0):!1},this.memory=function(e){},this.resetDatabaseStructure=function(){console.log("reset databaseStructure"),n.set("_databaseStructure:"+s.getHost()+":"+s.getLogin(),[])},this.databaseStructure=function(e,t){return!t&&l.isInit()?e(l):!t&&s.DS_fetchFromCache()&&l.isInit()?(console.info("restore from cache : database Structure!"),e(l)):(t&&(l=new DatabaseStructure),console.time("Load Database Structure!"),void s.fetchQuery("SELECT * FROM system.columns").then(function(t){s.fetchQuery("SELECT database,name,engine FROM system.tables").then(function(a){s.fetchQuery("SELECT name FROM system.databases").then(function(n){s.fetchQuery("SELECT name,key,attribute.names,attribute.types from system.dictionaries ARRAY JOIN attribute ORDER BY name,attribute.names",null).then(function(i){s.fetchQuery("SELECT name,is_aggregate from system.functions",null).then(function(r){return console.timeEnd("Load Database Structure!"),s.DS_storeCache(t.data,a.data,n.data,i.data,r.data),l.init(t.data,a.data,n.data,i.data,r.data),e(l)},function(e){throw e})},function(e){throw e})},function(e){throw e})},function(e){throw e})},function(e){throw e}))},this.getConnectionInfo=function(){return d},this.setDatabase=function(e){return c=e},this.getDatabase=function(){return c},this.getHost=function(){return d.host},this.getPassword=function(){return d.password},this.getLogin=function(){return d.login},this.makeQueryId=function(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=0;8>a;a++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},this.isTabixServer=function(){return d.tabix&&d.tabix.server?!0:!1},this.makeSqlQuery=function(e,t){var a="";return t!==!1?(t=t||" FoRmAt JSON","null"==t&&(t=""),a=e+"\n\n"+t):a=e,a},this.direct_makeUrlRequest=function(e,t){var a="",n="";d.host.indexOf("://")>0||0==d.host.indexOf("/")||(n="http://"),a=n+d.host,a+="/?",a+="add_http_cors_header=1&log_queries=1&output_format_json_quote_64bit_integers=1",d.NotCH1_1_54276||(a+="&output_format_json_quote_denormals=1");return d.baseauth||(a+=d.password?"&user="+encodeURIComponent(d.login)+"&password="+encodeURIComponent(d.password):"&user="+encodeURIComponent(d.login)),e&&(a+="&database="+encodeURIComponent(c)),t&&(a+="&"+t),d.params&&(a+="&"+d.params),a},this.fetchQuery=function(e,t,a,n){return s.isTabixServer()?s.ts_fetchQuery(e,t,a,n):s.direct_fetchQuery(e,t,a,n)},this.pushProjectState=function(e){return s.fetchTabixServer("projectstate/push",e)},this.getProjectState=function(e){return s.fetchTabixServer("projectstate/fetch",e)},this.getStructure=function(e){return s.fetchTabixServer("structure",e)},this.getWidget=function(e,t){return s.fetchTabixServer("widget/"+e,t)},this.getDashboard=function(e,t){return s.fetchTabixServer("dashboard/"+e,t)},this.getDashboardsTree=function(e){return s.fetchTabixServer("dashboards",e)},this.fetchTabixServer=function(e,t,a){_.isObject(t)||(t={});var n=d.tabix.server;n=n+"/"+e+"?tabix_client="+window.TabixVersion+"&random="+Math.round(1e8*Math.random()),a&&(n+="&"+a);var i={version:window.TabixVersion,auth:{login:d.tabix.login,password:d.tabix.password,confid:d.tabix.confid}};i=Object.assign(t,i);var r={mode:"cors",method:"post",headers:{"Content-type":"application/json; charset=UTF-8"},body:JSON.stringify(i)};console.info("TS Request",n,r);var s=new Request(n,r);return fetch(s).then(function(e){var t=e.headers.get("content-type");return t.includes("text/plain")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t&&t.includes("application/json")&&e.status>=200&&e.status<300?Promise.resolve(e):e.text().then(Promise.reject.bind(Promise))}).then(function(e){return"OK"===e?"OK":e.json()},function(e){return Promise.reject(e)})},this.ts_fetchQuery=function(e,t,a,n){return s.fetchTabixServer("query",{query:s.makeSqlQuery(e,a)},n)},this.direct_fetchQuery=function(e,t,a,n){var i=s.makeSqlQuery(e,a),r=s.direct_makeUrlRequest(t,n),o={mode:"cors",method:"post",headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"},body:i};d.includeCredentials&&(o.credentials="include");var l=new Request(r,o);return fetch(l).then(function(e){var t=e.headers.get("content-type");return t.includes("text/tab-separated-values")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t.includes("text/plain")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t&&t.includes("application/json")&&e.status>=200&&e.status<300?Promise.resolve(e):e.text().then(Promise.reject.bind(Promise))}).then(function(e){return"OK"===e?"OK":e.json()},function(e){return Promise.reject(e)})}}e.module(t.app.name).service("API",a),a.$inject=["$http","$q","localStorageService","$sanitize","ThemeService"]}(angular,smi2);var DatabaseStructure=function(){function e(){_classCallCheck(this,e),this._init=!1,this.uciq_fields=[],this.all_fields=[],this.all_db_fields=[],this.uciq_dbtables=[]}return _createClass(e,[{key:"init",value:function(e,t,a,n,i){var r=this;console.log("Try init DS...."),this._init||(this.columns=e,this.tables=t,this.databases=a,this.functions=i,this.dictionaries=n,this.columns.forEach(function(e){!angular.isUndefined(e.default_kind)&&angular.isUndefined(e.default_type)&&(e.default_type=e.default_kind),r.all_fields[e.database+"."+e.table]||(r.all_fields[e.database+"."+e.table]=[]),_.isArray(r.all_db_fields[e.database])||(r.all_db_fields[e.database]=[]),_.isArray(r.all_db_fields[e.database][e.table])||(r.all_db_fields[e.database][e.table]=[]),r.all_db_fields[e.database][e.table].push(e),r.all_fields[e.database+"."+e.table].push({name:e.name,type:e.type,active:!0}),r.uciq_fields[e.database]||(r.uciq_fields[e.database]=[]),_.isArray(r.uciq_fields[e.database])||(r.uciq_fields[e.database]=[]),_.isArray(r.uciq_fields[e.database])||(r.uciq_fields[e.database]=[]),r.uciq_fields[e.database].push(e),r.uciq_dbtables[e.database+"."+e.table]=1}),console.log("DS init ... done"),this._init=!0)}},{key:"isInit",value:function(){return this._init&&this.functions&&this.functions.length>1}},{key:"getTables",value:function(){return this.tables}},{key:"getDatabases",value:function(){return this.databases}},{key:"getFieldsByDatabase",value:function(e){return this.all_db_fields[e]}},{key:"getFunctions",value:function(){return this.functions}},{key:"getFields",value:function(){return this.all_fields}},{key:"getUniqueDatabaseTables",value:function(){return this.uciq_dbtables}},{key:"getAllFieldsInDatabase",value:function(e){return this.uciq_fields[e]}},{key:"getDictionaries",value:function(){return this.dictionaries}},{key:"getColumns",value:function(){return this.columns}}]),e}();/* - * Copyright (C) 2017 IgorStrykhar in SMI2 - * All rights reserved. - */ -!function(e,t,a){function n(e,t,a){e.vars={AceThemes:t.getEditorThemes(),Themes:t.getThemes()},e.state=t.getCurrentState(),e.apply=function(){t.apply(e.state),e.state=t.getCurrentState(),a.go("sql")},e.reloadCache=function(){}}e.module(t.app.name).controller("PreferenceController",n),n.$inject=["$scope","Preference","$state"]}(angular,smi2,window.$),function(e,t){function a(t,a,n,i,r,s,o){var l="proc.interval",c="proc.key";t.widgets=[],t.staticGrid=!0,t.gridStackOptions={cellHeight:200,verticalMargin:0,disableDrag:!0,disableResize:!0,staticGrid:!0},t.logData={},t.vars={readOnlyRows:!0,canShowTable:!1,WidgetTable:!1,queryesToKill:{},clusterMode:!0,logMode:!0,loading:!1,isClusterLoad:!1,clusterList:!1,isDark:n.isDark(),sort:/^[a-z0-9_]+$/.test(r.get(c))?r.get(c):null,interval:r.get(l)||-1};var d=null;t.initClusterConfig=function(){var e="SELECT host_address,port FROM system.clusters GROUP BY host_address,port LIMIT 10";t.vars.clusterList=[],a.fetchQuery(e).then(function(e){e.data.forEach(function(e){t.vars.clusterList.push(e.host_address+":"+e.port)}),t.vars.isClusterLoad=!0,console.log("Cluster nodes list",t.vars.clusterList.join(",")),t.load()},function(e){t.vars.isClusterLoad=!0,console.error("Error "+e)})},t.flush=function(){t.logData={}},t.megreProcessData=function(e){return e.forEach(function(e){if(t.logData[e.hash]){var a=t.logData[e.hash].count;t.logData[e.hash].initial_query_id!=e.initial_query_id&&(a+=1),e.count=a,t.logData[e.hash]=e}else e.count=1,t.logData[e.hash]=e}),_.values(t.logData)},t.load=function(){console.info("Call load processes");var e="SELECT now() as dt, query, 1 as count,\n toUInt64(toUInt64(read_rows) + toUInt64(written_rows)) as rows,\n round(elapsed,1) as elapsed ,\n formatReadableSize(toUInt64(read_bytes)+toUInt64(written_bytes)) as bytes, \n formatReadableSize(memory_usage) as memory_usage,\n formatReadableSize(read_bytes) as bytes_read,\n formatReadableSize(written_bytes) as bytes_written, \n * , \n cityHash64(query) as hash, \n hostName()";t.vars.isClusterLoad&&t.vars.clusterList&&t.vars.clusterMode?e=e+" FROM remote('"+t.vars.clusterList.join(",")+"',system.processes, '"+a.getLogin()+"','"+a.getPassword()+"') ":e+=" FROM system.processes ",e+=" /* 12XQWE3X1X2XASDF */ WHERE query not like '%12XQWE3X1X2XASDF%'",t.vars.readOnlyRows&&(e+=" AND read_rows>0"),a.fetchQuery(e).then(function(e){var a=new DataProvider(e);t.widgets[0]?t.vars.logMode?t.widgets[0].updateData(t.megreProcessData(a.data)):t.widgets[0].updateData(a.data):(a.setColumnsHumanSort(["bytes","memory_usage","bytes_read","bytes_written"]),a.setSort("rows",-1),t.widgets[0]=new WidgetTable(a,!1,12,9),a.data.forEach(function(e){t.logData[e.hash]=e})),t.vars.canShowTable=!0,t.vars.data=!0,t.vars.loading=!1,t.$applyAsync()},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.setInterval=function(){r.set(l,t.vars.interval),d&&(i.cancel(d),d=null),t.vars.interval>-1&&(d=i(t.load,1e3*t.vars.interval))},t.$on("$destroy",function(){t.vars.interval=-1,i.cancel(d),t.setInterval()}),t.initClusterConfig(),t.vars.interval>-1&&t.setInterval(),t.dialogKill=function(n){var i="SELECT now() as dt,query,1 as count,\n \n formatReadableSize(read_bytes) as read_bytes, \n formatReadableSize(written_bytes) as written_bytes, \n formatReadableSize(memory_usage) as memory_usage,\n read_rows,written_rows,\n \n query_id as hash,\n round(elapsed,4) as elapsed \n FROM system.processes /* 12XQWE3X1X2XASDF */ WHERE query not like '%12XQWE3X1X2XASDF%' ORDER BY elapsed DESC";a.fetchQuery(i).then(function(i){s.show({controller:["$scope",function(e){e.queryesToKill=i.data,e.kill=function(e){var t="KILL QUERY WHERE query_id='"+e.hash+"' SYNC",i=s.confirm().title(t+" ?").textContent(e.query).ariaLabel("Lucky day").targetEvent(n).ok("Please do it!").cancel("Sounds like a scam");s.show(i).then(function(){a.fetchQuery(t,!1).then(function(e){s.show(s.alert().clickOutsideToClose(!0).title("Result: "+t).textContent(e).ariaLabel("Alert").ok("Ok!").targetEvent(n))},function(e){s.show(s.alert().clickOutsideToClose(!0).title("Error: "+t).textContent(e.data).ariaLabel("Error on Kill").ok("Ok!").targetEvent(n))})},function(){})},e.cancel=function(){s.cancel()}}],templateUrl:"app/metrics/dialog.kill.html",parent:e.element(document.body),targetEvent:n,clickOutsideToClose:!0}).then(function(e){t.status='You said the information was "'+e+'".'},function(){t.status="You cancelled the dialog."})})}}e.module(t.app.name).controller("ProcessesController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","hotRegisterer"]}(angular,smi2),/* - * Copyright (C) 2017 IgorStrykhar in Tabix LLC - * All rights reserved. - */ -function(e,t,a){function n(e,t,a){e.widgets=[],e.staticGrid=!0,e.gridStackOptions={cellHeight:200,verticalMargin:0,disableDrag:!0,disableResize:!0,staticGrid:!0},e.vars={uiTheme:a.themeObject,isDark:a.isDark()},e.dumpStaticGridSizes=function(){console.info("dumpStaticGridSizes");var t=[];e.widgets.map(function(e){var a={id:e.id,x:e.x,y:e.y,sizeX:e.sizeX,sizeY:e.sizeY};t.push(a),console.log(a)}),console.log(t)},e.initTab=function(){console.info("initPivotTab")},e.setWidgets=function(t,a){a.id=t,a.x=e.widgets[t].x,a.y=e.widgets[t].y,a.sizeX=e.widgets[t].sizeX,a.sizeY=e.widgets[t].sizeY,e.widgets[t]=a,e.$applyAsync()},e.init=function(){e.widgets=[{id:0,x:0,y:0,sizeX:4,sizeY:2},{id:1,x:8,y:0,sizeX:4,sizeY:2},{id:2,x:4,y:0,sizeX:4,sizeY:2},{id:3,x:0,y:4,sizeX:8,sizeY:3},{id:4,x:8,y:2,sizeX:4,sizeY:4},{id:5,x:0,y:2,sizeX:8,sizeY:2}],console.info("Init OverviewController"),t.fetchQuery("SELECT * FROM system.build_options").then(function(t){e.setWidgets(0,new WidgetTable(new DataProvider(t)))}),t.fetchQuery("SELECT database,table,name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns").then(function(t){var a={path:"database.table.name.data_compressed_bytes",title:"columns data_compressed_bytes",tooltip:"Size",valueformat:"0.00 b"},n={drawtype:"TREEMAP",code:a};e.setWidgets(1,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("SELECT database,table,sum(data_compressed_bytes) as data_compressed_bytes FROM system.columns GROUP BY database,table").then(function(t){var a={path:"database.table.data_compressed_bytes",title:"columns data_compressed_bytes",tooltip:"Size",valueformat:"0.00 b"},n={drawtype:"TREEMAP",code:a};e.setWidgets(2,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("select toStartOfDay(modification_time) as dt,\n sum(bytes) as bytes FROM system.parts group by dt order by dt LIMIT 30000").then(function(t){var a={autoAxis:!0,markLine:!0,title:"system.parts bytes"},n={drawtype:"CHART",code:a};e.setWidgets(3,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("select concat(database,'.',table) as table,sum(bytes) as bytes from system.parts\n group by table order by bytes desc LIMIT 3000").then(function(t){var a={title:"table bytes"},n={drawtype:"BAR",code:a};e.setWidgets(4,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("SELECT * FROM system.clusters").then(function(t){e.setWidgets(5,new WidgetTable(new DataProvider(t)))})},e.init()}e.module(t.app.name).controller("OverviewController",n),n.$inject=["$scope","API","ThemeService"]}(angular,smi2,window.$),function(e,t){function a(t,a,n,i,r,s,o){var l="proc.metrica",c="proc.metrica_max";t.data=[],t.metrcisChart=!1,t.maxlength=r.get(c)||50,t.chartData={},t.orderKeys={},t.preState={},t.EChartOptions={},t.vars={logEvents:!1,initChart:!1,isDark:n.isDark(),interval:r.get(l)||-1,scrollConfig:{autoHideScrollbar:!1,theme:n.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},e.element(o).bind("resize",function(){t.metrcisChart&&t.vars.initChart&&t.metrcisChart.resize()}),t.initChart=function(e){if(t.vars.initChart){for(var a in e)if("time"!=a){t.chartData[a].length>t.maxlength&&t.chartData[a].shift();var i=parseInt(e[a]);i-parseInt(t.preState[a]);t.chartData[a].push([e.time,i])}return t.metrcisChart.setOption(t.EChartOptions),void(t.preState=e)}if(e.time){t.preState=e;var r=[],s=[],o=[],l=[],c=[],d=0,u=0;for(var m in e)if("time"!=m){t.orderKeys[m]=d;var h=parseInt(e[m]);t.chartData[m]=[],t.chartData[m].push([e.time,h]),r.push({show:!0,borderWidth:0,shadowBlur:2}),s.push({show:!1,type:"time",splitLine:{show:!1},gridIndex:d}),o.push({type:"value",show:!1,scale:!0,splitLine:{show:!1},name:"value",boundaryGap:[0,"100%"],min:"dataMin",max:"dataMax",gridIndex:d}),c.push({textAlign:"center",text:m,textStyle:{fontSize:10,fontWeight:"normal"}}),l.push({name:m,type:"line",data:t.chartData[m],xAxisIndex:d,yAxisIndex:u,showSymbol:!1,hoverAnimation:!1}),d+=1,u+=1}var p=Math.ceil(Math.sqrt(d));r.forEach(function(e,t){e.left=t%p/p*100+.5+"%",e.top=Math.floor(t/p)/p*100+.5+"%",e.width=1/p*100-2+"%",e.height=1/p*100-2+"%",c[t].left=parseFloat(e.left)+parseFloat(e.width)/2+"%",c[t].top=parseFloat(e.top)+"%"});var g={version:3,title:c.concat([{text:"Metrics",top:"bottom",left:"center"}]),toolbox:{show:!0,feature:{saveAsImage:{show:!0}}},width:"100%",group:"group",grid:r,xAxis:s,yAxis:o,series:l,tooltip:{showDelay:0,backgroundColor:"#2c343c",trigger:"axis",formatter:function(e){e=e[0];var t=new Date(e.value[0]),a=e.value[1],n=a;return e.seriesName.toLowerCase().includes("bytes")?a=numbro(a).format("0.0000b"):a>1e4&&(a=numbro(a).format("0.0000a")),e.seriesName+"

"+moment(t).format("h:mm:ss")+"
"+a+"
"+(n!=a?"
"+n+"
":"")},axisPointer:{animation:!1}}};t.vars.initChart=!0,t.EChartOptions=Object.assign(g,t.EChartOptions);var b="macarons";n.isDark()&&(b="dark"),t.metrcisChart=echarts.init(document.querySelector("#metrcisChart"),b),t.metrcisChart.setOption(t.EChartOptions),t.metrcisChart.resize()}};var d=null;t.$watch("vars.logEvents",function(){t.flushChart()},!0),t.flushChart=function(){t.vars.initChart&&(t.chartData={},t.metrcisChart.dispose(),t.EChartOptions={},t.vars.initChart=!1,t.load())},t.flush=function(){for(var e in t.chartData)for(var a=t.chartData[e].length,n=0;a-2>n;n++)t.chartData[e].shift();t.metrcisChart.setOption(t.EChartOptions),t.metrcisChart.resize(),t.load()},t.load=function(){t.vars.loading=!0;var e=" SELECT metric,toInt64(value) as value,'metrics' as type FROM system.metrics ORDER BY metric ";e+=" UNION ALL SELECT metric,toInt64(value) as value,'async' as type FROM system.asynchronous_metrics ORDER BY metric ",t.vars.logEvents&&(e+=" UNION ALL SELECT event as metric, toInt64( value) as value,'events' as type FROM system.events ORDER BY metric"),a.fetchQuery(e).then(function(e){t.vars.loading=!1;var a={time:Date.now()};e.data.forEach(function(e){var t="";"events"==e.type&&(t=" "),a[e.metric+t]=e.value}),t.initChart(a)},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.setMaxlength=function(){r.set(c,t.maxlength)},t.setInterval=function(){r.set(l,t.vars.interval),d&&(i.cancel(d),d=null),t.vars.interval>-1&&(d=i(t.load,1e3*t.vars.interval))},t.$on("$destroy",function(){t.vars.interval=-1,i.cancel(d),t.setInterval()}),t.load(),t.vars.interval>-1&&t.setInterval()}e.module(t.app.name).controller("MetricschartController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","$window"]}(angular,smi2),function(e,t){function a(e,t,a,n,i,r,s){e.vars={uiTheme:a.themeObject,isDark:a.isDark(),selectedTabResultIndex:0,active:{Overview:!1,Chart:!1,Processes:!1}},e.initProcessesTab=function(t){e.vars.active.Processes=!0},e.initChartTab=function(t){e.vars.active.Chart=!0},e.initOverviewTab=function(t){e.vars.active.Overview=!0}}e.module(t.app.name).controller("MetricsController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","$window"]}(angular,smi2),function(e,t){function a(a,n,i,r,s,o,l){var c="basesConfig";a.isChrome=/Chrome/.test(navigator.userAgent),a.vars={bases:i.get(c)||[],db:{},loading:!1,version:t.app.version,themes:o.list},a.loginCheckDone=function(){r.databaseStructure(function(e){console.log("loginCheckDone ... DS ... done"),n.go("sql")},!0)},a.login=function(){if(a.vars.loading=!0,a.vars.db.id){for(var t=0;t=1024;)t/=1024,n++;return t.toFixed(+a)+" "+e[n]}})}(angular,smi2);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors - */ -var Widget=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:!1;_classCallCheck(this,e),this._scheduledResize=!1,this.data=t,this.drawCommnads=a,this.title=!1,this._draw=!1,a&&this.drawCommnads.drawtype?this.drawType=this.drawCommnads.drawtype.toUpperCase():this.drawType=!1,this.error=this.data.error,this.text=this.data.text,this.name="Widget",this.element=!1,this.init=!1,_.isNumber(n)&&(this.sizeX=n),_.isNumber(i)&&(this.sizeY=i),this.type=!1;var r=angular.element("*[ng-app]").injector().get("ThemeService").isDark();this.isDark=r,window.isDarkTheme=r}return _createClass(e,[{key:"applySettings",value:function(e){console.log("applySettings",e),_.isObject(e)&&e.title&&(this.title=e.title)}},{key:"onDrag",value:function(){}},{key:"getSizeElementHeight",value:function(){var e=this.element[0].offsetHeight;return 100>e&&(e=100),e}},{key:"getSizeElementWidth",value:function(){return this.element[0].offsetWidth}},{key:"destroy",value:function(e){return console.info("Destroy widget is empty"),!1}},{key:"onResize",value:function(){}},{key:"scheduledResize",value:function(){if(!this._scheduledResize){this._scheduledResize=!0;var e=this;setTimeout(function(){e._scheduledResize=!1,e.onResize()},200)}}},{key:"toString",value:function(){return"("+this.name+", "+this.y+")"}}]),e}(),WidgetTable=function(e){function t(e,a,n,i){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,n,i));if(r.type="table",r.table={},r.sort=!1,r.hotId="hotIdTable"+Math.floor(1e7*Math.random()),r.handsonTable={},r.error)return r.sizeY=2,r.sizeX=12,r.init=!1,_possibleConstructorReturn(r);if(r.text)return r.sizeY=4,r.sizeX=12,r.init=!1,_possibleConstructorReturn(r);var s=new HandsTable(r.isDark,r.data.meta,{sort:r.data.sortByColl(),sortOrder:r.data.sortOrderBy(),humanSortCols:r.data.getColumnsHumanSort()});if(r.table={settings:s.makeSettings()},r.table.settings.hotId=r.hotId,!r.sizeX&&!r.sizeY){var o=s.countColumns();r.initTableWSize(o)}return r.init=!0,r}return t.$inject=["DataProvider","draw","sizeX","sizeY"],_inherits(t,e),_createClass(t,[{key:"initTableWSize",value:function(e){var t=1;e>2&&(t=2),e>5&&(t=3),e>10&&(t=4),e>15&&(t=6),"statistics"==this.data.sourceType&&(t=6),this.sizeX=t,this.sizeY=1,this.data.rows>60&&(this.sizeY=1),this.data.rows>250&&(this.sizeY=2),this.data.rows>500&&(this.sizeY=3),1==this.data.countAll&&(this.sizeX=6,this.sizeY=3),this.sizeY=2*this.sizeY,this.sizeX=2*this.sizeX}},{key:"destroy",value:function(e){return function(){e.handsonTable.destroy(),e.handsonTable=null,e.data.data=null,e.settings=null,e.table=null,e.init=!1,e.element.html()}}},{key:"preProcessor",value:function(){}},{key:"postProcessor",value:function(){var e=this.table.settings;e.width=this.getSizeElementWidth(),e.height=this.getSizeElementHeight(),e.data=this.data.data,this.handsonTable=new Handsontable(this.element[0],e)}},{key:"onDrag",value:function(){this.onResize()}},{key:"updateData",value:function(e){var t=this.handsonTable,a=t.sortColumn,n=t.sortOrder;this.data.update(e),this.handsonTable.loadData(e),this.handsonTable.updateSettings({columnSorting:{column:a,sortOrder:n}}),this.handsonTable.render()}},{key:"onResize",value:function(){if(console.info("table.onResize()"),this.init&&this.handsonTable){var e=this.getSizeElementWidth(),t=this.getSizeElementHeight();if(this.handsonTable.getSettings().width!=e||this.handsonTable.getSettings().height!=t)return this.handsonTable.updateSettings({width:e,height:t}),this.handsonTable.render(),!0}}}]),t}(Widget);angular.module(smi2.app.name).service("WidgetTable",WidgetTable);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -var WidgetPivot=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a));return n.type="pivot",n.error||n.text?_possibleConstructorReturn(n):(n.init=!0,n.renderers=$.extend($.pivotUtilities.renderers,$.pivotUtilities.c3_renderers,$.pivotUtilities.d3_renderers,$.pivotUtilities.export_renderers,$.pivotUtilities.subtotal_renderers),n.pivot={config:{dataClass:$.pivotUtilities.SubtotalPivotData,renderer:n.renderers}},1==n.data.countAll&&(n.sizeX=6,n.sizeY=3),n.sizeY=2*n.sizeY,n.sizeX=2*n.sizeX,n)}return t.$inject=["DataProvider","draw"],_inherits(t,e),t}(Widget);angular.module(smi2.app.name).service("WidgetPivot",WidgetPivot);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -var WidgetDraw=function(e){function t(e,a,n,i){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,n,i));return r.type="draw",r.error||r.text?_possibleConstructorReturn(r):(r.library=!1,r._list={GRAPH:DrawEchartsGraph,PLOTLY:DrawPlotly,HEATMAP:DrawEchartsHeatmap,CALENDAR:DrawEchartsCalendar,RAW:DrawEchartsMap,BAR:DrawEchartsBar,RIVER:DrawEchartsRiver,MAP:DrawEchartsMap,GMAPS:DrawGoogleMap,TREEMAP:DrawEchartsTreemap,FLATTREE:DrawEchartsFlatTree,SANKEYS:DrawEchartsSunkeys,CHART:DrawEchartsChart,GRIDCHART:DrawEchartsGridChart,TEXT:DrawText,D3:DrawD3,C3:DrawC3},r.init=r.getChartClass(),r.sizeX||r.sizeY||(r.sizeX=6,r.sizeY=3,"TEXT"==r.drawType&&(r.sizeX=1,r.sizeY=2),1==r.data.countAll&&(r.sizeX=12,r.sizeY=3)),r)}return t.$inject=["DataProvider","draw","sizeX","sizeY"],_inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this._draw&&this._draw.onResize()}},{key:"getChartClass",value:function(){return this.drawType||(this.drawType="CHART",console.error("Un support DrawType:null")),this._list[this.drawType]?!0:(console.error("Un support DrawType:"+this.drawType),!1)}},{key:"draw",get:function(){return this.drawType&&!this._draw&&(this._draw=new this._list[this.drawType](this,this.drawType)),this._draw}}]),t}(Widget);angular.module(smi2.app.name).service("WidgetDraw",WidgetDraw);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors - */ -var HandsTable=function(){function e(t,a,n){_classCallCheck(this,e),this.isDarkTheme=t,this.meta=a,this.Preset=n}return e.$inject=["isDark","metaData","Preset"],_createClass(e,[{key:"_handsRenderer",value:function(e,t,a,n,i,r,s){"numeric"==s.type?null==r||"-nan"==r||"inf"==r||"+nan"==r||"+inf"==r||"-inf"==r||"nan"==r?(null==r&&(arguments[5]="NULL"),t.style.color="black",t.style.background="red",Handsontable.renderers.TextRenderer.apply(this,arguments)):Handsontable.renderers.NumericRenderer.apply(this,arguments):"date"==s.type||"time"==s.type?(moment(new Date(r)).isValid()&&s.renderDateFormat&&(r=moment(r).format(s.renderDateFormat)),arguments[5]=r,Handsontable.renderers.TextRenderer.apply(this,arguments)):Handsontable.renderers.TextRenderer.apply(this,arguments),s.backgroundColor&&(t.style.backgroundColor=s.backgroundColor),s.color&&(t.style.color=s.color)}},{key:"countColumns",value:function(){return this.meta.length}},{key:"makeColumns",value:function(){var e=this,t=this.Preset.humanSortCols,a=[],n=[],i={},r=0;return this.meta.forEach(function(s){i[s.name]=r,r++,a.push(s.name);var o={};switch(o.type="text",o.width=100,o.typeOriginal=s.type,o.isDark=e.isDarkTheme,s.type.includes("Int64")?(o.type="text",o.width=100,_.isObject(e.meta.prepareInt64Cols)&&e.meta.prepareInt64Cols[s.name]&&(o.type="numeric")):s.type.includes("Int")&&(o.width=80,o.type="numeric"),s.type){case"Date":o.width=90,o.type="date",o.dateFormat="YYYY-MM-DD";break;case"DateTime":o.width=150,o.type="time",o.timeFormat="YYYY-MM-DD HH:mm:ss";break;case"Float32":o.width=80,o.type="numeric",o.format="0.[0000000]";break;case"Float64":o.width=80,o.type="numeric",o.format="0.[0000000]";break;case"String":o.width=180}o.renderer=e._handsRenderer,o.data=s.name,_.isArray(t)&&_.indexOf(t,s.name)>-1&&(o.sortFunction=function(e){var t=Handsontable.helper.objectEach,a={TiB:1099511627776,GiB:1073741824,MiB:1048576,KiB:1024,B:1},n=function(e,t,a){return _.isUndefined(e)?e:(isNaN(e)&&e.indexOf(" "+t)>-1&&(e=parseFloat(e.replace(t,""))*a),e)};return function(i,r){var s=i[1],o=r[1];return t(a,function(e,t){s=n(s,t,e),o=n(o,t,e)}),o>s?e?-1:1:s>o?e?1:-1:0}}),n.push(o)}),{colHeaders:a,columns:n,colPositions:i}}},{key:"fecthContextMenu",value:function(){return{items:{columnformat:{name:"Column format",submenu:{items:[{name:"Reset",key:"columnformat:1",callback:function(t,a,n){e.makeFormat(this,"Reset")}},{name:"Money",key:"columnformat:2",callback:function(t,a,n){e.makeFormat(this,"Money")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Human",key:"columnformat:3",callback:function(t,a,n){e.makeFormat(this,"Human")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Bytes",key:"columnformat:4",callback:function(t,a,n){e.makeFormat(this,"Bytes")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Percentages",key:"columnformat:5",callback:function(t,a,n){e.makeFormat(this,"Percentages")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Time only",key:"columnformat:6",callback:function(t,a,n){e.makeFormat(this,"Time")},disabled:function(){return!e.isFormatColl(this,"Time")}},{name:"Date only",key:"columnformat:7",callback:function(t,a,n){e.makeFormat(this,"Date")},disabled:function(){return!e.isFormatColl(this,"Date")}},{name:"Date loc.",key:"columnformat:8",callback:function(t,a,n){e.makeFormat(this,"DateLoc")},disabled:function(){return!e.isFormatColl(this,"Date")}},{name:"Float",key:"columnformat:9",callback:function(t,a,n){e.makeFormat(this,"Float")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Heatmaps",key:"columnformat:10",callback:function(t,a,n){e.makeHeatmaps(this,"Heatmaps")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Negative & Positive",key:"columnformat:11",callback:function(t,a,n){e.makeHeatmaps(this,"NegaPosi")},disabled:function(){return!e.isFormatColl(this,"numeric")}}]}},style:{name:"Style",submenu:{items:[{name:"Normal",callback:function(t,a,n){e.makeStyle(this,"Normal")},key:"style:normal"},{name:"Bold",callback:function(t,a){e.makeStyle(this,"Bold")},key:"style:makebold"},{name:"Red color",callback:function(t,a){e.makeStyle(this,"Red")},key:"style:red"},{name:"Green color",callback:function(t,a){e.makeStyle(this,"Green")},key:"style:green"},{name:"Yellow color",callback:function(t,a){e.makeStyle(this,"Yellow")},key:"style:yellow"},{name:"Orange color",callback:function(t,a){e.makeStyle(this,"Orange")},key:"style:orange"}]}},hsep1:"---------",copyTo:{name:"To Clipboard",submenu:{items:[{name:"Redmine Markdown",callback:function(t,a,n){console.info("copyToClipboard"),e.copyToClipboard(this,"Redmine")},key:"copyTo:1"},{name:"Redmine Markdown (full)",callback:function(t,a,n){console.info("copyToClipboard"),e.copyToClipboard(this,"Redmine",!0)},key:"copyTo:2"},{name:"WHERE col1 IN (val,val),col2 IN ...",callback:function(t,a,n){console.info("makeWhereIn"),e.makeWhereIn(this)},key:"copyTo:3"},{name:"Create TABLE...",callback:function(t,a,n){e.makeCreateTable(this)},key:"copyTo:4"}]}},hsep3:"---------",Transform:{name:"Transpose full table",callback:function(t,a,n){e.Transpose(this,"Transpose")}},Calculate:{name:"Calc Avg & Sum & Median",callback:function(t,a,n){e.Calc(this,"All")}},hsep4:"---------",undo:{},make_read_only:{},alignment:{},hsep5:"---------"}}}},{key:"makeSettings",value:function(){var e=this.makeColumns(),t={observeChanges:!1,observeDOMVisibility:!0,dropdownMenu:!0,manualColumnMove:!0,manualColumnResize:!0,rowHeaders:!0,colWidths:100,fillHandle:!1,stretchH:"all",customBorders:!0,isDark:this.isDarkTheme,filters:!0,columnSorting:!0,sortIndicator:!0,manualRowResize:!0,viewportColumnRenderingOffset:"auto",wordWrap:!1,autoColumnSize:{samplingRatio:23},columns:e.columns,colHeaders:e.colHeaders,contextMenu:this.fecthContextMenu(),currentRowClassName:this.isDarkTheme?"currentRowDark":"currentRowWhite",currentColClassName:"currentCol",renderAllRows:!1,visibleRows:1500};return this.Preset.sort&&(t.columnSorting={column:e.colPositions[this.Preset.sort]},t.columnSorting.sortOrder=this.Preset.sortOrder),t}}],[{key:"isDark",value:function(){return window.isDarkTheme}},{key:"makeHeatmaps",value:function(e,t){for(var a=e.getSelectedRange(),n=Math.min(a.from.col,a.to.col),i=Math.max(a.from.col,a.to.col),r="#a900e5",s="#3668ff",o=chroma.scale([r,s]),l=n;i>=l;l++){var c=e.countRows(),d=e.getDataAtCol(l),u=Math.min.apply(null,d),m=Math.max.apply(null,d);if(null!==u&&null!==m)for(var h=0;c>=h;h++){var p=parseFloat(e.getDataAtCell(h,l));if("Heatmaps"==t){var g=(p-u)/(m-u),b=o(g).hex(),f=e.getCellMeta(h,l);f&&e.setCellMeta(h,l,"backgroundColor",b)}if("NegaPosi"==t){var v=!1;0>p&&(v="#e27137"),p>0&&(v="#31b3e5");var y=e.getCellMeta(h,l);y&&v&&e.setCellMeta(h,l,"color",v)}}else console.warn("Can`t find Min&Max in column",l)}e.render()}},{key:"getSelected",value:function(e,t,a){var n=e.getSelectedRange(),i=!1;if(!n&&t||a)return{isSelection:!1,fromRow:0,toRow:e.countRows(),toCol:e.countCols(),fromCol:0};if(!n)return{isSelection:!1,fromRow:-1,toRow:-1,toCol:-1,fromCol:-1};var r=Math.min(n.from.col,n.to.col),s=Math.max(n.from.col,n.to.col),o=Math.min(n.from.row,n.to.row),l=Math.max(n.from.row,n.to.row);return{isSelection:i,fromRow:o,toRow:l,toCol:s,fromCol:r}}},{key:"makeFormat",value:function(t,a){for(var n=e.getSelected(t,!0),i=t.getSettings().columns,r=n.fromCol;r<=n.toCol;r++)switch(console.log("makeFormat for coll ="+r,a),a){case"Reset":i[r].format=!1,i[r].renderDateFormat=!1;break;case"Money":i[r].format="$0,0.00";break;case"Human":i[r].format="5a";break;case"Bytes":i[r].format="0.0b";break;case"Percentages":i[r].format="(0.00 %)";break;case"Time":i[r].renderDateFormat="HH:mm:ss";break;case"Date":i[r].renderDateFormat="YYYY-MM-DD";break;case"DateTime":i[r].renderDateFormat="YYYY-MM-DD HH:mm:ss";break;case"DateLoc":i[r].renderDateFormat="LLLL";break;case"Float":i[r].format="0.[0000000]"}t.updateSettings({columns:i}),t.render()}},{key:"isFormatColl",value:function(e,t){t=t.toLowerCase();for(var a=e.getSelectedRange(),n=Math.min(a.from.col,a.to.col),i=Math.max(a.from.col,a.to.col),r=e.getSettings().columns,s=n;i>=s;s++)if(!r[s].type.toLowerCase().includes(t))return!1;return!0}},{key:"pushToClipboardText",value:function(e){var t=document.createElement("textarea");t.style.width=0,t.style.height=0,t.style.border=0,t.style.position="absolute",t.style.top=0,document.body.append(t),t.value=e,t.focus(),t.select();try{document.execCommand("copy")}catch(a){console.log("Oops, unable to copy")}document.body.removeChild(t)}},{key:"makeCreateTable",value:function(t){for(var a=e.getSelected(t,!0),n="\nCREATE TABLE x (\n",i=[],r=t.getSettings().columns,s=a.fromCol;s<=a.toCol;s++){var o=r[s].typeOriginal;i.push(" "+t.colToProp(s)+" "+o)}n=n+i.join(",\n")+"\n)\nENGINE = TinyLog\n;;\n",console.log(n),e.pushToClipboardText(n)}},{key:"Calc",value:function(t,a){for(var n=e.getSelected(t,!0),i=t.getSettings().columns,r=[],s=n.fromCol;s<=n.toCol;s++)for(var o=n.fromRow;o<=n.toRow;o++){var l=i[s].type.toLowerCase();l.includes("numeric")&&r.push(t.getDataAtCell(o,s))}if(_.isArray(r)&&r.length){var c={median:_.round(_.median(r),3),sum:_.round(_.sum(r),3),average:_.round(_.average(r),3),std:_.round(_.stdDeviation(r),3)};angular.element(document).scope().$emit("handleBroadcastCalcSumCells",c)}}},{key:"Transpose",value:function(t,a){var n=e.transpose(t.getSourceData()),i=[],r=[],s=!0,o=!1,l=void 0;try{for(var c,d=n.columns[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var u=c.value,m={};m.renderer=this._handsRenderer,m.data=u,m.type="text",m.width=100,r.push(m),i.push(u)}}catch(h){o=!0,l=h}finally{try{!s&&d["return"]&&d["return"]()}finally{if(o)throw l}}t.updateSettings({columns:r,colHeaders:i,data:n.data})}},{key:"transpose",value:function(e){var t=[],a=1,n=[];t.push(0);var i=!0,r=!1,s=void 0;try{for(var o,l=e[Symbol.iterator]();!(i=(o=l.next()).done);i=!0){var c=o.value,d=0,u=!0,m=!1,h=void 0;try{for(var p,g=Object.entries(c)[Symbol.iterator]();!(u=(p=g.next()).done);u=!0){var b=_slicedToArray(p.value,2),f=b[0],v=b[1];n[d]||(n[d]={}),1==a&&(n[d][0]=f),n[d][a]=v,d++}}catch(y){m=!0,h=y}finally{try{!u&&g["return"]&&g["return"]()}finally{if(m)throw h}}t.push(a),a++}}catch(y){r=!0,s=y}finally{try{!i&&l["return"]&&l["return"]()}finally{if(r)throw s}}return{data:n,columns:t}}},{key:"makeWhereIn",value:function(t){for(var a=e.getSelected(t,!0),n=[],i=t.getSettings().columns,r=a.fromCol;r<=a.toCol;r++){for(var s=[],o=a.fromRow;o<=a.toRow;o++)s.push(t.getDataAtCell(o,r));var l=s.filter(function(e,t,a){return a.indexOf(e)===t}),c=i[r].type.toLowerCase();c.includes("numeric")?n.push(t.colToProp(r)+" IN ( "+l.join(" , ")+") "):n.push(t.colToProp(r)+" IN ( '"+l.join("' , '")+"') ")}n="\n"+n.join("\n AND\n")+"\n\n",console.log(n),e.pushToClipboardText(n)}},{key:"copyToClipboard",value:function(t,a,n){for(var i=e.getSelected(t,!0,n),r="",s=[],o=i.fromCol;o<=i.toCol;o++)s.push(t.colToProp(o));r=r+" | "+s.join(" | ")+" |\n",s=[];for(var l=i.fromRow;l<=i.toRow;l++){for(var c=i.fromCol;c<=i.toCol;c++)s.push(t.getDataAtCell(l,c));r=r+" | "+s.join(" | ")+" |\n",s=[]}e.pushToClipboardText(r)}},{key:"HideColumn",value:function(t){for(var a=e.getSelected(t,!0),n=t.getSettings().columns,i=a.fromCol;i<=a.toCol;i++)n[i].width=0;t.updateSettings({columns:n})}},{key:"ShowAllColumns",value:function(e){var t=e.getSettings().columns;console.info("SHOWALL",t);var a=!0,n=!1,i=void 0;try{for(var r,s=t[Symbol.iterator]();!(a=(r=s.next()).done);a=!0){var o=r.value;console.info("COL",t[o])}}catch(l){n=!0,i=l}finally{try{!a&&s["return"]&&s["return"]()}finally{if(n)throw i}}e.updateSettings({columns:t})}},{key:"makeStyle",value:function(t,a){console.log("makeStyle",a);for(var n=e.getSelected(t,!0),i=n.fromRow;i<=n.toRow;i++)for(var r=n.fromCol;r<=n.toCol;r++){var s=t.getCellMeta(i,r),o="htCell"+a;(!s.className||s.className&&s.className.indexOf(o)<0)&&t.setCellMeta(i,r,"className",o)}t.render()}}]),e}();angular.module(smi2.app.name).service("HandsTable",HandsTable);var DrawBasicChart=function(){function DrawBasicChart(e){_classCallCheck(this,DrawBasicChart),this.widget=e,this.chart=!1,this.init=!1,this.options={},this.widget.height=1,this.widget.width=1,this.errorMessage="",this.drawCodeObject={type:!1};try{this.drawCodeObject=this.initDrawCodeObject()}catch(t){console.error("error eval ",t)}console.info("isExecutableCode()",this.isExecutableCode())}return _createClass(DrawBasicChart,[{key:"setWidgetSize",value:function(e,t){console.log("setWidgetSize",e,t,this.widget.sizeX,this.widget.sizeY),this.widget.sizeX=e,this.widget.sizeY=t}},{key:"setError",value:function(e){this.errorMessage=e;var t="",a="";_.isUndefined(this.help)||(t=this.help),_.isUndefined(this.helpLink)||(a=this.helpLink),this.widget.error="Draw error message:"+e+"\n\n"+t+"\n\n"+(a?''+a+"":"")}},{key:"isDark",value:function(){return this.widget.isDark}},{key:"getError",value:function(){return this.errorMessage}},{key:"isExecutableCode",value:function(){return this.drawCodeObject&&this.drawCodeObject.type?this.drawCodeObject.exec:!1}},{key:"executableCode",value:function(){var e={};return this.isExecutableCode()&&(console.log(this.drawCodeObject.code),e=this.drawCodeObject.code.call(window,this.widget.data)),console.warn("executableCode:ResultFunction",e),e}},{key:"initChartByJsCode",value:function(){if(this.isExecutableCode()){var e=this.executableCode();return this.options=Object.assign(this.options,e),!0}return!1}},{key:"data",value:function(){return this.widget.data.data}},{key:"meta",value:function(){return this.widget.data.meta}},{key:"isNumericColumn",value:function(e){var t=this.getColumnPosition(e);if(!_.isUndefined(t)){var a=this.meta()[t].type;return a?(a=a.toLowerCase(),a.includes("int")||a.includes("float")?!0:!1):!1}}},{key:"isStringColumn",value:function(e){var t=this.getColumnPosition(e);if(!_.isUndefined(t)){var a=this.meta()[t].type;return a?(a=a.toLowerCase(),a.includes("string")||a.includes("enum")?!0:!1):!1}}},{key:"getColumnPosition",value:function(e){return parseInt(_.findKey(this.meta(),{name:e}))}},{key:"haveColumn",value:function(e){if(_.isNaN(e)||_.isNull(e)||_.isUndefined(e))return!1;var t=this.getColumnPosition(e);return _.isNaN(t)||_.isNull(t)||_.isUndefined(t)?!1:!0}},{key:"getColumnByType",value:function(e){var t=_.findIndex(this.meta(),{type:e});return 0>t?!1:this.getColumns(t)}},{key:"getDateTimeColumn",value:function(){return this.getColumnByType("DateTime")}},{key:"getDateColumn",value:function(){return this.getColumnByType("Date")}},{key:"findDateTimeAxis",value:function(){var e=this.getDateTimeColumn();if(e)return e;var t=this.getDateColumn();return t?t:!1}},{key:"getColumns",value:function(e){var t=_.map(this.meta(),"name");return _.isUndefined(e)?t:t[e]}},{key:"getFirstColumn",value:function(){return this.getColumns(0)}},{key:"getDrawCommandObject",value:function(){return this.drawCodeObject&&this.drawCodeObject.type?this.drawCodeObject.code:!1}},{key:"updateCode",value:function updateCode(codejs,showErrors){var drawCommand=this.widget.drawCommnads;if(drawCommand&&drawCommand.code)try{var data={},code="("+codejs+")",obj=eval(code);_.isObject(obj)&&(console.info("Apply code",codejs),drawCommand.code=codejs,this.applyCode())}catch(E){showErrors&&console.error("error eval ",codejs,E)}}},{key:"getCode",value:function(){var e=!1,t=this.widget.drawCommnads;return t&&t.code&&(e=t.code),e.length<9?!1:e}},{key:"initDrawCodeObject",value:function initDrawCodeObject(){var drawCommand=this.widget.drawCommnads;if(!drawCommand)return[];var codeDrawText=!1;if(drawCommand&&drawCommand.code&&(codeDrawText=drawCommand.code),!codeDrawText)return[];var draw={code:!1,type:!1};if(_.isObject(codeDrawText))return draw={isok:!0,code:codeDrawText,type:"undefined"==typeof codeDrawText?"undefined":_typeof(codeDrawText),exec:!1};if("text"==drawCommand.drawtype.toLowerCase()){var obj=codeDrawText.trim();return draw={isok:!0,code:obj,type:"undefined"==typeof obj?"undefined":_typeof(obj),exec:!1}}try{var code="("+codeDrawText+")",_obj=eval(code),type="undefined"==typeof _obj?"undefined":_typeof(_obj);draw={isok:!0,code:_obj,type:type,exec:!!(_obj&&_obj.constructor&&_obj.call&&_obj.apply)}}catch(E){console.error("error eval ",codeDrawText,E)}return draw}}]),DrawBasicChart}(),DrawText=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type=a.toUpperCase(),n.library="text",n.widget.sizeX=0,n.widget.sizeY=0,n}return _inherits(t,e),_createClass(t,[{key:"preProcessor",value:function(){var e=this.getDrawCommandObject();this.init=this.applyText(e)}},{key:"applyText",value:function(e){return this.isDark()&&(this.widget.element[0].style.background="#404a59"),e?this.widget.element[0].innerHTML=Mustache.render(e,this.widget.data):this.widget.element[0].innerHTML="
"+JSON.stringify(this.widget.data,null,"	")+"
",!0}},{key:"onResize",value:function(){}}]),t}(DrawBasicChart),DrawPlotly=function(_DrawBasicChart2){function DrawPlotly(e,t){_classCallCheck(this,DrawPlotly);var a=_possibleConstructorReturn(this,(DrawPlotly.__proto__||Object.getPrototypeOf(DrawPlotly)).call(this,e));return a.type=t.toUpperCase(),a.library="plotly",a.chart=null,a.setWidgetSize(6,3),a._datajs=!1,a}return _inherits(DrawPlotly,_DrawBasicChart2),_createClass(DrawPlotly,[{key:"onResize",value:function(){if(this.plotly){var e=this.widget.getSizeElementHeight(),t=this.widget.getSizeElementWidth();(this.layout.height!=e||this.layout.width!=t)&&(this.layout.height=e,this.layout.width=t,this.relayout())}}},{key:"preProcessor",value:function(){return this.init=this.create(),this.getError()?(console.error(this.getError()),this.chart.before("

"+this.getError()+"

"),this.init=!1,!1):void console.info("preProcessor",this.init)}},{key:"initDrawCodeObject",value:function(){return!1}},{key:"getElement",value:function(){return this.widget.element[0]}},{key:"relayout",value:function(){Plotly.relayout(this.getElement(),this.layout)}},{key:"editor",value:function(){console.info("editoreditoreditor")}},{key:"getDataForCodeJS",value:function(){if(this._datajs)return this._datajs;for(var e={},t=this.getColumns(),a=this.data().length,n=0;a>n;++n){var i=this.data()[n];for(var r in t){var s=t[r];e[s]||(e[s]=[]),e[s].push(i[s])}}return this._datajs=e,e}},{key:"applyCode",value:function applyCode(){try{var codeJS=this.getCode();console.info("applyCode",codeJS);var data=this.getDataForCodeJS();console.log("getDataForCodeJS",data),console.log("this.data()",this.data()),codeJS="("+codeJS+")";var obj=eval(codeJS);_.isObject(obj)&&this.applyObject(obj)}catch(E){console.log(E)}}},{key:"applyLayout",value:function(e){console.info("<<<<<<< applyLayout >>>>>>>>>>",e),this.layout=e;var t=this.widget.getSizeElementHeight(),a=this.widget.getSizeElementWidth();this.layout.height=t,this.layout.width=a}},{key:"applyObject",value:function(e){var t={data:[],layout:{}};_.isObject(e)&&(_.isObject(e.data)&&(t.data=e.data),_.isObject(e.trace)&&t.data.push(e.trace),_.isObject(e.trace1)&&t.data.push(e.trace1),_.isObject(e.trace2)&&t.data.push(e.trace2),_.isObject(e.trace3)&&t.data.push(e.trace3),_.isObject(e.trace4)&&t.data.push(e.trace4),_.isObject(e.layout)&&(t.layout=e.layout)),console.info(t),console.log("llll:",t);var a={editable:!1};t=Object.assign(t,this.getDarkThemeSettings()),this.applyLayout(t.layout),console.warn("this.layout",this.layout),this.plotly?(console.info("UPDATE!"),this.plotly=Plotly.newPlot(this.getElement(),t.data,this.layout,a)):this.plotly=Plotly.newPlot(this.getElement(),t.data,this.layout,a)}},{key:"makeAutoDraw",value:function(){var e=this;console.info("<<<<<<< makeAutoDraw >>>>>>>>>>");var t={autoAxis:!1,markLine:!0,stack:!1,path:!1,sort:!0,xAxis:!1,yAxis:!1},a={},n=this.getColumns(),i=this.getFirstColumn(),r=i,s=this.findDateTimeAxis(),o=this.data();s&&(i=s),t.sort&&(o=_.sortBy(o,i)),r=i;var l=0,c=[],d=[];for(var u in n){var m=n[u],h=!1;_.size(a)&&(h=_.isUndefined(a[m])),m==r||h||(this.isStringColumn(m)&&2>l&&!groupPath?(_.isArray(c)||(c=[]),c.push(m),l++):this.isNumericColumn(m)&&d.push(m))}var p=o.length,g=0,b=[],f={};for(console.log("DATA LEN",p,o),g=0;p>g;++g){var v=o[g];b.push(v[r])}for(b=_.uniq(b),g=0;p>g;++g){var y=o[g],w=function(t){var i=n[t],s=[r],o=!1;if(_.size(a)&&(o=_.isUndefined(a[i])),i!==r&&!o&&e.isNumericColumn(i)&&_.findIndex(c,i)<0){if(c)for(var l=0;l"+this.getError()+"

"),!1;var e=this.getDrawCommandObject();e.raw&&(this.options=_.merge(this.options,e.raw)),this.isDark(),console.info("preProcessor",this.init,this.options)}},{key:"loadGoogleMapJS",value:function(e){if(window._sendGoogleMapLoad)return void this.afterLoadMapProcessor();window._sendGoogleMapLoad=!0,window._isGoogleMapLoaded=!1,console.info("YA_MAP>Start load map : api-maps.yandex.ru");var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCRQH39oyrPnfPPgADuOp0eSRsDHRUMyyY",t.charset="utf-8",t.onload=t.onreadystatechange=function(){t.readyState&&"complete"!==t.readyState&&"loaded"!==t.readyState||(t.onload=t.onreadystatechange=null,e.afterLoadMapProcessor(),window._isGoogleMapLoaded=!0)};var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a)}},{key:"getDarkStyle",value:function(){return[{featureType:"all",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{color:"#000000"},{lightness:13}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#144b53"},{lightness:14},{weight:1.4}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#08304b"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#0c4152"},{lightness:5}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#0b434f"},{lightness:25}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#0b3d51"},{lightness:16}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"transit",elementType:"all",stylers:[{color:"#146474"}]},{featureType:"water",elementType:"all",stylers:[{color:"#021019"}]}]}},{key:"getLightStyle",value:function(){return[{featureType:"landscape",stylers:[{hue:"#FFBB00"},{saturation:43.400000000000006},{lightness:37.599999999999994},{gamma:1}]},{featureType:"road.highway",stylers:[{hue:"#FFC200"},{saturation:-61.8},{lightness:45.599999999999994},{gamma:1}]},{featureType:"road.arterial",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:51.19999999999999},{gamma:1}]},{featureType:"road.local",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:52},{gamma:1}]},{featureType:"water",stylers:[{hue:"#0078FF"},{saturation:-13.200000000000003},{lightness:2.4000000000000057},{gamma:1}]},{featureType:"poi",stylers:[{hue:"#00FF6A"},{saturation:-1.0989010989011234},{lightness:11.200000000000017},{gamma:1}]}]}},{key:"create",value:function(){console.warn("CREATE"),this._map=new google.maps.Map(this.widget.element[0],this.mapOptions);var e=this.getLightStyle();this.isDark()&&(e=this.getDarkStyle()),this._map.setOptions({styles:e});var t=this,a=this.getDrawCommandObject(),n={longitude:"longitude",latitude:"latitude",count:"count",title:"title"},i=new google.maps.LatLngBounds,r=0;a&&(n=Object.assign(n,a)),this.data().forEach(function(e,a){var s=parseInt(e[n.count]);s>r&&(r=s);var o={lat:e[n.latitude],lng:e[n.longitude]},l=!1;e[n.title]&&(l=new google.maps.InfoWindow({content:'
'+e[n.title]+"
"})),i.extend(o);var c=new google.maps.Marker({position:o,map:t._map,title:"Value:"+s});l&&c.addListener("click",function(){l.open(this._map,c)})}),this._map.fitBounds(i),this._map.panToBounds(i)}}]),t}(DrawBasicChart),DrawEcharts=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.help="",n.type=a.toUpperCase(),n.library="echarts",n.preference={gridchart:!1,bar:!1},n.options={version:3,textStyle:{fontFamily:"Menlo"},toolbox:{show:!0,feature:{dataZoom:{yAxisIndex:"none",title:"data Zoom"},dataView:{readOnly:!1,title:"data View"},magicType:{type:["line","bar","stack","tiled"],title:{line:"line",bar:"bar",stack:"stack",tiled:"tiled"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image"}}}},n}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){console.log("onResize Chart"),this.chart&&this.init&&this.chart.resize()}},{key:"preProcessor",value:function(){if(this.initChartByJsCode())this.init=!0;else try{this.init=this.create()}catch(e){this.setError(this.getError()+"\n\n\n"+e.name+":"+e.message+"\n"+e.stack)}if(this.getError())return console.error(this.getError()),!1;var t=this.getDrawCommandObject();if(t.raw&&(this.options=_.merge(this.options,t.raw)),this.isDark()&&(this.options.backgroundColor="#404a59",this.options.textStyle={color:"rgba(255, 255, 255, 0.3)"},this.options.lineStyle={color:"rgba(255, 255, 255, 0.3)"}),_.isArray(this.options.series)&&_.isObject(this.options.series[0])){if(_.isObject(t))if(_.isArray(t.series))for(var a=0;a<=t.series.length;a++)_.isObject(this.options.series[a])&&(this.options.series[a]=_.merge(this.options.series[a],t.series[a]));else this.options.series[0]=_.merge(this.options.series[0],t);this.isDark()&&_.set(this.options.series[0],"label.normal.textStyle.color","white")}this.chart.setOption(this.options),console.info("preProcessor",this.init,this.options)}},{key:"getParameterPath",value:function(){var e=this.getDrawCommandObject(),t={path:""};e&&(t=Object.assign(t,e));var a="";if(_.isString(e)?a=e:t.path&&(a=t.path),!a)return!1;for(var n=_.split(a,"."),i=0;is;s+=1){var o=this.getColumns(s);if(!i&&this.isNumericColumn(o)){i=o;break}}t.date=n,t.value=i}if(!this.haveColumn(t.date)||!this.haveColumn(t.value))return this.setError("Not set date | value cols"),!1;var l=0,c=Number.MAX_VALUE,d=_.map(this.data(),function(e){var a=parseFloat(e[t.value]);return a&&a>l&&(l=a),a&&c>a&&(c=a),[e[t.date],a]});d=_.groupBy(d,function(e){var t=(""+e[0]).substring(0,4);return t});var u={tooltip:{position:"top"},calendar:[],series:[],visualMap:{min:c,max:l,calculable:!0,orient:"horizontal",left:"center",top:"top"}},m=60,h=0;return _.forEach(d,function(e,t){u.calendar.push({top:m,range:t,right:0,cellSize:["auto",20]}),u.series.push({type:"heatmap",coordinateSystem:"calendar",data:e,calendarIndex:h}),h+=1,m+=200}),this.options=Object.assign(u,this.options),!0}}]),t}(DrawEcharts),DrawEchartsTreemap=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"getSerieSettings",value:function(e){var t=echarts.format;return{tooltip:{formatter:function(a){var n=a.value,i=[],r=a.treePathInfo;if(_.isArray(r))for(var s=1;s'+t.encodeHTML(i.join("."))+"
",e.tooltip+" : "+numbro(n).format(o)].join("")}},itemStyle:{normal:{borderColor:"#fff"}},type:"treemap"}}},{key:"getLevelOption",value:function(){return[{itemStyle:{normal:{borderWidth:0,gapWidth:5}}},{itemStyle:{normal:{gapWidth:1}}},{colorSaturation:[.35,.5],itemStyle:{normal:{gapWidth:1,borderColorSaturation:.6}}}]}},{key:"buildTreeData",value:function(e,t){var a=[],n=this;return _.forEach(e,function(e,i){var r=t[i],s={};if(s.value=r.__value,_.isObject(e)){var o=n.buildTreeData(e,r);_.isArray(o)&&o.length&&(s.children=o)}s.name=i,a.push(s)}),a}},{key:"create",value:function(){var e=this.getDrawCommandObject(),t={path:"",title:"TreeMap",tooltip:"Usage",valueformat:!1};e&&(t=Object.assign(t,e));var a="";t.path&&(a=t.path),_.isString(e)&&(a=e);var n=_.split(a,"."),i=n.length;if(!i)return this.setError("Not set path"),!1;for(var r=0;i>r;r+=1)if(!this.haveColumn(n[r]))return this.setError("bad path, no column:"+n[r]),!1;if(!this.isNumericColumn(n[i-1]))return this.setError("bad column:"+n[i-1]+" must be number"),!1;var s={},o={};this.data().forEach(function(e){for(var t=e[n[i-1]],a=[],r=0;i-1>r;r+=1){a.push(e[n[r]]);var l=_.get(s,a.join("_"),0);_.set(s,a.join(".")+".__value",parseFloat(l)+parseFloat(t))}_.set(o,a.join("."),t)});var l=this.buildTreeData(o,s),c={tooltip:{trigger:"item"}};return c.series=[{name:t.title,label:{show:!0,formatter:"{b}"},levels:this.getLevelOption(),data:l}],this.options=Object.assign(c,this.options),this.options.series[0]=Object.assign(this.getSerieSettings(t),this.options.series[0]),!0}}]),t}(DrawEcharts),DrawEchartsSunkeys=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments)); -}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){this.helpLink="https://tabix.io/doc/draw/Draw_Sankeys/",this.help="Default config : {path:''} or {value:'',source:'',target:''}, if empty path or not set, try auto create path, then find columns [String] : [Integer|Float] : [String] ";var e=this.getDrawCommandObject(),t={path:"",value:"value",source:"source",target:"target"};e&&(t=Object.assign(t,e));var a="";_.isString(e)?a=e:t.path?a=t.path:this.haveColumn(t.source)&&this.haveColumn(t.value)&&this.haveColumn(t.target)&&(a=t.source+"."+t.value+"."+t.target);var n=[];if(a)n=_.split(a,".");else{var i=!1,r=this.getColumns();for(var s in r){var o=r[s];this.isNumericColumn(o)&&i&&(n.push(o),i=!1),this.isStringColumn(o)&&!i&&(n.push(o),i=!0)}}if(console.log("patharr>",n),!n.length)return this.setError("The value of the variable 'path' - empty"),!1;if(!(1&n.length))return this.setError("The value of the variable 'path' must be odd"),!1;var l=[],c=[];this.data().forEach(function(e){for(var t=0;ta&&(a=s),e[t.destination.longitude]&&e[t.destination.latitude]){var o="";e[t.destination.name]&&(o=e[t.destination.name]),i.push({fromName:e[t.name],toName:o,coords:[[e[t.longitude],e[t.latitude]],[e[t.destination.longitude],e[t.destination.latitude]]]})}n.push({name:e[t.name],value:[e[t.longitude],e[t.latitude],s],label:{emphasis:{position:"right",show:!0}}})});var r=[{name:t.title,type:"effectScatter",coordinateSystem:"geo",data:n,showEffectOn:"render",rippleEffect:{brushType:"stroke"},symbolSize:function(e){return a?e[2]/a*15:e[2]/1e4},hoverAnimation:!0,label:{normal:{formatter:"{b}",position:"right",show:!0}},itemStyle:{normal:{color:"#f4e925",shadowBlur:10,shadowColor:"#333"}},zlevel:1}];if(i.length>0){var s="path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z";r.push({name:t.title,type:"lines",zlevel:1,effect:{show:!0,period:6,trailLength:.7,color:"#fff",symbolSize:3},lineStyle:{normal:{width:0,curveness:.2}},data:i}),r.push({name:t.title,type:"lines",zlevel:2,symbol:["none","arrow"],symbolSize:10,effect:{show:!0,period:6,trailLength:0,symbol:s,symbolSize:15},lineStyle:{normal:{width:1,opacity:.6,curveness:.2}},data:i})}var o={tooltip:{trigger:"item"},geo:{name:t.title,type:"map",map:"world",label:{emphasis:{show:!1}},visualMap:{show:!0,min:0,max:100,inRange:{symbolSize:[6,60]}},roam:!0,itemStyle:{normal:{areaColor:"#323c48",borderColor:"#404a59"},emphasis:{areaColor:"#2a333d"}}},series:r};return this.options=Object.assign(this.options,o),!0}}]),t}(DrawEcharts),DrawEchartsHeatmap=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){var e=this.getParameterPath();if(!e)return this.setError("Not set path"),!1;var t={},a={},n={};this.data().forEach(function(i){_.set(t,i[e[0]],1),_.set(a,i[e[1]],1),_.set(n,i[e[0]]+"."+i[e[1]],parseFloat(i[e[2]]))});var i=[],r=_.keys(t),s=_.keys(a),o=0,l=0;_.mapKeys(t,function(e,t){_.mapKeys(a,function(e,a){var r=_.get(n,t+"."+a,"-");o>r&&(o=r),r>l&&(l=r),i.push([t,a,r])})});var c={tooltip:{position:"top"},animation:!1,grid:{height:"50%",y:"10%"},xAxis:{type:"category",data:r,splitArea:{show:!0}},yAxis:{type:"category",data:s,splitArea:{show:!0}},visualMap:{min:o,max:l,calculable:!0,orient:"horizontal",left:"center",bottom:"15%"},series:[{name:"Punch Card",type:"heatmap",data:i,label:{normal:{show:!0}},itemStyle:{emphasis:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};return this.options=Object.assign(c,this.options),!0}}]),t}(DrawEcharts),DrawEchartsGraph=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){this.helpLink="https://tabix.io/doc/draw/Draw_Graph/",this.help="Default config : {path:''} or {value:'',source:'',target:''}, if empty path or not set, try auto create path, then find columns [String] : [Integer|Float] : [String] ";var e=this.getDrawCommandObject(),t={path:"",categories:"categories",name:"name",value:"value",target:"target",targetValue:"",sourceValue:"",layout:"",edgeSymbol:""};e&&(t=Object.assign(t,e));var a="";_.isString(e)?a=e:t.path?a=t.path:this.haveColumn(t.source)&&this.haveColumn(t.value)&&this.haveColumn(t.target)&&(a=t.source+"."+t.value+"."+t.target);var n=[],i=this.haveColumn(t.targetValue),r=this.haveColumn(t.sourceValue);this.haveColumn(t.categories);if(a)n=_.split(a,".");else{var s=!1,o=this.getColumns();for(var l in o){var c=o[l];this.isNumericColumn(c)&&s&&(n.push(c),s=!1),this.isStringColumn(c)&&!s&&(n.push(c),s=!0)}}if(console.log("patharr>",n),!n.length)return this.setError("The value of the variable 'path' - empty"),!1;if(!(1&n.length))return this.setError("The value of the variable 'path' must be odd"),!1;var d=[],u=[];this.data().forEach(function(e){for(var a=0;a10}}}}else u[e[s]]={symbolSize:1};if(i){var m=e[t.targetValue]/1.5;u[e[l]]={symbolSize:m,label:{normal:{show:m>10}}}}else u[e[l]]={symbolSize:1};d.push({source:e[s],target:e[l],value:e[o]})}});var m=[];for(var h in u)m.push(_.merge({name:h},u[h]));console.log("result_nodes",m);var p={tooltip:{trigger:"item",triggerOn:"mousemove"},series:[{type:"graph",layout:"circular",data:m,circular:{rotateLabel:!0},animationThreshold:300,animationDuration:300,links:d,itemStyle:{normal:{borderWidth:1,borderColor:"#aaa"}},roam:!0,label:{normal:{position:"right",formatter:"{b}"}},lineStyle:{normal:{color:"source",curveness:.3}}}]};return p=Object.assign(p,this.options),this.options=p,!0}}]),t}(DrawEcharts),DrawEchartsFlatTree=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"getSerieSettings",value:function(){return{symbolSize:7,type:"tree",label:{normal:{position:"left",verticalAlign:"middle",align:"right"}},leaves:{label:{color:this.isDark()?"white":"auto",normal:{position:"right",verticalAlign:"middle",align:"left"}}},expandAndCollapse:!0}}}]),t}(DrawEchartsTreemap),DrawEchartsChart=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){console.log("DrawEchartsChart");var e=this.getDrawCommandObject(),t=this.preCreate(e),a=this.createChart(e),n={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0}};return e.title&&this.applyTitle(e.title),this.applyDataZoom(),this.applyLegend(),this.options=Object.assign(a,this.options,n,t),this.postCreate(e),!0}},{key:"postCreate",value:function(e){return{}}},{key:"preCreate",value:function(e){return{}}},{key:"createChart",value:function(e){var t=this,a={autoAxis:!1,markLine:!0,stack:!1,path:!1,sort:!0,xAxis:!1,yAxis:!1};e&&(a=Object.assign(a,e));var n={},i=this.getColumns(),r=this.getFirstColumn(),s=r,o=this.findDateTimeAxis(),l={},c=[],d=[],u=[],m={},h=this.data();if(o&&(r=o),a.xAxis){if(!this.haveColumn(a.xAxis))throw"xAxis column not exists";s=a.xAxis}else a.sort&&(h=_.sortBy(h,r)),s=r;if(d=[{name:s,type:"category",data:[]}],a.yAxis)if(_.isString(a.yAxis)){if(!this.haveColumn(a.yAxis))throw"yAxis column not exists";n[a.yAxis]=1}else{if(!_.isArray(a.yAxis))throw"yAxis column must string or array";var p=void 0;for(p=0;pk&&!w?(_.isArray(y)||(y=[]),y.push(S),k++):this.isNumericColumn(S)&&x.push(S))}var A=h.length;for(console.log("DATA LEN",A,h),v=0;A>v;++v){var D=h[v];d[0].data.push(D[d[0].name])}for(d[0].data=_.uniq(d[0].data),console.log("xAxis[0].data.",d[0].data),v=0;A>v;++v){var R=h[v],E=function(e){var a=i[e],r=[s],o=!1;if(_.size(n)&&(o=_.isUndefined(n[a])),a!==s&&!o&&t.isNumericColumn(a)&&_.findIndex(y,a)<0){if(y)for(var l=0;l1){var P=_.groupBy(b,function(e){return Math.floor(e.median/1e3)});if(_.size(P)>1){var q=function(e){var t=P[e],n=_.map(t,"column").join(",");_.forEach(t,function(e){u[e.index].yAxisIndex=c.length,a.stack&&(u[e.index].stack=n,u[e.index].areaStyle={normal:{}})}),c.push({name:n,type:"value"})};for(var N in P)q(N)}}return c.length||(c=[{name:f,type:"value"}]),l.series=u,l.yAxis=c,l.xAxis=d,console.info("Make Chart Done : Options",l),l}}]),t}(DrawEcharts),DrawEchartsGridChart=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"preCreate",value:function(e){return this.preference.gridchart=!0,{}}},{key:"postCreate",value:function(e){var t=[],a=[],n=[],i=[],r=0;console.info("postCreate!!!!!!",this.options);var s=[],o=this.options.xAxis[0],l=this.options.yAxis[0];for(var c in this.options.series){c=parseInt(c);var d=this.options.series[c].name;this.options.series[c].xAxisIndex=c,this.options.series[c].yAxisIndex=r,console.log(d,this.options.series[c]),o.show=!1,o.gridIndex=c,l.gridIndex=c,l.show=!1,l.name=d,t.push({show:!0,borderWidth:0,shadowBlur:2}),n.push(_.clone(o)),a.push(_.clone(l)),i.push({textAlign:"center",text:d,textStyle:{fontSize:11,fontWeight:"normal"}}),s.push(c),r+=1}var u=Math.ceil(Math.sqrt(r));t.forEach(function(e,t){e.left=t%u/u*100+.5+"%",e.top=Math.floor(t/u)/u*100+.5+"%",e.width=1/u*100-1+"%",e.height=1/u*100-1+"%",i[t].left=parseFloat(e.left)+parseFloat(e.width)/2+"%",i[t].top=parseFloat(e.top)+"%"}),this.options.dataZoom&&this.options.dataZoom[0]&&(this.options.dataZoom[0].xAxisIndex=s),this.options.titles=i,this.options.grid=t,this.options.xAxis=n,this.options.yAxis=a}}]),t}(DrawEchartsChart),DrawEchartsBar=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"preCreate",value:function(e){return this.preference.bar=!0,{}}}]),t}(DrawEchartsChart),DrawD3=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="d3",a}return _inherits(t,e),t}(DrawBasicChart),DrawC3=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="c3",a.bindto=!1,a}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this.chart&&this.init}},{key:"preProcessor",value:function(){return console.log("preProcessor>c3.generate"),this.initChartByJsCode()?(console.log("c3.options>",this.options),this.bindto.className+=" c3",console.log("this.bindto.className",this.bindto.className),this.options.bindto=this.bindto,console.log("c3.options>",this.options),void(this.chart=c3.generate(this.options))):(console.error("C3.Init by code"),!1)}}]),t}(DrawBasicChart),DrawAMcharts=function(e){function t(e){_classCallCheck(this,t),console.warn("DrawAMcharts constructor");var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="amchart",a}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this.makeLegend()}},{key:"preProcessor",value:function(){this.createChart()&&(this.init=!0),console.log("!preProcessor,done",this.init,this.options)}},{key:"createChart",value:function(){var e=this,t={},a=this.widget.data.meta,n=!1,i="",r="mm",s=[],o=0,l=[];a.forEach(function(a){if("DateTime"==a.type)n="YYYY-MM-DD JJ:NN:SS",i=a.name;else if("Date"==a.type)n="YYYY-MM-DD",r="DD",i=a.name;else{if(!i)return void(i=a.name);o+=1;var c=e.getChartGraph(a,t[a.name]);c.id="g"+o,"v1"!==c.valueAxis&&l.push(c.valueAxis),s.push(c)}});var c={theme:Widget.isDark?"dark":"light",color:Widget.isDark?"#eee":"#333",type:"serial",categoryField:i,valueAxes:[{id:"v1",axisAlpha:1,gridAlpha:.07,axisColor:Widget.isDark?"#eee":"#333",gridColor:Widget.isDark?"#eee":"#333",ignoreAxisWidth:!0}],balloon:{borderThickness:1,shadowAlpha:0},graphs:s,chartCursor:{valueLineEnabled:!0,valueLineBalloonEnabled:!0,cursorAlpha:0,zoomable:!1,valueZoomable:!0,valueLineAlpha:.5},chartScrollbar:{graph:"g1",gridAlpha:0,color:"#888888",scrollbarHeight:25,backgroundAlpha:0,selectedBackgroundAlpha:.1,selectedBackgroundColor:"#888888",graphFillAlpha:0,autoGridCount:!0,selectedGraphFillAlpha:0,graphLineAlpha:.2,graphLineColor:"#c2c2c2",selectedGraphLineColor:"#888888",selectedGraphLineAlpha:1},categoryAxis:{dashLength:1,minorGridEnabled:!0,axisColor:Widget.isDark?"#eee":"#333",gridColor:Widget.isDark?"#eee":"#333"},data:this.widget.data.data};if(c.categoryAxis.parseDates=!1,n&&(c.dataDateFormat=n,c.categoryAxis.parseDates=!0,c.categoryAxis.minPeriod=r),l){var d=0;l.forEach(function(e){d++;var t={id:e,axisAlpha:1,axisThickness:1,position:"right",ignoreAxisWidth:!0,offset:1*d};c.valueAxes.push(t)})}return this.options=c,this.init=!0,this.makeLegend(),!0}},{key:"makeLegend",value:function(){console.log("this.widget.sizeY",this.widget.sizeY),this.widget.sizeY<2?delete this.options.legend:this.options.legend={align:"center",equalWidths:!1,periodValueText:"total: [[value.sum]]",valueAlign:"left",valueText:"[[value]] ([[percents]]%)",valueWidth:100},console.warn(this.options)}},{key:"getChartGraph",value:function(e,t){var a=e.name,n=e.name,i="v1";a=a.replace(/_axis\d+/gm,"");var r=/.*_axis(\d+).*/i,s=n.match(r);s&&s[1]&&(i="v"+s[1]);var o={id:"g1",valueAxis:i,fillAlphas:.2,bullet:"round",bulletSize:8,hideBulletsCount:50,lineThickness:1,title:a,useLineColorForBulletBorder:!0,valueField:n,type:"smoothedLine",balloonText:"[[title]] [[category]]
[[value]]"};return t||(t={}),Object.assign(o,t)}}]),t}(DrawBasicChart),DataProvider=function(){function e(t,a){if(_classCallCheck(this,e),t.totals&&t.data&&t.data.push(t.totals),this._humanSortCols=[],this._sortBy=!1,this._sortOrder=!1,this.data=t.data,this.text=!1,this.progressQuery="",this.sort=!1,this.sortOrder=!1,t.error||angular.isObject(t.data)||(angular.isString(t.data)?this.text=t.data:this.text=angular.toJson(t.data,!0),this.text=this.text.replace(/&/g,"&").replace(//g,">")),a||(a="ch"),this.sourceType=a,this.meta=t.meta,this.prepareInt64Cols={},this.data){try{this.prepareInt64()}catch(n){console.error("Error in prepareInt64",n)}_.isObject(this.meta)&&(this.meta.prepareInt64Cols=this.prepareInt64Cols)}t.query?this.query=t.query:this.query={index:0,drawCommands:!1},t.error?(this.error=t.error.replace("
","\n").replace(/&/g,"&").replace(//g,">"),this.error=this.error.replace("\\n","
")):this.error=!1,this.draw=this.query.drawCommands,this.rows=t.rows,this.position=this.query.index,this.countAll=t.countAllQuery}return e.$inject=["result","sourceType"],_createClass(e,[{key:"prepareInt64",value:function(){var e=this,t=[];return _.isArray(this.data)&&this.data.length>1?(this.prepareInt64Cols={},this.meta.forEach(function(a){if(a.type.includes("Int64")&&!a.type.includes("Array(")){var n=0;try{n=_.maxBy(e.data,function(e){return _.isEmpty(e[a.name])?void 0:parseInt(e[a.name])})[a.name]}catch(i){console.error("prepareInt64,maxBy",i,"in cell",a,"meta",e.meta)}var r=parseInt(n);r0?void(this.data=_.map(this.data,function(e){return t.forEach(function(t){e[t]=parseInt(e[t])}),e})):!1):!1}},{key:"isNormalInt64Col",value:function(e){return this.prepareInt64Cols[e]}},{key:"isText",value:function(){return this.text?!0:!1}},{key:"isError",value:function(){return this.error?!0:!1}},{key:"getError",value:function(){return this.error}},{key:"update",value:function(e){this.data=e}},{key:"data",value:function(){return this.data}},{key:"getData",value:function(){return this.data}},{key:"meta",value:function(){return this.meta}},{key:"toString",value:function(){return"("+this.name+", "+this.y+")"}},{key:"getColumnsHumanSort",value:function(){return this._humanSortCols}},{key:"setColumnsHumanSort",value:function(e){this._humanSortCols=e}},{key:"setSort",value:function(e,t){this._sortBy=e,this._sortOrder=t,_.isNumber(t)&&(this._sortOrder=parseInt(t)<0?!1:!0)}},{key:"sortByColl",value:function(){return this._sortBy}},{key:"sortOrderBy",value:function(){return this._sortOrder}}],[{key:"convertArrayToDataProvider",value:function(t,a){var n={};return n.data=t,n.meta=[],n.error=!1,n.query={drawCommands:!1},n.rows=t.length,n.position=0,n.countAll=0,Object.keys(t[0]).map(function(e){return n.meta.push({name:e,type:"string"})}),new e(n,a)}}]),e}();angular.module(smi2.app.name).service("DataProvider",DataProvider),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(e){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");return{restrict:"EA",scope:{onChange:"=?",load:"=?"},link:function(e,t,a){var n=window.ace.edit(t[0]);e.load(n),e.onChange&&(console.warn("Ace+bind:scope.onChange"),n.session.on("change",function(t){e.onChange(n.session)})),t.on("$destroy",function(){n.session.$stopWorker(),n.destroy()}),e.$watch(function(){return[t[0].offsetWidth,t[0].offsetHeight]},function(){n.resize(),n.renderer.updateFull()},!0)}}}]),/* - * Copyright (c) 2017. Smi2 - */ -angular.module(smi2.app.name).directive("pivot",[function(){return{restrict:"AE",scope:{data:"=",config:"=",editMode:"="},link:function(e,t,a){var n=$.extend($.pivotUtilities.renderers);null==e.config&&(e.config={rows:[],cols:[]}),e.renderPivotTable=function(){$(t).pivot(e.data,{renderers:n,rendererName:"Table",cols:e.config.cols,rows:e.config.rows,onRefresh:function(t){var a=JSON.parse(JSON.stringify(t));delete a.aggregators,delete a.renderers,delete a.derivedAttributes,delete a.rendererOptions,delete a.localeStrings,e.config=a,e.$apply()}})},e.renderPivotUITable=function(){$(t).pivotUI(e.data)},e.$watch("scope.editMode",function(t,a){console.log("watch"+e.editMode),t&&(e.editMode?e.renderPivotUITable():e.renderPivotTable())},!0),e.renderPivotUITable()}}}]),/** - * ng-handsontable 0.13.0 - * - * Copyright 2012-2015 Marcin Warpechowski - * Copyright 2015 Handsoncode sp. z o.o. - * Licensed under the MIT license. - * https://github.com/handsontable/ngHandsontable - * Date: Wed Oct 26 2016 10:00:05 GMT+0200 (CEST) -*/ -document.all&&!document.addEventListener&&(document.createElement("hot-table"),document.createElement("hot-column"),document.createElement("hot-autocomplete")),angular.module("ngHandsontable.services",[]),angular.module("ngHandsontable.directives",[]),angular.module("ngHandsontable",["ngHandsontable.services","ngHandsontable.directives"]),Handsontable.hooks.add("afterContextMenuShow",function(){Handsontable.EventManager.isHotTableEnv=!1}),function(){function e(e){return{parseAutoComplete:function(t,a,n){t.source=function(i,r){var s=this.instance.getSelected()[0],o=[],l=a[s];if(l){var c=t.optionList;if(c&&c.object){if(angular.isArray(c.object))o=c.object;else{var d=e(c.object)(l);if(angular.isArray(d))if(n)for(var u=0,m=d.length;m>u;u++){var h=d[u][c.property];null!==h&&void 0!==h&&o.push(h)}else o=d;else o=d}r(o)}}}}}}e.$inject=["$parse"],angular.module("ngHandsontable.services").factory("autoCompleteFactory",e)}(),function(){function e(){var e={};return{getInstance:function(t){return e[t]},registerInstance:function(t,a){e[t]=a},removeInstance:function(t){e[t]=void 0}}}e.$inject=[],angular.module("ngHandsontable.services").factory("hotRegisterer",e)}(),function(){function e(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.charAt(0).toLowerCase()})}function t(e){return e.substr(0,1).toUpperCase()+e.substr(1,e.length-1)}function a(a){return{containerClassName:"handsontable-container",initializeHandsontable:function(e,t){var n,i=document.createElement("div");return i.className=this.containerClassName,t.hotId&&(i.id=t.hotId),e[0].appendChild(i),n=new Handsontable(i,t),t.hotId&&a.registerInstance(t.hotId,n),n},updateHandsontableSettings:function(e,t){e&&e.updateSettings(t)},renderHandsontable:function(e){e&&e.render()},mergeSettingsFromScope:function(e,t){var a,n,i,r=angular.extend({},t);for(e=e||{},angular.extend(r,t.settings||{}),a=this.getAvailableSettings(),n=0,i=a.length;i>n;n++)"undefined"!=typeof r[a[n]]&&(e[a[n]]=r[a[n]]);return e},mergeHooksFromScope:function(e,a){var n,i,r,s,o=angular.extend({},a);for(e=e||{},angular.extend(o,a.settings||{}),n=this.getAvailableHooks(),i=0,r=n.length;r>i;i++)s="on"+t(n[i]),("function"==typeof o[n[i]]||"function"==typeof o[s])&&(e[n[i]]=o[n[i]]||o[s]);return e},trimScopeDefinitionAccordingToAttrs:function(e,t){for(var a in e)e.hasOwnProperty(a)&&void 0===t[a]&&void 0===t[e[a].substr(1,e[a].length)]&&delete e[a];return e},getTableScopeDefinition:function(){var e={};return this.applyAvailableSettingsScopeDef(e),this.applyAvailableHooksScopeDef(e),e.datarows="=",e.dataschema="=",e.observeDomVisibility="=",e},getColumnScopeDefinition:function(){var e={};return this.applyAvailableSettingsScopeDef(e),e.data="@",e},applyAvailableSettingsScopeDef:function(e){var t,a,n;for(t=this.getAvailableSettings(),a=0,n=t.length;n>a;a++)e[t[a]]="=";return e},applyAvailableHooksScopeDef:function(e){var a,n,i;for(a=this.getAvailableHooks(),n=0,i=a.length;i>n;n++)e[a[n]]="=on"+t(a[n]);return e},getAvailableSettings:function(t){var a=Object.keys(Handsontable.DefaultSettings.prototype);return-1===a.indexOf("contextMenuCopyPaste")&&a.push("contextMenuCopyPaste"),-1===a.indexOf("handsontable")&&a.push("handsontable"),a.indexOf("settings")>=0&&a.splice(a.indexOf("settings"),1),t&&(a=a.map(e)),a},getAvailableHooks:function(t){var a=Handsontable.hooks.getRegistered();return t&&(a=a.map(function(t){return"on-"+e(t)})),a}}}a.$inject=["hotRegisterer"],angular.module("ngHandsontable.services").factory("settingFactory",a)}(),function(){function e(){return{restrict:"EA",scope:!0,require:"^hotColumn",link:function(e,t,a,n){var i=a.datarows;n.setColumnOptionList(i)}}}e.$inject=[],angular.module("ngHandsontable.directives").directive("hotAutocomplete",e)}(),function(){function e(e){return{restrict:"EA",require:"^hotTable",scope:{},controller:["$scope",function(e){this.setColumnOptionList=function(t){e.column||(e.column={});var a={},n=t.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);n?(a.property=n[1],a.object=n[2]):a.object=t.split(","),e.column.optionList=a}}],compile:function(t,a){var n=this;return this.scope=e.trimScopeDefinitionAccordingToAttrs(e.getColumnScopeDefinition(),a),angular.forEach(Object.keys(this.scope),function(e){n.$$isolateBindings[e]={attrName:e,collection:!1,mode:"data"===e?"@":"=",optional:!1}}),function(t,a,n,i){var r={};angular.forEach(Object.keys(n),function(e){"$"!==e.charAt(0)&&""===n[e]&&(r[e]=!0)}),e.mergeSettingsFromScope(r,t),t.column||(t.column={}),angular.extend(t.column,r),i.setColumnSetting(t.column),t.$on("$destroy",function(){i.removeColumnSetting(t.column)})}}}}e.$inject=["settingFactory"],angular.module("ngHandsontable.directives").directive("hotColumn",e)}(),function(){function e(e,t,a,n){return{restrict:"EA",scope:{},priority:-400,controller:["$scope",function(t){this.setColumnSetting=function(a){t.htSettings||(t.htSettings={}),t.htSettings.columns||(t.htSettings.columns=[]),t.htSettings.columns.push(a),e.updateHandsontableSettings(t.hotInstance,t.htSettings)},this.removeColumnSetting=function(a){t.htSettings.columns.indexOf(a)>-1&&(t.htSettings.columns.splice(t.htSettings.columns.indexOf(a),1),e.updateHandsontableSettings(t.hotInstance,t.htSettings))}}],compile:function(i,r){var s,o=this;return this.scope=e.trimScopeDefinitionAccordingToAttrs(e.getTableScopeDefinition(),r),s=Object.keys(this.scope),angular.forEach(s,function(e){var t=o.scope[e].charAt(0);o.$$isolateBindings[e]={attrName:o.scope[e].length>1?o.scope[e].substr(1,o.scope[e].length):e,collection:"datarows"===e,mode:t,optional:!1}}),function(i,r,o){if(i.settings=n(o.settings)(i.$parent),i.htSettings||(i.htSettings={}),angular.forEach(Object.keys(o),function(e){"$"!==e.charAt(0)&&""===o[e]&&(i.htSettings[e]=!0)}),e.mergeSettingsFromScope(i.htSettings,i),e.mergeHooksFromScope(i.htSettings,i),i.htSettings.data||(i.htSettings.data=i.datarows),i.htSettings.dataSchema=i.dataschema,i.htSettings.hotId=o.hotId,i.htSettings.observeDOMVisibility=i.observeDomVisibility,i.htSettings.columns)for(var l=0,c=i.htSettings.columns.length;c>l;l++){var d=i.htSettings.columns[l];if("autocomplete"===d.type&&d.optionList){if("string"==typeof d.optionList){var u={},m=d.optionList.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);m?(u.property=m[1],u.object=m[2]):u.object=u,d.optionList=u}t.parseAutoComplete(d,i.datarows,!0)}}var h=i.htSettings.afterChange;i.htSettings.afterChange=function(){h&&h.apply(this,arguments),a.$$phase||i.$apply()},i.hotInstance=e.initializeHandsontable(r,i.htSettings),angular.forEach(s,function(t){i.$watch(t,function(a,n){void 0!==a&&("datarows"===t?i.hotInstance.getSettings().data===a?e.renderHandsontable(i.hotInstance):(i.hotInstance.loadData(a),i.htSettings.data=a):a!==n&&(i.htSettings[t]=a,e.updateHandsontableSettings(i.hotInstance,i.htSettings)))},["datarows","columns","rowHeights","colWidths","rowHeaders","colHeaders"].indexOf(t)>=0)})}}}}e.$inject=["settingFactory","autoCompleteFactory","$rootScope","$parse"],angular.module("ngHandsontable.directives").directive("hotTable",e),angular.module("ngHandsontable.directives").directive("hotAutoDestroy",["hotRegisterer",function(e){return{restrict:"A",link:function(t,a,n){a.on("$destroy",function(){try{var t=e.getInstance(n.hotId);t?(console.info("hotInstance.destroy();"),t.destroy()):console.log("Failed to destroy hot-instance")}catch(a){console.log(a)}})}}}])}(),function(e,t){function a(e){return function(t,a,n){var i=e(n.ngRightClick);a.bind("contextmenu",function(e){t.$apply(function(){e.preventDefault(),i(t,{$event:e})})})}}e.module(t.app.name).directive("ngRightClick",a),a.$inject=["$parse"]}(angular,smi2),function(e,t){function a(){return{restrict:"A",require:"mdMenu",link:function(t,a,n,i){t.$mdOpenMousepointMenu=function(t){var a=e.element(t.currentTarget).offset();i.offsets=function(){return{left:t.pageX-a.left,top:t.pageY-a.top+8}},i.open(t)}}}}e.module(t.app.name).directive("mousepointMenu",a)}(angular,smi2),/** - * gridstack-angular - Angular Gridstack.js directive - * @version v0.6.0-dev - * @author Kevin Dietrich - * @link https://github.com/kdietrich/gridstack-angular#readme - * @license MIT - */ -function(){angular.module("gridstack-angular",[]);var e=angular.module("gridstack-angular");e.controller("GridstackController",["$scope",function(e){var t=this;e.$watch("staticGrid",function(e,a){e=!e,e?t.gridstackHandler.enable():t.gridstackHandler.disable(),t.gridstackHandler.commit()},!0),this.init=function(e,a){return t.gridstackHandler=e.gridstack(a).data("gridstack"),t.gridstackHandler},this.removeItem=function(e){return t.gridstackHandler?t.gridstackHandler.removeWidget(e,!1):null},this.addItem=function(e){return t.gridstackHandler?(t.gridstackHandler.makeWidget(e),e):null}}])}(),function(){var e=angular.module("gridstack-angular");e.directive("gridstack",["$timeout",function(e){return{restrict:"A",controller:"GridstackController",controllerAs:"$gridstack",bindToController:{onChange:"&",onDragStart:"&",onDragStop:"&",onResizeStart:"&",onResizeStop:"&",gridstackHandler:"=?",options:"=",staticGrid:"="},link:function(t,a,n,i,r){i.init(a,i.options),a.on("change",function(a,n){e(function(){t.$apply(),i.onChange({event:a,items:n})})}),a.on("dragstart",function(e,t){i.onDragStart({event:e,ui:t})}),a.on("dragstop",function(a,n){e(function(){t.$apply(),i.onDragStop({event:a,ui:n})})}),a.on("resizestart",function(e,t){i.onResizeStart({event:e,ui:t})}),a.on("resizestop",function(a,n){e(function(){t.$apply(),i.onResizeStop({event:a,ui:n})})})}}}])}(),function(){var e=angular.module("gridstack-angular");e.directive("gridstackItem",["$timeout",function(e){return{restrict:"A",require:"^gridstack",scope:{gridstackItem:"=",onItemAdded:"&",onItemRemoved:"&",gsItemId:"=?",gsItemX:"=",gsItemY:"=",gsItemWidth:"=",gsItemHeight:"=",gsItemAutopos:"="},link:function(t,a,n,i){t.gsItemId&&a.attr("data-gs-id",t.gsItemId),a.attr("data-gs-x",t.gsItemX),a.attr("data-gs-y",t.gsItemY),a.attr("data-gs-width",t.gsItemWidth),a.attr("data-gs-height",t.gsItemHeight),a.attr("data-gs-auto-position",t.gsItemAutopos);var r=(i.addItem(a),a.data("_gridstack_node"));e(function(){t.onItemAdded({item:r})}),t.$watchGroup(["gsItemX","gsItemY","gsItemWidth","gsItemHeight"],function(){(Number(a.attr("data-gs-x"))!==t.gsItemX||Number(a.attr("data-gs-y"))!==t.gsItemY||Number(a.attr("data-gs-width"))!==t.gsItemWidth||Number(a.attr("data-gs-height"))!==t.gsItemHeight)&&i.gridstackHandler.update(a,t.gsItemX,t.gsItemY,t.gsItemWidth,t.gsItemHeight)}),t.$watch(function(){return a.attr("data-gs-id")},function(e){t.gsItemId=e}),t.$watch(function(){return a.attr("data-gs-x")},function(e){t.gsItemX=Number(e)}),t.$watch(function(){return a.attr("data-gs-y")},function(e){t.gsItemY=Number(e)}),t.$watch(function(){return a.attr("data-gs-width")},function(e){t.gsItemWidth=Number(e)}),t.$watch(function(){return a.attr("data-gs-height")},function(e){t.gsItemHeight=Number(e)}),a.bind("$destroy",function(){var e=a.data("_gridstack_node");t.onItemRemoved({item:e}),i.removeItem(a)})}}}])}(),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){function a(t,a,n){var i="";if("echarts"==t.draw.library){var r="macarons";t.isDark&&(r="dark"),t.draw.chart=echarts.init(a[0],r),i=!1}if("plotly"==t.draw.library&&(t.element=e.element('
 
'),i=!1),"c3"==t.draw.library){var s=document.createElement("div");t.draw.bindto=s,a[0].appendChild(s),i=!1}return"text"==t.draw.library&&(t.element=e.element('
 
'),i=!1),"d3"==t.draw.library&&console.info("DW:d3"),"gmaps"==t.draw.library&&(t.element=e.element('
 
'),i=!1),console.group("widget.draw.preProcessor"),console.time("widget.draw.preProcessor time took"),t.draw.preProcessor instanceof Function&&t.draw.preProcessor(),console.timeEnd("widget.draw.preProcessor time took"),console.groupEnd(),i}function n(t,n){return function(i,r,s){i.widget.type;if(console.time("drawWidget.buildLinkFunc"),i.widget.isDark=i.isdark,i.widget.preProcessor instanceof Function&&i.widget.preProcessor(),i.widget.error||i.widget.textformat||i.widget.text||i.widget.empty)return console.log("widget Have Error",i.widget.error),i.widget.error&&r.html("
"+i.widget.error+"
"),i.widget.text&&r.html("
"+i.widget.text+"
"),i.widget.empty&&r.html("NO DATA"),void r.addClass("grid-monospace");if("table"==i.widget.type&&(i.widget.element=e.element('
')),"draw"==i.widget.type){i.widget.element=!1;var o=a(i.widget,r,n);o&&(i.widget.element=e.element(o))}"pivot"==i.widget.type&&(i.widget.element=e.element('')),i.widget.element?(r.append(i.widget.element),t(i.widget.element)(i),i.widget.element.on("$destroy",i.widget.destroy(i.widget))):r.on("$destroy",i.widget.destroy(i.widget)),i.widget.postProcessor instanceof Function&&i.widget.postProcessor(),i.$watch(function(){return[r[0].offsetWidth,r[0].offsetHeight].join("x")},function(e){i.widget.scheduledResize()}),i.events={resize:function(e,t){n(function(){t.widget.scheduledResize()},300)}},n(function(){i.widget.scheduledResize()},300),console.timeEnd("drawWidget.buildLinkFunc")}}e.module(t.app.name).directive("drawWidget",["$compile","$timeout",function(e,t){return{restrict:"EA",template:'
',scope:{widget:"=widget",isdark:"=isdark"},replace:!0,link:n(e,t)}}])}(angular,smi2),angular.module("angularResizable",[]).directive("resizable",function(){function e(e){void 0===t?(t=e,setTimeout(function(){t(),t=void 0},100)):t=e}var t;return{restrict:"AE",scope:{rDirections:"=",rCenteredX:"=",rCenteredY:"=",rWidth:"=",rHeight:"=",rFlex:"=",rGrabber:"@",rDisabled:"@",rNoThrottle:"=",resizable:"@"},link:function(t,a,n){if("false"!==t.resizable){var i="flexBasis"in document.documentElement.style?"flexBasis":"webkitFlexBasis"in document.documentElement.style?"webkitFlexBasis":"msFlexPreferredSize"in document.documentElement.style?"msFlexPreferredSize":"flexBasis";t.$watch("rWidth",function(e){a[0].style[t.rFlex?i:"width"]=e!==!1?e+"px":""}),t.$watch("rHeight",function(e){a[0].style[t.rFlex?i:"height"]=e!==!1?e+"px":""}),a.addClass("resizable");var r,s,o,l,c,d=window.getComputedStyle(a[0],null),u=t.rDirections||["right"],m=t.rCenteredX?2:1,h=t.rCenteredY?2:1,p=t.rGrabber?t.rGrabber:"",g={},b=function(e){g.width=!1,g.height=!1,"x"===c?g.width=parseInt(a[0].style[t.rFlex?i:"width"]):g.height=parseInt(a[0].style[t.rFlex?i:"height"]),g.id=a[0].id,g.evt=e},f=function(e){return e.touches?e.touches[0].clientX:e.clientX},v=function(e){return e.touches?e.touches[0].clientY:e.clientY},y=function(n){function d(){t.$emit("angular-resizable.resizing",g)}var u,p="x"===c?o-f(n):o-v(n);switch(l){case"top":u=t.rFlex?i:"height",a[0].style[u]=s+p*h+"px";break;case"bottom":u=t.rFlex?i:"height",a[0].style[u]=s-p*h+"px";break;case"right":u=t.rFlex?i:"width",a[0].style[u]=r-p*m+"px";break;case"left":u=t.rFlex?i:"width",a[0].style[u]=r+p*m+"px"}b(n),t.rNoThrottle?d():e(d)},w=function C(e){b(),t.$emit("angular-resizable.resizeEnd",g),t.$apply(),document.removeEventListener("mouseup",C,!1),document.removeEventListener("mousemove",y,!1),document.removeEventListener("touchend",C,!1),document.removeEventListener("touchmove",y,!1),a.removeClass("no-transition")},k=function(e){var n={},r=!1,s=!1;n.width=parseInt(a[0].style[t.rFlex?i:"width"]),n.height=parseInt(a[0].style[t.rFlex?i:"height"]),"right"==l&&(n.width>10?(t.preState=n,r=0,s=0):(t.preState&&t.preState.width||(t.preState.width=100),s=t.preState.height,r=t.preState.width)),"bottom"==l&&(n.height>10?(t.preState=n,s=0):(t.preState&&t.preState.height||(t.preState.height=100),s=t.preState.height,r=t.preState.width)),r!==!1&&(a[0].style[t.rFlex?i:"width"]=r+"px"),s!==!1&&(a[0].style[t.rFlex?i:"height"]=s+"px"),t.$apply()},x=function(e,n){l=n,c="left"===l||"right"===l?"x":"y",o="x"===c?f(e):v(e),r=parseInt(d.getPropertyValue("width")),s=parseInt(d.getPropertyValue("height")),a.addClass("no-transition"),document.addEventListener("mouseup",w,!1),document.addEventListener("mousemove",y,!1),document.addEventListener("touchend",w,!1),document.addEventListener("touchmove",y,!1),e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,b(e),t.$emit("angular-resizable.resizeStart",g),t.$apply()};u.forEach(function(e){var n=document.createElement("div");n.setAttribute("class","rg-"+e),n.innerHTML=p,a[0].appendChild(n),n.ondragstart=function(){return!1};var i=function(a){var n="true"===t.rDisabled;n||1!==a.which&&!a.touches||x(a,e)};n.addEventListener("dblclick",k,!1),n.addEventListener("mousedown",i,!1),n.addEventListener("touchstart",i,!1)})}}}});var csvImport=angular.module("ngCsvImport",[]);csvImport.directive("ngCsvImport",function(){return{restrict:"E",transclude:!0,replace:!0,scope:{content:"=?",header:"=?",headerVisible:"=?",separator:"=?",separatorVisible:"=?",result:"=?",encoding:"=?",encodingVisible:"=?",accept:"=?",acceptSize:"=?",acceptSizeExceedCallback:"=?",callback:"=?",mdButtonClass:"@?",mdInputClass:"@?",mdButtonTitle:"@?",mdSvgIcon:"@?",uploadButtonLabel:"="},template:function(e,t){var a=angular.isDefined(t.material),n=angular.isDefined(t.multiple);return'
Header
'+(a?'
':'')+'
Encoding
{{encoding}}
Seperator
'+(a?' {{mdButtonTitle}}':"")+"
"},link:function(e,t,a){if(e.separatorVisible=!!e.separatorVisible,e.headerVisible=!!e.headerVisible,e.acceptSize=e.acceptSize||Number.POSITIVE_INFINITY,e.material=angular.isDefined(a.material),e.multiple=angular.isDefined(a.multiple),e.multiple)throw new Error("Multiple attribute is not supported yet.");var n=angular.element(t[0].querySelector('input[type="file"]')),i=angular.element(t[0].querySelector("md-input-container"));if(e.material&&n){if(n.removeClass("ng-show"),n.addClass("ng-hide"),i){var r=angular.element(i[0].querySelector("div.md-errors-spacer"));r&&r.remove()}e.onClick=function(){n.click()}}angular.element(t[0].querySelector(".separator-input")).on("keyup",function(t){if(null!=e.content){var a={csv:e.content,header:e.header,separator:t.target.value,encoding:e.encoding};e.result=s(a),e.$apply(),"function"==typeof e.callback&&e.callback(t)}}),t.on("change",function(t){if(t.target.files&&t.target.files.length){if(t.target.files[0].size>e.acceptSize)return void("function"==typeof e.acceptSizeExceedCallback&&e.acceptSizeExceedCallback(t.target.files[0]));e.filename=t.target.files[0].name;var a=new FileReader;if(a.onload=function(a){e.$apply(function(){var n={csv:a.target.result.replace(/\r\n|\r/g,"\n"),header:e.header,separator:e.separator};e.content=n.csv,e.result=s(n),e.result.filename=e.filename,e.$$postDigest(function(){"function"==typeof e.callback&&e.callback(t)})})},"file"!==t.target.type||null==t.target.files&&null==t.srcElement.files){if(null!=e.content){var n={csv:e.content,header:!e.header,separator:e.separator};e.result=s(n),e.$$postDigest(function(){"function"==typeof e.callback&&e.callback(t)})}}else a.readAsText((t.srcElement||t.target).files[0],e.encoding)}});var s=function(e){var t=e.csv.split(new RegExp('\n(?![^"]*"(?:(?:[^"]*"){2})*[^"]*$)')),a=[],n=0,i=t[0].split(e.separator).length,r=[];e.header&&(r=t[0].split(e.separator),n=1);for(var s=n;s3e4&&(a=3e4),t.fetchQuery("SELECT now(),number,sin(number),sin(number),SHA1(toString(number)),SHA1(toString(number)) as xx from system.numbers limit "+a).then(function(t){var a="ch",n=new DataProvider(t,a);n.progressQuery="SQL";var i=new WidgetTable(n);e.w=i,e.vars.show=!0,e.vars.counter++,console.info("Load done",e.vars.counter,e.vars.show)})},e._widgetsx=[],e.removeResult=function(t,a,n){n.stopPropagation(),delete e.listDashboards[a]},e.inits=function(){e.listDashboards={}},e.inits(),e.moveWidget=function(){e.widgets[0].x=1,e.widgets[0].width=2,e.widgets[0].height=2},e.removeWidget=function(t){var a=e.widgets.indexOf(t);e.widgets.splice(a,1)},e.onChange=function(e,t){console.log("onChange event: "+e+" items:"+t)},e.onDragStart=function(e,t){console.log("onDragStart event: "+e+" ui:"+t)},e.onDragStop=function(e,t){console.log("onDragStop event: "+e+" ui:"+t)},e.onResizeStart=function(e,t){console.log("onResizeStart event: "+e+" ui:"+t)},e.onResizeStop=function(e,t){console.log("onResizeStop ",t.size)},e.onItemAdded=function(e){console.log("onItemAdded item: "+e)},e.onItemRemoved=function(e){console.log("onItemRemoved item: "+e)}}e.module(t.app.name).controller("DashController",a),a.$inject=["$scope","API","ThemeService","$stateParams","localStorageService","$mdDialog","$window","$mdToast"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.vars={isDark:i.isDark(),historysql:a.sqlLog,charthelp:[],active:{chart:!0,history:!0,snippet:!0,vars:!0},snippets:o.snippets,variables:s.vars},t.vars.scrollConfig2={autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:400,setHeight:200,advanced:{updateOnContentResize:!0}},t.showAddVarsDialog=function(a){l.show({controller:["$scope","$mdDialog",function(e,t){e.v={name:"Var1",type:"text",value:""},e.close=function(){t.cancel()},e.add=function(e){t.hide(e)}}],templateUrl:"app/base/addVarsDialog.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0}).then(function(e){e.name&&e.value&&e.type&&(s.addVar(e.type,e.name,e.value),t.broadcast())},function(){})},t.broadcast=function(){a.$emit("handleBroadcastUpdateVarsAndSnippets",{value:!0})},t.changed=function(e){s.update(e),t.broadcast()},t.showState=function(){console.warn(t.vars.variables)},t.addVar=function(){s.addVar("int","limit",1e3),t.broadcast()},t.actionHistory=function(e){a.$emit("handleBroadcastInsertInActive",{value:e})},t.dropSnippet=function(e){o.drop(e),t.broadcast()},t.dropVar=function(e){s.drop(e),t.broadcast()},t.init=function(){(!_.isObject(t.vars)||_.isUndefined(t.vars.variables.limit))&&s.addVar("int","limit",1e3)},t.init()}e.module(t.app.name).controller("SidebarHelperCtrl",a),a.$inject=["$scope","$rootScope","API","ThemeService","localStorageService","Variables","Snippets","$mdDialog"]}(angular,smi2),function(e,t){function a(e,t,a,n,i,r,s,o,l,c){e.vars={searchline:"",counter:0,loaded:!1,error:!1,databases:[]},e.vars.scrollConfig={autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:400,advanced:{updateOnContentResize:!0}},e.vars.metis={config:{toggle:!1,preventDefault:!1}},e.clickInsertField=function(e){t.$emit("handleBroadcastInsertInActive",{value:e.name})},e.clickAndSelect=function(a,n){return a.name==t.currentDatabase?(n.stopPropagation(),!1):void e.selectDatabase(a)},e.selectDatabase=function(e){console.time("sidebar.selectDatabase time took"),t.currentDatabase=e.name,s.show(s.simple().content("USE "+e.name+" database").theme(i.theme).position("bottom right")),console.timeEnd("sidebar.selectDatabase time took")},e.openTable=function(e){console.log("openTable!!!!!!!!!!!!!!!!!!!!!!!"),r("tableSiedenav").close(),t.currentDatabase!=e.database&&(s.show(s.simple().content("USE "+e.database+" database").theme(i.theme).position("bottom right")),t.currentDatabase=e.database),t.currentTable=e.name,r("tableSiedenav").open()},t.$on("handleBroadcastDatabases",function(){e.reLoad(!0),e.$applyAsync()}),e.updateDS=function(){n.databaseStructure(function(e){a.reload()},!0)},e.rightMenuProcessTable=function(e,a,i,r){console.log("rightMenuProcessTable",e,a,i),"InsertSQLDrop"==e&&(-1!==i.indexOf(".")&&(i='"'+i+'"'),t.$emit("handleBroadcastInsertInActive",{value:"DROP TABLE IF EXISTS "+a+"."+i})),"InsertName"==e&&t.$emit("handleBroadcastInsertInActive",{value:a+"."+i}),"InsertSQLDescribe"==e&&n.fetchQuery("SHOW CREATE TABLE "+a+'."'+i+'"').then(function(e){var a=window.sqlFormatter.format(e.data[0].statement);t.$emit("handleBroadcastInsertInActive",{value:a})}),"OpenTables"==e&&(window.location="/#/database/"+a+"/table/"+i),"InsertDescribe"==e&&n.fetchQuery("SELECT * FROM system.columns WHERE database='"+a+"' AND table='"+i+"'").then(function(e){var n=[],r=[];e.data.forEach(function(e){n.push(e.name),"Date"==e.type&&r.push(e.name+"=today()")}),-1!==i.indexOf(".")&&(i='"'+i+'"');var s="\nSELECT\n "+n.join(",\n ")+"\nFROM\n "+a+"."+i+"\n";r.length&&(s=s+"\nWHERE\n "+r.join("\n AND \n")),s+="\nLIMIT 100\n\n",console.log(s),t.$emit("handleBroadcastInsertInActive",{value:s})})},e.showAlertDatabaseStructure=function(e){o.show(o.alert().clickOutsideToClose(!0).title("Error on load database structure").textContent(e).ariaLabel("Error on load database structure").ok("OK")).then(function(e){n.clear(),a.go("login")})},e.reLoad=function(a){e.vars.loaded=!1,e.vars.error=!1,e.vars.databases=[],t.isInitDatabaseStructure=!1,n.fetchQuery("SELECT 1").then(function(i){e.$applyAsync(),n.databaseStructure(function(a){console.log("isInitDatabaseStructure-true"),t.isInitDatabaseStructure=Date.now(),e.$applyAsync(),console.log("databaseStructure - done");var n=a.getFields();e.vars.databases=a.getTables().reduce(function(e,t){var a=[{active:!0,value:"Select",key:"OpenTables",icon:"arrow-expand",db:t.database}],i=[{active:!0,value:"Open table",key:"OpenTables",icon:"arrow-expand",db:t.database,table:t.name},{active:!0,value:"Code Select from",key:"InsertDescribe",icon:"format-size",db:t.database,table:t.name},{active:!0,value:"Insert table name",key:"InsertName",icon:"bing",db:t.database,table:t.name},{active:!0,value:"Make SQL Describe",key:"InsertSQLDescribe",icon:"border-vertical",db:t.database,table:t.name},{active:!0,value:"Make SQL Drop",key:"InsertSQLDrop",icon:"delete",db:t.database,table:t.name}],r="table";t.engine.match(/Dictionary.*/)&&(r="library"),t.engine.match(/Distributed.*/)&&(r="soundcloud"),t.engine.match(/AggregatingMergeTree.*/)&&(r="cube"),t.engine.match(/MaterializedView.*/)&&(r="border-bottom"),t.engine.match(/SummingMergeTree.*/)&&(r="table-row-plus-after"),t.engine.match(/CollapsingMergeTree.*/)&&(r="table-row-height"),t.engine.match(/$Merge^/)&&(r="source-fork"),t.active=!0,t.classEngine=r,t.rightMenuListTable=i;var s=!0,o=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var u=c.value;if("-"!==t.name&&u.name==t.database)return u.tables.push({active:!0,database:t.database,name:t.name,engine:t.engine,classEngine:t.classEngine,fields:n[t.database+"."+t.name],rightMenuList:t.rightMenuListTable}),e}}catch(m){o=!0,l=m}finally{try{!s&&d["return"]&&d["return"]()}finally{if(o)throw l}}return[].concat(_toConsumableArray(e),[{name:t.database,rightMenuList:a,tables:[{active:!0,database:t.database,name:t.name,engine:t.engine,classEngine:t.classEngine,rightMenuList:t.rightMenuListTable,fields:n[t.database+"."+t.name]}]}])},[]),e.selectDatabase(e.vars.databases[0]),a.getDatabases().forEach(function(t){var a=!1;e.vars.databases.forEach(function(e){e.name==t.name&&(a=!0)}),a||e.vars.databases.push({name:t.name,tables:[],active:!0})}),l(function(){e.vars.loaded=!0,e.vars.error=!1,$("#sideBarMetismenu").metisMenu()},100)},a)},function(t){e.showAlertDatabaseStructure(t)})},e.reLoad()}e.module(t.app.name).controller("SidebarController",a),a.$inject=["$scope","$rootScope","$state","API","ThemeService","$mdSidenav","$mdToast","$mdDialog","$timeout","localStorageService"]}(angular,smi2),function(e,t){function a(a,n,i,r,s){a.user=i.getConnectionInfo().name,a.themes=r.list,a.isTabixServer=i.isTabixServer(),a.isChrome=/Chrome/.test(navigator.userAgent),a.vars={disable_exit:window.global_tabix_disable_exit,hideExitButton:!window.global_tabix_disable_exit},a.help=function(a){function n(e,a){e.vars={version:t.app.version,buildDate:t.app.buildDate},e.hide=function(){a.hide()},e.cancel=function(){a.cancel()},e.answer=function(e){a.hide(e)}}n.$inject=["$scope","$mdDialog"],s.show({controller:n,templateUrl:"app/base/helpDialogRu.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0})},a.logout=function(){i.clear(),n.go("login")},a.setUiTheme=function(e){r.set(e.name),window.location.reload()}}e.module(t.app.name).controller("HeaderController",a),a.$inject=["$scope","$state","API","ThemeService","$mdDialog"]}(angular,smi2),ace.define("ace/theme/dracula",["require","exports","module","ace/lib/dom"],function(e,t,a){t.isDark=!0,t.cssClass="ace-dracula",t.cssText="ace-dracula .ace_gutter {background: #282a36;color: rgb(144,145,148)}.ace-dracula .ace_print-margin {width: 1px;background: #e8e8e8}.ace-dracula {background-color: #282a36;color: #f8f8f2}.ace-dracula .ace_cursor {color: #f8f8f0}.ace-dracula .ace_marker-layer .ace_selection {background: #44475a}.ace-dracula.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #282a36;border-radius: 2px}.ace-dracula .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-dracula .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #3B3A32}.ace-dracula .ace_marker-layer .ace_active-line {background: #44475a}.ace-dracula .ace_gutter-active-line {background-color: #44475a}.ace-dracula .ace_marker-layer .ace_selected-word {border: 1px solid #44475a}.ace-dracula .ace_fold {background-color: #50fa7b;border-color: #f8f8f2}.ace-dracula .ace_keyword {color: #ff79c6}.ace-dracula .ace_constant.ace_language {color: #bd93f9}.ace-dracula .ace_constant.ace_numeric {color: #bd93f9}.ace-dracula .ace_constant.ace_character {color: #bd93f9}.ace-dracula .ace_constant.ace_character.ace_escape {color: #ff79c6}.ace-dracula .ace_constant.ace_other {color: #bd93f9}.ace-dracula .ace_support.ace_function {color: #8be9fd}.ace-dracula .ace_support.ace_constant {color: #6be5fd}.ace-dracula .ace_support.ace_class {font-style: italic;color: #66d9ef}.ace-dracula .ace_support.ace_type {font-style: italic;color: #66d9ef}.ace-dracula .ace_storage {color: #ff79c6}.ace-dracula .ace_storage.ace_type {font-style: italic;color: #8be9fd}.ace-dracula .ace_invalid {color: #F8F8F0;background-color: #ff79c6}.ace-dracula .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #bd93f9}.ace-dracula .ace_string {color: #f1fa8c}.ace-dracula .ace_comment {color: #6272a4}.ace-dracula .ace_variable {color: #50fa7b}.ace-dracula .ace_variable.ace_parameter {font-style: italic;color: #ffb86c}.ace-dracula .ace_entity.ace_other.ace_attribute-name {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_function {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_tag {color: #ff79c6}";var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),ace.define("ace/mode/clickhouse",["require","exports","module","ace/lib/oop","ace/mode/text","ace/token_iterator","ace/mode/folding","ace/mode/clickhouse_FoldMode","ace/mode/clickhouse_highlight_rules"],function(e,t){var a=e("../lib/oop"),n=e("./text").Mode,i=e("./clickhouse_highlight_rules").ClickhouseHighlightRules,r=e("./clickhouse_FoldMode").FoldMode,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./behaviour/cstyle").CstyleBehaviour,l=function(){this.foldingRules=new r,this.$outdent=new s,this.$behaviour=new o,this.HighlightRules=i};a.inherits(l,n),function(){var t=this;this.lineCommentStart="--",this.getHighlightRule=function(){return t.session.$mode.$highlightRules},this.getCompletions=function(e,t,a,n){return t.$mode.$highlightRules.completions},this.$id="ace/mode/clickhouse",this.checkOutdent=function(e,t,a){return this.$outdent.checkOutdent(t,a)},this.autoOutdent=function(e,t,a){this.$outdent.autoOutdent(t,a)},this.findTokens=function(t,a,n){t=t.replace(/^(\r\n|\n|\r)/gm,"").replace(/(\r\n|\n|\r)$/gm,"");for(var i=e("ace/token_iterator").TokenIterator,r=e("ace/edit_session").EditSession,s=new r(t,this),o=new i(s,0,0),l=o.getCurrentToken(),c=[];l;){var d=l;if(d.row=o.getCurrentTokenRow(),d.col=o.getCurrentTokenColumn(),d.type==a&&(c.push(d),n))return d.value=d.value.toLowerCase(),d;l=o.stepForward()}return c},this.trim=function(e,t){return t!==!0&&"string"==typeof t&&t.length>0&&(e=e.replace("^("+t+")"," ").replace(t+"$"," "),e=e.replace(new RegExp("^"+t+"|"+t+"$","g")," ")),e},this.collapseAll=function(e){for(var t=e,a=t.foldWidgets,n=t.getLength(),i=0,r=i;n>r;r++)if(null==a[r]&&(a[r]=t.getFoldWidget(r)),"start"==a[r]){var s=t.getFoldWidgetRange(r);if(s&&s.end.row<=n&&s.start.row>=i){r=s.end.row;try{var o=t.addFold("...",s);o&&(o.collapseChildren=depth)}catch(t){}}}},this.replaceVars=function(e,t){var a={},n=this.fetchTokens(e);if(console.warn("Find tokens",n,t),n.vars.length>0)for(var i in n.vars){var r=n.vars[i],s=r;r=r.indexOf("{")>-1?r.replace("{","").replace("}",""):r.replace("$","").replace("@","").replace(":","");for(var o in t){var l=t[o];l.name.toLowerCase()==r.toLowerCase()&&(console.info(l.name.toLowerCase(),"==",r.toLowerCase()),e=e.replace(s,l.value))}}return{sql:e,tokens:n,vars:a}},this.fetchTokens=function(t){var a={groupby:[],where:[],vars:[],limit:-1},n=e("ace/token_iterator").TokenIterator,i=e("ace/edit_session").EditSession,r=new i(t,this);r.bgTokenizer.start(0);for(var s=new n(r,0,0),o=s.getCurrentToken();o;){var l=o;if(l.row=s.getCurrentTokenRow(),l.col=s.getCurrentTokenColumn(),"variable.language"==l.type&&l.value&&a.vars.push(l.value),"keyword"==l.type&&l.value.toLowerCase().includes("limit")!==!1){var c=l.value.toLowerCase().match(/LIMIT\W+(\d+)\W*\,\W*(\d+)/i);c||(c=l.value.toLowerCase().match(/LIMIT\W+(\d+)/i)),c[0]&&c[1]&&c[2]?a.limit={from:c[1],to:c[2]}:c[0]&&c[1]&&(a.limit={from:c[1],to:!1})}o=s.stepForward()}return console.info("Parse & Find tokens result",a),a},this.splitByTokens=function(t,a,n){var i=e("ace/token_iterator").TokenIterator,r=e("ace/edit_session").EditSession,s=e("ace/range").Range,o=new r(t,this);o.bgTokenizer.start(0);var l=new i(o,0,0),c=l.getCurrentToken();if(_.isUndefined(c)){var d=0;do d++,l=new i(o,d,0),c=l.getCurrentToken();while(100>d&&!c)}for(var u=[],m=0,h=0,p=!1,g=void 0,b=void 0;c;){var f=c;if(f.row=l.getCurrentTokenRow(),f.col=l.getCurrentTokenColumn(),f.type==a&&(n!==!0&&f.value==n||n===!0)){var v=0;n instanceof String&&(v=n.length),g=new s(m,h,f.row,f.col+v),b=o.getTextRange(g),m=f.row,h=f.col+v,b=this.trim(b,f.value),b.length>2&&("string"==typeof p&&(b=this.trim(b,p)),u.push({sql:b,range:g,keyword:p}),p=f.value)}c=l.stepForward()}return g=new s(m,h,Number.MAX_VALUE,Number.MAX_VALUE),b=o.getTextRange(g),b=this.trim(b,n),"string"==typeof p&&(b=this.trim(b,p)),b.length>2&&u.push({sql:b,range:g,keyword:p}),u}}.call(l.prototype),t.Mode=l}),ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,a){var n=e("../lib/lang");t.$detectIndentation=function(e,t){function a(e){for(var t=0,a=e;al;l++){var c=e[l];if(/^\s*[^*+\-\s]/.test(c)){if(" "==c[0])r++,s=-Number.MAX_VALUE;else{var d=c.match(/^ */)[0].length;if(d&&" "!=c[d]){var u=d-s;!(u>0)||s%u||d%u||(i[u]=(i[u]||0)+1),n[d]=(n[d]||0)+1}s=d}for(;o>l&&"\\"==c[c.length-1];)c=e[l++]}}for(var m=i.reduce(function(e,t){return e+t},0),h={score:0,length:0},p=0,l=1;12>l;l++){var g=a(l);1==l?(p=g,g=n[1]?.9:.8,n.length||(g=0)):g/=p,i[l]&&(g+=i[l]/m),g>h.score&&(h={score:g,length:l})}if(h.score&&h.score>1.4)var b=h.length;return r>p+1?((1==b||r/4>p||h.score<1.8)&&(b=void 0),{ch:" ",length:b}):p>r+1?{ch:" ",length:b}:void 0},t.detectIndentation=function(e){var a=e.getLines(0,1e3),n=t.$detectIndentation(a)||{};return n.ch&&e.setUseSoftTabs(" "==n.ch),n.length&&e.setTabSize(n.length),n},t.trimTrailingSpace=function(e,t){for(var a=e.getDocument(),n=a.getAllLines(),i=t?-1:0,r=0,s=n.length;s>r;r++){var o=n[r],l=o.search(/\s+$/);l>i&&a.removeInLine(r,l,o.length)}},t.convertIndentation=function(e,t,a){var i=e.getTabString()[0],r=e.getTabSize();a||(a=r),t||(t=i);for(var s=" "==t?t:n.stringRepeat(t,a),o=e.doc,l=o.getAllLines(),c={},d={},u=0,m=l.length;m>u;u++){var h=l[u],p=h.match(/^\s*/)[0];if(p){var g=e.$getStringScreenWidth(p)[0],b=Math.floor(g/r),f=g%r,v=c[b]||(c[b]=n.stringRepeat(s,b)); -v+=d[f]||(d[f]=n.stringRepeat(" ",f)),v!=p&&(o.removeInLine(u,0,p.length),o.insertInLine({row:u,column:0},v))}}e.setTabSize(a),e.setUseSoftTabs(" "==t)},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var a=e.match(/\d+/);return a&&(t.length=parseInt(a[0],10)),t},t.$parseArg=function(e){return e?"string"==typeof e?t.$parseStringArg(e):"string"==typeof e.text?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,a){var n=t.$parseArg(a);t.convertIndentation(e.session,n.ch,n.length)}},{name:"setIndentation",exec:function(e,a){var n=t.$parseArg(a);n.length&&e.session.setTabSize(n.length),n.ch&&e.session.setUseSoftTabs(" "==n.ch)}}]}),function(){ace.require(["ace/ext/whitespace"],function(){})}(),ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,a){var n=e("ace/lib/dom"),i=e("ace/lib/lang"),r=function(e,t){this.element=n.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var a=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",a),e.on("changeSelection",a),e.on("keyboardActivity",a)};(function(){this.updateStatus=function(e){function t(e,t){e&&a.push(e,t||"|")}var a=[];t(e.keyBinding.getStatusText(e)),e.commands.recording&&t("REC");var n=e.selection,i=n.lead;if(!n.isEmpty()){var r=e.getSelectionRange();t("("+(r.end.row-r.start.row)+":"+(r.end.column-r.start.column)+")"," ")}t(i.row+":"+i.column," "),n.rangeCount&&t("["+n.rangeCount+"]"," "),a.pop(),this.element.textContent=a.join("")}}).call(r.prototype),t.StatusBar=r}),function(){ace.require(["ace/ext/statusbar"],function(){})}(),ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,a){var n=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,a=t.textInput.getElement();if(t.selection.isEmpty()){var i=t.getCursorPosition(),r=t.session.getWordRange(i.row,i.column),s=t.session.getTextRange(r);if(t.session.tokenRe.lastIndex=0,t.session.tokenRe.test(s)){var o="",l=s+" "+o;a.value=l,a.setSelectionRange(s.length,s.length+1),a.setSelectionRange(0,0),a.setSelectionRange(0,s.length);var c=!1;n.addListener(a,"keydown",function d(){n.removeListener(a,"keydown",d),c=!0}),t.textInput.setInputHandler(function(e){if(console.log(e,l,a.selectionStart,a.selectionEnd),e==l)return"";if(0===e.lastIndexOf(l,0))return e.slice(l.length);if(e.substr(a.selectionEnd)==l)return e.slice(0,-l.length);if(e.slice(-2)==o){var n=e.slice(0,-2);if(" "==n.slice(-1))return c?n.substring(0,a.selectionEnd):(n=n.slice(0,-1),t.session.replace(r,n),"")}return e})}}};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var a=this.textInput.getElement();a.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}),function(){ace.require(["ace/ext/spellcheck"],function(){})}(),ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,a){a.exports.createOption=function(e){var t,a=document.createElement("option");for(t in e)e.hasOwnProperty(t)&&("selected"===t?a.setAttribute(t,e[t]):a[t]=e[t]);return a},a.exports.createCheckbox=function(e,t,a){var n=document.createElement("input");return n.setAttribute("type","checkbox"),n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("value",t),n.setAttribute("class",a),t&&n.setAttribute("checked","checked"),n},a.exports.createInput=function(e,t,a){var n=document.createElement("input");return n.setAttribute("type","text"),n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("value",t),n.setAttribute("class",a),n},a.exports.createLabel=function(e,t){var a=document.createElement("label");return a.setAttribute("for",t),a.textContent=e,a},a.exports.createSelection=function(e,t,n){var i=document.createElement("select");return i.setAttribute("id",e),i.setAttribute("name",e),i.setAttribute("class",n),t.forEach(function(e){i.appendChild(a.exports.createOption(e))}),i}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,a){function n(e){for(var t=l.text,a=e.split(/[\/\\]/).pop(),n=0;n +/g,">"),u=function(e,t,a){var i=n.createElement("div");i.innerHTML=d,this.element=i.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},this.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;r.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),r.stopPropagation(e)}),r.addListener(e,"click",function(e){var a=e.target||e.srcElement,n=a.getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),r.stopPropagation(e)}),r.addCommandKeyListener(e,function(e,a,n){var i=l.keyCodeToString(n),s=t.$searchBarKb.findKeyCommand(a,i);s&&s.exec&&(s.exec(t),r.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),r.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),r.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),r.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new o([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new o,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]),this.setSearchRange=function(e){this.searchRange=e,e?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(e){n.setCssClass(this.replaceOption,"checked",this.searchRange),n.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.replaceBox.style.display=this.replaceOption.checked?"":"none",this.find(!1,!1,e)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,a){var i=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:a,range:this.searchRange}),r=!i&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",r),this.editor._emit("findSearchBox",{match:!r}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,a=0,n=0;if(t){var i=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),r=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(r-=e.session.doc.positionToIndex(this.searchRange.start));for(var s,o=t.lastIndex=0;(s=t.exec(i))&&(a++,o=s.index,r>=o&&n++,!(a>c))&&(s[0]||(t.lastIndex=o+=1,!(o>=i.length))););}this.searchCounter.textContent=n+" of "+(a>c?c+"+":a)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(u.prototype),t.SearchBox=u,t.Search=function(e,t){var a=e.searchBox||new u(e);a.show(e.session.getTextRange(),t)}}),function(){ace.require(["ace/ext/searchbox"],function(){})}(),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,a){var n=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),s=e("./range").Range,o=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,d=s.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,i),this.getTokenizer=function(){function e(e,t,a){return e=e.substr(1),/^\d+$/.test(e)&&!a.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new c({start:[{regex:/:/,onMatch:function(e,t,a){return a.length&&a[0].expectIf?(a[0].expectIf=!1,a[0].elseBranch=a[0],[a[0]]):":"}},{regex:/\\./,onMatch:function(e,t,a){var n=e[1];return"}"==n&&a.length?e=n:-1!="`$\\".indexOf(n)?e=n:a.inFormatString&&("n"==n?e="\n":"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,a){return[a.length?a.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,a,n){var i=e(t.substr(1),a,n);return n.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,a){a[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,a){var n=a[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,a){return a[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,a){a[0]&&(a[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,a){a.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var a=t.substr(1);return(this.variables[t[0]+"__"]||{})[a]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var i=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(i);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,a){var n=t.flag||"",i=t.guard;i=new RegExp(i,n.replace(/[^gi]/,""));var r=this.tokenizeTmSnippet(t.fmt,"formatString"),s=this,o=e.replace(i,function(){s.variables.__=arguments;for(var e=s.resolveVariables(r,a),t="E",n=0;n1?(v=t[t.length-1].length,f+=t.length-1):v+=e.length,y+=e}else e.start?e.end={row:f,column:v}:e.start={row:f,column:v}});var w=e.getSelectionRange(),k=e.session.replace(w,y),x=new m(e),C=e.inVirtualSelectionMode&&e.selection.index;x.addTabstops(l,w.start,k,C)},this.insertSnippet=function(e,t){var a=this;return e.inVirtualSelectionMode?a.insertSnippetForSelection(e,t):(e.forEachSelection(function(){a.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),void(e.tabstopManager&&e.tabstopManager.tabNext()))},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var a=e.getCursorPosition(),n=e.session.getState(a.row);"object"===("undefined"==typeof n?"undefined":_typeof(n))&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),a=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&a.push.apply(a,n[t].includeScopes),a.push("_"),a},this.expandWithTab=function(e,t){var a=this,n=e.forEachSelection(function(){return a.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var a,n=e.getCursorPosition(),i=e.session.getLine(n.row),r=i.substring(0,n.column),s=i.substr(n.column),o=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(a=this.findMatchingSnippet(t,r,s)),!!a},this),a?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-a.replaceBefore.length,n.column+a.replaceAfter.length),this.variables.M__=a.matchBefore,this.variables.T__=a.matchAfter,this.insertSnippetForSelection(e,a.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,a){for(var n=e.length;n--;){var i=e[n];if((!i.startRe||i.startRe.test(t))&&(!i.endRe||i.endRe.test(a))&&(i.startRe||i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(a):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(a)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function a(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function n(e,t,n){return e=a(e),t=a(t),n?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function i(e){e.scope||(e.scope=t||"_"),t=e.scope,s[t]||(s[t]=[],o[t]={});var a=o[t];if(e.name){var i=a[e.name];i&&l.unregister(i),a[e.name]=e}s[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=n(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=n(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}var s=this.snippetMap,o=this.snippetNameMap,l=this;e||(e=[]),e&&e.content?i(e):Array.isArray(e)&&e.forEach(i),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function a(e){var a=i[e.scope||t];if(a&&a[e.name]){delete a[e.name];var r=n[e.scope||t],s=r&&r.indexOf(e);s>=0&&r.splice(s,1)}}var n=this.snippetMap,i=this.snippetNameMap;e.content?a(e):Array.isArray(e)&&e.forEach(a)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,a=[],n={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=i.exec(e);){if(t[1])try{n=JSON.parse(t[1]),a.push(n)}catch(r){}if(t[4])n.content=t[4].replace(/^\t/gm,""),a.push(n),n={};else{var s=t[2],o=t[3];if("regex"==s){var l=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=l.exec(o)[1],n.trigger=l.exec(o)[1],n.endTrigger=l.exec(o)[1],n.endGuard=l.exec(o)[1]}else"snippet"==s?(n.tabTrigger=o.match(/^\S*/)[0],n.name||(n.name=o)):n[s]=o}}return a},this.getSnippetByName=function(e,t){var a,n=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(a=i[e]),!!a},this),a}}).call(u.prototype);var m=function(e){return e.tabstopManager?e.tabstopManager:(e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),void this.attach(e))};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],a=e.start,n=e.end,i=a.row,r=n.row,s=r-i,o=n.column-a.column;if(t&&(s=-s,o=-o),!this.$inChange&&t){var l=this.selectedTabstop,c=l&&!l.some(function(e){return d(e.start,a)<=0&&d(e.end,n)>=0});if(c)return this.detach()}for(var u=this.ranges,m=0;m0?(this.removeRange(h),m--):(h.start.row==i&&h.start.column>a.column&&(h.start.column+=o),h.end.row==i&&h.end.column>=a.column&&(h.end.column+=o),h.start.row>=i&&(h.start.row+=s),h.end.row>=i&&(h.end.row+=s),d(h.start,h.end)>0&&this.removeRange(h)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var a=this.editor.session,n=a.getTextRange(e.firstNonLinked),i=e.length;i--;){var r=e[i];if(r.linked){var s=t.snippetManager.tmStrFormat(n,r.original);a.replace(r,s)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,a=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var i=this.ranges[n].contains(e.row,e.column),r=a||this.ranges[n].contains(t.row,t.column);if(i&&r)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,a=this.index+(e||1);a=Math.min(Math.max(a,1),t),a==t&&(a=0),this.selectTabstop(a),0===a&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var a=this.editor.multiSelect;a.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||a.addRange(t[n].clone(),!0);a.ranges[0]&&a.addRange(a.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,a){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=s.fromPoints(a,a);g(n.start,t),g(n.end,t),e[0]=[n],e[0].index=0}var i=this.index,r=[i+1,0],o=this.ranges;e.forEach(function(e,a){for(var n=this.$openTabstops[a]||e,i=e.length;i--;){var l=e[i],c=s.fromPoints(l.start,l.end||l.start);p(c.start,t),p(c.end,t),c.original=l,c.tabstop=n,o.push(c),n!=e?n.unshift(c):n[i]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(r.push(n),this.$openTabstops[a]=n),this.addTabstopMarkers(n)},this),r.length>2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(m.prototype);var h={};h.onChange=o.prototype.onChange,h.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},h.update=function(e,t,a){this.$insertRight=a,this.pos=e,this.onChange(t)};var p=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},g=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,a){return t.snippetManager.insertSnippet(this,e,a)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,a){var n=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),o=e("../lib/lang"),l=e("../lib/dom"),c=function(e){var t=new n(e);t.$maxLines=4;var a=new i(t);return a.setHighlightActiveLine(!1),a.setShowPrintMargin(!1),a.renderer.setShowGutter(!1),a.renderer.setHighlightGutterLine(!1),a.$mouseHandler.$focusWaitTimout=0,a.$highlightTagPending=!0,a},d=function(e){var t=l.createElement("div"),a=new c(t);e&&e.appendChild(t),t.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150);var n=function(){};a.focus=n,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=n,a.renderer.$cursorLayer.element.style.opacity=0,a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",function(e){var t=e.getDocumentPosition();a.selection.moveToPosition(t),u.start.row=u.end.row=t.row,e.stop()});var i,d=new r(-1,0,-1,1/0),u=new r(-1,0,-1,1/0);u.id=a.session.addMarker(u,"ace_active-line","fullLine"),a.setSelectOnHover=function(e){e?d.id&&(a.session.removeMarker(d.id),d.id=null):d.id=a.session.addMarker(d,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",function(e){if(!i)return void(i=e);if(i.x!=e.x||i.y!=e.y){i=e,i.scrollTop=a.renderer.scrollTop;var t=i.getDocumentPosition().row;d.start.row!=t&&(d.id||a.setRow(t),h(t))}}),a.renderer.on("beforeRender",function(){if(i&&-1!=d.start.row){i.$pos=null;var e=i.getDocumentPosition().row;d.id||a.setRow(e),h(e,!0)}}),a.renderer.on("afterRender",function(){var e=a.getRow(),t=a.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&l.addCssClass(n,"ace_selected"))});var m=function(){h(-1)},h=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))};a.getHoveredRow=function(){return d.start.row},s.addListener(a.container,"mouseout",m),a.on("hide",m),a.on("changeSelection",m),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(e){var t=a.data[e];return"string"==typeof t?t:t&&t.value||""};var p=a.session.bgTokenizer;return p.$tokenizeRow=function(e){var t=a.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);var i,r,s=-1;t.iconClass&&n.push({type:"icon ace_icon-"+t.iconClass,value:" "});for(var o=0;ol-2&&(c=c.substr(0,l-t.caption.length-3)+"…"),n.push({type:"rightAlignedText",value:c})}return n},p.$updateOnChange=n,p.start=n,a.session.$computeWidth=function(){return this.screenWidth=0},a.$blockScrolling=1/0,a.isOpen=!1,a.isTopdown=!1,a.data=[],a.setData=function(e){a.setValue(o.stringRepeat("\n",e.length),-1),a.data=e||[],a.setRow(0)},a.getData=function(e){return a.data[e]},a.getRow=function(){return u.start.row},a.setRow=function(e){e=Math.max(0,Math.min(this.data.length,e)),u.start.row!=e&&(a.selection.clearSelection(),u.start.row=u.end.row=e||0,a.session._emit("changeBackMarker"),a.moveCursorTo(e||0,0),a.isOpen&&a._signal("select"))},a.on("changeSelection",function(){a.isOpen&&a.setRow(a.selection.lead.row),a.renderer.scrollCursorIntoView()}),a.hide=function(){this.container.style.display="none",this._signal("hide"),a.isOpen=!1},a.show=function(e,t,n){var r=this.container,s=window.innerHeight,o=window.innerWidth,l=this.renderer,c=l.$maxLines*t*1.4,d=e.top+this.$borderSize,u=d>s/2&&!n;u&&d+t+c>s?(l.$maxPixelHeight=d-2*this.$borderSize,r.style.top="",r.style.bottom=s-d+"px",a.isTopdown=!1):(d+=t,l.$maxPixelHeight=s-d-.2*t,r.style.top=d+"px",r.style.bottom="",a.isTopdown=!0),r.style.display="",this.renderer.$textLayer.checkForSizeChanges();var m=e.left;m+r.offsetWidth>o&&(m=o-r.offsetWidth),r.style.left=m+"px",this._signal("show"),i=null,a.isOpen=!0},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a};l.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=d}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,a){t.parForEach=function(e,t,a){var n=0,i=e.length;0===i&&a();for(var r=0;i>r;r++)t(e[r],function(e,t){n++,n===i&&a(e,t)})};var n=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,a){a=a||n;for(var i=[],r=t-1;r>=0&&a.test(e[r]);r--)i.push(e[r]);return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,a){a=a||n;for(var i=[],r=t;r=t?a:t-1;break;case"down":t=t>=a?-1:t+1;break;case"start":t=0;break;case"end":t=a}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var a,n=this.editor.selection.getAllRanges(),i=0;a=n[i];i++)a.start.column-=this.completions.filterText.length,this.editor.session.remove(a);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();return t||e.tabstopManager?t:void e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var a=e.getSession(),n=e.getCursorPosition(),i=(a.getLine(n.row),r.getCompletionPrefix(e));this.base=a.doc.createAnchor(n.row,n.column-i.length),this.base.$insertRight=!0;var s=[],o=e.completers.length;return e.completers.forEach(function(r,l){r.getCompletions(e,a,n,i,function(n,r){!n&&r&&(s=s.concat(r));var l=e.getCursorPosition();a.getLine(l.row);t(null,{prefix:i,matches:s,finished:0===--o})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),a=this.editor.session.getTextRange({start:this.base,end:t});if(a==this.completions.filterText)return;return this.completions.setFilter(a),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=a||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,a,e):this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,a){var i=function(){return a.finished?this.detach():void 0}.bind(this),r=a.prefix,s=a&&a.matches;if(!s||!s.length)return i();if(0===r.indexOf(a.prefix)&&n==this.gatherCompletionsId){this.completions=new d(s),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(r);var o=this.completions.filtered;return o.length&&(1!=o.length||o[0].value!=r||o[0].snippet)?this.autoInsert&&1==o.length&&a.finished?this.insertMatch(o[0]):void this.openPopup(this.editor,r,e):i()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,a=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return a&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(n=e.getDocTooltip(a)),n}),n||(n=a),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=o.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var a=this.popup,n=a.container.getBoundingClientRect();t.style.top=a.container.style.top,t.style.bottom=a.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}}}).call(c.prototype),c.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new c),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var d=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var a=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===a?!1:(a=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var a=[],n=t.toUpperCase(),i=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var o=r.value||r.caption||r.snippet;if(o){var l,c,d=-1,u=0,m=0;if(this.exactMatch){if(t!==o.substr(0,t.length))continue e}else for(var h=0;h=0&&(0>g||g>p)?p:g,0>l)continue e;c=l-d-1,c>0&&(-1===d&&(m+=10),m+=c),u|=1<",s.escapeHTML(e.caption),"
","
",s.escapeHTML(e.snippet)].join(""))}},u=[d,l,c];t.setCompleters=function(e){u.length=0,e&&u.push.apply(u,e)},t.addCompleter=function(e){u.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=d;var m,h={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){g(t.session.$mode)},g=function k(e){var t=e.$id;n.files||(n.files={}),b(t),e.modes&&e.modes.forEach(k)},b=function x(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},r.loadModule(t,function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){x("ace/mode/"+e)})))})}},f=function(e){var t=e.editor,a=t.completer&&t.completer.activated;if("backspace"===e.command.name)a&&!o.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){var n=o.getCompletionPrefix(t);n&&n.length>=t.$liveAutocompletionThreshold&&!a&&(t.completer||(t.completer=new i),t.completer.autoInsert=!1,t.completer.showPopup(t))}},v=s.delayedCall(function(){f(m)},0),y=function(e){m=e,v.delay(e.editor.$liveAutocompletionDelay)},w=e("../editor").Editor;e("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",y)):this.commands.removeListener("afterExec",y)},value:!1},liveAutocompletionThreshold:{value:0},liveAutocompletionDelay:{value:500},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(){})}(),ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,a){e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:""},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:""!=o.value?n="php":"support.php_tag"==o.type&&"?>"==o.value?n="html":"meta.tag.name.style"==o.type&&"css"!=n?n="css":"meta.tag.name.style"==o.type&&"css"==n?n="html":"meta.tag.name.script"==o.type&&"js"!=n?n="js":"meta.tag.name.script"==o.type&&"js"==n&&(n="html"),g=e.stepForward(),g&&0==g.type.indexOf("meta.tag.name")&&(s=g.value),"support.php_tag"==p.type&&"v;v++)u+=" ";break}if(h===!1)for(v in l)if(!(p.type!=l[v].type||l[v].value&&p.value!=l[v].value||l[v].blockTag&&-1!==d.indexOf(i)||l[v].context&&l[v].context!==n)){if(l[v].indent===!0&&m++,!l[v].dontBreak&&!b)for(u+="\n",v=0;m>v;v++)u+=" ";break}if(u+=f,"support.php_tag"==p.type&&"?>"==p.value&&(h=!1),r=i,p=o,o=g,null===o)break}else o=g;else o=e.stepForward();return u}}),ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,a){var n=e("ace/token_iterator").TokenIterator,i=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new n(e,0,0),a=(t.getCurrentToken(),e.$modeId.split("/").pop()),r=i(t,a);e.doc.setValue(r)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}),function(){ace.require(["ace/ext/beautify"],function(){})}(),ace.define("ace/mode/clickhouse_highlight_rules",["require","exports","$rootScope","module","ace/lib/oop","ace/snippets","ace/ext/language_tools","ace/mode/text_highlight_rules"],function(e,t,a){var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){var e=this,t="SELECT|CASE|THEN|DISTINCT|INSERT|UPDATE|DELETE|WHERE|AND|OR|OFFSET|HAVING|AS|FROM|WHEN|ELSE|END|TYPE|LEFT|RIGHT|JOIN|ON|OUTER|DESC|ASC|UNION|CREATE|TABLE|PRIMARY|KEY|FOREIGN|NOT|REFERENCES|INNER|CROSS|NATURAL|DATABASE|DROP|GRANT|ANY|BETWEEN|ATTACH|DETACH|CAST|WITH|BIT_AND|BIT_OR|TO|BIT_XOR|DESCRIBE|OPTIMIZE|PREWHERE|TOTALS|DATABASES|PROCESSLIST|SHOW|IF",a="INSERT\\W+INTO|RENAME\\WTABLE|IF\\W+NOT\\W+EXISTS|IF\\W+EXISTS|FORMAT\\W+Vertical|FORMAT\\W+JSONCompact|FORMAT\\W+JSONEachRow|FORMAT\\W+TSKV|FORMAT\\W+TabSeparatedWithNames|FORMAT\\W+TabSeparatedWithNamesAndTypes|FORMAT\\W+TabSeparatedRaw|FORMAT\\W+BlockTabSeparated|FORMAT\\W+CSVWithNames|FORMAT\\W+CSV|FORMAT\\W+JSON|FORMAT\\W+TabSeparated",n="true|false|NULL",i="sum|sumIf|avg|avgIf",r="date|integer|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|float64|datetime|enum8|enum16|fixedstring|array|tuple|stringMergeTree|SummingMergeTree|ReplacingMergeTree|ReplicatedMergeTree|Buffer|ReplicatedCollapsingMergeTree|CollapsingMergeTree|AggregatingMergeTree|Merge|Memory|GraphiteMergeTree|ReplicatedAggregatingMergeTree|ReplicatedSummingMergeTree",s=["IF NOT EXISTS","RENAME TABLE","IF EXISTS","GROUP BY","ORDER BY","UNION ALL","FORMAT JSON","FORMAT JSONCompact","FORMAT JSONEachRow","FORMAT TSV","FORMAT TabSeparated","FORMAT TabSeparatedWithNames","FORMAT TabSeparatedWithNamesAndTypes","FORMAT TabSeparatedRaw","FORMAT BlockTabSeparated","FORMAT TSKV","FORMAT CSV","FORMAT CSVWithNames","SYSTEM RELOAD CONFIG","DROP TEMPORARY TABLE","EXISTS TEMPORARY TABLE","SYSTEM RELOAD DICTIONARY","SYSTEM RELOAD DICTIONARIES","SYSTEM DROP DNS CACHE","SYSTEM SHUTDOWN","SYSTEM KILL","CLEAR COLUMN IN PARTITION"],o=["DRAW_GMAPS","DRAW_GRAPH","DRAW_PLOTLY","DRAW_CALENDAR","DRAW_TEXT","DRAW_HEATMAP","DRAW_CHART","DRAW_BAR","DRAW_GRIDCHART","DRAW_FLATTREE","DRAW_RIVER","DRAW_RAW","DRAW_SANKEYS","DRAW_TREEMAP","DRAW_C3","DRAW_MAP"],l="";if(window.aceJSRules&&window.aceJSRules.builtinFunctions){if(window.aceJSRules.builtinFunctions){var c=[];window.aceJSRules.builtinFunctions.forEach(function(e){c.push(e.name)}),i=c.join("|")}_.isArray(window.aceJSRules.tables)&&(l=window.aceJSRules.tables.join("|"))}var d="";d=window.global_delimiter?new RegExp(window.global_delimiter):new RegExp(";;");var u=[],m=t.toLowerCase();window.aceJSRules&&_.isArray(window.aceJSRules.fieldsList)&&window.aceJSRules.fieldsList.forEach(function(e){var t=e.name.toLowerCase()+"|";m.indexOf(t)>-1||u.push(e.name)});var h=this.createKeywordMapper({"support.function":i,keyword:t,"constant.language":n,"storage.type":r,"markup.bold":l,"markup.heading":u.join("|")},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$",caseInsensitive:!0},{token:"comment.block",start:"```",end:"```"},{token:"keyword",regex:"GROUP\\W+BY|ON\\W+CLUSTER|ORDER\\W+BY|LIMIT\\W+\\d+\\W*,\\W*\\d+|LIMIT\\W+\\d+\\W+BY\\W+|LIMIT\\W+\\d+"},{token:"variable.language",regex:/\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/@[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/\:[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/\{[\w]+(?:\[[\w\]+]|[=\-]>\w+)\}?/},{token:"comment",start:"/\\*",end:"\\*/"},{token:"constant",regex:'".*?"'},{token:"keyword",regex:a},{token:"invalid.illegal",regex:o.join("|")},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:h,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"constant.character.escape",regex:d},{token:"punctuation",regex:/[?:,;.]/},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(\\{]"},{token:"paren.rparen",regex:"[\\)\\}]"},{token:"text",regex:"\\s+"}]},this.normalizeRules(),this.completions=[],this.getCompletions=function(){return e.completions},this.addCompletions=function(e,t,a,n,i,r,s){this.completions.push({name:e,value:t,caption:a,score:n,meta:i,iconClass:r,docHTML:s})},this.addCompletionsDictionaries=function(e){this.addCompletions(e.dic,e.dic,e.title,0,"dic","dict",this.makeCompletionsDocFunctions(e.title,e.dic))},this.addCompletionsFunctions=function(e){this.addCompletions(e.name,e.name+"( )",e.name+"( )",e.score,"function","function",this.makeCompletionsDocFunctions(e.name,e.origin,e.comb))},this.addCompletionsTableFiled=function(e){var t=e.table+"."+e.name,a=e.name,n="type:"+e.type+"

default_type:"+e.default_type+"
"+e.default_expression;this.addCompletions(t,a,a,100,e.type,"field",this.makeCompletionsdocHTML(t,n))},this.addArrayCompletions=function(e,t,a){var n=this;e.forEach(function(e){n.addCompletions(e,e,e,0,t,a,!1)})},this.setKeywords=function(e){console.log("setKeywords > ",e),this.keywordRule.onMatch=this.createKeywordMapper(e,"identifier")},this.makeCompletionsDocFunctions=function(e,t,a){if(!window.global_chFunctionsHelp)return!1;if(!window.global_chFunctionsHelp.functions)return!1;var n="",i=e;if("undefined"!=typeof window.global_chFunctionsHelp.functions[e]?i=e:"undefined"!=typeof window.global_chFunctionsHelp.functions[t]&&(i=t),"undefined"!=typeof window.global_chFunctionsHelp.functions[i]){var r="en",s=window.global_chFunctionsHelp.functions[i],o="",l="";s.desc&&(o=s.bracket,l=s.desc[r],l||(l=s.desc.en?s.desc.en:s.desc.ru)),l&&(l=l.replace(/\.\s*/gm,".
")),n=''+e+o+'
'+l+" "}else n=''+e+"( )
"+t;return n+'
'},this.makeCompletionsdocHTML=function(e,t){return'
'+e+"
"+t+"
"},this.addArrayCompletions(t.split("|"),"keyword","keyword"),this.addArrayCompletions(s,"keyword","keyword"),this.addArrayCompletions(o,"draw","draw"),this.addArrayCompletions(r.split("|"),"type","type")};n.inherits(r,i),t.ClickhouseHighlightRules=r}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,a){var n=e("ace/range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var a=e.getLine(t),i=a.match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,s=e.findMatchingBracket({row:t,column:r});if(!s||s.row==t)return 0;var o=this.$getIndent(e.getLine(s.row));e.replace(new n(t,0,t,r-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/clickhouse_FoldMode",["$rootScope","require","exports","module","ace/lib/oop","ace/range","ace/mode/sqlserver","ace/mode/folding/cstyle"],function(e,t,a){var n=e("../lib/oop"),i=e("ace/mode/folding/cstyle").FoldMode,r=(e("ace/range").Range,e("ace/token_iterator").TokenIterator),s=t.FoldMode=function(){};n.inherits(s,i),function(){this.foldingRules="cStyle",this.foldingStartMarker=/\(|\{/,this.getFoldWidgetRange=function(e,t,a,n){for(var i=new r(e,a,0),s=i.getCurrentToken(),o=!1;s;){var l=s,c=i.getCurrentTokenPosition();if(s=i.stepForward(),"paren.lparen"!=l.type||"("!=l.value&&"{"!=l.value||(o=e.getBracketRange(c)),o)break}return o}}.call(s.prototype)}),window.global_chFunctionsHelp={functions:{corr:{bracket:"(x, y)",desc:{en:'Calculates the Pearson correlation coefficient: Σ((x - x̅)(y - y̅)) / sqrt(Σ((x - x̅)2) * Σ((y - y̅)2)).'}},stddevPop:{bracket:"(x)",desc:{en:"The result is equal to the square root of 'varPop(x)'."}},varPop:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / n%%."}},argMin:{bracket:"(arg, val)",desc:{en:"Calculates the 'arg' value for a minimal 'val' value. If there are several different values of 'arg' for minimal values of 'val', the first of these values encountered is output."}},quantileExactWeighted:{bracket:"(level)(x, weight)",desc:{en:"Вычисляет квантиль уровня level точно."}},min:{bracket:"(v)",desc:{en:"Minimal execution speed in rows per second. Checked on every data block when 'timeout_before_checking_execution_speed' expires. If the execution speed is lower, an exception is thrown."}},varSamp:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / (n - 1)%%.

Returns Float64. If n <= 1, it returns +∞."}},anyLast:{bracket:"(x)",desc:{en:"Selects the last value encountered.
The result is just as indeterminate as for the 'any' function."}},argMax:{bracket:"(arg, val)",desc:{en:"Calculates the 'arg' value for a maximum 'val' value. If there are several different values of 'arg' for maximum values of 'val', the first of these values encountered is output."}},count:{bracket:"()",desc:{en:"Counts the number of rows. "}},any:{bracket:"(x)",desc:{en:"Selects the last value encountered.
The result is just as indeterminate as for the 'any' function."}},avg:{bracket:"(x)",desc:{en:"Calculates the average.
Only works for numbers.
The result is always Float64."}},sequenceMatch:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"Pattern matching for event chains.

'pattern' is a string containing a pattern to match."}},stddevSamp:{bracket:"(x)",desc:{en:"The result is equal to the square root of 'varSamp(x)'."}},medianDeterministic:{bracket:"(x, determinator)",desc:{en:"This function works similarly to the 'median' function - it approximates the median."}},quantilesTimingWeighted:{bracket:"(level1, level2, ...)(x, weight)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianTimingWeighted' function."}},uniq:{bracket:"(N)(x)",desc:{en:"Calculates the number of different argument values, if it is less than or equal to N.
If the number of different argument values is greater than N, it returns N + 1."}},covarSamp:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / (n - 1)%%.

Returns Float64. If n <= 1, it returns +∞."}},max:{bracket:"(v)",desc:{en:"Maximum number of bytes (uncompressed data) that can be passed to a remote server or saved in a temporary table when using GLOBAL IN."}},quantileTDigest:{bracket:"(level)(x)",desc:{en:"t-digest"}},quantilesTiming:{bracket:"(level1, level2, ...)(x, weight)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianTimingWeighted' function."}},quantiles:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},quantile:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},groupArray:{bracket:"(x)",desc:{en:"Creates an array of argument values.
Values can be added to the array in any (indeterminate) order.

In some cases, you can rely on the order of execution. This applies to cases when SELECT comes from a subquery that uses ORDER BY."}},sum:{bracket:"(x)",desc:{en:"Calculates the sum.
Only works for numbers."}},median:{bracket:"(x, weight)",desc:{en:"Differs from the 'medianTiming' function in that it has a second argument - "weights". Weight is a non-negative integer.
The result is calculated as if the 'x' value were passed 'weight' number of times to the 'medianTiming' function."}},quantileTiming:{bracket:"(level)(x, weight)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianTimingWeighted' function."}},quantileTimingWeighted:{bracket:"(level)(x, weight)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianTimingWeighted' function."}},groupUniqArray:{bracket:"(x)",desc:{en:"Creates an array from different argument values. Memory consumption is the same as for the 'uniqExact' function."}},uniqHLL12:{bracket:"(x)",desc:{en:"Uses the HyperLogLog algorithm to approximate the number of different values of the argument. "}},covarPop:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / n%%."}},sequenceCount:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"sequenceMatch"}},quantileDeterministic:{bracket:"(level)(x, determinator)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianDeterministic' function."}},quantileExact:{bracket:"(level)(x, weight)",desc:{en:""}},quantilesDeterministic:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},medianTiming:{bracket:"(x, weight)",desc:{en:"Differs from the 'medianTiming' function in that it has a second argument - "weights"."}},medianTimingWeighted:{bracket:"(x, weight)",desc:{ru:"",en:"Differs from the 'medianTiming' function in that it has a second argument - "weights"."}},uniqExact:{bracket:"(x)",desc:{en:"Calculates the number of different values of the argument, exactly.
There is no reason to fear approximations, so it's better to use the 'uniq' function.
You should use the 'uniqExact' function if you definitely need an exact result. "}},uniqCombined:{bracket:"(x)",desc:{en:""}},uniqUpTo:{bracket:"(N)(x)",desc:{en:"Calculates the number of different argument values, if it is less than or equal to N.
If the number of different argument values is greater than N, it returns N + 1."}},substring:{bracket:"(s, offset, length)",desc:{en:"The same as 'substring', but for Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception)."}},notLike:{bracket:"(haystack, pattern), haystack NOT LIKE pattern operator",desc:{en:"The same thing as 'like', but negative."}},hostName:{bracket:"()",desc:{en:"Returns a string with the name of the host that this function was performed on. For distributed processing, this is the name of the remote server host, if the function is performed on a remote server."}},globalNotIn:{bracket:"(v)",desc:{en:"See the section "IN operators"."}},or:{bracket:"(v)",desc:{en:"The same thing as 'max_temporary_columns', but without counting constant columns.
Note that constant columns are formed fairly often when running a query, but they require approximately zero computing resources."}},extractAll:{bracket:"(haystack, pattern)",desc:{en:"Extracts all the fragments of a string using a regular expression. If 'haystack' doesn't match the 'pattern' regex, an empty string is returned. Returns an array of strings consisting of all matches to the regex."}},arrayFirst:{bracket:"(func, arr1, ...)",desc:{en:"Returns the index of the first element in the 'arr1' array for which 'func' returns something other than 0."}},notEquals:{bracket:"(v)",desc:{ru:"",en:""}},arrayExists:{bracket:"([func,] arr1, ...)",desc:{en:"Returns 1 if there is at least one element in 'arr' for which 'func' returns something other than 0. Otherwise, it returns 0."}},arrayCount:{bracket:"([func,] arr1, ...)",desc:{en:"Returns the number of elements in 'arr' for which 'func' returns something other than 0. If 'func' is not specified, it returns the number of non-zero items in the array."}},arrayMap:{bracket:"(func, arr1, ...)",desc:{en:"Returns an array obtained from the original application of the 'func' function to each element in the 'arr' array."}},now:{bracket:"(v)",desc:{en:"If the parameter is true, INSERT operation will skip columns with unknown names from input.
Otherwise, an exception will be generated, it is default behavior.
The parameter works only for JSONEachRow and TSKV input formats."}},intDiv:{bracket:"(a, b)",desc:{en:"Differs from 'intDiv' in that it returns zero when dividing by zero or when dividing a minimal negative number by minus one."}},topLevelDomain:{bracket:"(v)",desc:{en:"- Selects the top-level domain. Example: .ru."}},intHash32:{bracket:"(v)",desc:{en:"Calculates a 32-bit hash code from any type of integer.
This is a relatively fast non-cryptographic hash function of average quality for numbers."}},replaceOne:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replaces the first occurrence, if it exists, of the 'pattern' substring in 'haystack' with the 'replacement' substring.
Hereafter, 'pattern' and 'replacement' must be constants."}},cityHash64:{bracket:"(v)",desc:{en:"Calculates CityHash64 from a string or a similar hash function for any number of any type of arguments.
For String-type arguments, CityHash is used. This is a fast non-cryptographic hash function for strings with decent quality"}},OSToRoot:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the operating system from the Yandex.Metrica dictionary. If any OS matches the passed number, it returns a UInt8 number - the ID of the corresponding root OS (for example, it converts Windows Vista to Windows). Otherwise, returns 0."}},sipHash128:{bracket:"(v)",desc:{en:"Calculates SipHash from a string.
Accepts a String-type argument. Returns FixedString(16).
Differs from sipHash64 in that the final xor-folding state is only done up to 128 bits."}},SHA1:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32)."}},asin:{bracket:"(x)",desc:{en:"The arc sine."}},SHA256:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32)."}},MD5:{bracket:"(v)",desc:{en:"Calculates the MD5 from a string and returns the resulting set of bytes as FixedString(16)."}},bitmaskToList:{bracket:"(num)",desc:{en:"Accepts an integer. Returns a string containing the list of powers of two that total the source number when summed. They are comma-separated without spaces in text format, in ascending order."}},array:{bracket:"(v)",desc:{en:"The -%%Array%% suffix can be appended to any aggregate function. In this case, the aggregate function takes arguments of the 'Array(T)' type (arrays) instead of 'T' type arguments. If the aggregate function accepts multiple arguments, this must be arrays of equal lengths. "}},dictGetStringOrDefault:{bracket:"(v)",desc:{ru:"%%dictGetT('dict_name', 'attr_name', id, default)%%
Аналогично функциям dictGetT, но значение по умолчанию берётся из последнего аргумента функции.",en:""}},greaterOrEquals:{bracket:"(v)",desc:{ru:"",en:""}},e:{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},runningDifference:{bracket:"(x)",desc:{en:"Calculates the difference between consecutive values in the data block.
Result of the function depends on the order of the data in the blocks.

It works only inside of the each processed block of data. Data splitting in the blocks is not explicitly controlled by the user. "}},not:{bracket:"(v)",desc:{ru:'Смотрите раздел "Операторы IN".',en:"See the section "IN operators"."}},intHash64:{bracket:"(v)",desc:{en:"Calculates a 64-bit hash code from any type of integer.
It works faster than intHash32. Average quality."}},acos:{bracket:"(x)",desc:{ru:"Арккосинус.",en:"The arc cosine."}},dictGetString:{bracket:"(v)",desc:{en:""}},and:{bracket:"(x, determinator)",desc:{en:"This function works similarly to the 'median' function - it approximates the median. However, in contrast to 'median', the result is deterministic and does not depend on the order of query execution.

To achieve this, the function takes a second argument - the "determinator". "}},dictGetDate:{bracket:"(v)",desc:{ru:"",en:""}},dictGetFloat32:{bracket:"(v)",desc:{ru:"",en:""}},dictGetInt8:{bracket:"(v)",desc:{ru:"",en:""}},dictGetUInt32:{bracket:"(v)",desc:{ru:"",en:""}},OSIn:{bracket:"(lhs, rhs)",desc:{en:"Checks whether the 'lhs' operating system belongs to the 'rhs' operating system."}},arrayFirstIndex:{bracket:"(func, arr1, ...)",desc:{en:"Returns the index of the first element in the 'arr1' array for which 'func' returns something other than 0."}},ceil:{bracket:"(x[, N])",desc:{en:"Returns the smallest round number that is greater than or equal to 'x'. In every other way, it is the same as the 'floor' function (see above)."}},fragment:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},dictGetUInt8:{bracket:"(v)",desc:{ru:"",en:""}},dictHas:{bracket:"(v)",desc:{ru:"%%dictHas('dict_name', id)%%
- проверить наличие ключа в словаре. Возвращает значение типа UInt8, равное 0, если ключа нет и 1, если ключ есть.",en:""}},arraySum:{bracket:"([func,] arr1, ...)",desc:{en:"Returns the sum of the 'func' values. If the function is omitted, it just returns the sum of the array elements."}},emptyArrayDateTime:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},intDivOrZero:{bracket:"(a, b)",desc:{en:"Differs from 'intDiv' in that it returns zero when dividing by zero or when dividing a minimal negative number by minus one."}},SEHierarchy:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the search engine from the Yandex.Metrica dictionary. Returns an array with a hierarchy of search engines. Similar to the 'regionHierarchy' function."}},regionToContinent:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a continent. In every other way, this function is the same as 'regionToCity'.
Example: %%regionToContinent(toUInt32(213)) = 10001%% converts Moscow (213) to Eurasia (10001)."}},dictGetInt32:{bracket:"(v)",desc:{ru:"",en:""}},toInt8:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},materialize:{bracket:"(x)",desc:{en:"Turns a constant into a full column containing just one value.
In ClickHouse, full columns and constants are represented differently in memory. Functions work differently for constant arguments and normal arguments (different code is executed), although the result is almost always the same. This function is for debugging this behavior."}},regionToCountry:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a country. In every other way, this function is the same as 'regionToCity'.
Example: %%regionToCountry(toUInt32(213)) = 225%% converts Moscow (213) to Russia (225)."}},dictGetDateTime:{bracket:"(v)",desc:{ru:"",en:""}},xor:{bracket:"(v)",desc:{ru:"",en:""}},regionToCity:{bracket:"(id[, geobase])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. If this region is a city or part of a city, it returns the region ID for the appropriate city. Otherwise, returns 0."}},dictGetFloat64:{bracket:"(v)",desc:{ru:"",en:""}},timeSlot:{bracket:"(StartTime, Duration)",desc:{en:"For a time interval starting at 'StartTime' and continuing for 'Duration' seconds, it returns an array of moments in time, consisting of points from this interval rounded down to the half hour."}},toTime:{bracket:"(v)",desc:{en:"Converts a date with time to the date of the start of the Unix Epoch, while preserving the time."}},log2:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the binary logarithm of the argument."}},toRelativeHourNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the hour, starting from a certain fixed point in the past."}},toRelativeDayNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the day, starting from a certain fixed point in the past."}},toRelativeWeekNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the week, starting from a certain fixed point in the past."}},splitByString:{bracket:"(separator, s)",desc:{en:"The same as above, but it uses a string of multiple characters as the separator. The string must be non-empty."}},currentDatabase:{bracket:"()",desc:{en:"Returns the name of the current database.
You can use this function in table engine parameters in a CREATE TABLE query where you need to specify the database."}},toRelativeMonthNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the month, starting from a certain fixed point in the past."}},visibleWidth:{bracket:"(x)",desc:{en:"Calculates the approximate width when outputting values to the console in text format (tab-separated). This function is used by the system for implementing Pretty formats."}},bitShiftRight:{bracket:"(a, b)",desc:{en:""}},toRelativeYearNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the year, starting from a certain fixed point in the past."}},toStartOfHour:{bracket:"(v)",desc:{en:"Rounds down a date with time to the start of the hour."}},halfMD5:{bracket:"(v)",desc:{en:"Calculates the MD5 from a string. Then it takes the first 8 bytes of the hash and interprets them as UInt64 in big endian."}},toStartOfFiveMinute:{bracket:"(v)",desc:{en:""}},toUInt16OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument."}},toMonday:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the nearest Monday.
Returns the date."}},IPv6NumToString:{bracket:"(x)",desc:{en:"Accepts a FixedString(16) value containing the IPv6 address in binary format. Returns a string containing this address in text format. "}},indexOf:{bracket:"(arr, x)",desc:{ru:"Возвращает индекс элемента x (начиная с 1), если он есть в массиве, или 0, если его нет.",en:"Returns the index of the 'x' element (starting from 1) if it is in the array, or 0 if it is not."}},today:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает текущую дату на один из моментов выполнения запроса.
То же самое, что toDate(now())",en:"Accepts zero arguments and returns the current date at one of the moments of request execution.
The same as 'toDate(now())'."}},emptyArrayToSingle:{bracket:"(v)",desc:{ru:"Принимает пустой массив и возвращает массив из одного элемента, равного значению по умолчанию.",en:"Accepts an empty array as argument and returns an array of one element equal to the default value."}},sleep:{bracket:"(seconds)",desc:{ru:"Спит seconds секунд на каждый блок данных. Можно указать как целое число, так и число с плавающей запятой.",en:"Sleeps 'seconds' seconds on each data block. You can specify an integer or a floating-point number."}},extract:{bracket:"(params, name)",desc:{en:"Parses the string in double quotes. The value is unescaped. If unescaping failed, it returns an empty string. Examples: "}},emptyArrayInt8:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},regionToName:{bracket:"(id[, lang])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. A string with the name of the language can be passed as a second argument. Supported languages are: ru, en, ua, uk, by, kz, tr. If the second argument is omitted, the language 'ru' is used. "}},concat:{bracket:"(arr[, separator])",desc:{ru:"Склеивает строки, перечисленные в массиве, с разделителем separator.
separator - необязательный параметр, константная строка, по умолчанию равен пустой строке.
Возвращается строка.",en:"Concatenates strings from the array elements, using 'separator' as the separator.
'separator' is a string constant, an optional parameter. By default it is an empty string.
Returns a string."}},convertCharset:{bracket:"(s, from, to)",desc:{ru:"Возвращает сконвертированную из кодировки from в кодировку to строку s.",en:"Returns a string with the data %%s%% (encoded as %%from%% charset) that was converted to the %%to%% charset."}},toMonth:{bracket:"(v)",desc:{ru:"Переводит дату или дату-с-временем в число типа UInt8, содержащее номер месяца (1-12).",en:"Converts a date or date with time to a UInt8 number containing the month number (1-12)."}},IPv6StringToNum:{bracket:"(s)",desc:{ru:"Функция, обратная к IPv6NumToString. Если IPv6 адрес в неправильном формате, то возвращает строку из нулевых байт.
HEX может быть в любом регистре.",en:"The reverse function of IPv6NumToString. If the IPv6 address has an invalid format, it returns a string of null bytes.
HEX can be uppercase or lowercase."}},emptyArrayString:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},uptime:{bracket:"()",desc:{ru:"Возвращает аптайм сервера в секундах.",en:"Returns server's uptime in seconds."}},blockSize:{bracket:"()",desc:{en:"Gets the size of the block.
In ClickHouse, queries are always run on blocks (sets of column parts). This function allows getting the size of the block that you called it for."}},toInt64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},pathFull:{bracket:"(v)",desc:{ru:"То же самое, но включая query string и fragment. Пример: /top/news.html?page=2#comments",en:"- The same as above, but including query-string and fragment. Example: /top/news.html?page=2#comments"}},emptyArrayDate:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},emptyArrayInt64:{bracket:"(v)",desc:{ -ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},toInt32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},greater:{bracket:"(v)",desc:{ru:"",en:""}},emptyArrayInt32:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},toString:{bracket:"(str)",desc:{ru:"Принимает значение типа FixedString(16). Возвращает строку из 36 символов в текстовом виде.",en:"Accepts a FixedString(16) value containing the UUID in the binary format. Returns a readable string containing the UUID in the text format."}},greatest:{bracket:"(a, b)",desc:{ru:"Возвращает наибольшее значение из a и b.",en:"Returns the greatest element of a and b."}},emptyArrayUInt64:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},emptyArrayUInt32:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},formatReadableSize:{bracket:"(x)",desc:{en:"Gets a size (number of bytes). Returns a string that contains rounded size with the suffix (KiB, MiB etc.).

Example:

%% "}},toInt16OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},emptyArrayUInt8:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},protocol:{bracket:"(v)",desc:{ru:"Возвращает протокол. Примеры: http, ftp, mailto, magnet...",en:"- Selects the protocol. Examples: http, ftp, mailto, magnet..."}},regionToPopulation:{bracket:"(id[, geobase])",desc:{en:"Gets the population for a region.
The population can be recorded in files with the geobase. See the section "External dictionaries".
If the population is not recorded for the region, it returns 0.
In the Yandex geobase, the population might be recorded for child regions, but not for parent regions."}},notIn:{bracket:"(v)",desc:{ru:'Смотрите раздел "Операторы IN".',en:"See the section "IN operators"."}},position:{bracket:"(haystack, needle)",desc:{en:"The same as 'position', but the position is returned in Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
There's also positionCaseInsensitiveUTF8 function."}},arrayElement:{bracket:"(arr, n), arr[n] operator",desc:{en:"Get the element with the index 'n' from the array 'arr'.
'n' should be any integer type.
Indexes in an array begin from one.
Negative indexes are supported - in this case, it selects the corresponding element numbered from the end. "}},toStringCutToZero:{bracket:"(s)",desc:{en:"Accepts a String or FixedString argument. Returns a String that is cut to a first null byte occurrence."}},log:{bracket:"(x)",desc:{ru:"Принимает числовой аргумент, возвращает число типа Float64, близкое к десятичному логарифму от аргумента.",en:"Accepts a numeric argument and returns a Float64 number close to the decimal logarithm of the argument."}},SEIn:{bracket:"(lhs, rhs)",desc:{ru:"Проверяет принадлежность поисковой системы lhs поисковой системе rhs.",en:"Checks whether the 'lhs' search engine belongs to the 'rhs' search engine."}},replicate:{bracket:"(v)",desc:{en:"Create a MergeTree table with a different name. Move all the data from the directory with the ReplicatedMergeTree table data to the new table's data directory."}},sipHash64:{bracket:"(v)",desc:{en:'Calculates SipHash from a string.
Accepts a String-type argument. Returns UInt64.
SipHash is a cryptographic hash function. It works at least three times faster than MD5. For more information, see https://131002.net/siphash/'}},emptyArrayUInt16:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},hex:{bracket:"(str)",desc:{en:"Accepts a string containing any number of hexadecimal digits, and returns a string containing the corresponding bytes. Supports both uppercase and lowercase letters A-F. The number of hexadecimal digits doesn't have to be even."}},regionToDistrict:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a federal district (type 4 in the geobase). In every other way, this function is the same as 'regionToCity'. "}},arrayFilter:{bracket:"(func, arr1, ...)",desc:{en:"Returns an array containing only the elements in 'arr1' for which 'func' returns something other than 0.

Examples:

%%
SELECT arrayFilter(x -> x LIKE '%World%', ['Hello', 'abc World']) AS res "}},toStartOfQuarter:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the first day of the quarter.
The first day of the quarter is either 1 January, 1 April, 1 July, or 1 October. Returns the date."}},divide:{bracket:"(a, b), a / b operator",desc:{en:"Calculates the quotient of the numbers. The result type is always a floating-point type.
It is not integer division. For integer division, use the 'intDiv' function.
When dividing by zero you get 'inf', '-inf', or 'nan'."}},reverseUTF8:{bracket:"(v)",desc:{en:"Reverses a sequence of Unicode code points, assuming that the string contains a set of bytes representing a UTF-8 text. Otherwise, it does something else (it doesn't throw an exception)."}},toDate:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},emptyArrayFloat64:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},abs:{bracket:"(s, c)",desc:{en:"If the %%s%% string is non-empty and does not contain the %%c%% character at the end, it appends the %%c%% character to the end."}},yesterday:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns yesterday's date at one of the moments of request execution.
The same as 'today() - 1'."}},toMinute:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the minute of the hour (0-59)."}},bitXor:{bracket:"(a, b)",desc:{en:""}},minus:{bracket:"(a, b), a - b operator",desc:{en:"Calculates the difference. The result is always signed.

You can also calculate whole numbers from a date or date with time. The idea is the same - see above for 'plus'."}},toDateTime:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},modulo:{bracket:"(a, b), a % b operator",desc:{en:"Calculates the remainder after division.
If arguments are floating-point numbers, they are pre-converted to integers by dropping the decimal portion. The remainder is taken in the same sense as in C++. Truncated division is used for negative numbers.
An exception is thrown when dividing by zero or when dividing a minimal negative number by minus one."}},bitmaskToArray:{bracket:"(num)",desc:{en:"Accepts an integer. Returns an array of UInt64 numbers containing the list of powers of two that total the source number when summed. Numbers in the array are in ascending order."}},negate:{bracket:"(a), -a operator",desc:{en:"Calculates a number with the reverse sign. The result is always signed."}},emptyArrayFloat32:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},range:{bracket:"(N)",desc:{en:"Returns an array of numbers from 0 to N-1.
Just in case, an exception is thrown if arrays with a total length of more than 100,000,000 elements are created in a data block."}},arrayAll:{bracket:"([func,] arr1, ...)",desc:{en:"Returns 1 if 'func' returns something other than 0 for all the elements in 'arr'. Otherwise, it returns 0."}},toInt32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},unhex:{bracket:"(str)",desc:{en:"Accepts a string containing any number of hexadecimal digits, and returns a string containing the corresponding bytes. Supports both uppercase and lowercase letters A-F. The number of hexadecimal digits doesn't have to be even. If it is odd, the last digit is interpreted as the younger half of the 00-0F byte. If the argument string contains anything other than hexadecimal digits, some implementation-defined result is returned (an exception isn't thrown).
If you want to convert the result to a number, you can use the functions 'reverse' and 'reinterpretAsType'."}},toFloat64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},bitAnd:{bracket:"(a, b)",desc:{ru:"",en:""}},toStartOfYear:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the first day of the year.
Returns the date."}},bitOr:{bracket:"(a, b)",desc:{ru:"",en:""}},SEToRoot:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the search engine from the Yandex.Metrica dictionary. If any search engine matches the passed number, it returns a UInt8 number - the ID of the corresponding root search engine (for example, it converts Yandex.Images to Yandex). Otherwise, returns 0."}},toRelativeMinuteNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the minute, starting from a certain fixed point in the past."}},visitParamExtractInt:{bracket:"(params, name)",desc:{ru:"Аналогично для Int64.",en:"The same as for Int64."}},emptyArrayInt16:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},visitParamExtractString:{bracket:"(params, name)",desc:{en:"Parses the string in double quotes. The value is unescaped. If unescaping failed, it returns an empty string. "}},arrayEnumerateUniq:{bracket:"(arr, ...)",desc:{en:"Returns an array the same size as the source array, indicating for each element what its position is among elements with the same value. "}},visitParamExtractUInt:{bracket:"(params, name)",desc:{en:"Parses UInt64 from the value of the field named 'name'. If this is a string field, it tries to parse a number from the beginning of the string. If the field doesn't exist, or it exists but doesn't contain a number, it returns 0."}},toTypeName:{bracket:"(x)",desc:{en:"Gets the type name. Returns a string containing the type name of the passed argument."}},empty:{bracket:"(v)",desc:{en:"Accepts an empty array as argument and returns an array of one element equal to the default value."}},multiply:{bracket:"(a, b), a * b operator",desc:{en:"Calculates the product of the numbers."}},has:{bracket:"('database', 'table', 'column')",desc:{ru:"",en:"Accepts constant String columns - database name, table name and column name. Returns constant UInt8 value, equal to 1 if column exists,
otherwise 0.
If table doesn't exist than exception is thrown.
For elements of nested data structure function checks existence of column. For nested data structure 0 is returned."}},bitNot:{bracket:"(a)",desc:{ru:"",en:""}},lessOrEquals:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},reinterpretAsInt64:{bracket:"(v)",desc:{en:""}},IPv4NumToString:{bracket:"(num)",desc:{en:"Similar to IPv4NumToString, but using %%xxx%% instead of the last octet. "}},bitShiftLeft:{bracket:"(a, b)",desc:{ru:"",en:""}},dictGetInt16:{bracket:"(v)",desc:{ru:"",en:""}},toUInt32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},regionIn:{bracket:"(lhs, rhs[, geobase])",desc:{en:"Checks whether a 'lhs' region belongs to a 'rhs' region. Returns a UInt8 number equal to 1 if it belongs, or 0 if it doesn't belong.
The relationship is reflexive - any region also belongs to itself."}},reinterpretAsUInt8:{bracket:"(v)",desc:{en:""}},dictIsIn:{bracket:"(v)",desc:{en:"%%dictIsIn('dict_name', child_id, ancestor_id)%%
- For the 'dict_name' hierarchical dictionary, finds out whether the 'child_id' key is located inside 'ancestor_id' (or matches 'ancestor_id'). Returns UInt8."}},toSecond:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the second in the minute (0-59).
Leap seconds are not accounted for."}},least:{bracket:"(a, b)",desc:{en:"Returns the least element of a and b."}},countEqual:{bracket:"(arr, x)",desc:{en:'Returns the number of elements in the array equal to 'x'. Equivalent to arrayCount(elem -> elem = x, arr).'}},IPv4StringToNum:{bracket:"(s)",desc:{en:"The reverse function of IPv4NumToString. If the IPv4 address has an invalid format, it returns 0."}},replaceRegexpAll:{bracket:"(haystack, pattern, replacement)",desc:{en:"This does the same thing, but replaces all the occurrences"}},SHA224:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32).
The function works fairly slowly (SHA-1 processes about 5 million short strings per second per processor core, while SHA-224 and SHA-256 process about 2.2 million). "}},URLHash:{bracket:"(url[, N])",desc:{en:"A fast, decent-quality non-cryptographic hash function for a string obtained from a URL using some type of normalization.
URLHash(s) - Calculates a hash from a string without one of the trailing symbols /,? or # at the end, if present"}},equals:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},plus:{bracket:"(a, b), a + b operator",desc:{ru:"Вычисляет сумму чисел.

Также можно складывать целые числа с датой и датой-с-временем. В случае даты, прибавление целого числа означает прибавление соответствующего количества дней. В случае даты-с-временем - прибавление соответствующего количества секунд.",en:"Calculates the sum of the numbers.

You can also add whole numbers with a date or date and time. In the case of a date, adding a whole number means adding the corresponding number of days. For a date with time, it means adding the corresponding number of seconds."}},less:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},regionHierarchy:{bracket:"(id[, geobase])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. Returns an array of region IDs consisting of the passed region and all parents along the chain.
Example: %%regionHierarchy(toUInt32(213)) = [213,1,3,225,10001,10000]%%."}},toUInt64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},rowNumberInAllBlocks:{bracket:"()",desc:{en:"Returns an incremental row number within all blocks that were processed by this function."}},toDayOfWeek:{bracket:"(v)",desc:{en:"Converts a date or date with time to a UInt8 number containing the number of the day of the week (Monday is 1, and Sunday is 7)."}},bar:{bracket:"(v)",desc:{en:"Allows building a unicode-art diagram.

bar(x, min, max, width) - Draws a band with a width proportional to (x - min) and equal to 'width' characters when x"}},"if":{bracket:"(v)",desc:{en:"The suffix -%%If%% can be appended to the name of any aggregate function. In this case, the aggregate function accepts an extra argument - a condition (Uint8 type). "}},regionToArea:{bracket:"(id[, geobase])",desc:{en:"Converts a region to an area (type 5 in the geobase). In every other way, this function is the same as 'regionToCity'.──────────────────────────────────"}},dictGetUInt16:{bracket:"(v)",desc:{ru:"",en:""}},toUInt8:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toUInt16:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},path:{bracket:"(URL)",desc:{en:"- The same thing, but without the protocol and host in the result. The / element (root) is not included."}},extractURLParameters:{bracket:"(URL)",desc:{ru:"Возвращает массив строк вида name=value, соответствующих параметрам URL. Значения никак не декодируются.",en:"- Gets an array of name=value strings corresponding to the URL parameters. The values are not decoded in any way."}},OSHierarchy:{bracket:"(v)",desc:{ru:"Принимает число типа UInt8 - идентификатор операционной системы из словаря Яндекс.Метрики. Возвращает массив с иерархией операционных систем. Аналогично функции regionHierarchy.",en:"Accepts a UInt8 number - the ID of the operating system from the Yandex.Metrica dictionary. Returns an array with a hierarchy of operating systems. Similar to the 'regionHierarchy' function."}},cutQueryStringAndFragment:{bracket:"(v)",desc:{ru:"Удаляет query string и fragment identifier. Знак вопроса и символ решётки тоже удаляются.",en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},timeSlots:{bracket:"(StartTime, Duration)",desc:{ru:"Для интервала времени, начинающегося в StartTime и продолжающегося Duration секунд, возвращает массив моментов времени, состоящий из округлений вниз до получаса точек из этого интервала.
Например, %%timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600)) = [toDateTime('2012-01-01 12:00:00'), toDateTime('2012-01-01 12:30:00')]%%.
Это нужно для поиска хитов, входящих в соответствующий визит.",en:"For a time interval starting at 'StartTime' and continuing for 'Duration' seconds, it returns an array of moments in time, consisting of points from this interval rounded down to the half hour.
For example, %%timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600)) = [toDateTime('2012-01-01 12:00:00'), toDateTime('2012-01-01 12:30:00')]%%.
This is necessary for searching for pageviews in the corresponding session."}},toUInt32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toStartOfMinute:{bracket:"(v)",desc:{ru:"Округляет дату-с-временем вниз до начала минуты.",en:"Rounds down a date with time to the start of the minute."}},version:{bracket:"()",desc:{ru:"Возвращает версию сервера в виде строки.",en:"Returns server's version as a string."}},toUInt64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toInt16:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},reinterpretAsInt16:{bracket:"(v)",desc:{en:""}},toInt64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toFixedString:{bracket:"(s, N)",desc:{ru:"Преобразует аргумент типа String в тип FixedString(N) (строку фиксированной длины N). N должно быть константой.
Если строка имеет меньше байт, чем N, то она дополняется нулевыми байтами справа. Если строка имеет больше байт, чем N - кидается исключение.",en:"Converts a String type argument to a FixedString(N) type (a string with fixed length N). N must be a constant. If the string has fewer bytes than N, it is passed with null bytes to the right. If the string has more bytes than N, an exception is thrown."}},toFloat32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},dictGetHierarchy:{bracket:"(v)",desc:{ru:"%%dictGetHierarchy('dict_name', id)%%
- для иерархического словаря dict_name - вернуть массив ключей словаря, начиная с id и продолжая цепочкой родительских элементов. Возвращает Array(UInt64).",en:"%%dictGetHierarchy('dict_name', id)%%
- For the 'dict_name' hierarchical dictionary, returns an array of dictionary keys starting from 'id' and continuing along the chain of parent elements. Returns Array(UInt64)."}},dictGetInt64:{bracket:"(v)",desc:{ru:"",en:""}},CAST:{bracket:"(x, t)",desc:{en:"Casts x to the t data type.
The syntax %%CAST(x AS t)%% is also supported.
"}},toRelativeSecondNum:{bracket:"(v)",desc:{ru:"Переводит дату-с-временем в номер секунды, начиная с некоторого фиксированного момента в прошлом.",en:"Converts a date with time or date to the number of the second, starting from a certain fixed point in the past."}},toUInt8OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toStartOfMonth:{bracket:"(v)",desc:{ru:"Округляет дату или дату-с-временем вниз до первого дня месяца.
Возвращается дата.",en:"Rounds down a date or date with time to the first day of the month.
Returns the date."}},rand64:{bracket:"(v)",desc:{ru:"Возвращает псевдослучайное число типа UInt64, равномерно распределённое среди всех чисел типа UInt64.
Используется linear congruential generator.",en:"Returns a pseudo-random UInt64 number, evenly distributed among all UInt64-type numbers.
Uses a linear congruential generator."}},toInt8OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toFloat32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toYear:{bracket:"(v)",desc:{ru:"Переводит дату или дату-с-временем в число типа UInt16, содержащее номер года (AD).",en:"Converts a date or date with time to a UInt16 number containing the year number (AD)."}},atan:{bracket:"(x)",desc:{ru:"Арктангенс.",en:"The arc tangent."}},toFloat64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},arrayEnumerate:{bracket:"(arr, ...)",desc:{en:"Returns an array the same size as the source array, indicating for each element what its position is among elements with the same value.
"}},toDayOfMonth:{bracket:"(v)",desc:{en:"Converts a date or date with time to a UInt8 number containing the number of the day of the month (1-31)."}},dictGetUInt64:{bracket:"(v)",desc:{ru:"",en:""}},IPv4NumToStringClassC:{bracket:"(num)",desc:{en:"Similar to IPv4NumToString, but using %%xxx%% instead of the last octet. "}},reinterpretAsString:{bracket:"(v)",desc:{en:"This function accepts a number or date or date with time, and returns a string containing bytes representing the corresponding value in host order (little endian). Null bytes are dropped from the end. For example, a UInt32 type value of 255 is a string that is one byte long."}},toHour:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the hour in 24-hour time (0-23).
This function assumes that if clocks are moved ahead, it is by one hour and occurs at 2 a.m., and if clocks are moved back, it is by one hour and occurs at 3 a.m. (which is not always true - even in Moscow the clocks were once changed at a different time)."}},ignore:{bracket:"(...)",desc:{en:"A function that accepts any arguments and always returns 0.
However, the argument is still calculated. This can be used for benchmarks."}},arrayJoin:{bracket:"(v)",desc:{en:"This is a very unusual function.

Normal functions don't change a set of rows, but just change the values in each row (map). Aggregate functions compress a set of rows (fold or reduce).
The 'arrayJoin' function takes each row and generates a set of rows (unfold).

T"}},length:{bracket:"(v)",desc:{en:"Returns the length of a string in Unicode code points (not in characters), assuming that the string contains a set of bytes that make up UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
The result type is UInt64."}},tuple:{bracket:"(tuple, n), operator x.N",desc:{en:"A function that allows getting columns from a tuple.
'N' is the column index, starting from 1. 'N' must be a constant. 'N' must be a strict postive integer no greater than the size of the tuple.
There is no cost to execute the function."}},extractURLParameterNames:{bracket:"(URL)",desc:{en:"- Gets an array of name=value strings corresponding to the names of URL parameters. The values are not decoded in any way."}},tupleElement:{bracket:"(tuple, n), operator x.N",desc:{en:"A function that allows getting columns from a tuple.
'N' is the column index, starting from 1. 'N' must be a constant. 'N' must be a strict postive integer no greater than the size of the tuple.
There is no cost to execute the function."}},"in":{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},globalIn:{bracket:"(v)",desc:{en:"See the section "IN operators"."}},isFinite:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is not infinite and not a NaN, otherwise 0."}},isNaN:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is a NaN, otherwise 0."}},isInfinite:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is infinite, otherwise 0.
Note that 0 is returned for a NaN."}},transform:{bracket:"(v)",desc:{en:"Transforms a value according to the explicitly defined mapping of some elements to other ones.
There are two variations of this function:

1. %%transform(x, array_from, array_to, default)%% "}},rand:{bracket:"(v)",desc:{en:"Returns a pseudo-random UInt64 number, evenly distributed among all UInt64-type numbers.
Uses a linear congruential generator."}},reinterpretAsUInt16:{bracket:"(v)",desc:{en:""}},pi:{bracket:"(v)",desc:{en:"Maximum pipeline depth. Corresponds to the number of transformations that each data block goes through during query processing. Counted within the limits of a single server. If the pipeline depth is greater, an exception is thrown. By default, 1000."}},reinterpretAsUInt32:{bracket:"(v)",desc:{en:""}},reinterpretAsUInt64:{bracket:"(v)",desc:{en:""}},reinterpretAsInt8:{bracket:"(v)",desc:{en:""}},upperUTF8:{bracket:"(v)",desc:{en:"Converts a string to uppercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. So for Turkish the result might not be exactly correct. "}},reinterpretAsInt32:{bracket:"(v)",desc:{en:""}},reinterpretAsFloat32:{bracket:"(v)",desc:{en:""}},reinterpretAsFloat64:{bracket:"(v)",desc:{en:""}},reinterpretAsDate:{bracket:"(v)",desc:{en:""}},reinterpretAsDateTime:{bracket:"(v)",desc:{en:""}},roundToExp2:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than one, it returns 0. Otherwise, it rounds the number down to the nearest (whole non-negative) degree of two."}},upper:{bracket:"(v)",desc:{en:"Converts a string to uppercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. So for Turkish the result might not be exactly correct."}},positionUTF8:{bracket:"(haystack, needle)",desc:{en:"The same as 'position', but the position is returned in Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
There's also positionCaseInsensitiveUTF8 function."}},roundDuration:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than one, it returns 0. Otherwise, it rounds the number down to numbers from the set: 1, 10, 30, 60, 120, 180, 240, 300, 600, 1200, 1800, 3600, 7200, 18000, 36000. This function is specific to Yandex.Metrica and used for implementing the report on session length."}},roundAge:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than 18, it returns 0. Otherwise, it rounds the number down to numbers from the set: 18, 25, 35, 45. This function is specific to Yandex.Metrica and used for implementing the report on user age."}},round:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than 18, it returns 0. Otherwise, it rounds the number down to numbers from the set: 18, 25, 35, 45. This function is specific to Yandex.Metrica and used for implementing the report on user age."}},floor:{bracket:"(x[, N])",desc:{en:"Returns a rounder number that is less than or equal to 'x'."}},notEmpty:{bracket:"(v)",desc:{en:"Returns 0 for an empty array, or 1 for a non-empty array.
The result type is UInt8.
The function also works for strings."}},lengthUTF8:{bracket:"(v)",desc:{en:"Returns the length of a string in Unicode code points (not in characters), assuming that the string contains a set of bytes that make up UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
The result type is UInt64."}},lower:{bracket:"(v)",desc:{en:"Converts a string to lowercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. "}},lowerUTF8:{bracket:"(v)",desc:{en:"Converts a string to lowercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. "}},reverse:{bracket:"(v)",desc:{en:"Reverses a sequence of Unicode code points, assuming that the string contains a set of bytes representing a UTF-8 text. Otherwise, it does something else (it doesn't throw an exception)."}},URLPathHierarchy:{bracket:"(URL)",desc:{en:"- The same thing, but without the protocol and host in the result. The / element (root) is not included. "}},substringUTF8:{bracket:"(s, offset, length)",desc:{en:"The same as 'substring', but for Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception)."}},appendTrailingCharIfAbsent:{bracket:"(s, c)",desc:{en:"If the %%s%% string is non-empty and does not contain the %%c%% character at the end, it appends the %%c%% character to the end." -}},alphaTokens:{bracket:"(s)",desc:{en:"Selects substrings of consecutive bytes from the range a-z and A-Z.
Returns an array of selected substrings."}},splitByChar:{bracket:"(separator, s)",desc:{en:"Splits a string into substrings, using 'separator' as the separator.
'separator' must be a string constant consisting of exactly one character.
Returns an array of selected substrings"}},arrayStringConcat:{bracket:"(arr[, separator])",desc:{en:"Concatenates strings from the array elements, using 'separator' as the separator.
'separator' is a string constant, an optional parameter. By default it is an empty string.
Returns a string."}},replaceAll:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replaces all occurrences of the 'pattern' substring in 'haystack' with the 'replacement' substring."}},replaceRegexpOne:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replacement using the 'pattern' regular expression. A re2 regular expression. Replaces only the first occurrence, if it exists.
A pattern can be specified as 'replacement'. "}},cbrt:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the cubic root of the argument."}},match:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"Pattern matching for event chains.

'pattern' is a string containing a pattern to match. The pattern is similar to a regular expression."}},cutURLParameter:{bracket:"(URL, name)",desc:{en:"Removes the URL parameter named 'name', if present. This function works under the assumption that the parameter name is encoded in the URL exactly the same way as in the passed argument."}},like:{bracket:"(haystack, pattern), haystack NOT LIKE pattern operator",desc:{en:"The same thing as 'like', but negative."}},domain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},domainWithoutWWW:{bracket:"(v)",desc:{en:"- Selects the domain and removes no more than one 'www.' from the beginning of it, if present."}},firstSignificantSubdomain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},queryString:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},queryStringAndFragment:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},extractURLParameter:{bracket:"(URL)",desc:{en:"- Gets an array of name=value strings corresponding to the names of URL parameters. The values are not decoded in any way."}},URLHierarchy:{bracket:"(URL)",desc:{en:"- Gets an array containing the URL trimmed to the %%/%%, %%?%% characters in the path and query-string. Consecutive separator characters are counted as one. The cut is made in the position after all the consecutive separator characters. Example:"}},cutToFirstSignificantSubdomain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},cutWWW:{bracket:"(v)",desc:{en:"Removes no more than one 'www.' from the beginning of the URL's domain, if present."}},cutQueryString:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},cutFragment:{bracket:"(v)",desc:{en:"Removes the fragment identifier. The number sign is also removed."}},visitParamHas:{bracket:"(params, name)",desc:{en:"Checks whether there is a field with the 'name' name."}},visitParamExtractFloat:{bracket:"(params, name)",desc:{en:"The same as for Float64."}},visitParamExtractBool:{bracket:"(params, name)",desc:{en:"Parses a true/false value. The result is UInt8."}},visitParamExtractRaw:{bracket:"(params, name)",desc:{en:"Returns the value of a field, including separators."}},exp:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 10x."}},exp2:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 2x."}},exp10:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 10x."}},tgamma:{bracket:"(x)",desc:{en:"Gamma function."}},log10:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the decimal logarithm of the argument."}},sqrt:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the square root of the argument."}},erf:{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},erfc:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 1 - erf(x), but without loss of precision for large 'x' values."}},lgamma:{bracket:"(x)",desc:{en:"The logarithm of the gamma function."}},sin:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is infinite, otherwise 0.
Note that 0 is returned for a NaN."}},cos:{bracket:"(x)",desc:{ru:"Арккосинус.",en:"The arc cosine."}},tan:{bracket:"(x)",desc:{ru:"Арктангенс.",en:"The arc tangent."}},pow:{bracket:"(x, y)",desc:{ru:"xy.",en:"xy."}}}},/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(){angular.module(smi2.app.name).run(["$rootScope","$state","$mdTheming","ThemeService","localStorageService",function(e,t,a,n,i){e.breadcrumbs=[],e.currentDatabase=null;var r=e.$on("$stateChangeError",function(e,a,n,i,r,s){"notAuthorized"==s&&t.go("login")});e.$on("$destroy",function(){return r}),window.document.title="Tabix.IO ["+window.TabixBuildDate+"]",e.sqlLog=i.get("sqlLog")||[],e.$watch("sqlLog",function(e){i.set("sqlLog",e)}),e.isInitDatabaseStructure=!1,e.sidebar={letf_resizable_width:200,clickLetfResizable:function(){e.sidebar.letf_resizable_width<10?e.sidebar.letf_resizable_width=200:e.sidebar.letf_resizable_width=0}}}])}(),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){e.module(t.app.name).config(["$stateProvider",function(e){e.state("base",{"abstract":!0,resolve:{session:["$q","API",function(e,t){window.global_tabix_disable_exit=!1,_.isObject(window.global_tabix_default_settings)&&(_.isUndefined(window.global_tabix_default_settings.host)||_.isUndefined(window.global_tabix_default_settings.login)||(window.global_tabix_disable_exit=!0,t.setConnection(window.global_tabix_default_settings)));var a=e.defer();return t.isAuthorized()?a.resolve():a.reject("notAuthorized"),a.promise}]},templateUrl:"app/base/base.html"}).state("layout",{parent:"base","abstract":!0,views:{header:{templateUrl:"app/base/header.html",controller:"HeaderController"},sidebar:{templateUrl:"app/base/sidebar.html",controller:"SidebarController"},main:{template:""}}}).state("layoutDash",{parent:"base","abstract":!0,views:{header:{templateUrl:"app/base/header.html",controller:"HeaderController"},sidebar:{templateUrl:"app/dash/dashsidebar.html",controller:"DashSidebarController"},main:{template:""}}}).state("dashboard",{parent:"layout",url:"",controller:["$state",function(e){e.go("sql")}]}).state("dashId",{parent:"layoutDash",url:"/dash/{dashId}",templateUrl:"app/dash/dash.html",controller:"DashController"}).state("dash",{parent:"layoutDash",url:"/dash",templateUrl:"app/dash/dash.html",controller:"DashController"}).state("devplot",{parent:"layoutDash",url:"/devplot",templateUrl:"app/dev/plot.html",controller:"devplotController"}).state("devedit",{parent:"layoutDash",url:"/devedit",templateUrl:"app/dev/edit.html",controller:"EditController"}).state("preference",{parent:"layout",url:"/Preference",templateUrl:"app/preference/preference.html",controller:"PreferenceController"}).state("login",{url:"/login",templateUrl:"app/login/login.html",controller:"LoginController"}).state("sql",{parent:"layout",url:"/sql",templateUrl:"app/sql/sql.html",controller:"SqlController"}).state("table",{parent:"layout",url:"/database/{dbName}/table/{tableName}",templateUrl:"app/table/table.html",controller:"TableController"}).state("metrics",{parent:"layoutDash",url:"/metrics",templateUrl:"app/metrics/metrics.html",controller:"MetricsController"}).state("404",{parent:"layout",templateUrl:"app/base/404.html"})}])}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){e.module(t.app.name).config(["$locationProvider","$httpProvider","$sceProvider","$urlRouterProvider","ThemeServiceProvider","$mdThemingProvider",function(e,t,a,n,i,r){t.interceptors.push("HttpInterceptor"),a.enabled(!1);var s=!1;s=_.isFunction(i.$get[0])?i.$get[0]().isDark():i.$get().isDark(),console.log("isDark",s),s&&r.theme("default").dark().primaryPalette("blue").accentPalette("blue",{"default":"500"}),window.disableNgInspectWatchers=!1,n.otherwise(function(e){var t=e.get("$state");t.transitionTo("404")})}])}(angular,smi2); \ No newline at end of file diff --git a/build/scripts/app-b6bad67439.js b/build/scripts/app-b6bad67439.js deleted file mode 100644 index 6756abcc..00000000 --- a/build/scripts/app-b6bad67439.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t

404 not found

Back'),e.put("app/base/addVarsDialog.html",'

Mango (Fruit)

Add var (no space)
TextIntDateCode
CloseAdd
'),e.put("app/base/base.html",'
Open table
'),e.put("app/base/breadcrumbs.html",''),e.put("app/base/header.html",'
Requirements Chrome! Dashboard SQL Metrics & Processes Settings Help Sign out [{{user}}]
'),e.put("app/base/helpDialogLogin.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

* Work only in "Google chrome" version up 55

* Clickhouse server version up v1.1.54164

* Not readonly CH user




https://tabix.ioOk
'),e.put("app/base/helpDialogRu.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

ClickHouse Manual


Tabix.IO Manual

Hot keys

⌘ + Enter

Exec current query

⌘ + Shift + Enter

Exec all query

⌘ + Y

Drop current line

⌘ + ⇧ + F

Reformat

⌘ + ⇧ + Plus|Minus

свернуть все/развернуть

⌘ + Right|Left

переключает вкладки

⌘ + ⌥ + Up|Down

Copy lines Up/Down

⌥ + Up|Down

Move lines Up/Down

Ctrl + K

Remove to line end

⌘ + Backspace

Remove to linestart

Ace Editor Default Keyboard Shortcuts

DrawChart

DrawChart

DrawMap

DrawMap

https://tabix.ioOk
'),e.put("app/base/sidebar.html",''),e.put("app/base/sidebarhelper.html",'

{{ hist }}

'),e.put("app/dash/dash.html",'
favorite

{{vars.dash.title}}

favoritePinSave


Apply
'),e.put("app/dash/dashsidebar.html",'
'),e.put("app/dev/edit.html",'
'),e.put("app/dev/plot.html",'openEditorWidget
code:
{{code}}
'),e.put("app/login/login.html",'
Requirements Chrome or Chromium engine Browser! Requirements & helpUi Theme{{theme.title}}
'),e.put("app/metrics/dialog.kill.html",'

Kill query

{{ q.elapsed }}

{{ q.query }}

{{ q.bytes_read }}

{{ q.hash }}

Cancel
'),e.put("app/metrics/metrics.html",'Processes
Overview
Metrics
'),e.put("app/metrics/metricschart.html",'

Metrics

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+(\'sec\')}}{{interval}}system.eventsRefreshReset
'),e.put("app/metrics/overview.html",'

Overview

'),e.put("app/metrics/processes.html",'

Processes

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+\'sec\'}}Select/Read onlyLog ModeClusterRefreshResetKILL Query
'),e.put("app/panels/sendtodashboard.html",'
Send to dashboard
ApplicationWebsite


AppendBottom





CloseApply
'), -e.put("app/panels/share.html",'
Share


Can refresh dataPassword protectSupport variablesBoardJsonTSVCSV
CloseApply
'),e.put("app/preference/preference.html",'

Preference & settings

{{theme}}{{theme}}Save sessionLive AutocompletionDisable auto-helpDisable hotKey left+rightUse WrapModeShow invisible charsApply
'),e.put("app/render/WidgetsList.html",'
{{::w.title}}
'),e.put("app/sql/PlotlyEditor.tmpl.html",'
PlotLy JavaScript editor ( alpha )

Tab One

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi.

Tab Two

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor, orci enim rutrum enim, vel tempor sapien arcu a tellus. Vivamus convallis sodales ante varius gravida. Curabitur a purus vel augue ultrices ultricies id a nisl. Nullam malesuada consequat diam, a facilisis tortor volutpat et. Sed urna dolor, aliquet vitae posuere vulputate, euismod ac lorem. Sed felis risus, pulvinar at interdum quis, vehicula sed odio. Phasellus in enim venenatis, iaculis tortor eu, bibendum ante. Donec ac tellus dictum neque volutpat blandit. Praesent efficitur faucibus risus, ac auctor purus porttitor vitae. Phasellus ornare dui nec orci posuere, nec luctus mauris semper.

Morbi viverra, ante vel aliquet tincidunt, leo dolor pharetra quam, at semper massa orci nec magna. Donec posuere nec sapien sed laoreet. Etiam cursus nunc in condimentum facilisis. Etiam in tempor tortor. Vivamus faucibus egestas enim, at convallis diam pulvinar vel. Cras ac orci eget nisi maximus cursus. Nunc urna libero, viverra sit amet nisl at, hendrerit tempor turpis. Maecenas facilisis convallis mi vel tempor. Nullam vitae nunc leo. Cras sed nisl consectetur, rhoncus sapien sit amet, tempus sapien.

Integer turpis erat, porttitor vitae mi faucibus, laoreet interdum tellus. Curabitur posuere molestie dictum. Morbi eget congue risus, quis rhoncus quam. Suspendisse vitae hendrerit erat, at posuere mi. Cras eu fermentum nunc. Sed id ante eu orci commodo volutpat non ac est. Praesent ligula diam, congue eu enim scelerisque, finibus commodo lectus.

Close
'),e.put("app/sql/renderResult.html",'
{{resultContainer.cellsCalc}}{{::tableData.data.progressQuery}}CSV with headersCSV without headersTSV with headersTSV without headersPinnedTable
Draw
'),e.put("app/sql/showDialogUpload.html",'

Upload CSV to View

'),e.put("app/sql/sql.html",'
{{tab.name + (tab.changed ? \' *\' : \'\')}}
Make snippetAutoFormatExpandCollapseCollapse All
{{tab.buttonTitle}}Run current ⌘ + ⏎Full screenSave{{item.name}}Query log
USE {{::dbb.name}}{{vars.LastStatistics.elapsed| number:2}} sec.| {{vars.LastStatistics.rows_read| number}} rows.| {{vars.LastStatistics.bytes_read|filesize}}
..... {{tab.progress.query}}
'),e.put("app/table/table-container.html",'

{{vars.currentDatabase}} {{vars.currentTable}}

Structure
NameTypeDefault typeValueSizeCompress
{{$index + 1}}{{field[key]}}
Information
1Size{{vars.statistics.size}}
2Size,bytes{{vars.statistics.sizeBytes}}
3First row{{vars.statistics.minDate}}
4Last row{{vars.statistics.maxDate}}

SHOW CREATE TABLE
{{vars.createtable}}
Data
Data From {{vars.offset}} To {{vars.offset + vars.limit}}
No data
'),e.put("app/table/table.html",'
')}]),function(e,t){function a(e,t){var a=t.dbName,n=t.tableName;e.vars={dbName:a,tableName:n}}e.module(t.app.name).controller("TableController",a),a.$inject=["$scope","$stateParams"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.tablewidget={},t.vars={columns:{},ugrid:{},sortColumn:!1,isDark:i.isDark(),createtable:{},data:null,grid:null,limit:100,offset:0,statistics:{},loading:!0,isRawStatistics:!1,rawstatistics:"",scrollConfig:{autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},t.initContainer=function(){a.$watch("currentTable",function(e){e&&(t.vars.currentTable=a.currentTable,t.vars.currentDatabase=a.currentDatabase,t.init())})},t.onAfterInit=function(){},t.updateHandTable=function(){l.getInstance("hotTableContain").render()},t.initOnGo=function(){t.$parent.vars&&(o.get("tableSiedenav")&&s("tableSiedenav").close(),t.vars.currentTable=t.$parent.vars.tableName,t.vars.currentDatabase=t.$parent.vars.dbName,t.init())},t.load=function(){console.warn("LOAD DATA! IN TABLES"),t.vars.data=-1,n.fetchQuery("\n select * from "+t.vars.currentDatabase+"."+t.vars.currentTable+" limit "+t.vars.offset+", "+t.vars.limit+"\n ").then(function(e){var a="ch";t.tablewidget=new WidgetTable(new DataProvider(e,a)),t.vars.loading=!1},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.calcRawSize=function(){t.vars.isRawStatistics=!0,n.fetchQuery("SELECT any(ignore(*)) FROM "+t.vars.currentDatabase+"."+t.vars.currentTable+" SAMPLE 1 / 10000 ").then(function(e){t.vars.rawstatistics=e.statistics},function(e){t.vars.rawstatistics=e.data})},t.init=function(){t.vars.loading=!0,t.vars.createtable="N/A",n.fetchQuery("SHOW CREATE TABLE "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(e){t.vars.createtable=window.sqlFormatter.format(e.data[0].statement)}),n.fetchQuery("SELECT table, formatReadableSize(sum(bytes)) as size, sum(bytes) as sizeBytes, min(min_date) as minDate, max(max_date) as maxDate FROM system.parts WHERE database = '"+t.vars.currentDatabase+"' AND ( table = '"+t.vars.currentTable+"' OR table = '"+t.vars.currentTable+"_sharded' ) GROUP BY table ").then(function(e){return t.vars.statistics=e&&e.data.length&&e.data[0]||{}}),n.fetchQuery("SELECT * FROM system.columns WHERE database='"+t.vars.currentDatabase+"' AND table='"+t.vars.currentTable+"'").then(function(a){n.fetchQuery("describe table "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(n){_.map(n.data,function(t){var n=_.find(a.data,{name:t.name});return _.merge(t,n),t.size="-",t.ratio="-",!e.isUndefined(t.default_kind)&&e.isUndefined(t.default_type)&&(t.default_type=t.default_kind),t.data_compressed_bytes&&(t.size=numbro(t.data_compressed_bytes).format("0.0 b")+" / "+numbro(t.data_uncompressed_bytes).format("0.0 b"),t.ratio=numbro(parseInt(t.data_uncompressed_bytes)/parseInt(t.data_compressed_bytes)).format("0.0")),t}),t.vars.columns=n,t.vars.sortColumn=!1;var i=0;n.data.forEach(function(e){3>i&&("Date"==e.type&&(t.vars.sortColumn=e.name),"DateTime"==e.type&&(t.vars.sortColumn=e.name)),i+=1}),t.load()})})},t.loadNext=function(){t.vars.loading=!0,t.vars.offset+=t.vars.limit,t.load()},t.loadPrev=function(){t.vars.offset>0&&(t.vars.loading=!0,t.vars.offset-=t.vars.limit,t.load())}}e.module(t.app.name).controller("TableContainerController",a),a.$inject=["$scope","$rootScope","API","ThemeService","$stateParams","$mdSidenav","$mdComponentRegistry","hotRegisterer"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -window.global_delimiter=";;",window.aceJSRules={builtinFunctions:[],lang:"en",dictionaries:[],fieldsList:[],tables:[]},function(e,t){function a(t,a,n,i,r,s,o,l,c,d,u,m,h,p,g){var b="sqlHistory2",f="saveTabs",v="sessionData",y=255;t.AceEditorInLoad=!1,t.vars={EditorIsInit:!1,sqlHistory:i.get(b)||[],dictionaries:[],isDictionariesLoad:!1,tabs:[],enableLiveAutocompletion:h.get("liveAutocompletion"),disableAutohelp:h.get("disableAutohelp"),disableHotKeyCmdLeft:h.get("disableHotKeyCmdLeft"),saveTabs:i.get(f)||!0,LastStatistics:!1,delimiters:[{name:";; Double",delimiter:";;"},{name:"; Single",delimiter:";"}],databasesList:[],searchQueryOnServer:"",currentTab:{},selectedTab:0,formats:[{name:"Table",sql:" format JSON",render:"html"},{name:"JSON compact",sql:" format JSONCompact"}],db:null,limitTimes:h.get("limitTimes"),limitRows:h.get("limitRows"),fontSize:h.get("fontSize"),theme:h.get("editorTheme")},t.vars.delimiter=i.get("delimiter")||";;",t.vars.format=t.vars.formats[0],t.vars.themes=["ambiance","eclipse","mono_industrial","tomorrow_night_blue","chaos","github","monokai","tomorrow_night_bright","chrome","idle_fingers","pastel_on_dark","tomorrow_night_eighties","clouds","iplastic","solarized_dark","tomorrow_night","clouds_midnight","katzenmilch","solarized_light","twilight","cobalt","kr_theme","sqlserver","vibrant_ink","crimson_editor","kuroir","terminal","xcode","dawn","merbivore","textmate","dreamweaver","merbivore_soft","tomorrow"],n.onbeforeunload=function(e){if(""!==t.vars.currentTab.sql&&"localhost"!=location.hostname){var a="Do you want to leave this page?";return"undefined"==typeof e&&(e=window.event),e&&(e.returnValue=a),a}};var w=t.$on("$stateChangeStart",function(e){var a="Do you want to leave this page?";e.defaultPrevented||""===t.vars.currentTab||confirm(a)||e.preventDefault()}),k=function(){if(t.vars.saveTabs){var e=t.vars.tabs.map(function(e){return e.editor?e.sql=e.editor.getValue():e.sql="",{name:e.name,sql:e.sql,buttonTitle:e.buttonTitle,format:e.format,delimiter:e.delimiter,results:[],editor:null,selectedResultTab:0}});i.set(v,e),console.info("Save session , localStorageService.set(SQL_SESSION_KEY)")}};t.$watch("$root.isInitDatabaseStructure",function(){t.vars.EditorIsInit=a.isInitDatabaseStructure}),t.InitDatabaseStructure=function(){console.warn(">>>>>>>>>>>>>>>InitDatabaseStructure<<<<<<<",a.isInitDatabaseStructure)},t.executeQuery=function(a,n,i){var s="result_overflow_mode=throw";t.vars.currentTab.loading=!0,t.vars.limitRows&&(s+="&max_result_rows="+t.vars.limitRows),t.vars.limitTimes&&(s+="&timeout_overflow_mode=throw&max_execution_time="+t.vars.limitTimes);var o=a.sql.replace(/(\r\n|\n|\r)$/gm,"").substr(0,130);t.vars.currentTab.progress.query=o;var d="";a.qid&&(d=" /*TABIX_QUERY_ID_"+a.qid+"*/ "),r.fetchQuery(d+a.sql,!0,a.format,s).then(function(r){try{var s=r;e.isObject(r)||(r={data:s,meta:null,rows:null,statistics:null}),r.error=!1,r.query=a,r.countAllQuery=n.length;var l={time:moment().format("HH:mm:ss")};e.isObject(r.statistics)&&Object.assign(l,r.statistics),l.query=o,_.isArray(t.vars.currentTab.statistics)&&t.vars.currentTab.statistics.push(l),t.vars.LastStatistics=l;var c=new DataProvider(r,"ch");c.progressQuery=o,i.widgets.tables.push(new WidgetTable(c)),"drawCommand"in a&&a.drawCommand.length?(c.countAll=a.drawCommand.length>r.countAllQuery?a.drawCommand.length:r.countAllQuery,console.info("query.drawCommand",a.drawCommand),a.drawCommand.forEach(function(e){i.widgets.draw.push(new WidgetDraw(c,e))})):i.widgets.draw.push(new WidgetDraw(c,!1)),i.data.push(a),t.$applyAsync(),a.index+1-1&&r>-1&&t.vars.currentTab.editor.gotoLine(s,r),console.log("move cursor to",s,r)}var d="ch";console.warn("ERROR",n);var u=new DataProvider(n,d);i.data.push(a),i.widgets.tables.push(new WidgetTable(u)),t.finalizeResult(i)})},t.renderResult=function(e){},t.finalizeResult=function(e){if(t.vars.currentTab.loading=!1,t.vars.currentTab.progress=!1,e.data.find(function(e){return e.keyword&&-1!=["DROP","CREATE","ALTER"].indexOf(e.keyword.toUpperCase())})&&l.show(l.simple().content("Press `Reload Structure` for reload").theme(c.theme).position("bottom right")),t.$applyAsync(),t.vars.currentTab.statistics[0]){var a=DataProvider.convertArrayToDataProvider(t.vars.currentTab.statistics,"statistics");a.sort="time",a.sortOrder="desc",e.widgets.stats.push(new WidgetTable(a,!1))}},t.execute=function(n,s){t.$applyAsync(),console.groupCollapsed("Execute query"),t.vars.LastStatistics=!1,s.sql=s.editor.getValue();var o=s.sql,d=0,m=s.editor,h=[],p=m.getSelectedText();e.isUndefined(s.selectedTabResultIndex)&&(s.selectedTabResultIndex=0);var b={data:[],time:u("date")(new Date,"HH:mm:ss"),pinned:!1,widgets:{tables:[],pivot:[],draw:[],stats:[]}};if(""!==p&&null!==p&&(o=p),console.info("[EDITOR TEXT]> ",o),""===o||null===o)return void l.show(l.simple().content("SQL query is empty").theme(c.theme).position("bottom right"));s.results=[b],k();var f=window.global_delimiter;f||(f=";;"),m.session.$mode.splitByTokens(o,"constant.character.escape",f).forEach(function(t){if(!("current"==n&&d>0)){var s=[],o=t.sql;if(!(o.length<5)){if("current"==n&&!p){var l=m.selection.getCursor();if(!l||e.isUndefined(l))return;var c=t.range.compare(l.row,l.column);if(0!==c)return}var u=o.trim();-1==a.sqlLog.indexOf(u)&&(a.sqlLog.unshift(u),a.sqlLog.length>y&&a.sqlLog.splice(0,y),i.set("sqlLog",a.sqlLog));var b=m.session.$mode.replaceVars(o,g.get());o=b.sql;b.vars;if(console.log("replacedVars",b),m.session.$mode.findTokens(o,"invalid.illegal",!0)){var f=m.session.$mode.splitByTokens(o,"invalid.illegal",!0);o=f[0].sql,f.forEach(function(t){if(e.isDefined(t.keyword)&&t.keyword){var a=/DRAW_(\w+)/gim,n=a.exec(t.keyword);n&&n[1]&&s.push({drawtype:n[1].toLowerCase(),code:t.sql})}})}console.info("[SQL]>",o),s&&console.info("[DRAW]>",s);var v=null,w=!1,k=!1,x=null,C=m.session.$mode.findTokens(o,"storage",!0),S=m.session.$mode.findTokens(o,"keyword",!0);C.hasOwnProperty("value")?(v=!1,k=C.value):(v=" FORMAT JSON ",w=!0),S.hasOwnProperty("value")&&(x=S.value),"select"!=x&&"with"!=x&&(v=!1,w=!1),h.push({sql:o,index:d,format:v,setedformat:w,keyword:x,storage:k,drawCommand:s,itemRange:t.range,qid:r.makeQueryId()}),d++}}}),console.groupEnd("Execute query"),h.length&&(t.vars.currentTab.progress={},t.vars.currentTab.statistics||(t.vars.currentTab.statistics=[]),t.executeQuery(h[0],h,b))},t.setTheme=function(e){t.vars.theme=e,t.vars.tabs.forEach(function(t){return t.editor.setTheme("ace/theme/"+e)}),i.set("editorTheme",e)},t.reloadCache=function(){console.log("reloadCache"),r.resetDatabaseStructure(),l.show(l.simple().content("Reload page - for reset cache").theme(c.theme).position("bottom right"))},t.selectDatabase=function(e,a){e&&(r.setDatabase(e),t.vars.db!=e&&(t.vars.db=e,t.AceEditorInLoad||(t.aceLoadDatabaseFields(),t.aceApply(!1))))},t.insertWordInEditor=function(e){var a=t.vars.currentTab.editor,n=a.getCursorPosition();n.column+=e.length,a.clearSelection(),a.insert(e),t.vars.currentTab.sql=a.getValue(),d(function(){a.focus(),a.moveCursorToPosition(n)})},t.aceLoadDatabaseFields=function(){var e=t.vars.db;window.aceJSRules.fieldsList=[],r.databaseStructure(function(t){window.aceJSRules.fieldsList=t.getAllFieldsInDatabase(e)})},t.aceLoadDatabaseStructure=function(){var e=t.vars.db;window.aceJSRules.tables=[],r.databaseStructure(function(a){t.vars.databasesList=a.getDatabases(),Object.keys(a.getUniqueDatabaseTables()).forEach(function(e){window.aceJSRules.tables.push(e)}),window.aceJSRules.fieldsList=a.getAllFieldsInDatabase(e)})},t.loadInAce=function(e){e.session.setMode({path:"ace/mode/clickhouse"});for(var t in window.aceJSRules.builtinFunctions){var a=window.aceJSRules.builtinFunctions[t];e.session.$mode.$highlightRules.addCompletionsFunctions(a)}e.session.$mode.$highlightRules.addArrayCompletions(window.aceJSRules.tables,"[table]","table");for(var n in window.aceJSRules.dictionaries){var i=window.aceJSRules.dictionaries[n];e.session.$mode.$highlightRules.addCompletionsDictionaries(i)}for(var r in window.aceJSRules.fieldsList){var s=window.aceJSRules.fieldsList[r];e.session.$mode.$highlightRules.addCompletionsTableFiled(s)}var o=g.getCompletions(),l=p.getCompletions();e.session.$mode.$highlightRules.addArrayCompletions(o,"[var]","var"),e.session.$mode.$highlightRules.addArrayCompletions(l,"[snippet]","snippet"),e.session.bgTokenizer.start(0)},t.aceApply=function(e){e?(console.log(""),t.loadInAce(e)):t.vars.tabs.forEach(function(e){e.editor&&(console.log(""),t.loadInAce(e.editor))}),a.$watch("currentDatabase",t.selectDatabase)},t.changeRootSelectDatabase=function(e){a.currentDatabase!=e&&(a.currentDatabase=e)},t.aceLoadDictionaries=function(){t.vars.isDictionariesLoad||(window.aceJSRules.dictionaries=[],t.vars.dictionaries=[],window.aceJSRules.builtinFunctions=[],t.vars.isDictionariesLoad=!0,r.databaseStructure(function(e){e.getFunctions().forEach(function(e){if(window.aceJSRules.builtinFunctions.push({name:e.name,isaggr:e.is_aggregate,score:101,comb:!1,origin:e.name}),e.is_aggregate){var t={name:e.name+"If",isaggr:e.is_aggregate,score:3,comb:"If",origin:e.name};window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"Array",isaggr:e.is_aggregate,score:2,comb:"Array",origin:e.name},window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"State",isaggr:e.is_aggregate,score:1,comb:"State",origin:e.name},window.aceJSRules.builtinFunctions.push(t)}}),e.getDictionaries().forEach(function(e){var a=e.name;a=a.replace(/^.*\./gm,""),"news"!=a&&(a=a.replace(/s$/gm,"")),a=a?a.toLowerCase()+"_id":"ID";var n="dictGet"+e["attribute.types"]+"('"+e.name+"','"+e["attribute.names"]+"',to"+e.key+"( "+a+" ) ) AS "+e["attribute.names"]+",";window.aceJSRules.dictionaries.push({dic:n,title:"dic_"+e.name+"."+e["attribute.names"]}),t.vars.dictionaries.push({dic:n,title:e.name+"."+e["attribute.names"]+" as "+e["attribute.types"]})})}))};for(var x=function(e){t.vars.tabs.length>=e&&(t.vars.currentTab=t.vars.tabs[e],t.vars.selectedTab=e,d(function(){t.vars.currentTab.editor.focus()}))},C=function(){t.vars.selectedTab>0&&x(t.vars.selectedTab-1)},S=function(){t.vars.selectedTabD;D++)A(D);m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+right":"ctrl+right",callback:S}),m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+left":"ctrl+left",callback:C}),m.add({combo:"ctrl+shift+f",callback:T}),t.aceLoaded=function(e){t.editorVisiable=!1,d(function(){t.editorVisiable=!0,t.AceEditorInLoad=!0,a.currentDatabase&&t.selectDatabase(a.currentDatabase),t.aceLoadDictionaries(),t.aceLoadDatabaseStructure(),t.aceLoadDatabaseFields();var n=t.vars.tabs.find(function(e){return!e.editor})||t.vars.currentTab;n.editor=e,e.$blockScrolling=1/0,e.setOptions({fontSize:t.vars.fontSize+"px",enableBasicAutocompletion:!0,behavioursEnabled:!0,wrapBehavioursEnabled:!0,highlightSelectedWord:!0,showGutter:!0,enableLiveAutocompletion:t.vars.enableLiveAutocompletion,liveAutocompletionDelay:500,liveAutocompletionThreshold:1}),e.setTheme("ace/theme/"+t.vars.theme),e.session.setUseWrapMode(h.get("useWrapMode")),e.commands.addCommand({name:"runCurrentCommand",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:function(){t.execute("current",n)}}),e.commands.addCommand({name:"removeLiness",bindKey:{win:"Ctrl-Y",mac:"Cmd-Y"},exec:function(e){e.removeLines()}}),e.commands.addCommand({name:"collapseAll",bindKey:{win:"Ctrl-Shift--",mac:"Command+Shift+-"},exec:function(e){e.session.$mode.collapseAll(e.session)}}),e.commands.addCommand({name:"unfold",bindKey:{win:"Ctrl-Shift-+",mac:"Command+Shift+="},exec:function(e){e.session.unfold()}}),e.commands.addCommand({name:"runAllCommand",bindKey:{win:"Shift-Ctrl-Enter",mac:"Shift-Command-Enter"},exec:function(){t.execute("all",n)}});for(var i=function(t){e.commands.addCommand({name:"selecttab"+t,bindKey:{win:"Ctrl-Shift-"+(t+1),mac:"Command-Shift-"+(t+1)},exec:function(){return x(t)}})},r=0;9>r;r++)i(r);e.commands.addCommand({name:"selectnexttab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Right":"Ctrl-Right",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Right":"Command-Right"},exec:S}),e.commands.addCommand({name:"selectprevtab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Left":"Ctrl-Left",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Left":"Command-Left"},exec:C}),e.commands.addCommand({name:"formatcode",bindKey:{win:"Ctrl-Shift-F",mac:"Command-Shift-F"},exec:T}),e.setValue(n.sql),e.clearSelection(),e.focus(),e.selection.moveTo(0,0),e.on("changeSelection",function(){d(function(){n.buttonTitle=""!==e.getSelectedText()?"Run selected ⌘ + ⏎":"Run all ⇧ + ⌘ + ⏎",n.originalSql&&(n.changed=n.originalSql!=n.sql)})}),t.AceEditorInLoad=!1,t.aceApply(e)},100)},t.save=function(e,a){return o.show(o.prompt().title("Save SQL as?").placeholder("Title").initialValue(e.name).targetEvent(a).ok("Save").cancel("")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n?(t.vars.sqlHistory[n].sql=e.sql,t.vars.sqlHistory[n].name=a):t.vars.sqlHistory.push({sql:e.sql,name:a}),e.originalSql=e.sql,e.name=a,i.set(b,t.vars.sqlHistory),k()})},t.load=function(e){t.vars.currentTab.sql=e.sql,t.vars.currentTab.originalSql=e.sql,t.vars.currentTab.name=e.name,t.vars.currentTab.editor.setValue(e.sql),t.aceApply(t.vars.currentTab.editor)},t.getExportData=function(t){return t.data.data.map(function(t){return Object.keys(t).map(function(a){return e.isArray(t[a])?t[a].join(", "):t[a]})})},t.getExportHeaders=function(e){return e.data.meta.map(function(e){return e.name})},t.addTab=function(){t.vars.currentTab={name:"new SQL",sql:"",buttonTitle:"Run ⌘ + ⏎",format:{},editor:null,results:[],selectedResultTab:0},t.vars.tabs.push(t.vars.currentTab),k()},t.changeTab=function(e){k(),t.vars.currentTab=e},t.removeTab=function(e,a){a.stopPropagation();var n=function(){t.vars.tabs.splice(t.vars.tabs.indexOf(e),1),t.vars.tabs.length==t.vars.selectedTab&&t.vars.selectedTab--};e.changed?o.show(o.confirm().title("SQL was changed. Save it before exit?").targetEvent(a).ok("Yes").cancel("No")).then(function(){var a=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=a&&(t.vars.sqlHistory[a].sql=e.sql,t.vars.sqlHistory[a].name=e.name),i.set(b,t.vars.sqlHistory),n()},n):n()},t.removeResult=function(e,t,a){},a.$on("handleBroadcastUpdateVarsAndSnippets",function(e,a){t.aceApply()}),a.$on("handleBroadcastCalcSumCells",function(e,a){_.isObject(t.vars.currentTab.results[0])&&(t.vars.currentTab.results[0].cellsCalc=a,t.$applyAsync())}),a.$on("handleBroadcastInsertInActive",function(e,a){a.value&&t.insertWordInEditor(" "+a.value+" ")}),t.toggleSidenav=function(e){s(e).toggle()},t.removeHistory=function(e,a){a.preventDefault();var n=t.vars.sqlHistory.indexOf(e);-1!=n&&o.show(o.confirm().title("Delete "+e.name+"?").targetEvent(a).ok("Yes").cancel("No")).then(function(){t.vars.sqlHistory.splice(n,1),i.set(b,t.vars.sqlHistory)})},t.setSql=function(e){t.vars.currentTab.sql=e,t.toggleSidenav("log"),t.vars.currentTab.editor.setValue(e),d(function(){return t.vars.currentTab.editor.focus()},500)},t.changeTabName=function(e,a){a.stopPropagation(),o.show(o.prompt().title("Title tab").placeholder("title").initialValue(e.name).targetEvent(a).ok("Apply").cancel("Cancel")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n&&(e.originalSql=e.sql,t.vars.sqlHistory[n].name=a,i.set(b,t.vars.sqlHistory)),e.name=a,k()})},t.vars.saveTabs?(t.vars.tabs=i.get(v),_.isArray(t.vars.tabs)||(t.vars.tabs=[]),t.vars.tabs.length>0?d(function(){return t.vars.currentTab=t.vars.tabs[0]},500):t.addTab()):(i.set(v,[]),t.addTab()),t.$on("$destroy",function(){r.setDatabase(a.currentDatabase),w(),n.onbeforeunload=null}),t.rightAceMenuList=[],t.showDialogUpload=function(t,a){function n(e,t){e.vars={UploadCsv:{content:null,header:!0,headerVisible:!0,separator:",",separatorVisible:!0,result:null,encoding:"ISO-8859-1",encodingVisible:!0,uploadButtonLabel:"Upload",callback:function(e){t.hide()}}},e.$watch("vars.UploadCsv.result",function(e){e&&t.hide(e)}),e.hide=function(){t.hide()},e.cancel=function(){t.cancel()}}n.$inject=["$scope","$mdDialog"],o.show({controller:n,templateUrl:"app/sql/showDialogUpload.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0}).then(function(e){if(e&&t&&t.tables){var a=DataProvider.convertArrayToDataProvider(e,"csv");t.tables.push(new WidgetTable(a))}},function(){})},t.rightMenuProcess=function(e){t.vars.currentTab.sql=t.vars.currentTab.editor.getValue();var a=t.vars.currentTab.editor.session;if(t.vars.currentTab.editor.resize(),"Snippet"==e){var n=t.vars.currentTab.editor.getSelectedText();n&&(p.add(n),t.aceApply())}else"AutoFormat"==e?T():"Expand"==e?a.unfold():"Collapse All"==e?a.$mode.collapseAll(a):"Collapse"==e&&a.foldAll();t.vars.currentTab.editor.focus()}}e.module(t.app.name).controller("SqlController",a),a.$inject=["$scope","$rootScope","$window","localStorageService","API","$mdSidenav","$mdDialog","$mdToast","ThemeService","$timeout","$filter","hotkeys","Preference","Snippets","Variables"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors - */ -function(e,t,a){function n(t,a,n,i,r,s,o,l,c,d,u){function m(e,t){this.apply=function(){l.show(l.simple().content("Share OK, link in clipboard").theme(c.theme).position("top right")),e&&e.close()},this.close=function(){e&&e.close()}}function h(e,t){this.apply=function(){l.show(l.simple().content("Add to dashboard - OK").theme(c.theme).position("top right")),e&&e.close()},this.close=function(){e&&e.close()}}t.tabsRender=!0,t.vars={rsw:0,uiTheme:c.themeObject,isChartReady:!1,staticGrid:!0,stackType:"false",isDark:c.isDark(),active:{table:!1,pivot:!1,draw:!1}},t.staticGrid=!0,t.gridStackOptions={cellHeight:200,verticalMargin:3,disableDrag:!0},t.switchStaticGrid=function(){t.vars.staticGrid=!t.vars.staticGrid,t.staticGrid=t.vars.staticGrid,console.info("staticGrid",t.staticGrid)},t.shareResult=function(){var t=u.newPanelPosition().absolute().right().top();u.open({controller:m,templateUrl:"app/panels/share.html",attachTo:e.element(document.body),position:t,panelClass:"demo-dialog-example",trapFocus:!0,zIndex:150,clickOutsideToClose:!0,clickEscapeToClose:!0,hasBackdrop:!0,controllerAs:"ctrl",locals:{$widget:""}})},t.SendToDashboard=function(t,a){var n=u.newPanelPosition().absolute().right().top();u.open({controller:h,templateUrl:"app/panels/sendtodashboard.html",attachTo:e.element(document.body),position:n,panelClass:"demo-dialog-example",trapFocus:!0,zIndex:150,clickOutsideToClose:!0,clickEscapeToClose:!0,hasBackdrop:!0,controllerAs:"ctrl",locals:{$widget:t}})},t.initNoTabs=function(){t.vars.active.table=!0,t.vars.active.draw=!0,t.vars.active.pivot=!0},t.initTableTab=function(){t.vars.active.table=!0},t.initDrawTab=function(){t.vars.active.draw=!0},t.onResizeStop=function(){},t.openEditor=function(a){o.show({controller:PlotlyEditorController,templateUrl:"app/sql/PlotlyEditor.tmpl.html",parent:e.element(document.body),locals:{w:a}}).then(function(e){t.status='You said the information was "'+e+'".'},function(){t.status="You cancelled the dialog."})},t.openEditorPlotLy=function(e){console.log("openEditorPlotLy",e),t.openEditor(e)},t.initPivotTab=function(){t.vars.active.pivot=!0}}e.module(t.app.name).controller("RenderCtrl",n),n.$inject=["$scope","$rootScope","$window","localStorageService","API","$mdSidenav","$mdDialog","$mdToast","ThemeService","$timeout","$mdPanel"]}(angular,smi2,window.$),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar, SMI2 LLC and other contributors - */ -function(e,t){function a(e){var t=this,a={date:"calendar",text:"message-text-outline","int":"numeric",code:"cow"};this.vars={},this.getIcon=function(e){return a[e]},this.constructor=function(){var a=e.get("UserVariables");_.isObject(a)||(a={});for(var n in a){var i=a[n];t.vars[n]={id:n,name:i.name,title:i.name,value:i.value,typeEdit:"text",type:i.type,icon:t.getIcon(i.type)}}},this.constructor(),this.drop=function(e){delete t.vars[e]},this.update=function(e){console.info("Update value",e),t.apply()},this.getCompletions=function(){var e=[];for(var a in t.vars){var n=t.vars[a];e.push("$"+n.name)}return e},this.get=function(){return t.vars},this.addVar=function(e,a,n){var i=a;t.vars[i]={id:i,name:a,title:a,value:n,typeEdit:"text",type:e,icon:t.getIcon(e)},t.apply()},this.apply=function(){var a={};_.forEach(t.vars,function(e,t){var n={id:e.id,name:e.title,type:e.type,value:e.value};a[e.id]=n}),e.set("UserVariables",a)}}e.module(t.app.name).service("Variables",a),a.$inject=["localStorageService"]}(angular,smi2),function(e,t){function a(t,a){var n=t.get("themeName")||"dark",i=[{isDark:!1,name:"light",title:"Light theme"},{isDark:!0,name:"dark",title:"Dark theme"}],r=i.find(function(e){return e.name==n})||i[1];return r.isDark&&e.element("body").addClass("dark"),this.isDark=function(){return r.isDark},this.get=function(){return r},{isDark:function(){return r.isDark},list:i,set:function(e){console.warn(e,n),e!=n&&(console.log("localStorageService.set('themeName', ",e),t.set("themeName",e),a.reload(),window.location.reload())},get:function(){},theme:r.name,themeObject:r}}e.module(t.app.name).service("ThemeService",a),a.$inject=["localStorageService","$state"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar/SMI2 LLC and other contributors - */ -function(e,t){function a(e){var t=this;this.snippets={},this.constructor=function(){var a=e.get("UserSnippets");_.isObject(a)||(a={});for(var n in a){var i=a[n];t.snippets[n]={id:n,code:i.code,dt:i.dt}}console.log("UserSnippets",t.snippets)},this.constructor(),this.getCompletions=function(){var e=[];for(var a in t.snippets){var n=t.snippets[a];e.push(n.code)}return e},this.getSnippets=function(){return t.snippets},this.drop=function(e){delete t.snippets[e]},this.update=function(e){console.info("Update value",e),t.apply()},this.hashCode=function(e){return e.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)},this.add=function(e){e=e.trim();var a="SQL_"+Math.abs(t.hashCode(e));console.log("UserSnippets",e,a),t.snippets[a]={id:a,code:e,dt:Date.now()},t.apply()},this.apply=function(){var a={};_.forEach(t.snippets,function(e,t){var n={id:e.id,code:e.code,dt:e.dt};a[e.id]=n}),e.set("UserSnippets",a)}}e.module(t.app.name).service("Snippets",a),a.$inject=["localStorageService"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){function a(e,t){var a=this,n={limitRows:5e3,limitTimes:5,fontSize:14,editorTheme:"cobalt",theme:"dark",saveTabs:!0,liveAutocompletion:!0,disableAutohelp:!1,disableHotKeyCmdLeft:!0,delimiter:";;",liveAutocompletionDelay:500,liveAutocompletionThreshold:1,useWrapMode:!0,showInvisibles:!1},i=["ligth","dark"],r=["ambiance","eclipse","mono_industrial","tomorrow_night_blue","chaos","github","monokai","tomorrow_night_bright","chrome","idle_fingers","pastel_on_dark","tomorrow_night_eighties","clouds","iplastic","solarized_dark","tomorrow_night","clouds_midnight","katzenmilch","solarized_light","twilight","cobalt","kr_theme","sqlserver","vibrant_ink","crimson_editor","kuroir","terminal","xcode","dawn","merbivore","textmate","dreamweaver","merbivore_soft","tomorrow","dracula"];this.current={},this.constructor=function(){var t=e.get("UserPreference");a.current=_.merge(n,t)},this.constructor(),this.getThemes=function(){return i},this.getEditorThemes=function(){return r},this.apply=function(e){_.forEach(e,function(e,t){a.set(t,e)}),a.save()},this.save=function(){console.log("localStorageService,set",a.current),e.set("UserPreference",a.current)},this.getCurrentState=function(){return a.current},this.get=function(e){return n[e]},this.set=function(e,t){("limitRows"==e||"limitTimes"==e||"fontSize"==e||"liveAutocompletionDelay"==e||"liveAutocompletionThreshold"==e)&&(t=parseInt(t)),a.current[e]=t}}e.module(t.app.name).service("Preference",a),a.$inject=["localStorageService","ThemeService"]}(angular,smi2),function(e,t){function a(e,t){return{responseError:function(a){return 401==a.status&&t.get("$state").go("login"),e.reject(a)}}}e.module(t.app.name).service("HttpInterceptor",a),a.$inject=["$q","$injector"]}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){function a(t,a,n,i,r){var s=this,o="currentBaseConfig",l=new DatabaseStructure,c=null,d={},u=n.get(o);u&&(u.host||u.tabix)&&(d=u),this.setConnection=function(t){n.set(o,t),d=e.copy(t)},this.isAuthorized=function(){return s.isTabixServer()?d&&d.tabix?d.tabix.server:!1:d?d.host:!1},this.clear=function(){c=null,d={},n.set(o,{}),l=new DatabaseStructure},this.hashCode=function(e){return e.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)},this.DS_CacheKey=function(){var e="_databaseStructure:"+JSON.stringify(d);return e=s.hashCode(e)},this.DS_storeCache=function(e,t,a,i,r){var o={columns:e,tables:t,databases:a,dictionaries:i,functions:r,ttl:Date.now()};return n.set(s.DS_CacheKey(),o)},this.DS_fetchFromCache=function(){var e=n.get(s.DS_CacheKey());if(!e||!e.ttl)return!1;var t=(Date.now()-e.ttl)/36e5;return t>1.5?!1:e&&e.functions&&e.functions.length>1?(l.init(e.columns,e.tables,e.databases,e.dictionaries,e.functions),!0):!1},this.memory=function(e){},this.resetDatabaseStructure=function(){console.log("reset databaseStructure"),n.set("_databaseStructure:"+s.getHost()+":"+s.getLogin(),[])},this.databaseStructure=function(e,t){return!t&&l.isInit()?e(l):!t&&s.DS_fetchFromCache()&&l.isInit()?(console.info("restore from cache : database Structure!"),e(l)):(t&&(l=new DatabaseStructure),console.time("Load Database Structure!"),void s.fetchQuery("SELECT * FROM system.columns").then(function(t){s.fetchQuery("SELECT database,name,engine FROM system.tables").then(function(a){s.fetchQuery("SELECT name FROM system.databases").then(function(n){s.fetchQuery("SELECT name,key,attribute.names,attribute.types from system.dictionaries ARRAY JOIN attribute ORDER BY name,attribute.names",null).then(function(i){s.fetchQuery("SELECT name,is_aggregate from system.functions",null).then(function(r){return console.timeEnd("Load Database Structure!"),s.DS_storeCache(t.data,a.data,n.data,i.data,r.data),l.init(t.data,a.data,n.data,i.data,r.data),e(l)},function(e){throw e})},function(e){throw e})},function(e){throw e})},function(e){throw e})},function(e){throw e}))},this.getConnectionInfo=function(){return d},this.setDatabase=function(e){return c=e},this.getDatabase=function(){return c},this.getHost=function(){return d.host},this.getPassword=function(){return d.password},this.getLogin=function(){return d.login},this.makeQueryId=function(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=0;8>a;a++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},this.isTabixServer=function(){return d.tabix&&d.tabix.server?!0:!1},this.makeSqlQuery=function(e,t){var a="";return t!==!1?(t=t||" FoRmAt JSON","null"==t&&(t=""),a=e+"\n\n"+t):a=e,a},this.direct_makeUrlRequest=function(e,t){var a="",n="";d.host.indexOf("://")>0||0==d.host.indexOf("/")||(n="http://"),a=n+d.host,a+="/?",a+="add_http_cors_header=1&log_queries=1&output_format_json_quote_64bit_integers=1",d.NotCH1_1_54276||(a+="&output_format_json_quote_denormals=1");return d.baseauth||(a+=d.password?"&user="+encodeURIComponent(d.login)+"&password="+encodeURIComponent(d.password):"&user="+encodeURIComponent(d.login)),e&&(a+="&database="+encodeURIComponent(c)),t&&(a+="&"+t),d.params&&(a+="&"+d.params),a},this.fetchQuery=function(e,t,a,n){return s.isTabixServer()?s.ts_fetchQuery(e,t,a,n):s.direct_fetchQuery(e,t,a,n)},this.pushProjectState=function(e){return s.fetchTabixServer("projectstate/push",e)},this.getProjectState=function(e){return s.fetchTabixServer("projectstate/fetch",e)},this.getStructure=function(e){return s.fetchTabixServer("structure",e)},this.getWidget=function(e,t){return s.fetchTabixServer("widget/"+e,t)},this.getDashboard=function(e,t){return s.fetchTabixServer("dashboard/"+e,t)},this.getDashboardsTree=function(e){return s.fetchTabixServer("dashboards",e)},this.fetchTabixServer=function(e,t,a){_.isObject(t)||(t={});var n=d.tabix.server;n=n+"/"+e+"?tabix_client="+window.TabixVersion+"&random="+Math.round(1e8*Math.random()),a&&(n+="&"+a);var i={version:window.TabixVersion,auth:{login:d.tabix.login,password:d.tabix.password,confid:d.tabix.confid}};i=Object.assign(t,i);var r={mode:"cors",method:"post",headers:{"Content-type":"application/json; charset=UTF-8"},body:JSON.stringify(i)};console.info("TS Request",n,r);var s=new Request(n,r);return fetch(s).then(function(e){var t=e.headers.get("content-type");return t.includes("text/plain")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t&&t.includes("application/json")&&e.status>=200&&e.status<300?Promise.resolve(e):e.text().then(Promise.reject.bind(Promise))}).then(function(e){return"OK"===e?"OK":e.json()},function(e){return Promise.reject(e)})},this.ts_fetchQuery=function(e,t,a,n){return s.fetchTabixServer("query",{query:s.makeSqlQuery(e,a)},n)},this.direct_fetchQuery=function(e,t,a,n){var i=s.makeSqlQuery(e,a),r=s.direct_makeUrlRequest(t,n),o={mode:"cors",method:"post",headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"},body:i};d.includeCredentials&&(o.credentials="include");var l=new Request(r,o);return fetch(l).then(function(e){var t=e.headers.get("content-type");return t.includes("text/tab-separated-values")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t.includes("text/plain")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t&&t.includes("application/json")&&e.status>=200&&e.status<300?Promise.resolve(e):e.text().then(Promise.reject.bind(Promise))}).then(function(e){return"OK"===e?"OK":e.json()},function(e){return Promise.reject(e)})}}e.module(t.app.name).service("API",a),a.$inject=["$http","$q","localStorageService","$sanitize","ThemeService"]}(angular,smi2);var DatabaseStructure=function(){function e(){_classCallCheck(this,e),this._init=!1,this.uciq_fields=[],this.all_fields=[],this.all_db_fields=[],this.uciq_dbtables=[]}return _createClass(e,[{key:"init",value:function(e,t,a,n,i){var r=this;console.log("Try init DS...."),this._init||(this.columns=e,this.tables=t,this.databases=a,this.functions=i,this.dictionaries=n,this.columns.forEach(function(e){!angular.isUndefined(e.default_kind)&&angular.isUndefined(e.default_type)&&(e.default_type=e.default_kind),r.all_fields[e.database+"."+e.table]||(r.all_fields[e.database+"."+e.table]=[]),r.all_db_fields[e.database]||(r.all_db_fields[e.database]=[]),r.all_db_fields[e.database][e.table]||(r.all_db_fields[e.database][e.table]=[]),r.all_db_fields[e.database][e.table].push(e),r.all_fields[e.database+"."+e.table].push({name:e.name,type:e.type,active:!0}),r.uciq_fields[e.database]||(r.uciq_fields[e.database]=[]),_.isArray(r.uciq_fields[e.database])||(r.uciq_fields[e.database]=[]),_.isArray(r.uciq_fields[e.database])||(r.uciq_fields[e.database]=[]),r.uciq_fields[e.database].push(e),r.uciq_dbtables[e.database+"."+e.table]=1}),console.log("DS init ... done"),this._init=!0)}},{key:"isInit",value:function(){return this._init&&this.functions&&this.functions.length>1}},{key:"getTables",value:function(){return this.tables}},{key:"getDatabases",value:function(){return this.databases}},{key:"getFieldsByDatabase",value:function(e){return this.all_db_fields[e]}},{key:"getFunctions",value:function(){return this.functions}},{key:"getFields",value:function(){return this.all_fields}},{key:"getUniqueDatabaseTables",value:function(){return this.uciq_dbtables}},{key:"getAllFieldsInDatabase",value:function(e){return this.uciq_fields[e]}},{key:"getDictionaries",value:function(){return this.dictionaries}},{key:"getColumns",value:function(){return this.columns}}]),e}();/* - * Copyright (C) 2017 IgorStrykhar in SMI2 - * All rights reserved. - */ -!function(e,t,a){function n(e,t,a){e.vars={AceThemes:t.getEditorThemes(),Themes:t.getThemes()},e.state=t.getCurrentState(),e.apply=function(){t.apply(e.state),e.state=t.getCurrentState(),a.go("sql")},e.reloadCache=function(){}}e.module(t.app.name).controller("PreferenceController",n),n.$inject=["$scope","Preference","$state"]}(angular,smi2,window.$),function(e,t){function a(t,a,n,i,r,s,o){var l="proc.interval",c="proc.key";t.widgets=[],t.staticGrid=!0,t.gridStackOptions={cellHeight:200,verticalMargin:0,disableDrag:!0,disableResize:!0,staticGrid:!0},t.logData={},t.vars={readOnlyRows:!0,canShowTable:!1,WidgetTable:!1,queryesToKill:{},clusterMode:!0,logMode:!0,loading:!1,isClusterLoad:!1,clusterList:!1,isDark:n.isDark(),sort:/^[a-z0-9_]+$/.test(r.get(c))?r.get(c):null,interval:r.get(l)||-1};var d=null;t.initClusterConfig=function(){var e="SELECT host_address,port FROM system.clusters GROUP BY host_address,port LIMIT 10";t.vars.clusterList=[],a.fetchQuery(e).then(function(e){e.data.forEach(function(e){t.vars.clusterList.push(e.host_address+":"+e.port)}),t.vars.isClusterLoad=!0,console.log("Cluster nodes list",t.vars.clusterList.join(",")),t.load()},function(e){t.vars.isClusterLoad=!0,console.error("Error "+e)})},t.flush=function(){t.logData={}},t.megreProcessData=function(e){return e.forEach(function(e){if(t.logData[e.hash]){var a=t.logData[e.hash].count;t.logData[e.hash].initial_query_id!=e.initial_query_id&&(a+=1),e.count=a,t.logData[e.hash]=e}else e.count=1,t.logData[e.hash]=e}),_.values(t.logData)},t.load=function(){console.info("Call load processes");var e="SELECT now() as dt, query, 1 as count,\n toUInt64(toUInt64(read_rows) + toUInt64(written_rows)) as rows,\n round(elapsed,1) as elapsed ,\n formatReadableSize(toUInt64(read_bytes)+toUInt64(written_bytes)) as bytes, \n formatReadableSize(memory_usage) as memory_usage,\n formatReadableSize(read_bytes) as bytes_read,\n formatReadableSize(written_bytes) as bytes_written, \n * , \n cityHash64(query) as hash, \n hostName()";t.vars.isClusterLoad&&t.vars.clusterList&&t.vars.clusterMode?e=e+" FROM remote('"+t.vars.clusterList.join(",")+"',system.processes, '"+a.getLogin()+"','"+a.getPassword()+"') ":e+=" FROM system.processes ",e+=" /* 12XQWE3X1X2XASDF */ WHERE query not like '%12XQWE3X1X2XASDF%'",t.vars.readOnlyRows&&(e+=" AND read_rows>0"),a.fetchQuery(e).then(function(e){var a=new DataProvider(e);t.widgets[0]?t.vars.logMode?t.widgets[0].updateData(t.megreProcessData(a.data)):t.widgets[0].updateData(a.data):(a.setColumnsHumanSort(["bytes","memory_usage","bytes_read","bytes_written"]),a.setSort("rows",-1),t.widgets[0]=new WidgetTable(a,!1,12,9),a.data.forEach(function(e){t.logData[e.hash]=e})),t.vars.canShowTable=!0,t.vars.data=!0,t.vars.loading=!1,t.$applyAsync()},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.setInterval=function(){r.set(l,t.vars.interval),d&&(i.cancel(d),d=null),t.vars.interval>-1&&(d=i(t.load,1e3*t.vars.interval))},t.$on("$destroy",function(){t.vars.interval=-1,i.cancel(d),t.setInterval()}),t.initClusterConfig(),t.vars.interval>-1&&t.setInterval(),t.dialogKill=function(n){var i="SELECT now() as dt,query,1 as count,\n \n formatReadableSize(read_bytes) as read_bytes, \n formatReadableSize(written_bytes) as written_bytes, \n formatReadableSize(memory_usage) as memory_usage,\n read_rows,written_rows,\n \n query_id as hash,\n round(elapsed,4) as elapsed \n FROM system.processes /* 12XQWE3X1X2XASDF */ WHERE query not like '%12XQWE3X1X2XASDF%' ORDER BY elapsed DESC";a.fetchQuery(i).then(function(i){s.show({controller:["$scope",function(e){e.queryesToKill=i.data,e.kill=function(e){var t="KILL QUERY WHERE query_id='"+e.hash+"' SYNC",i=s.confirm().title(t+" ?").textContent(e.query).ariaLabel("Lucky day").targetEvent(n).ok("Please do it!").cancel("Sounds like a scam");s.show(i).then(function(){a.fetchQuery(t,!1).then(function(e){s.show(s.alert().clickOutsideToClose(!0).title("Result: "+t).textContent(e).ariaLabel("Alert").ok("Ok!").targetEvent(n))},function(e){s.show(s.alert().clickOutsideToClose(!0).title("Error: "+t).textContent(e.data).ariaLabel("Error on Kill").ok("Ok!").targetEvent(n))})},function(){})},e.cancel=function(){s.cancel()}}],templateUrl:"app/metrics/dialog.kill.html",parent:e.element(document.body),targetEvent:n,clickOutsideToClose:!0}).then(function(e){t.status='You said the information was "'+e+'".'},function(){t.status="You cancelled the dialog."})})}}e.module(t.app.name).controller("ProcessesController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","hotRegisterer"]}(angular,smi2),/* - * Copyright (C) 2017 IgorStrykhar in Tabix LLC - * All rights reserved. - */ -function(e,t,a){function n(e,t,a){e.widgets=[],e.staticGrid=!0,e.gridStackOptions={cellHeight:200,verticalMargin:0,disableDrag:!0,disableResize:!0,staticGrid:!0},e.vars={uiTheme:a.themeObject,isDark:a.isDark()},e.dumpStaticGridSizes=function(){console.info("dumpStaticGridSizes");var t=[];e.widgets.map(function(e){var a={id:e.id,x:e.x,y:e.y,sizeX:e.sizeX,sizeY:e.sizeY};t.push(a),console.log(a)}),console.log(t)},e.initTab=function(){console.info("initPivotTab")},e.setWidgets=function(t,a){a.id=t,a.x=e.widgets[t].x,a.y=e.widgets[t].y,a.sizeX=e.widgets[t].sizeX,a.sizeY=e.widgets[t].sizeY,e.widgets[t]=a,e.$applyAsync()},e.init=function(){e.widgets=[{id:0,x:0,y:0,sizeX:4,sizeY:2},{id:1,x:8,y:0,sizeX:4,sizeY:2},{id:2,x:4,y:0,sizeX:4,sizeY:2},{id:3,x:0,y:4,sizeX:8,sizeY:3},{id:4,x:8,y:2,sizeX:4,sizeY:4},{id:5,x:0,y:2,sizeX:8,sizeY:2}],console.info("Init OverviewController"),t.fetchQuery("SELECT * FROM system.build_options").then(function(t){e.setWidgets(0,new WidgetTable(new DataProvider(t)))}),t.fetchQuery("SELECT database,table,name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns").then(function(t){var a={path:"database.table.name.data_compressed_bytes",title:"columns data_compressed_bytes",tooltip:"Size",valueformat:"0.00 b"},n={drawtype:"TREEMAP",code:a};e.setWidgets(1,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("SELECT database,table,sum(data_compressed_bytes) as data_compressed_bytes FROM system.columns GROUP BY database,table").then(function(t){var a={path:"database.table.data_compressed_bytes",title:"columns data_compressed_bytes",tooltip:"Size",valueformat:"0.00 b"},n={drawtype:"TREEMAP",code:a};e.setWidgets(2,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("select toStartOfDay(modification_time) as dt,\n sum(bytes) as bytes FROM system.parts group by dt order by dt LIMIT 30000").then(function(t){var a={autoAxis:!0,markLine:!0,title:"system.parts bytes"},n={drawtype:"CHART",code:a};e.setWidgets(3,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("select concat(database,'.',table) as table,sum(bytes) as bytes from system.parts\n group by table order by bytes desc LIMIT 3000").then(function(t){var a={title:"table bytes"},n={drawtype:"BAR",code:a};e.setWidgets(4,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("SELECT * FROM system.clusters").then(function(t){e.setWidgets(5,new WidgetTable(new DataProvider(t)))})},e.init()}e.module(t.app.name).controller("OverviewController",n),n.$inject=["$scope","API","ThemeService"]}(angular,smi2,window.$),function(e,t){function a(t,a,n,i,r,s,o){var l="proc.metrica",c="proc.metrica_max";t.data=[],t.metrcisChart=!1,t.maxlength=r.get(c)||50,t.chartData={},t.orderKeys={},t.preState={},t.EChartOptions={},t.vars={logEvents:!1,initChart:!1,isDark:n.isDark(),interval:r.get(l)||-1,scrollConfig:{autoHideScrollbar:!1,theme:n.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},e.element(o).bind("resize",function(){t.metrcisChart&&t.vars.initChart&&t.metrcisChart.resize()}),t.initChart=function(e){if(t.vars.initChart){for(var a in e)if("time"!=a){t.chartData[a].length>t.maxlength&&t.chartData[a].shift();var i=parseInt(e[a]);i-parseInt(t.preState[a]);t.chartData[a].push([e.time,i])}return t.metrcisChart.setOption(t.EChartOptions),void(t.preState=e)}if(e.time){t.preState=e;var r=[],s=[],o=[],l=[],c=[],d=0,u=0;for(var m in e)if("time"!=m){t.orderKeys[m]=d;var h=parseInt(e[m]);t.chartData[m]=[],t.chartData[m].push([e.time,h]),r.push({show:!0,borderWidth:0,shadowBlur:2}),s.push({show:!1,type:"time",splitLine:{show:!1},gridIndex:d}),o.push({type:"value",show:!1,scale:!0,splitLine:{show:!1},name:"value",boundaryGap:[0,"100%"],min:"dataMin",max:"dataMax",gridIndex:d}),c.push({textAlign:"center",text:m,textStyle:{fontSize:10,fontWeight:"normal"}}),l.push({name:m,type:"line",data:t.chartData[m],xAxisIndex:d,yAxisIndex:u,showSymbol:!1,hoverAnimation:!1}),d+=1,u+=1}var p=Math.ceil(Math.sqrt(d));r.forEach(function(e,t){e.left=t%p/p*100+.5+"%",e.top=Math.floor(t/p)/p*100+.5+"%",e.width=1/p*100-2+"%",e.height=1/p*100-2+"%",c[t].left=parseFloat(e.left)+parseFloat(e.width)/2+"%",c[t].top=parseFloat(e.top)+"%"});var g={version:3,title:c.concat([{text:"Metrics",top:"bottom",left:"center"}]),toolbox:{show:!0,feature:{saveAsImage:{show:!0}}},width:"100%",group:"group",grid:r,xAxis:s,yAxis:o,series:l,tooltip:{showDelay:0,backgroundColor:"#2c343c",trigger:"axis",formatter:function(e){e=e[0];var t=new Date(e.value[0]),a=e.value[1],n=a;return e.seriesName.toLowerCase().includes("bytes")?a=numbro(a).format("0.0000b"):a>1e4&&(a=numbro(a).format("0.0000a")),e.seriesName+"

"+moment(t).format("h:mm:ss")+"
"+a+"
"+(n!=a?"
"+n+"
":"")},axisPointer:{animation:!1}}};t.vars.initChart=!0,t.EChartOptions=Object.assign(g,t.EChartOptions);var b="macarons";n.isDark()&&(b="dark"),t.metrcisChart=echarts.init(document.querySelector("#metrcisChart"),b),t.metrcisChart.setOption(t.EChartOptions),t.metrcisChart.resize()}};var d=null;t.$watch("vars.logEvents",function(){t.flushChart()},!0),t.flushChart=function(){t.vars.initChart&&(t.chartData={},t.metrcisChart.dispose(),t.EChartOptions={},t.vars.initChart=!1,t.load())},t.flush=function(){for(var e in t.chartData)for(var a=t.chartData[e].length,n=0;a-2>n;n++)t.chartData[e].shift();t.metrcisChart.setOption(t.EChartOptions),t.metrcisChart.resize(),t.load()},t.load=function(){t.vars.loading=!0;var e=" SELECT metric,toInt64(value) as value,'metrics' as type FROM system.metrics ORDER BY metric ";e+=" UNION ALL SELECT metric,toInt64(value) as value,'async' as type FROM system.asynchronous_metrics ORDER BY metric ",t.vars.logEvents&&(e+=" UNION ALL SELECT event as metric, toInt64( value) as value,'events' as type FROM system.events ORDER BY metric"),a.fetchQuery(e).then(function(e){t.vars.loading=!1;var a={time:Date.now()};e.data.forEach(function(e){var t="";"events"==e.type&&(t=" "),a[e.metric+t]=e.value}),t.initChart(a)},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.setMaxlength=function(){r.set(c,t.maxlength)},t.setInterval=function(){r.set(l,t.vars.interval),d&&(i.cancel(d),d=null),t.vars.interval>-1&&(d=i(t.load,1e3*t.vars.interval))},t.$on("$destroy",function(){t.vars.interval=-1,i.cancel(d),t.setInterval()}),t.load(),t.vars.interval>-1&&t.setInterval()}e.module(t.app.name).controller("MetricschartController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","$window"]}(angular,smi2),function(e,t){function a(e,t,a,n,i,r,s){e.vars={uiTheme:a.themeObject,isDark:a.isDark(),selectedTabResultIndex:0,active:{Overview:!1,Chart:!1,Processes:!1}},e.initProcessesTab=function(t){e.vars.active.Processes=!0},e.initChartTab=function(t){e.vars.active.Chart=!0},e.initOverviewTab=function(t){e.vars.active.Overview=!0}}e.module(t.app.name).controller("MetricsController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","$window"]}(angular,smi2),function(e,t){function a(a,n,i,r,s,o,l){var c="basesConfig";a.isChrome=/Chrome/.test(navigator.userAgent),a.vars={bases:i.get(c)||[],db:{},loading:!1,version:t.app.version,themes:o.list},a.loginCheckDone=function(){r.databaseStructure(function(e){console.log("loginCheckDone ... DS ... done"),n.go("sql")},!0)},a.login=function(){if(a.vars.loading=!0,a.vars.db.id){for(var t=0;t=1024;)t/=1024,n++;return t.toFixed(+a)+" "+e[n]}})}(angular,smi2);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors - */ -var Widget=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:!1;_classCallCheck(this,e),this._scheduledResize=!1,this.data=t,this.drawCommnads=a,this.title=!1,this._draw=!1,a&&this.drawCommnads.drawtype?this.drawType=this.drawCommnads.drawtype.toUpperCase():this.drawType=!1,this.error=this.data.error,this.text=this.data.text,this.name="Widget",this.element=!1,this.init=!1,_.isNumber(n)&&(this.sizeX=n),_.isNumber(i)&&(this.sizeY=i),this.type=!1;var r=angular.element("*[ng-app]").injector().get("ThemeService").isDark();this.isDark=r,window.isDarkTheme=r}return _createClass(e,[{key:"applySettings",value:function(e){console.log("applySettings",e),_.isObject(e)&&e.title&&(this.title=e.title)}},{key:"onDrag",value:function(){}},{key:"getSizeElementHeight",value:function(){var e=this.element[0].offsetHeight;return 100>e&&(e=100),e}},{key:"getSizeElementWidth",value:function(){return this.element[0].offsetWidth}},{key:"destroy",value:function(e){return console.info("Destroy widget is empty"),!1}},{key:"onResize",value:function(){}},{key:"scheduledResize",value:function(){if(!this._scheduledResize){this._scheduledResize=!0;var e=this;setTimeout(function(){e._scheduledResize=!1,e.onResize()},200)}}},{key:"toString",value:function(){return"("+this.name+", "+this.y+")"}}]),e}(),WidgetTable=function(e){function t(e,a,n,i){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,n,i));if(r.type="table",r.table={},r.sort=!1,r.hotId="hotIdTable"+Math.floor(1e7*Math.random()),r.handsonTable={},r.error)return r.sizeY=2,r.sizeX=12,r.init=!1,_possibleConstructorReturn(r);if(r.text)return r.sizeY=4,r.sizeX=12,r.init=!1,_possibleConstructorReturn(r);var s=new HandsTable(r.isDark,r.data.meta,{sort:r.data.sortByColl(),sortOrder:r.data.sortOrderBy(),humanSortCols:r.data.getColumnsHumanSort()});if(r.table={settings:s.makeSettings()},r.table.settings.hotId=r.hotId,!r.sizeX&&!r.sizeY){var o=s.countColumns();r.initTableWSize(o)}return r.init=!0,r}return t.$inject=["DataProvider","draw","sizeX","sizeY"],_inherits(t,e),_createClass(t,[{key:"initTableWSize",value:function(e){var t=1;e>2&&(t=2),e>5&&(t=3),e>10&&(t=4),e>15&&(t=6),"statistics"==this.data.sourceType&&(t=6),this.sizeX=t,this.sizeY=1,this.data.rows>60&&(this.sizeY=1),this.data.rows>250&&(this.sizeY=2),this.data.rows>500&&(this.sizeY=3),1==this.data.countAll&&(this.sizeX=6,this.sizeY=3),this.sizeY=2*this.sizeY,this.sizeX=2*this.sizeX}},{key:"destroy",value:function(e){return function(){e.handsonTable.destroy(),e.handsonTable=null,e.data.data=null,e.settings=null,e.table=null,e.init=!1,e.element.html()}}},{key:"preProcessor",value:function(){}},{key:"postProcessor",value:function(){var e=this.table.settings;e.width=this.getSizeElementWidth(),e.height=this.getSizeElementHeight(),e.data=this.data.data,this.handsonTable=new Handsontable(this.element[0],e)}},{key:"onDrag",value:function(){this.onResize()}},{key:"updateData",value:function(e){var t=this.handsonTable,a=t.sortColumn,n=t.sortOrder;this.data.update(e),this.handsonTable.loadData(e),this.handsonTable.updateSettings({columnSorting:{column:a,sortOrder:n}}),this.handsonTable.render()}},{key:"onResize",value:function(){if(console.info("table.onResize()"),this.init&&this.handsonTable){var e=this.getSizeElementWidth(),t=this.getSizeElementHeight();if(this.handsonTable.getSettings().width!=e||this.handsonTable.getSettings().height!=t)return this.handsonTable.updateSettings({width:e,height:t}),this.handsonTable.render(),!0}}}]),t}(Widget);angular.module(smi2.app.name).service("WidgetTable",WidgetTable);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -var WidgetPivot=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a));return n.type="pivot",n.error||n.text?_possibleConstructorReturn(n):(n.init=!0,n.renderers=$.extend($.pivotUtilities.renderers,$.pivotUtilities.c3_renderers,$.pivotUtilities.d3_renderers,$.pivotUtilities.export_renderers,$.pivotUtilities.subtotal_renderers),n.pivot={config:{dataClass:$.pivotUtilities.SubtotalPivotData,renderer:n.renderers}},1==n.data.countAll&&(n.sizeX=6,n.sizeY=3),n.sizeY=2*n.sizeY,n.sizeX=2*n.sizeX,n)}return t.$inject=["DataProvider","draw"],_inherits(t,e),t}(Widget);angular.module(smi2.app.name).service("WidgetPivot",WidgetPivot);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -var WidgetDraw=function(e){function t(e,a,n,i){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,n,i));return r.type="draw",r.error||r.text?_possibleConstructorReturn(r):(r.library=!1,r._list={GRAPH:DrawEchartsGraph,PLOTLY:DrawPlotly,HEATMAP:DrawEchartsHeatmap,CALENDAR:DrawEchartsCalendar,RAW:DrawEchartsMap,BAR:DrawEchartsBar,RIVER:DrawEchartsRiver,MAP:DrawEchartsMap,GMAPS:DrawGoogleMap,TREEMAP:DrawEchartsTreemap,FLATTREE:DrawEchartsFlatTree,SANKEYS:DrawEchartsSunkeys,CHART:DrawEchartsChart,GRIDCHART:DrawEchartsGridChart,TEXT:DrawText,D3:DrawD3,C3:DrawC3},r.init=r.getChartClass(),r.sizeX||r.sizeY||(r.sizeX=6,r.sizeY=3,"TEXT"==r.drawType&&(r.sizeX=1,r.sizeY=2),1==r.data.countAll&&(r.sizeX=12,r.sizeY=3)),r)}return t.$inject=["DataProvider","draw","sizeX","sizeY"],_inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this._draw&&this._draw.onResize()}},{key:"getChartClass",value:function(){return this.drawType||(this.drawType="CHART",console.error("Un support DrawType:null")),this._list[this.drawType]?!0:(console.error("Un support DrawType:"+this.drawType),!1)}},{key:"draw",get:function(){return this.drawType&&!this._draw&&(this._draw=new this._list[this.drawType](this,this.drawType)),this._draw}}]),t}(Widget);angular.module(smi2.app.name).service("WidgetDraw",WidgetDraw);/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors - */ -var HandsTable=function(){function e(t,a,n){_classCallCheck(this,e),this.isDarkTheme=t,this.meta=a,this.Preset=n}return e.$inject=["isDark","metaData","Preset"],_createClass(e,[{key:"_handsRenderer",value:function(e,t,a,n,i,r,s){"numeric"==s.type?null==r||"-nan"==r||"inf"==r||"+nan"==r||"+inf"==r||"-inf"==r||"nan"==r?(null==r&&(arguments[5]="NULL"),t.style.color="black",t.style.background="red",Handsontable.renderers.TextRenderer.apply(this,arguments)):Handsontable.renderers.NumericRenderer.apply(this,arguments):"date"==s.type||"time"==s.type?(moment(new Date(r)).isValid()&&s.renderDateFormat&&(r=moment(r).format(s.renderDateFormat)),arguments[5]=r,Handsontable.renderers.TextRenderer.apply(this,arguments)):Handsontable.renderers.TextRenderer.apply(this,arguments),s.backgroundColor&&(t.style.backgroundColor=s.backgroundColor),s.color&&(t.style.color=s.color)}},{key:"countColumns",value:function(){return this.meta.length}},{key:"makeColumns",value:function(){var e=this,t=this.Preset.humanSortCols,a=[],n=[],i={},r=0;return this.meta.forEach(function(s){i[s.name]=r,r++,a.push(s.name);var o={};switch(o.type="text",o.width=100,o.typeOriginal=s.type,o.isDark=e.isDarkTheme,s.type.includes("Int64")?(o.type="text",o.width=100,_.isObject(e.meta.prepareInt64Cols)&&e.meta.prepareInt64Cols[s.name]&&(o.type="numeric")):s.type.includes("Int")&&(o.width=80,o.type="numeric"),s.type){case"Date":o.width=90,o.type="date",o.dateFormat="YYYY-MM-DD";break;case"DateTime":o.width=150,o.type="time",o.timeFormat="YYYY-MM-DD HH:mm:ss";break;case"Float32":o.width=80,o.type="numeric",o.format="0.[0000000]";break;case"Float64":o.width=80,o.type="numeric",o.format="0.[0000000]";break;case"String":o.width=180}o.renderer=e._handsRenderer,o.data=s.name,_.isArray(t)&&_.indexOf(t,s.name)>-1&&(o.sortFunction=function(e){var t=Handsontable.helper.objectEach,a={TiB:1099511627776,GiB:1073741824,MiB:1048576,KiB:1024,B:1},n=function(e,t,a){return _.isUndefined(e)?e:(isNaN(e)&&e.indexOf(" "+t)>-1&&(e=parseFloat(e.replace(t,""))*a),e)};return function(i,r){var s=i[1],o=r[1];return t(a,function(e,t){s=n(s,t,e),o=n(o,t,e)}),o>s?e?-1:1:s>o?e?1:-1:0}}),n.push(o)}),{colHeaders:a,columns:n,colPositions:i}}},{key:"fecthContextMenu",value:function(){return{items:{columnformat:{name:"Column format",submenu:{items:[{name:"Reset",key:"columnformat:1",callback:function(t,a,n){e.makeFormat(this,"Reset")}},{name:"Money",key:"columnformat:2",callback:function(t,a,n){e.makeFormat(this,"Money")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Human",key:"columnformat:3",callback:function(t,a,n){e.makeFormat(this,"Human")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Bytes",key:"columnformat:4",callback:function(t,a,n){e.makeFormat(this,"Bytes")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Percentages",key:"columnformat:5",callback:function(t,a,n){e.makeFormat(this,"Percentages")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Time only",key:"columnformat:6",callback:function(t,a,n){e.makeFormat(this,"Time")},disabled:function(){return!e.isFormatColl(this,"Time")}},{name:"Date only",key:"columnformat:7",callback:function(t,a,n){e.makeFormat(this,"Date")},disabled:function(){return!e.isFormatColl(this,"Date")}},{name:"Date loc.",key:"columnformat:8",callback:function(t,a,n){e.makeFormat(this,"DateLoc")},disabled:function(){return!e.isFormatColl(this,"Date")}},{name:"Float",key:"columnformat:9",callback:function(t,a,n){e.makeFormat(this,"Float")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Heatmaps",key:"columnformat:10",callback:function(t,a,n){e.makeHeatmaps(this,"Heatmaps")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Negative & Positive",key:"columnformat:11",callback:function(t,a,n){e.makeHeatmaps(this,"NegaPosi")},disabled:function(){return!e.isFormatColl(this,"numeric")}}]}},style:{name:"Style",submenu:{items:[{name:"Normal",callback:function(t,a,n){e.makeStyle(this,"Normal")},key:"style:normal"},{name:"Bold",callback:function(t,a){e.makeStyle(this,"Bold")},key:"style:makebold"},{name:"Red color",callback:function(t,a){e.makeStyle(this,"Red")},key:"style:red"},{name:"Green color",callback:function(t,a){e.makeStyle(this,"Green")},key:"style:green"},{name:"Yellow color",callback:function(t,a){e.makeStyle(this,"Yellow")},key:"style:yellow"},{name:"Orange color",callback:function(t,a){e.makeStyle(this,"Orange")},key:"style:orange"}]}},hsep1:"---------",copyTo:{name:"To Clipboard",submenu:{items:[{name:"Redmine Markdown",callback:function(t,a,n){console.info("copyToClipboard"),e.copyToClipboard(this,"Redmine")},key:"copyTo:1"},{name:"Redmine Markdown (full)",callback:function(t,a,n){console.info("copyToClipboard"),e.copyToClipboard(this,"Redmine",!0)},key:"copyTo:2"},{name:"WHERE col1 IN (val,val),col2 IN ...",callback:function(t,a,n){console.info("makeWhereIn"),e.makeWhereIn(this)},key:"copyTo:3"},{name:"Create TABLE...",callback:function(t,a,n){e.makeCreateTable(this)},key:"copyTo:4"}]}},hsep3:"---------",Transform:{name:"Transpose full table",callback:function(t,a,n){e.Transpose(this,"Transpose")}},Calculate:{name:"Calc Avg & Sum & Median",callback:function(t,a,n){e.Calc(this,"All")}},hsep4:"---------",undo:{},make_read_only:{},alignment:{},hsep5:"---------"}}}},{key:"makeSettings",value:function(){var e=this.makeColumns(),t={observeChanges:!1,observeDOMVisibility:!0,dropdownMenu:!0,manualColumnMove:!0,manualColumnResize:!0,rowHeaders:!0,colWidths:100,fillHandle:!1,stretchH:"all",customBorders:!0,isDark:this.isDarkTheme,filters:!0,columnSorting:!0,sortIndicator:!0,manualRowResize:!0,viewportColumnRenderingOffset:"auto",wordWrap:!1,autoColumnSize:{samplingRatio:23},columns:e.columns,colHeaders:e.colHeaders,contextMenu:this.fecthContextMenu(),currentRowClassName:this.isDarkTheme?"currentRowDark":"currentRowWhite",currentColClassName:"currentCol",renderAllRows:!1,visibleRows:1500};return this.Preset.sort&&(t.columnSorting={column:e.colPositions[this.Preset.sort]},t.columnSorting.sortOrder=this.Preset.sortOrder),t}}],[{key:"isDark",value:function(){return window.isDarkTheme}},{key:"makeHeatmaps",value:function(e,t){for(var a=e.getSelectedRange(),n=Math.min(a.from.col,a.to.col),i=Math.max(a.from.col,a.to.col),r="#a900e5",s="#3668ff",o=chroma.scale([r,s]),l=n;i>=l;l++){var c=e.countRows(),d=e.getDataAtCol(l),u=Math.min.apply(null,d),m=Math.max.apply(null,d);if(null!==u&&null!==m)for(var h=0;c>=h;h++){var p=parseFloat(e.getDataAtCell(h,l));if("Heatmaps"==t){var g=(p-u)/(m-u),b=o(g).hex(),f=e.getCellMeta(h,l);f&&e.setCellMeta(h,l,"backgroundColor",b)}if("NegaPosi"==t){var v=!1;0>p&&(v="#e27137"),p>0&&(v="#31b3e5");var y=e.getCellMeta(h,l);y&&v&&e.setCellMeta(h,l,"color",v)}}else console.warn("Can`t find Min&Max in column",l)}e.render()}},{key:"getSelected",value:function(e,t,a){var n=e.getSelectedRange(),i=!1;if(!n&&t||a)return{isSelection:!1,fromRow:0,toRow:e.countRows(),toCol:e.countCols(),fromCol:0};if(!n)return{isSelection:!1,fromRow:-1,toRow:-1,toCol:-1,fromCol:-1};var r=Math.min(n.from.col,n.to.col),s=Math.max(n.from.col,n.to.col),o=Math.min(n.from.row,n.to.row),l=Math.max(n.from.row,n.to.row);return{isSelection:i,fromRow:o,toRow:l,toCol:s,fromCol:r}}},{key:"makeFormat",value:function(t,a){for(var n=e.getSelected(t,!0),i=t.getSettings().columns,r=n.fromCol;r<=n.toCol;r++)switch(console.log("makeFormat for coll ="+r,a),a){case"Reset":i[r].format=!1,i[r].renderDateFormat=!1;break;case"Money":i[r].format="$0,0.00";break;case"Human":i[r].format="5a";break;case"Bytes":i[r].format="0.0b";break;case"Percentages":i[r].format="(0.00 %)";break;case"Time":i[r].renderDateFormat="HH:mm:ss";break;case"Date":i[r].renderDateFormat="YYYY-MM-DD";break;case"DateTime":i[r].renderDateFormat="YYYY-MM-DD HH:mm:ss";break;case"DateLoc":i[r].renderDateFormat="LLLL";break;case"Float":i[r].format="0.[0000000]"}t.updateSettings({columns:i}),t.render()}},{key:"isFormatColl",value:function(e,t){t=t.toLowerCase();for(var a=e.getSelectedRange(),n=Math.min(a.from.col,a.to.col),i=Math.max(a.from.col,a.to.col),r=e.getSettings().columns,s=n;i>=s;s++)if(!r[s].type.toLowerCase().includes(t))return!1;return!0}},{key:"pushToClipboardText",value:function(e){var t=document.createElement("textarea");t.style.width=0,t.style.height=0,t.style.border=0,t.style.position="absolute",t.style.top=0,document.body.append(t),t.value=e,t.focus(),t.select();try{document.execCommand("copy")}catch(a){console.log("Oops, unable to copy")}document.body.removeChild(t)}},{key:"makeCreateTable",value:function(t){for(var a=e.getSelected(t,!0),n="\nCREATE TABLE x (\n",i=[],r=t.getSettings().columns,s=a.fromCol;s<=a.toCol;s++){var o=r[s].typeOriginal;i.push(" "+t.colToProp(s)+" "+o)}n=n+i.join(",\n")+"\n)\nENGINE = TinyLog\n;;\n",console.log(n),e.pushToClipboardText(n)}},{key:"Calc",value:function(t,a){for(var n=e.getSelected(t,!0),i=t.getSettings().columns,r=[],s=n.fromCol;s<=n.toCol;s++)for(var o=n.fromRow;o<=n.toRow;o++){var l=i[s].type.toLowerCase();l.includes("numeric")&&r.push(t.getDataAtCell(o,s))}if(_.isArray(r)&&r.length){var c={median:_.round(_.median(r),3),sum:_.round(_.sum(r),3),average:_.round(_.average(r),3),std:_.round(_.stdDeviation(r),3)};angular.element(document).scope().$emit("handleBroadcastCalcSumCells",c)}}},{key:"Transpose",value:function(t,a){var n=e.transpose(t.getSourceData()),i=[],r=[],s=!0,o=!1,l=void 0;try{for(var c,d=n.columns[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var u=c.value,m={};m.renderer=this._handsRenderer,m.data=u,m.type="text",m.width=100,r.push(m),i.push(u)}}catch(h){o=!0,l=h}finally{try{!s&&d["return"]&&d["return"]()}finally{if(o)throw l}}t.updateSettings({columns:r,colHeaders:i,data:n.data})}},{key:"transpose",value:function(e){var t=[],a=1,n=[];t.push(0);var i=!0,r=!1,s=void 0;try{for(var o,l=e[Symbol.iterator]();!(i=(o=l.next()).done);i=!0){var c=o.value,d=0,u=!0,m=!1,h=void 0;try{for(var p,g=Object.entries(c)[Symbol.iterator]();!(u=(p=g.next()).done);u=!0){var b=_slicedToArray(p.value,2),f=b[0],v=b[1];n[d]||(n[d]={}),1==a&&(n[d][0]=f),n[d][a]=v,d++}}catch(y){m=!0,h=y}finally{try{!u&&g["return"]&&g["return"]()}finally{if(m)throw h}}t.push(a),a++}}catch(y){r=!0,s=y}finally{try{!i&&l["return"]&&l["return"]()}finally{if(r)throw s}}return{data:n,columns:t}}},{key:"makeWhereIn",value:function(t){for(var a=e.getSelected(t,!0),n=[],i=t.getSettings().columns,r=a.fromCol;r<=a.toCol;r++){for(var s=[],o=a.fromRow;o<=a.toRow;o++)s.push(t.getDataAtCell(o,r));var l=s.filter(function(e,t,a){return a.indexOf(e)===t}),c=i[r].type.toLowerCase();c.includes("numeric")?n.push(t.colToProp(r)+" IN ( "+l.join(" , ")+") "):n.push(t.colToProp(r)+" IN ( '"+l.join("' , '")+"') ")}n="\n"+n.join("\n AND\n")+"\n\n",console.log(n),e.pushToClipboardText(n)}},{key:"copyToClipboard",value:function(t,a,n){for(var i=e.getSelected(t,!0,n),r="",s=[],o=i.fromCol;o<=i.toCol;o++)s.push(t.colToProp(o));r=r+" | "+s.join(" | ")+" |\n",s=[];for(var l=i.fromRow;l<=i.toRow;l++){for(var c=i.fromCol;c<=i.toCol;c++)s.push(t.getDataAtCell(l,c));r=r+" | "+s.join(" | ")+" |\n",s=[]}e.pushToClipboardText(r)}},{key:"HideColumn",value:function(t){for(var a=e.getSelected(t,!0),n=t.getSettings().columns,i=a.fromCol;i<=a.toCol;i++)n[i].width=0;t.updateSettings({columns:n})}},{key:"ShowAllColumns",value:function(e){var t=e.getSettings().columns;console.info("SHOWALL",t);var a=!0,n=!1,i=void 0;try{for(var r,s=t[Symbol.iterator]();!(a=(r=s.next()).done);a=!0){var o=r.value;console.info("COL",t[o])}}catch(l){n=!0,i=l}finally{try{!a&&s["return"]&&s["return"]()}finally{if(n)throw i}}e.updateSettings({columns:t})}},{key:"makeStyle",value:function(t,a){console.log("makeStyle",a);for(var n=e.getSelected(t,!0),i=n.fromRow;i<=n.toRow;i++)for(var r=n.fromCol;r<=n.toCol;r++){var s=t.getCellMeta(i,r),o="htCell"+a;(!s.className||s.className&&s.className.indexOf(o)<0)&&t.setCellMeta(i,r,"className",o)}t.render()}}]),e}();angular.module(smi2.app.name).service("HandsTable",HandsTable);var DrawBasicChart=function(){function DrawBasicChart(e){_classCallCheck(this,DrawBasicChart),this.widget=e,this.chart=!1,this.init=!1,this.options={},this.widget.height=1,this.widget.width=1,this.errorMessage="",this.drawCodeObject={type:!1};try{this.drawCodeObject=this.initDrawCodeObject()}catch(t){console.error("error eval ",t)}console.info("isExecutableCode()",this.isExecutableCode())}return _createClass(DrawBasicChart,[{key:"setWidgetSize",value:function(e,t){console.log("setWidgetSize",e,t,this.widget.sizeX,this.widget.sizeY),this.widget.sizeX=e,this.widget.sizeY=t}},{key:"setError",value:function(e){this.errorMessage=e;var t="",a="";_.isUndefined(this.help)||(t=this.help),_.isUndefined(this.helpLink)||(a=this.helpLink),this.widget.error="Draw error message:"+e+"\n\n"+t+"\n\n"+(a?''+a+"":"")}},{key:"isDark",value:function(){return this.widget.isDark}},{key:"getError",value:function(){return this.errorMessage}},{key:"isExecutableCode",value:function(){return this.drawCodeObject&&this.drawCodeObject.type?this.drawCodeObject.exec:!1}},{key:"executableCode",value:function(){var e={};return this.isExecutableCode()&&(console.log(this.drawCodeObject.code),e=this.drawCodeObject.code.call(window,this.widget.data)),console.warn("executableCode:ResultFunction",e),e}},{key:"initChartByJsCode",value:function(){if(this.isExecutableCode()){var e=this.executableCode();return this.options=Object.assign(this.options,e),!0}return!1}},{key:"data",value:function(){return this.widget.data.data}},{key:"meta",value:function(){return this.widget.data.meta}},{key:"isNumericColumn",value:function(e){var t=this.getColumnPosition(e);if(!_.isUndefined(t)){var a=this.meta()[t].type;return a?(a=a.toLowerCase(),a.includes("int")||a.includes("float")?!0:!1):!1}}},{key:"isStringColumn",value:function(e){var t=this.getColumnPosition(e);if(!_.isUndefined(t)){var a=this.meta()[t].type;return a?(a=a.toLowerCase(),a.includes("string")||a.includes("enum")?!0:!1):!1}}},{key:"getColumnPosition",value:function(e){return parseInt(_.findKey(this.meta(),{name:e}))}},{key:"haveColumn",value:function(e){if(_.isNaN(e)||_.isNull(e)||_.isUndefined(e))return!1;var t=this.getColumnPosition(e);return _.isNaN(t)||_.isNull(t)||_.isUndefined(t)?!1:!0}},{key:"getColumnByType",value:function(e){var t=_.findIndex(this.meta(),{type:e});return 0>t?!1:this.getColumns(t)}},{key:"getDateTimeColumn",value:function(){return this.getColumnByType("DateTime")}},{key:"getDateColumn",value:function(){return this.getColumnByType("Date")}},{key:"findDateTimeAxis",value:function(){var e=this.getDateTimeColumn();if(e)return e;var t=this.getDateColumn();return t?t:!1}},{key:"getColumns",value:function(e){var t=_.map(this.meta(),"name");return _.isUndefined(e)?t:t[e]}},{key:"getFirstColumn",value:function(){return this.getColumns(0)}},{key:"getDrawCommandObject",value:function(){return this.drawCodeObject&&this.drawCodeObject.type?this.drawCodeObject.code:!1}},{key:"updateCode",value:function updateCode(codejs,showErrors){var drawCommand=this.widget.drawCommnads;if(drawCommand&&drawCommand.code)try{var data={},code="("+codejs+")",obj=eval(code);_.isObject(obj)&&(console.info("Apply code",codejs),drawCommand.code=codejs,this.applyCode())}catch(E){showErrors&&console.error("error eval ",codejs,E)}}},{key:"getCode",value:function(){var e=!1,t=this.widget.drawCommnads;return t&&t.code&&(e=t.code),e.length<9?!1:e}},{key:"initDrawCodeObject",value:function initDrawCodeObject(){var drawCommand=this.widget.drawCommnads;if(!drawCommand)return[];var codeDrawText=!1;if(drawCommand&&drawCommand.code&&(codeDrawText=drawCommand.code),!codeDrawText)return[];var draw={code:!1,type:!1};if(_.isObject(codeDrawText))return draw={isok:!0,code:codeDrawText,type:"undefined"==typeof codeDrawText?"undefined":_typeof(codeDrawText),exec:!1};if("text"==drawCommand.drawtype.toLowerCase()){var obj=codeDrawText.trim();return draw={isok:!0,code:obj,type:"undefined"==typeof obj?"undefined":_typeof(obj),exec:!1}}try{var code="("+codeDrawText+")",_obj=eval(code),type="undefined"==typeof _obj?"undefined":_typeof(_obj);draw={isok:!0,code:_obj,type:type,exec:!!(_obj&&_obj.constructor&&_obj.call&&_obj.apply)}}catch(E){console.error("error eval ",codeDrawText,E)}return draw}}]),DrawBasicChart}(),DrawText=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type=a.toUpperCase(),n.library="text",n.widget.sizeX=0,n.widget.sizeY=0,n}return _inherits(t,e),_createClass(t,[{key:"preProcessor",value:function(){var e=this.getDrawCommandObject();this.init=this.applyText(e)}},{key:"applyText",value:function(e){return this.isDark()&&(this.widget.element[0].style.background="#404a59"),e?this.widget.element[0].innerHTML=Mustache.render(e,this.widget.data):this.widget.element[0].innerHTML="
"+JSON.stringify(this.widget.data,null,"	")+"
",!0}},{key:"onResize",value:function(){}}]),t}(DrawBasicChart),DrawPlotly=function(_DrawBasicChart2){function DrawPlotly(e,t){_classCallCheck(this,DrawPlotly);var a=_possibleConstructorReturn(this,(DrawPlotly.__proto__||Object.getPrototypeOf(DrawPlotly)).call(this,e));return a.type=t.toUpperCase(),a.library="plotly",a.chart=null,a.setWidgetSize(6,3),a._datajs=!1,a}return _inherits(DrawPlotly,_DrawBasicChart2),_createClass(DrawPlotly,[{key:"onResize",value:function(){if(this.plotly){var e=this.widget.getSizeElementHeight(),t=this.widget.getSizeElementWidth();(this.layout.height!=e||this.layout.width!=t)&&(this.layout.height=e,this.layout.width=t,this.relayout())}}},{key:"preProcessor",value:function(){return this.init=this.create(),this.getError()?(console.error(this.getError()),this.chart.before("

"+this.getError()+"

"),this.init=!1,!1):void console.info("preProcessor",this.init)}},{key:"initDrawCodeObject",value:function(){return!1}},{key:"getElement",value:function(){return this.widget.element[0]}},{key:"relayout",value:function(){Plotly.relayout(this.getElement(),this.layout)}},{key:"editor",value:function(){console.info("editoreditoreditor")}},{key:"getDataForCodeJS",value:function(){if(this._datajs)return this._datajs;for(var e={},t=this.getColumns(),a=this.data().length,n=0;a>n;++n){var i=this.data()[n];for(var r in t){var s=t[r];e[s]||(e[s]=[]),e[s].push(i[s])}}return this._datajs=e,e}},{key:"applyCode",value:function applyCode(){try{var codeJS=this.getCode();console.info("applyCode",codeJS);var data=this.getDataForCodeJS();console.log("getDataForCodeJS",data),console.log("this.data()",this.data()),codeJS="("+codeJS+")";var obj=eval(codeJS);_.isObject(obj)&&this.applyObject(obj)}catch(E){console.log(E)}}},{key:"applyLayout",value:function(e){console.info("<<<<<<< applyLayout >>>>>>>>>>",e),this.layout=e;var t=this.widget.getSizeElementHeight(),a=this.widget.getSizeElementWidth();this.layout.height=t,this.layout.width=a}},{key:"applyObject",value:function(e){var t={data:[],layout:{}};_.isObject(e)&&(_.isObject(e.data)&&(t.data=e.data),_.isObject(e.trace)&&t.data.push(e.trace),_.isObject(e.trace1)&&t.data.push(e.trace1),_.isObject(e.trace2)&&t.data.push(e.trace2),_.isObject(e.trace3)&&t.data.push(e.trace3),_.isObject(e.trace4)&&t.data.push(e.trace4),_.isObject(e.layout)&&(t.layout=e.layout)),console.info(t),console.log("llll:",t);var a={editable:!1};t=Object.assign(t,this.getDarkThemeSettings()),this.applyLayout(t.layout),console.warn("this.layout",this.layout),this.plotly?(console.info("UPDATE!"),this.plotly=Plotly.newPlot(this.getElement(),t.data,this.layout,a)):this.plotly=Plotly.newPlot(this.getElement(),t.data,this.layout,a)}},{key:"makeAutoDraw",value:function(){var e=this;console.info("<<<<<<< makeAutoDraw >>>>>>>>>>");var t={autoAxis:!1,markLine:!0,stack:!1,path:!1,sort:!0,xAxis:!1,yAxis:!1},a={},n=this.getColumns(),i=this.getFirstColumn(),r=i,s=this.findDateTimeAxis(),o=this.data();s&&(i=s),t.sort&&(o=_.sortBy(o,i)),r=i;var l=0,c=[],d=[];for(var u in n){var m=n[u],h=!1;_.size(a)&&(h=_.isUndefined(a[m])),m==r||h||(this.isStringColumn(m)&&2>l&&!groupPath?(_.isArray(c)||(c=[]),c.push(m),l++):this.isNumericColumn(m)&&d.push(m))}var p=o.length,g=0,b=[],f={};for(console.log("DATA LEN",p,o),g=0;p>g;++g){var v=o[g];b.push(v[r])}for(b=_.uniq(b),g=0;p>g;++g){var y=o[g],w=function(t){var i=n[t],s=[r],o=!1;if(_.size(a)&&(o=_.isUndefined(a[i])),i!==r&&!o&&e.isNumericColumn(i)&&_.findIndex(c,i)<0){if(c)for(var l=0;l"+this.getError()+"

"),!1;var e=this.getDrawCommandObject();e.raw&&(this.options=_.merge(this.options,e.raw)),this.isDark(),console.info("preProcessor",this.init,this.options)}},{key:"loadGoogleMapJS",value:function(e){if(window._sendGoogleMapLoad)return void this.afterLoadMapProcessor();window._sendGoogleMapLoad=!0,window._isGoogleMapLoaded=!1,console.info("YA_MAP>Start load map : api-maps.yandex.ru");var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCRQH39oyrPnfPPgADuOp0eSRsDHRUMyyY",t.charset="utf-8",t.onload=t.onreadystatechange=function(){t.readyState&&"complete"!==t.readyState&&"loaded"!==t.readyState||(t.onload=t.onreadystatechange=null,e.afterLoadMapProcessor(),window._isGoogleMapLoaded=!0)};var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a)}},{key:"getDarkStyle",value:function(){return[{featureType:"all",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{color:"#000000"},{lightness:13}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#144b53"},{lightness:14},{weight:1.4}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#08304b"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#0c4152"},{lightness:5}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#0b434f"},{lightness:25}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#0b3d51"},{lightness:16}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"transit",elementType:"all",stylers:[{color:"#146474"}]},{featureType:"water",elementType:"all",stylers:[{color:"#021019"}]}]}},{key:"getLightStyle",value:function(){return[{featureType:"landscape",stylers:[{hue:"#FFBB00"},{saturation:43.400000000000006},{lightness:37.599999999999994},{gamma:1}]},{featureType:"road.highway",stylers:[{hue:"#FFC200"},{saturation:-61.8},{lightness:45.599999999999994},{gamma:1}]},{featureType:"road.arterial",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:51.19999999999999},{gamma:1}]},{featureType:"road.local",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:52},{gamma:1}]},{featureType:"water",stylers:[{hue:"#0078FF"},{saturation:-13.200000000000003},{lightness:2.4000000000000057},{gamma:1}]},{featureType:"poi",stylers:[{hue:"#00FF6A"},{saturation:-1.0989010989011234},{lightness:11.200000000000017},{gamma:1}]}]}},{key:"create",value:function(){console.warn("CREATE"),this._map=new google.maps.Map(this.widget.element[0],this.mapOptions);var e=this.getLightStyle();this.isDark()&&(e=this.getDarkStyle()),this._map.setOptions({styles:e});var t=this,a=this.getDrawCommandObject(),n={longitude:"longitude",latitude:"latitude",count:"count",title:"title"},i=new google.maps.LatLngBounds,r=0;a&&(n=Object.assign(n,a)),this.data().forEach(function(e,a){var s=parseInt(e[n.count]);s>r&&(r=s);var o={lat:e[n.latitude],lng:e[n.longitude]},l=!1;e[n.title]&&(l=new google.maps.InfoWindow({content:'
'+e[n.title]+"
"})),i.extend(o);var c=new google.maps.Marker({position:o,map:t._map,title:"Value:"+s});l&&c.addListener("click",function(){l.open(this._map,c)})}),this._map.fitBounds(i),this._map.panToBounds(i)}}]),t}(DrawBasicChart),DrawEcharts=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.help="",n.type=a.toUpperCase(),n.library="echarts",n.preference={gridchart:!1,bar:!1},n.options={version:3,textStyle:{fontFamily:"Menlo"},toolbox:{show:!0,feature:{dataZoom:{yAxisIndex:"none",title:"data Zoom"},dataView:{readOnly:!1,title:"data View"},magicType:{type:["line","bar","stack","tiled"],title:{line:"line",bar:"bar",stack:"stack",tiled:"tiled"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image"}}}},n}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){console.log("onResize Chart"),this.chart&&this.init&&this.chart.resize()}},{key:"preProcessor",value:function(){if(this.initChartByJsCode())this.init=!0;else try{this.init=this.create()}catch(e){this.setError(this.getError()+"\n\n\n"+e.name+":"+e.message+"\n"+e.stack)}if(this.getError())return console.error(this.getError()),!1;var t=this.getDrawCommandObject();if(t.raw&&(this.options=_.merge(this.options,t.raw)),this.isDark()&&(this.options.backgroundColor="#404a59",this.options.textStyle={color:"rgba(255, 255, 255, 0.3)"},this.options.lineStyle={color:"rgba(255, 255, 255, 0.3)"}),_.isArray(this.options.series)&&_.isObject(this.options.series[0])){if(_.isObject(t))if(_.isArray(t.series))for(var a=0;a<=t.series.length;a++)_.isObject(this.options.series[a])&&(this.options.series[a]=_.merge(this.options.series[a],t.series[a]));else this.options.series[0]=_.merge(this.options.series[0],t);this.isDark()&&_.set(this.options.series[0],"label.normal.textStyle.color","white")}this.chart.setOption(this.options),console.info("preProcessor",this.init,this.options)}},{key:"getParameterPath",value:function(){var e=this.getDrawCommandObject(),t={path:""};e&&(t=Object.assign(t,e));var a="";if(_.isString(e)?a=e:t.path&&(a=t.path),!a)return!1;for(var n=_.split(a,"."),i=0;is;s+=1){var o=this.getColumns(s);if(!i&&this.isNumericColumn(o)){i=o;break}}t.date=n,t.value=i}if(!this.haveColumn(t.date)||!this.haveColumn(t.value))return this.setError("Not set date | value cols"),!1;var l=0,c=Number.MAX_VALUE,d=_.map(this.data(),function(e){var a=parseFloat(e[t.value]);return a&&a>l&&(l=a),a&&c>a&&(c=a),[e[t.date],a]});d=_.groupBy(d,function(e){var t=(""+e[0]).substring(0,4);return t});var u={tooltip:{position:"top"},calendar:[],series:[],visualMap:{min:c,max:l,calculable:!0,orient:"horizontal",left:"center",top:"top"}},m=60,h=0;return _.forEach(d,function(e,t){u.calendar.push({top:m,range:t,right:0,cellSize:["auto",20]}),u.series.push({type:"heatmap",coordinateSystem:"calendar",data:e,calendarIndex:h}),h+=1,m+=200}),this.options=Object.assign(u,this.options),!0}}]),t}(DrawEcharts),DrawEchartsTreemap=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"getSerieSettings",value:function(e){var t=echarts.format;return{tooltip:{formatter:function(a){var n=a.value,i=[],r=a.treePathInfo;if(_.isArray(r))for(var s=1;s'+t.encodeHTML(i.join("."))+"",e.tooltip+" : "+numbro(n).format(o)].join("")}},itemStyle:{normal:{borderColor:"#fff"}},type:"treemap"}}},{key:"getLevelOption",value:function(){return[{itemStyle:{normal:{borderWidth:0,gapWidth:5}}},{itemStyle:{normal:{gapWidth:1}}},{colorSaturation:[.35,.5],itemStyle:{normal:{gapWidth:1,borderColorSaturation:.6}}}]}},{key:"buildTreeData",value:function(e,t){var a=[],n=this;return _.forEach(e,function(e,i){var r=t[i],s={};if(s.value=r.__value,_.isObject(e)){var o=n.buildTreeData(e,r);_.isArray(o)&&o.length&&(s.children=o)}s.name=i,a.push(s)}),a}},{key:"create",value:function(){var e=this.getDrawCommandObject(),t={path:"",title:"TreeMap",tooltip:"Usage",valueformat:!1};e&&(t=Object.assign(t,e));var a="";t.path&&(a=t.path),_.isString(e)&&(a=e);var n=_.split(a,"."),i=n.length;if(!i)return this.setError("Not set path"),!1;for(var r=0;i>r;r+=1)if(!this.haveColumn(n[r]))return this.setError("bad path, no column:"+n[r]),!1;if(!this.isNumericColumn(n[i-1]))return this.setError("bad column:"+n[i-1]+" must be number"),!1;var s={},o={};this.data().forEach(function(e){for(var t=e[n[i-1]],a=[],r=0;i-1>r;r+=1){a.push(e[n[r]]);var l=_.get(s,a.join("_"),0);_.set(s,a.join(".")+".__value",parseFloat(l)+parseFloat(t))}_.set(o,a.join("."),t)});var l=this.buildTreeData(o,s),c={tooltip:{trigger:"item"}};return c.series=[{name:t.title,label:{show:!0,formatter:"{b}"},levels:this.getLevelOption(),data:l}],this.options=Object.assign(c,this.options),this.options.series[0]=Object.assign(this.getSerieSettings(t),this.options.series[0]),!0}}]),t}(DrawEcharts),DrawEchartsSunkeys=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments)); -}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){this.helpLink="https://tabix.io/doc/draw/Draw_Sankeys/",this.help="Default config : {path:''} or {value:'',source:'',target:''}, if empty path or not set, try auto create path, then find columns [String] : [Integer|Float] : [String] ";var e=this.getDrawCommandObject(),t={path:"",value:"value",source:"source",target:"target"};e&&(t=Object.assign(t,e));var a="";_.isString(e)?a=e:t.path?a=t.path:this.haveColumn(t.source)&&this.haveColumn(t.value)&&this.haveColumn(t.target)&&(a=t.source+"."+t.value+"."+t.target);var n=[];if(a)n=_.split(a,".");else{var i=!1,r=this.getColumns();for(var s in r){var o=r[s];this.isNumericColumn(o)&&i&&(n.push(o),i=!1),this.isStringColumn(o)&&!i&&(n.push(o),i=!0)}}if(console.log("patharr>",n),!n.length)return this.setError("The value of the variable 'path' - empty"),!1;if(!(1&n.length))return this.setError("The value of the variable 'path' must be odd"),!1;var l=[],c=[];this.data().forEach(function(e){for(var t=0;ta&&(a=s),e[t.destination.longitude]&&e[t.destination.latitude]){var o="";e[t.destination.name]&&(o=e[t.destination.name]),i.push({fromName:e[t.name],toName:o,coords:[[e[t.longitude],e[t.latitude]],[e[t.destination.longitude],e[t.destination.latitude]]]})}n.push({name:e[t.name],value:[e[t.longitude],e[t.latitude],s],label:{emphasis:{position:"right",show:!0}}})});var r=[{name:t.title,type:"effectScatter",coordinateSystem:"geo",data:n,showEffectOn:"render",rippleEffect:{brushType:"stroke"},symbolSize:function(e){return a?e[2]/a*15:e[2]/1e4},hoverAnimation:!0,label:{normal:{formatter:"{b}",position:"right",show:!0}},itemStyle:{normal:{color:"#f4e925",shadowBlur:10,shadowColor:"#333"}},zlevel:1}];if(i.length>0){var s="path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z";r.push({name:t.title,type:"lines",zlevel:1,effect:{show:!0,period:6,trailLength:.7,color:"#fff",symbolSize:3},lineStyle:{normal:{width:0,curveness:.2}},data:i}),r.push({name:t.title,type:"lines",zlevel:2,symbol:["none","arrow"],symbolSize:10,effect:{show:!0,period:6,trailLength:0,symbol:s,symbolSize:15},lineStyle:{normal:{width:1,opacity:.6,curveness:.2}},data:i})}var o={tooltip:{trigger:"item"},geo:{name:t.title,type:"map",map:"world",label:{emphasis:{show:!1}},visualMap:{show:!0,min:0,max:100,inRange:{symbolSize:[6,60]}},roam:!0,itemStyle:{normal:{areaColor:"#323c48",borderColor:"#404a59"},emphasis:{areaColor:"#2a333d"}}},series:r};return this.options=Object.assign(this.options,o),!0}}]),t}(DrawEcharts),DrawEchartsHeatmap=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){var e=this.getParameterPath();if(!e)return this.setError("Not set path"),!1;var t={},a={},n={};this.data().forEach(function(i){_.set(t,i[e[0]],1),_.set(a,i[e[1]],1),_.set(n,i[e[0]]+"."+i[e[1]],parseFloat(i[e[2]]))});var i=[],r=_.keys(t),s=_.keys(a),o=0,l=0;_.mapKeys(t,function(e,t){_.mapKeys(a,function(e,a){var r=_.get(n,t+"."+a,"-");o>r&&(o=r),r>l&&(l=r),i.push([t,a,r])})});var c={tooltip:{position:"top"},animation:!1,grid:{height:"50%",y:"10%"},xAxis:{type:"category",data:r,splitArea:{show:!0}},yAxis:{type:"category",data:s,splitArea:{show:!0}},visualMap:{min:o,max:l,calculable:!0,orient:"horizontal",left:"center",bottom:"15%"},series:[{name:"Punch Card",type:"heatmap",data:i,label:{normal:{show:!0}},itemStyle:{emphasis:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};return this.options=Object.assign(c,this.options),!0}}]),t}(DrawEcharts),DrawEchartsGraph=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){this.helpLink="https://tabix.io/doc/draw/Draw_Graph/",this.help="Default config : {path:''} or {value:'',source:'',target:''}, if empty path or not set, try auto create path, then find columns [String] : [Integer|Float] : [String] ";var e=this.getDrawCommandObject(),t={path:"",categories:"categories",name:"name",value:"value",target:"target",targetValue:"",sourceValue:"",layout:"",edgeSymbol:""};e&&(t=Object.assign(t,e));var a="";_.isString(e)?a=e:t.path?a=t.path:this.haveColumn(t.source)&&this.haveColumn(t.value)&&this.haveColumn(t.target)&&(a=t.source+"."+t.value+"."+t.target);var n=[],i=this.haveColumn(t.targetValue),r=this.haveColumn(t.sourceValue);this.haveColumn(t.categories);if(a)n=_.split(a,".");else{var s=!1,o=this.getColumns();for(var l in o){var c=o[l];this.isNumericColumn(c)&&s&&(n.push(c),s=!1),this.isStringColumn(c)&&!s&&(n.push(c),s=!0)}}if(console.log("patharr>",n),!n.length)return this.setError("The value of the variable 'path' - empty"),!1;if(!(1&n.length))return this.setError("The value of the variable 'path' must be odd"),!1;var d=[],u=[];this.data().forEach(function(e){for(var a=0;a10}}}}else u[e[s]]={symbolSize:1};if(i){var m=e[t.targetValue]/1.5;u[e[l]]={symbolSize:m,label:{normal:{show:m>10}}}}else u[e[l]]={symbolSize:1};d.push({source:e[s],target:e[l],value:e[o]})}});var m=[];for(var h in u)m.push(_.merge({name:h},u[h]));console.log("result_nodes",m);var p={tooltip:{trigger:"item",triggerOn:"mousemove"},series:[{type:"graph",layout:"circular",data:m,circular:{rotateLabel:!0},animationThreshold:300,animationDuration:300,links:d,itemStyle:{normal:{borderWidth:1,borderColor:"#aaa"}},roam:!0,label:{normal:{position:"right",formatter:"{b}"}},lineStyle:{normal:{color:"source",curveness:.3}}}]};return p=Object.assign(p,this.options),this.options=p,!0}}]),t}(DrawEcharts),DrawEchartsFlatTree=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"getSerieSettings",value:function(){return{symbolSize:7,type:"tree",label:{normal:{position:"left",verticalAlign:"middle",align:"right"}},leaves:{label:{color:this.isDark()?"white":"auto",normal:{position:"right",verticalAlign:"middle",align:"left"}}},expandAndCollapse:!0}}}]),t}(DrawEchartsTreemap),DrawEchartsChart=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){console.log("DrawEchartsChart");var e=this.getDrawCommandObject(),t=this.preCreate(e),a=this.createChart(e),n={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0}};return e.title&&this.applyTitle(e.title),this.applyDataZoom(),this.applyLegend(),this.options=Object.assign(a,this.options,n,t),this.postCreate(e),!0}},{key:"postCreate",value:function(e){return{}}},{key:"preCreate",value:function(e){return{}}},{key:"createChart",value:function(e){var t=this,a={autoAxis:!1,markLine:!0,stack:!1,path:!1,sort:!0,xAxis:!1,yAxis:!1};e&&(a=Object.assign(a,e));var n={},i=this.getColumns(),r=this.getFirstColumn(),s=r,o=this.findDateTimeAxis(),l={},c=[],d=[],u=[],m={},h=this.data();if(o&&(r=o),a.xAxis){if(!this.haveColumn(a.xAxis))throw"xAxis column not exists";s=a.xAxis}else a.sort&&(h=_.sortBy(h,r)),s=r;if(d=[{name:s,type:"category",data:[]}],a.yAxis)if(_.isString(a.yAxis)){if(!this.haveColumn(a.yAxis))throw"yAxis column not exists";n[a.yAxis]=1}else{if(!_.isArray(a.yAxis))throw"yAxis column must string or array";var p=void 0;for(p=0;pk&&!w?(_.isArray(y)||(y=[]),y.push(S),k++):this.isNumericColumn(S)&&x.push(S))}var A=h.length;for(console.log("DATA LEN",A,h),v=0;A>v;++v){var D=h[v];d[0].data.push(D[d[0].name])}for(d[0].data=_.uniq(d[0].data),console.log("xAxis[0].data.",d[0].data),v=0;A>v;++v){var E=h[v],R=function(e){var a=i[e],r=[s],o=!1;if(_.size(n)&&(o=_.isUndefined(n[a])),a!==s&&!o&&t.isNumericColumn(a)&&_.findIndex(y,a)<0){if(y)for(var l=0;l1){var P=_.groupBy(b,function(e){return Math.floor(e.median/1e3)});if(_.size(P)>1){var q=function(e){var t=P[e],n=_.map(t,"column").join(",");_.forEach(t,function(e){u[e.index].yAxisIndex=c.length,a.stack&&(u[e.index].stack=n,u[e.index].areaStyle={normal:{}})}),c.push({name:n,type:"value"})};for(var N in P)q(N)}}return c.length||(c=[{name:f,type:"value"}]),l.series=u,l.yAxis=c,l.xAxis=d,console.info("Make Chart Done : Options",l),l}}]),t}(DrawEcharts),DrawEchartsGridChart=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"preCreate",value:function(e){return this.preference.gridchart=!0,{}}},{key:"postCreate",value:function(e){var t=[],a=[],n=[],i=[],r=0;console.info("postCreate!!!!!!",this.options);var s=[],o=this.options.xAxis[0],l=this.options.yAxis[0];for(var c in this.options.series){c=parseInt(c);var d=this.options.series[c].name;this.options.series[c].xAxisIndex=c,this.options.series[c].yAxisIndex=r,console.log(d,this.options.series[c]),o.show=!1,o.gridIndex=c,l.gridIndex=c,l.show=!1,l.name=d,t.push({show:!0,borderWidth:0,shadowBlur:2}),n.push(_.clone(o)),a.push(_.clone(l)),i.push({textAlign:"center",text:d,textStyle:{fontSize:11,fontWeight:"normal"}}),s.push(c),r+=1}var u=Math.ceil(Math.sqrt(r));t.forEach(function(e,t){e.left=t%u/u*100+.5+"%",e.top=Math.floor(t/u)/u*100+.5+"%",e.width=1/u*100-1+"%",e.height=1/u*100-1+"%",i[t].left=parseFloat(e.left)+parseFloat(e.width)/2+"%",i[t].top=parseFloat(e.top)+"%"}),this.options.dataZoom&&this.options.dataZoom[0]&&(this.options.dataZoom[0].xAxisIndex=s),this.options.titles=i,this.options.grid=t,this.options.xAxis=n,this.options.yAxis=a}}]),t}(DrawEchartsChart),DrawEchartsBar=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"preCreate",value:function(e){return this.preference.bar=!0,{}}}]),t}(DrawEchartsChart),DrawD3=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="d3",a}return _inherits(t,e),t}(DrawBasicChart),DrawC3=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="c3",a.bindto=!1,a}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this.chart&&this.init}},{key:"preProcessor",value:function(){return console.log("preProcessor>c3.generate"),this.initChartByJsCode()?(console.log("c3.options>",this.options),this.bindto.className+=" c3",console.log("this.bindto.className",this.bindto.className),this.options.bindto=this.bindto,console.log("c3.options>",this.options),void(this.chart=c3.generate(this.options))):(console.error("C3.Init by code"),!1)}}]),t}(DrawBasicChart),DrawAMcharts=function(e){function t(e){_classCallCheck(this,t),console.warn("DrawAMcharts constructor");var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="amchart",a}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this.makeLegend()}},{key:"preProcessor",value:function(){this.createChart()&&(this.init=!0),console.log("!preProcessor,done",this.init,this.options)}},{key:"createChart",value:function(){var e=this,t={},a=this.widget.data.meta,n=!1,i="",r="mm",s=[],o=0,l=[];a.forEach(function(a){if("DateTime"==a.type)n="YYYY-MM-DD JJ:NN:SS",i=a.name;else if("Date"==a.type)n="YYYY-MM-DD",r="DD",i=a.name;else{if(!i)return void(i=a.name);o+=1;var c=e.getChartGraph(a,t[a.name]);c.id="g"+o,"v1"!==c.valueAxis&&l.push(c.valueAxis),s.push(c)}});var c={theme:Widget.isDark?"dark":"light",color:Widget.isDark?"#eee":"#333",type:"serial",categoryField:i,valueAxes:[{id:"v1",axisAlpha:1,gridAlpha:.07,axisColor:Widget.isDark?"#eee":"#333",gridColor:Widget.isDark?"#eee":"#333",ignoreAxisWidth:!0}],balloon:{borderThickness:1,shadowAlpha:0},graphs:s,chartCursor:{valueLineEnabled:!0,valueLineBalloonEnabled:!0,cursorAlpha:0,zoomable:!1,valueZoomable:!0,valueLineAlpha:.5},chartScrollbar:{graph:"g1",gridAlpha:0,color:"#888888",scrollbarHeight:25,backgroundAlpha:0,selectedBackgroundAlpha:.1,selectedBackgroundColor:"#888888",graphFillAlpha:0,autoGridCount:!0,selectedGraphFillAlpha:0,graphLineAlpha:.2,graphLineColor:"#c2c2c2",selectedGraphLineColor:"#888888",selectedGraphLineAlpha:1},categoryAxis:{dashLength:1,minorGridEnabled:!0,axisColor:Widget.isDark?"#eee":"#333",gridColor:Widget.isDark?"#eee":"#333"},data:this.widget.data.data};if(c.categoryAxis.parseDates=!1,n&&(c.dataDateFormat=n,c.categoryAxis.parseDates=!0,c.categoryAxis.minPeriod=r),l){var d=0;l.forEach(function(e){d++;var t={id:e,axisAlpha:1,axisThickness:1,position:"right",ignoreAxisWidth:!0,offset:1*d};c.valueAxes.push(t)})}return this.options=c,this.init=!0,this.makeLegend(),!0}},{key:"makeLegend",value:function(){console.log("this.widget.sizeY",this.widget.sizeY),this.widget.sizeY<2?delete this.options.legend:this.options.legend={align:"center",equalWidths:!1,periodValueText:"total: [[value.sum]]",valueAlign:"left",valueText:"[[value]] ([[percents]]%)",valueWidth:100},console.warn(this.options)}},{key:"getChartGraph",value:function(e,t){var a=e.name,n=e.name,i="v1";a=a.replace(/_axis\d+/gm,"");var r=/.*_axis(\d+).*/i,s=n.match(r);s&&s[1]&&(i="v"+s[1]);var o={id:"g1",valueAxis:i,fillAlphas:.2,bullet:"round",bulletSize:8,hideBulletsCount:50,lineThickness:1,title:a,useLineColorForBulletBorder:!0,valueField:n,type:"smoothedLine",balloonText:"[[title]] [[category]]
[[value]]"};return t||(t={}),Object.assign(o,t)}}]),t}(DrawBasicChart),DataProvider=function(){function e(t,a){if(_classCallCheck(this,e),t.totals&&t.data&&t.data.push(t.totals),this._humanSortCols=[],this._sortBy=!1,this._sortOrder=!1,this.data=t.data,this.text=!1,this.progressQuery="",this.sort=!1,this.sortOrder=!1,t.error||angular.isObject(t.data)||(angular.isString(t.data)?this.text=t.data:this.text=angular.toJson(t.data,!0),this.text=this.text.replace(/&/g,"&").replace(//g,">")),a||(a="ch"),this.sourceType=a,this.meta=t.meta,this.prepareInt64Cols={},this.data){try{this.prepareInt64()}catch(n){console.error("Error in prepareInt64",n)}_.isObject(this.meta)&&(this.meta.prepareInt64Cols=this.prepareInt64Cols)}t.query?this.query=t.query:this.query={index:0,drawCommands:!1},t.error?(this.error=t.error.replace("
","\n").replace(/&/g,"&").replace(//g,">"),this.error=this.error.replace("\\n","
")):this.error=!1,this.draw=this.query.drawCommands,this.rows=t.rows,this.position=this.query.index,this.countAll=t.countAllQuery}return e.$inject=["result","sourceType"],_createClass(e,[{key:"prepareInt64",value:function(){var e=this,t=[];return _.isArray(this.data)&&this.data.length>1?(this.prepareInt64Cols={},this.meta.forEach(function(a){if(a.type.includes("Int64")&&!a.type.includes("Array(")){var n=0;try{n=_.maxBy(e.data,function(e){return _.isEmpty(e[a.name])?void 0:parseInt(e[a.name])})[a.name]}catch(i){console.error("prepareInt64,maxBy",i,"in cell",a,"meta",e.meta)}var r=parseInt(n);r0?void(this.data=_.map(this.data,function(e){return t.forEach(function(t){e[t]=parseInt(e[t])}),e})):!1):!1}},{key:"isNormalInt64Col",value:function(e){return this.prepareInt64Cols[e]}},{key:"isText",value:function(){return this.text?!0:!1}},{key:"isError",value:function(){return this.error?!0:!1}},{key:"getError",value:function(){return this.error}},{key:"update",value:function(e){this.data=e}},{key:"data",value:function(){return this.data}},{key:"getData",value:function(){return this.data}},{key:"meta",value:function(){return this.meta}},{key:"toString",value:function(){return"("+this.name+", "+this.y+")"}},{key:"getColumnsHumanSort",value:function(){return this._humanSortCols}},{key:"setColumnsHumanSort",value:function(e){this._humanSortCols=e}},{key:"setSort",value:function(e,t){this._sortBy=e,this._sortOrder=t,_.isNumber(t)&&(this._sortOrder=parseInt(t)<0?!1:!0)}},{key:"sortByColl",value:function(){return this._sortBy}},{key:"sortOrderBy",value:function(){return this._sortOrder}}],[{key:"convertArrayToDataProvider",value:function(t,a){var n={};return n.data=t,n.meta=[],n.error=!1,n.query={drawCommands:!1},n.rows=t.length,n.position=0,n.countAll=0,Object.keys(t[0]).map(function(e){return n.meta.push({name:e,type:"string"})}),new e(n,a)}}]),e}();angular.module(smi2.app.name).service("DataProvider",DataProvider),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(e){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");return{restrict:"EA",scope:{onChange:"=?",load:"=?"},link:function(e,t,a){var n=window.ace.edit(t[0]);e.load(n),e.onChange&&(console.warn("Ace+bind:scope.onChange"),n.session.on("change",function(t){e.onChange(n.session)})),t.on("$destroy",function(){n.session.$stopWorker(),n.destroy()}),e.$watch(function(){return[t[0].offsetWidth,t[0].offsetHeight]},function(){n.resize(),n.renderer.updateFull()},!0)}}}]),/* - * Copyright (c) 2017. Smi2 - */ -angular.module(smi2.app.name).directive("pivot",[function(){return{restrict:"AE",scope:{data:"=",config:"=",editMode:"="},link:function(e,t,a){var n=$.extend($.pivotUtilities.renderers);null==e.config&&(e.config={rows:[],cols:[]}),e.renderPivotTable=function(){$(t).pivot(e.data,{renderers:n,rendererName:"Table",cols:e.config.cols,rows:e.config.rows,onRefresh:function(t){var a=JSON.parse(JSON.stringify(t));delete a.aggregators,delete a.renderers,delete a.derivedAttributes,delete a.rendererOptions,delete a.localeStrings,e.config=a,e.$apply()}})},e.renderPivotUITable=function(){$(t).pivotUI(e.data)},e.$watch("scope.editMode",function(t,a){console.log("watch"+e.editMode),t&&(e.editMode?e.renderPivotUITable():e.renderPivotTable())},!0),e.renderPivotUITable()}}}]),/** - * ng-handsontable 0.13.0 - * - * Copyright 2012-2015 Marcin Warpechowski - * Copyright 2015 Handsoncode sp. z o.o. - * Licensed under the MIT license. - * https://github.com/handsontable/ngHandsontable - * Date: Wed Oct 26 2016 10:00:05 GMT+0200 (CEST) -*/ -document.all&&!document.addEventListener&&(document.createElement("hot-table"),document.createElement("hot-column"),document.createElement("hot-autocomplete")),angular.module("ngHandsontable.services",[]),angular.module("ngHandsontable.directives",[]),angular.module("ngHandsontable",["ngHandsontable.services","ngHandsontable.directives"]),Handsontable.hooks.add("afterContextMenuShow",function(){Handsontable.EventManager.isHotTableEnv=!1}),function(){function e(e){return{parseAutoComplete:function(t,a,n){t.source=function(i,r){var s=this.instance.getSelected()[0],o=[],l=a[s];if(l){var c=t.optionList;if(c&&c.object){if(angular.isArray(c.object))o=c.object;else{var d=e(c.object)(l);if(angular.isArray(d))if(n)for(var u=0,m=d.length;m>u;u++){var h=d[u][c.property];null!==h&&void 0!==h&&o.push(h)}else o=d;else o=d}r(o)}}}}}}e.$inject=["$parse"],angular.module("ngHandsontable.services").factory("autoCompleteFactory",e)}(),function(){function e(){var e={};return{getInstance:function(t){return e[t]},registerInstance:function(t,a){e[t]=a},removeInstance:function(t){e[t]=void 0}}}e.$inject=[],angular.module("ngHandsontable.services").factory("hotRegisterer",e)}(),function(){function e(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.charAt(0).toLowerCase()})}function t(e){return e.substr(0,1).toUpperCase()+e.substr(1,e.length-1)}function a(a){return{containerClassName:"handsontable-container",initializeHandsontable:function(e,t){var n,i=document.createElement("div");return i.className=this.containerClassName,t.hotId&&(i.id=t.hotId),e[0].appendChild(i),n=new Handsontable(i,t),t.hotId&&a.registerInstance(t.hotId,n),n},updateHandsontableSettings:function(e,t){e&&e.updateSettings(t)},renderHandsontable:function(e){e&&e.render()},mergeSettingsFromScope:function(e,t){var a,n,i,r=angular.extend({},t);for(e=e||{},angular.extend(r,t.settings||{}),a=this.getAvailableSettings(),n=0,i=a.length;i>n;n++)"undefined"!=typeof r[a[n]]&&(e[a[n]]=r[a[n]]);return e},mergeHooksFromScope:function(e,a){var n,i,r,s,o=angular.extend({},a);for(e=e||{},angular.extend(o,a.settings||{}),n=this.getAvailableHooks(),i=0,r=n.length;r>i;i++)s="on"+t(n[i]),("function"==typeof o[n[i]]||"function"==typeof o[s])&&(e[n[i]]=o[n[i]]||o[s]);return e},trimScopeDefinitionAccordingToAttrs:function(e,t){for(var a in e)e.hasOwnProperty(a)&&void 0===t[a]&&void 0===t[e[a].substr(1,e[a].length)]&&delete e[a];return e},getTableScopeDefinition:function(){var e={};return this.applyAvailableSettingsScopeDef(e),this.applyAvailableHooksScopeDef(e),e.datarows="=",e.dataschema="=",e.observeDomVisibility="=",e},getColumnScopeDefinition:function(){var e={};return this.applyAvailableSettingsScopeDef(e),e.data="@",e},applyAvailableSettingsScopeDef:function(e){var t,a,n;for(t=this.getAvailableSettings(),a=0,n=t.length;n>a;a++)e[t[a]]="=";return e},applyAvailableHooksScopeDef:function(e){var a,n,i;for(a=this.getAvailableHooks(),n=0,i=a.length;i>n;n++)e[a[n]]="=on"+t(a[n]);return e},getAvailableSettings:function(t){var a=Object.keys(Handsontable.DefaultSettings.prototype);return-1===a.indexOf("contextMenuCopyPaste")&&a.push("contextMenuCopyPaste"),-1===a.indexOf("handsontable")&&a.push("handsontable"),a.indexOf("settings")>=0&&a.splice(a.indexOf("settings"),1),t&&(a=a.map(e)),a},getAvailableHooks:function(t){var a=Handsontable.hooks.getRegistered();return t&&(a=a.map(function(t){return"on-"+e(t)})),a}}}a.$inject=["hotRegisterer"],angular.module("ngHandsontable.services").factory("settingFactory",a)}(),function(){function e(){return{restrict:"EA",scope:!0,require:"^hotColumn",link:function(e,t,a,n){var i=a.datarows;n.setColumnOptionList(i)}}}e.$inject=[],angular.module("ngHandsontable.directives").directive("hotAutocomplete",e)}(),function(){function e(e){return{restrict:"EA",require:"^hotTable",scope:{},controller:["$scope",function(e){this.setColumnOptionList=function(t){e.column||(e.column={});var a={},n=t.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);n?(a.property=n[1],a.object=n[2]):a.object=t.split(","),e.column.optionList=a}}],compile:function(t,a){var n=this;return this.scope=e.trimScopeDefinitionAccordingToAttrs(e.getColumnScopeDefinition(),a),angular.forEach(Object.keys(this.scope),function(e){n.$$isolateBindings[e]={attrName:e,collection:!1,mode:"data"===e?"@":"=",optional:!1}}),function(t,a,n,i){var r={};angular.forEach(Object.keys(n),function(e){"$"!==e.charAt(0)&&""===n[e]&&(r[e]=!0)}),e.mergeSettingsFromScope(r,t),t.column||(t.column={}),angular.extend(t.column,r),i.setColumnSetting(t.column),t.$on("$destroy",function(){i.removeColumnSetting(t.column)})}}}}e.$inject=["settingFactory"],angular.module("ngHandsontable.directives").directive("hotColumn",e)}(),function(){function e(e,t,a,n){return{restrict:"EA",scope:{},priority:-400,controller:["$scope",function(t){this.setColumnSetting=function(a){t.htSettings||(t.htSettings={}),t.htSettings.columns||(t.htSettings.columns=[]),t.htSettings.columns.push(a),e.updateHandsontableSettings(t.hotInstance,t.htSettings)},this.removeColumnSetting=function(a){t.htSettings.columns.indexOf(a)>-1&&(t.htSettings.columns.splice(t.htSettings.columns.indexOf(a),1),e.updateHandsontableSettings(t.hotInstance,t.htSettings))}}],compile:function(i,r){var s,o=this;return this.scope=e.trimScopeDefinitionAccordingToAttrs(e.getTableScopeDefinition(),r),s=Object.keys(this.scope),angular.forEach(s,function(e){var t=o.scope[e].charAt(0);o.$$isolateBindings[e]={attrName:o.scope[e].length>1?o.scope[e].substr(1,o.scope[e].length):e,collection:"datarows"===e,mode:t,optional:!1}}),function(i,r,o){if(i.settings=n(o.settings)(i.$parent),i.htSettings||(i.htSettings={}),angular.forEach(Object.keys(o),function(e){"$"!==e.charAt(0)&&""===o[e]&&(i.htSettings[e]=!0)}),e.mergeSettingsFromScope(i.htSettings,i),e.mergeHooksFromScope(i.htSettings,i),i.htSettings.data||(i.htSettings.data=i.datarows),i.htSettings.dataSchema=i.dataschema,i.htSettings.hotId=o.hotId,i.htSettings.observeDOMVisibility=i.observeDomVisibility,i.htSettings.columns)for(var l=0,c=i.htSettings.columns.length;c>l;l++){var d=i.htSettings.columns[l];if("autocomplete"===d.type&&d.optionList){if("string"==typeof d.optionList){var u={},m=d.optionList.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);m?(u.property=m[1],u.object=m[2]):u.object=u,d.optionList=u}t.parseAutoComplete(d,i.datarows,!0)}}var h=i.htSettings.afterChange;i.htSettings.afterChange=function(){h&&h.apply(this,arguments),a.$$phase||i.$apply()},i.hotInstance=e.initializeHandsontable(r,i.htSettings),angular.forEach(s,function(t){i.$watch(t,function(a,n){void 0!==a&&("datarows"===t?i.hotInstance.getSettings().data===a?e.renderHandsontable(i.hotInstance):(i.hotInstance.loadData(a),i.htSettings.data=a):a!==n&&(i.htSettings[t]=a,e.updateHandsontableSettings(i.hotInstance,i.htSettings)))},["datarows","columns","rowHeights","colWidths","rowHeaders","colHeaders"].indexOf(t)>=0)})}}}}e.$inject=["settingFactory","autoCompleteFactory","$rootScope","$parse"],angular.module("ngHandsontable.directives").directive("hotTable",e),angular.module("ngHandsontable.directives").directive("hotAutoDestroy",["hotRegisterer",function(e){return{restrict:"A",link:function(t,a,n){a.on("$destroy",function(){try{var t=e.getInstance(n.hotId);t?(console.info("hotInstance.destroy();"),t.destroy()):console.log("Failed to destroy hot-instance")}catch(a){console.log(a)}})}}}])}(),function(e,t){function a(e){return function(t,a,n){var i=e(n.ngRightClick);a.bind("contextmenu",function(e){t.$apply(function(){e.preventDefault(),i(t,{$event:e})})})}}e.module(t.app.name).directive("ngRightClick",a),a.$inject=["$parse"]}(angular,smi2),function(e,t){function a(){return{restrict:"A",require:"mdMenu",link:function(t,a,n,i){t.$mdOpenMousepointMenu=function(t){var a=e.element(t.currentTarget).offset();i.offsets=function(){return{left:t.pageX-a.left,top:t.pageY-a.top+8}},i.open(t)}}}}e.module(t.app.name).directive("mousepointMenu",a)}(angular,smi2),/** - * gridstack-angular - Angular Gridstack.js directive - * @version v0.6.0-dev - * @author Kevin Dietrich - * @link https://github.com/kdietrich/gridstack-angular#readme - * @license MIT - */ -function(){angular.module("gridstack-angular",[]);var e=angular.module("gridstack-angular");e.controller("GridstackController",["$scope",function(e){var t=this;e.$watch("staticGrid",function(e,a){e=!e,e?t.gridstackHandler.enable():t.gridstackHandler.disable(),t.gridstackHandler.commit()},!0),this.init=function(e,a){return t.gridstackHandler=e.gridstack(a).data("gridstack"),t.gridstackHandler},this.removeItem=function(e){return t.gridstackHandler?t.gridstackHandler.removeWidget(e,!1):null},this.addItem=function(e){return t.gridstackHandler?(t.gridstackHandler.makeWidget(e),e):null}}])}(),function(){var e=angular.module("gridstack-angular");e.directive("gridstack",["$timeout",function(e){return{restrict:"A",controller:"GridstackController",controllerAs:"$gridstack",bindToController:{onChange:"&",onDragStart:"&",onDragStop:"&",onResizeStart:"&",onResizeStop:"&",gridstackHandler:"=?",options:"=",staticGrid:"="},link:function(t,a,n,i,r){i.init(a,i.options),a.on("change",function(a,n){e(function(){t.$apply(),i.onChange({event:a,items:n})})}),a.on("dragstart",function(e,t){i.onDragStart({event:e,ui:t})}),a.on("dragstop",function(a,n){e(function(){t.$apply(),i.onDragStop({event:a,ui:n})})}),a.on("resizestart",function(e,t){i.onResizeStart({event:e,ui:t})}),a.on("resizestop",function(a,n){e(function(){t.$apply(),i.onResizeStop({event:a,ui:n})})})}}}])}(),function(){var e=angular.module("gridstack-angular");e.directive("gridstackItem",["$timeout",function(e){return{restrict:"A",require:"^gridstack",scope:{gridstackItem:"=",onItemAdded:"&",onItemRemoved:"&",gsItemId:"=?",gsItemX:"=",gsItemY:"=",gsItemWidth:"=",gsItemHeight:"=",gsItemAutopos:"="},link:function(t,a,n,i){t.gsItemId&&a.attr("data-gs-id",t.gsItemId),a.attr("data-gs-x",t.gsItemX),a.attr("data-gs-y",t.gsItemY),a.attr("data-gs-width",t.gsItemWidth),a.attr("data-gs-height",t.gsItemHeight),a.attr("data-gs-auto-position",t.gsItemAutopos);var r=(i.addItem(a),a.data("_gridstack_node"));e(function(){t.onItemAdded({item:r})}),t.$watchGroup(["gsItemX","gsItemY","gsItemWidth","gsItemHeight"],function(){(Number(a.attr("data-gs-x"))!==t.gsItemX||Number(a.attr("data-gs-y"))!==t.gsItemY||Number(a.attr("data-gs-width"))!==t.gsItemWidth||Number(a.attr("data-gs-height"))!==t.gsItemHeight)&&i.gridstackHandler.update(a,t.gsItemX,t.gsItemY,t.gsItemWidth,t.gsItemHeight)}),t.$watch(function(){return a.attr("data-gs-id")},function(e){t.gsItemId=e}),t.$watch(function(){return a.attr("data-gs-x")},function(e){t.gsItemX=Number(e)}),t.$watch(function(){return a.attr("data-gs-y")},function(e){t.gsItemY=Number(e)}),t.$watch(function(){return a.attr("data-gs-width")},function(e){t.gsItemWidth=Number(e)}),t.$watch(function(){return a.attr("data-gs-height")},function(e){t.gsItemHeight=Number(e)}),a.bind("$destroy",function(){var e=a.data("_gridstack_node");t.onItemRemoved({item:e}),i.removeItem(a)})}}}])}(),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){function a(t,a,n){var i="";if("echarts"==t.draw.library){var r="macarons";t.isDark&&(r="dark"),t.draw.chart=echarts.init(a[0],r),i=!1}if("plotly"==t.draw.library&&(t.element=e.element('
 
'),i=!1),"c3"==t.draw.library){var s=document.createElement("div");t.draw.bindto=s,a[0].appendChild(s),i=!1}return"text"==t.draw.library&&(t.element=e.element('
 
'),i=!1),"d3"==t.draw.library&&console.info("DW:d3"),"gmaps"==t.draw.library&&(t.element=e.element('
 
'),i=!1),console.group("widget.draw.preProcessor"),console.time("widget.draw.preProcessor time took"),t.draw.preProcessor instanceof Function&&t.draw.preProcessor(),console.timeEnd("widget.draw.preProcessor time took"),console.groupEnd(),i}function n(t,n){return function(i,r,s){i.widget.type;if(console.time("drawWidget.buildLinkFunc"),i.widget.isDark=i.isdark,i.widget.preProcessor instanceof Function&&i.widget.preProcessor(),i.widget.error||i.widget.textformat||i.widget.text||i.widget.empty)return console.log("widget Have Error",i.widget.error),i.widget.error&&r.html("
"+i.widget.error+"
"),i.widget.text&&r.html("
"+i.widget.text+"
"),i.widget.empty&&r.html("NO DATA"),void r.addClass("grid-monospace");if("table"==i.widget.type&&(i.widget.element=e.element('
')),"draw"==i.widget.type){i.widget.element=!1;var o=a(i.widget,r,n);o&&(i.widget.element=e.element(o))}"pivot"==i.widget.type&&(i.widget.element=e.element('')),i.widget.element?(r.append(i.widget.element),t(i.widget.element)(i),i.widget.element.on("$destroy",i.widget.destroy(i.widget))):r.on("$destroy",i.widget.destroy(i.widget)),i.widget.postProcessor instanceof Function&&i.widget.postProcessor(),i.$watch(function(){return[r[0].offsetWidth,r[0].offsetHeight].join("x")},function(e){i.widget.scheduledResize()}),i.events={resize:function(e,t){n(function(){t.widget.scheduledResize()},300)}},n(function(){i.widget.scheduledResize()},300),console.timeEnd("drawWidget.buildLinkFunc")}}e.module(t.app.name).directive("drawWidget",["$compile","$timeout",function(e,t){return{restrict:"EA",template:'
',scope:{widget:"=widget",isdark:"=isdark"},replace:!0,link:n(e,t)}}])}(angular,smi2),angular.module("angularResizable",[]).directive("resizable",function(){function e(e){void 0===t?(t=e,setTimeout(function(){t(),t=void 0},100)):t=e}var t;return{restrict:"AE",scope:{rDirections:"=",rCenteredX:"=",rCenteredY:"=",rWidth:"=",rHeight:"=",rFlex:"=",rGrabber:"@",rDisabled:"@",rNoThrottle:"=",resizable:"@"},link:function(t,a,n){if("false"!==t.resizable){var i="flexBasis"in document.documentElement.style?"flexBasis":"webkitFlexBasis"in document.documentElement.style?"webkitFlexBasis":"msFlexPreferredSize"in document.documentElement.style?"msFlexPreferredSize":"flexBasis";t.$watch("rWidth",function(e){a[0].style[t.rFlex?i:"width"]=e!==!1?e+"px":""}),t.$watch("rHeight",function(e){a[0].style[t.rFlex?i:"height"]=e!==!1?e+"px":""}),a.addClass("resizable");var r,s,o,l,c,d=window.getComputedStyle(a[0],null),u=t.rDirections||["right"],m=t.rCenteredX?2:1,h=t.rCenteredY?2:1,p=t.rGrabber?t.rGrabber:"",g={},b=function(e){g.width=!1,g.height=!1,"x"===c?g.width=parseInt(a[0].style[t.rFlex?i:"width"]):g.height=parseInt(a[0].style[t.rFlex?i:"height"]),g.id=a[0].id,g.evt=e},f=function(e){return e.touches?e.touches[0].clientX:e.clientX},v=function(e){return e.touches?e.touches[0].clientY:e.clientY},y=function(n){function d(){t.$emit("angular-resizable.resizing",g)}var u,p="x"===c?o-f(n):o-v(n);switch(l){case"top":u=t.rFlex?i:"height",a[0].style[u]=s+p*h+"px";break;case"bottom":u=t.rFlex?i:"height",a[0].style[u]=s-p*h+"px";break;case"right":u=t.rFlex?i:"width",a[0].style[u]=r-p*m+"px";break;case"left":u=t.rFlex?i:"width",a[0].style[u]=r+p*m+"px"}b(n),t.rNoThrottle?d():e(d)},w=function C(e){b(),t.$emit("angular-resizable.resizeEnd",g),t.$apply(),document.removeEventListener("mouseup",C,!1),document.removeEventListener("mousemove",y,!1),document.removeEventListener("touchend",C,!1),document.removeEventListener("touchmove",y,!1),a.removeClass("no-transition")},k=function(e){var n={},r=!1,s=!1;n.width=parseInt(a[0].style[t.rFlex?i:"width"]),n.height=parseInt(a[0].style[t.rFlex?i:"height"]),"right"==l&&(n.width>10?(t.preState=n,r=0,s=0):(t.preState&&t.preState.width||(t.preState.width=100),s=t.preState.height,r=t.preState.width)),"bottom"==l&&(n.height>10?(t.preState=n,s=0):(t.preState&&t.preState.height||(t.preState.height=100),s=t.preState.height,r=t.preState.width)),r!==!1&&(a[0].style[t.rFlex?i:"width"]=r+"px"),s!==!1&&(a[0].style[t.rFlex?i:"height"]=s+"px"),t.$apply()},x=function(e,n){l=n,c="left"===l||"right"===l?"x":"y",o="x"===c?f(e):v(e),r=parseInt(d.getPropertyValue("width")),s=parseInt(d.getPropertyValue("height")),a.addClass("no-transition"),document.addEventListener("mouseup",w,!1),document.addEventListener("mousemove",y,!1),document.addEventListener("touchend",w,!1),document.addEventListener("touchmove",y,!1),e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,b(e),t.$emit("angular-resizable.resizeStart",g),t.$apply()};u.forEach(function(e){var n=document.createElement("div");n.setAttribute("class","rg-"+e),n.innerHTML=p,a[0].appendChild(n),n.ondragstart=function(){return!1};var i=function(a){var n="true"===t.rDisabled;n||1!==a.which&&!a.touches||x(a,e)};n.addEventListener("dblclick",k,!1),n.addEventListener("mousedown",i,!1),n.addEventListener("touchstart",i,!1)})}}}});var csvImport=angular.module("ngCsvImport",[]);csvImport.directive("ngCsvImport",function(){return{restrict:"E",transclude:!0,replace:!0,scope:{content:"=?",header:"=?",headerVisible:"=?",separator:"=?",separatorVisible:"=?",result:"=?",encoding:"=?",encodingVisible:"=?",accept:"=?",acceptSize:"=?",acceptSizeExceedCallback:"=?",callback:"=?",mdButtonClass:"@?",mdInputClass:"@?",mdButtonTitle:"@?",mdSvgIcon:"@?",uploadButtonLabel:"="},template:function(e,t){var a=angular.isDefined(t.material),n=angular.isDefined(t.multiple);return'
Header
'+(a?'
':'')+'
Encoding
{{encoding}}
Seperator
'+(a?' {{mdButtonTitle}}':"")+"
"},link:function(e,t,a){if(e.separatorVisible=!!e.separatorVisible,e.headerVisible=!!e.headerVisible,e.acceptSize=e.acceptSize||Number.POSITIVE_INFINITY,e.material=angular.isDefined(a.material),e.multiple=angular.isDefined(a.multiple),e.multiple)throw new Error("Multiple attribute is not supported yet.");var n=angular.element(t[0].querySelector('input[type="file"]')),i=angular.element(t[0].querySelector("md-input-container"));if(e.material&&n){if(n.removeClass("ng-show"),n.addClass("ng-hide"),i){var r=angular.element(i[0].querySelector("div.md-errors-spacer"));r&&r.remove()}e.onClick=function(){n.click()}}angular.element(t[0].querySelector(".separator-input")).on("keyup",function(t){if(null!=e.content){var a={csv:e.content,header:e.header,separator:t.target.value,encoding:e.encoding};e.result=s(a),e.$apply(),"function"==typeof e.callback&&e.callback(t)}}),t.on("change",function(t){if(t.target.files&&t.target.files.length){if(t.target.files[0].size>e.acceptSize)return void("function"==typeof e.acceptSizeExceedCallback&&e.acceptSizeExceedCallback(t.target.files[0]));e.filename=t.target.files[0].name;var a=new FileReader;if(a.onload=function(a){e.$apply(function(){var n={csv:a.target.result.replace(/\r\n|\r/g,"\n"),header:e.header,separator:e.separator};e.content=n.csv,e.result=s(n),e.result.filename=e.filename,e.$$postDigest(function(){"function"==typeof e.callback&&e.callback(t)})})},"file"!==t.target.type||null==t.target.files&&null==t.srcElement.files){if(null!=e.content){var n={csv:e.content,header:!e.header,separator:e.separator};e.result=s(n),e.$$postDigest(function(){"function"==typeof e.callback&&e.callback(t)})}}else a.readAsText((t.srcElement||t.target).files[0],e.encoding)}});var s=function(e){var t=e.csv.split(new RegExp('\n(?![^"]*"(?:(?:[^"]*"){2})*[^"]*$)')),a=[],n=0,i=t[0].split(e.separator).length,r=[];e.header&&(r=t[0].split(e.separator),n=1);for(var s=n;s3e4&&(a=3e4),t.fetchQuery("SELECT now(),number,sin(number),sin(number),SHA1(toString(number)),SHA1(toString(number)) as xx from system.numbers limit "+a).then(function(t){var a="ch",n=new DataProvider(t,a);n.progressQuery="SQL";var i=new WidgetTable(n);e.w=i,e.vars.show=!0,e.vars.counter++,console.info("Load done",e.vars.counter,e.vars.show)})},e._widgetsx=[],e.removeResult=function(t,a,n){n.stopPropagation(),delete e.listDashboards[a]},e.inits=function(){e.listDashboards={}},e.inits(),e.moveWidget=function(){e.widgets[0].x=1,e.widgets[0].width=2,e.widgets[0].height=2},e.removeWidget=function(t){var a=e.widgets.indexOf(t);e.widgets.splice(a,1)},e.onChange=function(e,t){console.log("onChange event: "+e+" items:"+t)},e.onDragStart=function(e,t){console.log("onDragStart event: "+e+" ui:"+t)},e.onDragStop=function(e,t){console.log("onDragStop event: "+e+" ui:"+t)},e.onResizeStart=function(e,t){console.log("onResizeStart event: "+e+" ui:"+t)},e.onResizeStop=function(e,t){console.log("onResizeStop ",t.size)},e.onItemAdded=function(e){console.log("onItemAdded item: "+e)},e.onItemRemoved=function(e){console.log("onItemRemoved item: "+e)}}e.module(t.app.name).controller("DashController",a),a.$inject=["$scope","API","ThemeService","$stateParams","localStorageService","$mdDialog","$window","$mdToast"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.vars={isDark:i.isDark(),historysql:a.sqlLog,charthelp:[],active:{chart:!0,history:!0,snippet:!0,vars:!0},snippets:o.snippets,variables:s.vars},t.vars.scrollConfig2={autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:400,setHeight:200,advanced:{updateOnContentResize:!0}},t.showAddVarsDialog=function(a){l.show({controller:["$scope","$mdDialog",function(e,t){e.v={name:"Var1",type:"text",value:""},e.close=function(){t.cancel()},e.add=function(e){t.hide(e)}}],templateUrl:"app/base/addVarsDialog.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0}).then(function(e){e.name&&e.value&&e.type&&(s.addVar(e.type,e.name,e.value),t.broadcast())},function(){})},t.broadcast=function(){a.$emit("handleBroadcastUpdateVarsAndSnippets",{value:!0})},t.changed=function(e){s.update(e),t.broadcast()},t.showState=function(){console.warn(t.vars.variables)},t.addVar=function(){s.addVar("int","limit",1e3),t.broadcast()},t.actionHistory=function(e){a.$emit("handleBroadcastInsertInActive",{value:e})},t.dropSnippet=function(e){o.drop(e),t.broadcast()},t.dropVar=function(e){s.drop(e),t.broadcast()},t.init=function(){(!_.isObject(t.vars)||_.isUndefined(t.vars.variables.limit))&&s.addVar("int","limit",1e3)},t.init()}e.module(t.app.name).controller("SidebarHelperCtrl",a),a.$inject=["$scope","$rootScope","API","ThemeService","localStorageService","Variables","Snippets","$mdDialog"]}(angular,smi2),function(e,t){function a(e,t,a,n,i,r,s,o,l,c){e.vars={searchline:"",counter:0,loaded:!1,error:!1,databases:[]},e.vars.scrollConfig={autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:400,advanced:{updateOnContentResize:!0}},e.vars.metis={config:{toggle:!1,preventDefault:!1}},e.clickInsertField=function(e){t.$emit("handleBroadcastInsertInActive",{value:e.name})},e.clickAndSelect=function(a,n){return a.name==t.currentDatabase?(n.stopPropagation(),!1):void e.selectDatabase(a)},e.selectDatabase=function(e){console.time("sidebar.selectDatabase time took"),t.currentDatabase=e.name,s.show(s.simple().content("USE "+e.name+" database").theme(i.theme).position("bottom right")),console.timeEnd("sidebar.selectDatabase time took")},e.openTable=function(e){console.log("openTable!!!!!!!!!!!!!!!!!!!!!!!"),r("tableSiedenav").close(),t.currentDatabase!=e.database&&(s.show(s.simple().content("USE "+e.database+" database").theme(i.theme).position("bottom right")),t.currentDatabase=e.database),t.currentTable=e.name,r("tableSiedenav").open()},t.$on("handleBroadcastDatabases",function(){e.reLoad(!0),e.$applyAsync()}),e.updateDS=function(){n.databaseStructure(function(e){a.reload()},!0)},e.rightMenuProcessTable=function(e,a,i,r){console.log("rightMenuProcessTable",e,a,i),"InsertSQLDrop"==e&&(-1!==i.indexOf(".")&&(i='"'+i+'"'),t.$emit("handleBroadcastInsertInActive",{value:"DROP TABLE IF EXISTS "+a+"."+i})),"InsertName"==e&&t.$emit("handleBroadcastInsertInActive",{value:a+"."+i}),"InsertSQLDescribe"==e&&n.fetchQuery("SHOW CREATE TABLE "+a+'."'+i+'"').then(function(e){var a=window.sqlFormatter.format(e.data[0].statement);t.$emit("handleBroadcastInsertInActive",{value:a})}),"OpenTables"==e&&(window.location="/#/database/"+a+"/table/"+i),"InsertDescribe"==e&&n.fetchQuery("SELECT * FROM system.columns WHERE database='"+a+"' AND table='"+i+"'").then(function(e){var n=[],r=[];e.data.forEach(function(e){n.push(e.name),"Date"==e.type&&r.push(e.name+"=today()")}),-1!==i.indexOf(".")&&(i='"'+i+'"');var s="\nSELECT\n "+n.join(",\n ")+"\nFROM\n "+a+"."+i+"\n";r.length&&(s=s+"\nWHERE\n "+r.join("\n AND \n")),s+="\nLIMIT 100\n\n",console.log(s),t.$emit("handleBroadcastInsertInActive",{value:s})})},e.showAlertDatabaseStructure=function(e){o.show(o.alert().clickOutsideToClose(!0).title("Error on load database structure").textContent(e).ariaLabel("Error on load database structure").ok("OK")).then(function(e){n.clear(),a.go("login")})},e.reLoad=function(a){e.vars.loaded=!1,e.vars.error=!1,e.vars.databases=[],t.isInitDatabaseStructure=!1,n.fetchQuery("SELECT 1").then(function(i){e.$applyAsync(),n.databaseStructure(function(a){console.log("isInitDatabaseStructure-true"),t.isInitDatabaseStructure=Date.now(),e.$applyAsync(),console.log("databaseStructure - done");var n=a.getFields();e.vars.databases=a.getTables().reduce(function(e,t){var a=[{active:!0,value:"Select",key:"OpenTables",icon:"arrow-expand",db:t.database}],i=[{active:!0,value:"Open table",key:"OpenTables",icon:"arrow-expand",db:t.database,table:t.name},{active:!0,value:"Code Select from",key:"InsertDescribe",icon:"format-size",db:t.database,table:t.name},{active:!0,value:"Insert table name",key:"InsertName",icon:"bing",db:t.database,table:t.name},{active:!0,value:"Make SQL Describe",key:"InsertSQLDescribe",icon:"border-vertical",db:t.database,table:t.name},{active:!0,value:"Make SQL Drop",key:"InsertSQLDrop",icon:"delete",db:t.database,table:t.name}],r="table";t.engine.match(/Dictionary.*/)&&(r="library"),t.engine.match(/Distributed.*/)&&(r="soundcloud"),t.engine.match(/AggregatingMergeTree.*/)&&(r="cube"),t.engine.match(/MaterializedView.*/)&&(r="border-bottom"),t.engine.match(/SummingMergeTree.*/)&&(r="table-row-plus-after"),t.engine.match(/CollapsingMergeTree.*/)&&(r="table-row-height"),t.engine.match(/$Merge^/)&&(r="source-fork"),t.active=!0,t.classEngine=r,t.rightMenuListTable=i;var s=!0,o=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var u=c.value;if("-"!==t.name&&u.name==t.database)return u.tables.push({active:!0,database:t.database,name:t.name,engine:t.engine,classEngine:t.classEngine,fields:n[t.database+"."+t.name],rightMenuList:t.rightMenuListTable}),e}}catch(m){o=!0,l=m}finally{try{!s&&d["return"]&&d["return"]()}finally{if(o)throw l}}return[].concat(_toConsumableArray(e),[{name:t.database,rightMenuList:a,tables:[{active:!0,database:t.database,name:t.name,engine:t.engine,classEngine:t.classEngine,rightMenuList:t.rightMenuListTable,fields:n[t.database+"."+t.name]}]}])},[]),e.selectDatabase(e.vars.databases[0]),a.getDatabases().forEach(function(t){var a=!1;e.vars.databases.forEach(function(e){e.name==t.name&&(a=!0)}),a||e.vars.databases.push({name:t.name,tables:[],active:!0})}),l(function(){e.vars.loaded=!0,e.vars.error=!1,$("#sideBarMetismenu").metisMenu()},100)},a)},function(t){e.showAlertDatabaseStructure(t)})},e.reLoad()}e.module(t.app.name).controller("SidebarController",a),a.$inject=["$scope","$rootScope","$state","API","ThemeService","$mdSidenav","$mdToast","$mdDialog","$timeout","localStorageService"]}(angular,smi2),function(e,t){function a(a,n,i,r,s){a.user=i.getConnectionInfo().name,a.themes=r.list,a.isTabixServer=i.isTabixServer(),a.isChrome=/Chrome/.test(navigator.userAgent),a.vars={disable_exit:window.global_tabix_disable_exit,hideExitButton:!window.global_tabix_disable_exit},a.help=function(a){function n(e,a){e.vars={version:t.app.version,buildDate:t.app.buildDate},e.hide=function(){a.hide()},e.cancel=function(){a.cancel()},e.answer=function(e){a.hide(e)}}n.$inject=["$scope","$mdDialog"],s.show({controller:n,templateUrl:"app/base/helpDialogRu.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0})},a.logout=function(){i.clear(),n.go("login")},a.setUiTheme=function(e){r.set(e.name),window.location.reload()}}e.module(t.app.name).controller("HeaderController",a),a.$inject=["$scope","$state","API","ThemeService","$mdDialog"]}(angular,smi2),ace.define("ace/theme/dracula",["require","exports","module","ace/lib/dom"],function(e,t,a){t.isDark=!0,t.cssClass="ace-dracula",t.cssText="ace-dracula .ace_gutter {background: #282a36;color: rgb(144,145,148)}.ace-dracula .ace_print-margin {width: 1px;background: #e8e8e8}.ace-dracula {background-color: #282a36;color: #f8f8f2}.ace-dracula .ace_cursor {color: #f8f8f0}.ace-dracula .ace_marker-layer .ace_selection {background: #44475a}.ace-dracula.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #282a36;border-radius: 2px}.ace-dracula .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-dracula .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #3B3A32}.ace-dracula .ace_marker-layer .ace_active-line {background: #44475a}.ace-dracula .ace_gutter-active-line {background-color: #44475a}.ace-dracula .ace_marker-layer .ace_selected-word {border: 1px solid #44475a}.ace-dracula .ace_fold {background-color: #50fa7b;border-color: #f8f8f2}.ace-dracula .ace_keyword {color: #ff79c6}.ace-dracula .ace_constant.ace_language {color: #bd93f9}.ace-dracula .ace_constant.ace_numeric {color: #bd93f9}.ace-dracula .ace_constant.ace_character {color: #bd93f9}.ace-dracula .ace_constant.ace_character.ace_escape {color: #ff79c6}.ace-dracula .ace_constant.ace_other {color: #bd93f9}.ace-dracula .ace_support.ace_function {color: #8be9fd}.ace-dracula .ace_support.ace_constant {color: #6be5fd}.ace-dracula .ace_support.ace_class {font-style: italic;color: #66d9ef}.ace-dracula .ace_support.ace_type {font-style: italic;color: #66d9ef}.ace-dracula .ace_storage {color: #ff79c6}.ace-dracula .ace_storage.ace_type {font-style: italic;color: #8be9fd}.ace-dracula .ace_invalid {color: #F8F8F0;background-color: #ff79c6}.ace-dracula .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #bd93f9}.ace-dracula .ace_string {color: #f1fa8c}.ace-dracula .ace_comment {color: #6272a4}.ace-dracula .ace_variable {color: #50fa7b}.ace-dracula .ace_variable.ace_parameter {font-style: italic;color: #ffb86c}.ace-dracula .ace_entity.ace_other.ace_attribute-name {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_function {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_tag {color: #ff79c6}";var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),ace.define("ace/mode/clickhouse",["require","exports","module","ace/lib/oop","ace/mode/text","ace/token_iterator","ace/mode/folding","ace/mode/clickhouse_FoldMode","ace/mode/clickhouse_highlight_rules"],function(e,t){var a=e("../lib/oop"),n=e("./text").Mode,i=e("./clickhouse_highlight_rules").ClickhouseHighlightRules,r=e("./clickhouse_FoldMode").FoldMode,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./behaviour/cstyle").CstyleBehaviour,l=function(){this.foldingRules=new r,this.$outdent=new s,this.$behaviour=new o,this.HighlightRules=i};a.inherits(l,n),function(){var t=this;this.lineCommentStart="--",this.getHighlightRule=function(){return t.session.$mode.$highlightRules},this.getCompletions=function(e,t,a,n){return t.$mode.$highlightRules.completions},this.$id="ace/mode/clickhouse",this.checkOutdent=function(e,t,a){return this.$outdent.checkOutdent(t,a)},this.autoOutdent=function(e,t,a){this.$outdent.autoOutdent(t,a)},this.findTokens=function(t,a,n){t=t.replace(/^(\r\n|\n|\r)/gm,"").replace(/(\r\n|\n|\r)$/gm,"");for(var i=e("ace/token_iterator").TokenIterator,r=e("ace/edit_session").EditSession,s=new r(t,this),o=new i(s,0,0),l=o.getCurrentToken(),c=[];l;){var d=l;if(d.row=o.getCurrentTokenRow(),d.col=o.getCurrentTokenColumn(),d.type==a&&(c.push(d),n))return d.value=d.value.toLowerCase(),d;l=o.stepForward()}return c},this.trim=function(e,t){return t!==!0&&"string"==typeof t&&t.length>0&&(e=e.replace("^("+t+")"," ").replace(t+"$"," "),e=e.replace(new RegExp("^"+t+"|"+t+"$","g")," ")),e},this.collapseAll=function(e){for(var t=e,a=t.foldWidgets,n=t.getLength(),i=0,r=i;n>r;r++)if(null==a[r]&&(a[r]=t.getFoldWidget(r)),"start"==a[r]){var s=t.getFoldWidgetRange(r);if(s&&s.end.row<=n&&s.start.row>=i){r=s.end.row;try{var o=t.addFold("...",s);o&&(o.collapseChildren=depth)}catch(t){}}}},this.replaceVars=function(e,t){var a={},n=this.fetchTokens(e);if(console.warn("Find tokens",n,t),n.vars.length>0)for(var i in n.vars){var r=n.vars[i],s=r;r=r.indexOf("{")>-1?r.replace("{","").replace("}",""):r.replace("$","").replace("@","").replace(":","");for(var o in t){var l=t[o];l.name.toLowerCase()==r.toLowerCase()&&(console.info(l.name.toLowerCase(),"==",r.toLowerCase()),e=e.replace(s,l.value))}}return{sql:e,tokens:n,vars:a}},this.fetchTokens=function(t){var a={groupby:[],where:[],vars:[],limit:-1},n=e("ace/token_iterator").TokenIterator,i=e("ace/edit_session").EditSession,r=new i(t,this);r.bgTokenizer.start(0);for(var s=new n(r,0,0),o=s.getCurrentToken();o;){var l=o;if(l.row=s.getCurrentTokenRow(),l.col=s.getCurrentTokenColumn(),"variable.language"==l.type&&l.value&&a.vars.push(l.value),"keyword"==l.type&&l.value.toLowerCase().includes("limit")!==!1){var c=l.value.toLowerCase().match(/LIMIT\W+(\d+)\W*\,\W*(\d+)/i);c||(c=l.value.toLowerCase().match(/LIMIT\W+(\d+)/i)),c[0]&&c[1]&&c[2]?a.limit={from:c[1],to:c[2]}:c[0]&&c[1]&&(a.limit={from:c[1],to:!1})}o=s.stepForward()}return console.info("Parse & Find tokens result",a),a},this.splitByTokens=function(t,a,n){var i=e("ace/token_iterator").TokenIterator,r=e("ace/edit_session").EditSession,s=e("ace/range").Range,o=new r(t,this);o.bgTokenizer.start(0);var l=new i(o,0,0),c=l.getCurrentToken();if(_.isUndefined(c)){var d=0;do d++,l=new i(o,d,0),c=l.getCurrentToken();while(100>d&&!c)}for(var u=[],m=0,h=0,p=!1,g=void 0,b=void 0;c;){var f=c;if(f.row=l.getCurrentTokenRow(),f.col=l.getCurrentTokenColumn(),f.type==a&&(n!==!0&&f.value==n||n===!0)){var v=0;n instanceof String&&(v=n.length),g=new s(m,h,f.row,f.col+v),b=o.getTextRange(g),m=f.row,h=f.col+v,b=this.trim(b,f.value),b.length>2&&("string"==typeof p&&(b=this.trim(b,p)),u.push({sql:b,range:g,keyword:p}),p=f.value)}c=l.stepForward()}return g=new s(m,h,Number.MAX_VALUE,Number.MAX_VALUE),b=o.getTextRange(g),b=this.trim(b,n),"string"==typeof p&&(b=this.trim(b,p)),b.length>2&&u.push({sql:b,range:g,keyword:p}),u}}.call(l.prototype),t.Mode=l}),ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,a){var n=e("../lib/lang");t.$detectIndentation=function(e,t){function a(e){for(var t=0,a=e;al;l++){var c=e[l];if(/^\s*[^*+\-\s]/.test(c)){if(" "==c[0])r++,s=-Number.MAX_VALUE;else{var d=c.match(/^ */)[0].length;if(d&&" "!=c[d]){var u=d-s;!(u>0)||s%u||d%u||(i[u]=(i[u]||0)+1),n[d]=(n[d]||0)+1}s=d}for(;o>l&&"\\"==c[c.length-1];)c=e[l++]}}for(var m=i.reduce(function(e,t){return e+t},0),h={score:0,length:0},p=0,l=1;12>l;l++){var g=a(l);1==l?(p=g,g=n[1]?.9:.8,n.length||(g=0)):g/=p,i[l]&&(g+=i[l]/m),g>h.score&&(h={score:g,length:l})}if(h.score&&h.score>1.4)var b=h.length;return r>p+1?((1==b||r/4>p||h.score<1.8)&&(b=void 0),{ch:" ",length:b}):p>r+1?{ch:" ",length:b}:void 0},t.detectIndentation=function(e){var a=e.getLines(0,1e3),n=t.$detectIndentation(a)||{};return n.ch&&e.setUseSoftTabs(" "==n.ch),n.length&&e.setTabSize(n.length),n},t.trimTrailingSpace=function(e,t){for(var a=e.getDocument(),n=a.getAllLines(),i=t?-1:0,r=0,s=n.length;s>r;r++){var o=n[r],l=o.search(/\s+$/);l>i&&a.removeInLine(r,l,o.length)}},t.convertIndentation=function(e,t,a){var i=e.getTabString()[0],r=e.getTabSize();a||(a=r),t||(t=i);for(var s=" "==t?t:n.stringRepeat(t,a),o=e.doc,l=o.getAllLines(),c={},d={},u=0,m=l.length;m>u;u++){var h=l[u],p=h.match(/^\s*/)[0];if(p){var g=e.$getStringScreenWidth(p)[0],b=Math.floor(g/r),f=g%r,v=c[b]||(c[b]=n.stringRepeat(s,b)); -v+=d[f]||(d[f]=n.stringRepeat(" ",f)),v!=p&&(o.removeInLine(u,0,p.length),o.insertInLine({row:u,column:0},v))}}e.setTabSize(a),e.setUseSoftTabs(" "==t)},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var a=e.match(/\d+/);return a&&(t.length=parseInt(a[0],10)),t},t.$parseArg=function(e){return e?"string"==typeof e?t.$parseStringArg(e):"string"==typeof e.text?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,a){var n=t.$parseArg(a);t.convertIndentation(e.session,n.ch,n.length)}},{name:"setIndentation",exec:function(e,a){var n=t.$parseArg(a);n.length&&e.session.setTabSize(n.length),n.ch&&e.session.setUseSoftTabs(" "==n.ch)}}]}),function(){ace.require(["ace/ext/whitespace"],function(){})}(),ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,a){var n=e("ace/lib/dom"),i=e("ace/lib/lang"),r=function(e,t){this.element=n.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var a=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",a),e.on("changeSelection",a),e.on("keyboardActivity",a)};(function(){this.updateStatus=function(e){function t(e,t){e&&a.push(e,t||"|")}var a=[];t(e.keyBinding.getStatusText(e)),e.commands.recording&&t("REC");var n=e.selection,i=n.lead;if(!n.isEmpty()){var r=e.getSelectionRange();t("("+(r.end.row-r.start.row)+":"+(r.end.column-r.start.column)+")"," ")}t(i.row+":"+i.column," "),n.rangeCount&&t("["+n.rangeCount+"]"," "),a.pop(),this.element.textContent=a.join("")}}).call(r.prototype),t.StatusBar=r}),function(){ace.require(["ace/ext/statusbar"],function(){})}(),ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,a){var n=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,a=t.textInput.getElement();if(t.selection.isEmpty()){var i=t.getCursorPosition(),r=t.session.getWordRange(i.row,i.column),s=t.session.getTextRange(r);if(t.session.tokenRe.lastIndex=0,t.session.tokenRe.test(s)){var o="",l=s+" "+o;a.value=l,a.setSelectionRange(s.length,s.length+1),a.setSelectionRange(0,0),a.setSelectionRange(0,s.length);var c=!1;n.addListener(a,"keydown",function d(){n.removeListener(a,"keydown",d),c=!0}),t.textInput.setInputHandler(function(e){if(console.log(e,l,a.selectionStart,a.selectionEnd),e==l)return"";if(0===e.lastIndexOf(l,0))return e.slice(l.length);if(e.substr(a.selectionEnd)==l)return e.slice(0,-l.length);if(e.slice(-2)==o){var n=e.slice(0,-2);if(" "==n.slice(-1))return c?n.substring(0,a.selectionEnd):(n=n.slice(0,-1),t.session.replace(r,n),"")}return e})}}};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var a=this.textInput.getElement();a.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}),function(){ace.require(["ace/ext/spellcheck"],function(){})}(),ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,a){a.exports.createOption=function(e){var t,a=document.createElement("option");for(t in e)e.hasOwnProperty(t)&&("selected"===t?a.setAttribute(t,e[t]):a[t]=e[t]);return a},a.exports.createCheckbox=function(e,t,a){var n=document.createElement("input");return n.setAttribute("type","checkbox"),n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("value",t),n.setAttribute("class",a),t&&n.setAttribute("checked","checked"),n},a.exports.createInput=function(e,t,a){var n=document.createElement("input");return n.setAttribute("type","text"),n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("value",t),n.setAttribute("class",a),n},a.exports.createLabel=function(e,t){var a=document.createElement("label");return a.setAttribute("for",t),a.textContent=e,a},a.exports.createSelection=function(e,t,n){var i=document.createElement("select");return i.setAttribute("id",e),i.setAttribute("name",e),i.setAttribute("class",n),t.forEach(function(e){i.appendChild(a.exports.createOption(e))}),i}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,a){function n(e){for(var t=l.text,a=e.split(/[\/\\]/).pop(),n=0;n +/g,">"),u=function(e,t,a){var i=n.createElement("div");i.innerHTML=d,this.element=i.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},this.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;r.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),r.stopPropagation(e)}),r.addListener(e,"click",function(e){var a=e.target||e.srcElement,n=a.getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),r.stopPropagation(e)}),r.addCommandKeyListener(e,function(e,a,n){var i=l.keyCodeToString(n),s=t.$searchBarKb.findKeyCommand(a,i);s&&s.exec&&(s.exec(t),r.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),r.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),r.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),r.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new o([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new o,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]),this.setSearchRange=function(e){this.searchRange=e,e?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(e){n.setCssClass(this.replaceOption,"checked",this.searchRange),n.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.replaceBox.style.display=this.replaceOption.checked?"":"none",this.find(!1,!1,e)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,a){var i=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:a,range:this.searchRange}),r=!i&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",r),this.editor._emit("findSearchBox",{match:!r}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,a=0,n=0;if(t){var i=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),r=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(r-=e.session.doc.positionToIndex(this.searchRange.start));for(var s,o=t.lastIndex=0;(s=t.exec(i))&&(a++,o=s.index,r>=o&&n++,!(a>c))&&(s[0]||(t.lastIndex=o+=1,!(o>=i.length))););}this.searchCounter.textContent=n+" of "+(a>c?c+"+":a)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(u.prototype),t.SearchBox=u,t.Search=function(e,t){var a=e.searchBox||new u(e);a.show(e.session.getTextRange(),t)}}),function(){ace.require(["ace/ext/searchbox"],function(){})}(),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,a){var n=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),s=e("./range").Range,o=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,d=s.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,i),this.getTokenizer=function(){function e(e,t,a){return e=e.substr(1),/^\d+$/.test(e)&&!a.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new c({start:[{regex:/:/,onMatch:function(e,t,a){return a.length&&a[0].expectIf?(a[0].expectIf=!1,a[0].elseBranch=a[0],[a[0]]):":"}},{regex:/\\./,onMatch:function(e,t,a){var n=e[1];return"}"==n&&a.length?e=n:-1!="`$\\".indexOf(n)?e=n:a.inFormatString&&("n"==n?e="\n":"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,a){return[a.length?a.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,a,n){var i=e(t.substr(1),a,n);return n.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,a){a[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,a){var n=a[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,a){return a[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,a){a[0]&&(a[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,a){a.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var a=t.substr(1);return(this.variables[t[0]+"__"]||{})[a]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var i=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(i);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,a){var n=t.flag||"",i=t.guard;i=new RegExp(i,n.replace(/[^gi]/,""));var r=this.tokenizeTmSnippet(t.fmt,"formatString"),s=this,o=e.replace(i,function(){s.variables.__=arguments;for(var e=s.resolveVariables(r,a),t="E",n=0;n1?(v=t[t.length-1].length,f+=t.length-1):v+=e.length,y+=e}else e.start?e.end={row:f,column:v}:e.start={row:f,column:v}});var w=e.getSelectionRange(),k=e.session.replace(w,y),x=new m(e),C=e.inVirtualSelectionMode&&e.selection.index;x.addTabstops(l,w.start,k,C)},this.insertSnippet=function(e,t){var a=this;return e.inVirtualSelectionMode?a.insertSnippetForSelection(e,t):(e.forEachSelection(function(){a.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),void(e.tabstopManager&&e.tabstopManager.tabNext()))},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var a=e.getCursorPosition(),n=e.session.getState(a.row);"object"===("undefined"==typeof n?"undefined":_typeof(n))&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),a=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&a.push.apply(a,n[t].includeScopes),a.push("_"),a},this.expandWithTab=function(e,t){var a=this,n=e.forEachSelection(function(){return a.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var a,n=e.getCursorPosition(),i=e.session.getLine(n.row),r=i.substring(0,n.column),s=i.substr(n.column),o=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(a=this.findMatchingSnippet(t,r,s)),!!a},this),a?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-a.replaceBefore.length,n.column+a.replaceAfter.length),this.variables.M__=a.matchBefore,this.variables.T__=a.matchAfter,this.insertSnippetForSelection(e,a.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,a){for(var n=e.length;n--;){var i=e[n];if((!i.startRe||i.startRe.test(t))&&(!i.endRe||i.endRe.test(a))&&(i.startRe||i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(a):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(a)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function a(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function n(e,t,n){return e=a(e),t=a(t),n?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function i(e){e.scope||(e.scope=t||"_"),t=e.scope,s[t]||(s[t]=[],o[t]={});var a=o[t];if(e.name){var i=a[e.name];i&&l.unregister(i),a[e.name]=e}s[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=n(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=n(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}var s=this.snippetMap,o=this.snippetNameMap,l=this;e||(e=[]),e&&e.content?i(e):Array.isArray(e)&&e.forEach(i),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function a(e){var a=i[e.scope||t];if(a&&a[e.name]){delete a[e.name];var r=n[e.scope||t],s=r&&r.indexOf(e);s>=0&&r.splice(s,1)}}var n=this.snippetMap,i=this.snippetNameMap;e.content?a(e):Array.isArray(e)&&e.forEach(a)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,a=[],n={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=i.exec(e);){if(t[1])try{n=JSON.parse(t[1]),a.push(n)}catch(r){}if(t[4])n.content=t[4].replace(/^\t/gm,""),a.push(n),n={};else{var s=t[2],o=t[3];if("regex"==s){var l=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=l.exec(o)[1],n.trigger=l.exec(o)[1],n.endTrigger=l.exec(o)[1],n.endGuard=l.exec(o)[1]}else"snippet"==s?(n.tabTrigger=o.match(/^\S*/)[0],n.name||(n.name=o)):n[s]=o}}return a},this.getSnippetByName=function(e,t){var a,n=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(a=i[e]),!!a},this),a}}).call(u.prototype);var m=function(e){return e.tabstopManager?e.tabstopManager:(e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),void this.attach(e))};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],a=e.start,n=e.end,i=a.row,r=n.row,s=r-i,o=n.column-a.column;if(t&&(s=-s,o=-o),!this.$inChange&&t){var l=this.selectedTabstop,c=l&&!l.some(function(e){return d(e.start,a)<=0&&d(e.end,n)>=0});if(c)return this.detach()}for(var u=this.ranges,m=0;m0?(this.removeRange(h),m--):(h.start.row==i&&h.start.column>a.column&&(h.start.column+=o),h.end.row==i&&h.end.column>=a.column&&(h.end.column+=o),h.start.row>=i&&(h.start.row+=s),h.end.row>=i&&(h.end.row+=s),d(h.start,h.end)>0&&this.removeRange(h)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var a=this.editor.session,n=a.getTextRange(e.firstNonLinked),i=e.length;i--;){var r=e[i];if(r.linked){var s=t.snippetManager.tmStrFormat(n,r.original);a.replace(r,s)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,a=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var i=this.ranges[n].contains(e.row,e.column),r=a||this.ranges[n].contains(t.row,t.column);if(i&&r)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,a=this.index+(e||1);a=Math.min(Math.max(a,1),t),a==t&&(a=0),this.selectTabstop(a),0===a&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var a=this.editor.multiSelect;a.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||a.addRange(t[n].clone(),!0);a.ranges[0]&&a.addRange(a.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,a){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=s.fromPoints(a,a);g(n.start,t),g(n.end,t),e[0]=[n],e[0].index=0}var i=this.index,r=[i+1,0],o=this.ranges;e.forEach(function(e,a){for(var n=this.$openTabstops[a]||e,i=e.length;i--;){var l=e[i],c=s.fromPoints(l.start,l.end||l.start);p(c.start,t),p(c.end,t),c.original=l,c.tabstop=n,o.push(c),n!=e?n.unshift(c):n[i]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(r.push(n),this.$openTabstops[a]=n),this.addTabstopMarkers(n)},this),r.length>2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(m.prototype);var h={};h.onChange=o.prototype.onChange,h.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},h.update=function(e,t,a){this.$insertRight=a,this.pos=e,this.onChange(t)};var p=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},g=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,a){return t.snippetManager.insertSnippet(this,e,a)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,a){var n=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),o=e("../lib/lang"),l=e("../lib/dom"),c=function(e){var t=new n(e);t.$maxLines=4;var a=new i(t);return a.setHighlightActiveLine(!1),a.setShowPrintMargin(!1),a.renderer.setShowGutter(!1),a.renderer.setHighlightGutterLine(!1),a.$mouseHandler.$focusWaitTimout=0,a.$highlightTagPending=!0,a},d=function(e){var t=l.createElement("div"),a=new c(t);e&&e.appendChild(t),t.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150);var n=function(){};a.focus=n,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=n,a.renderer.$cursorLayer.element.style.opacity=0,a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",function(e){var t=e.getDocumentPosition();a.selection.moveToPosition(t),u.start.row=u.end.row=t.row,e.stop()});var i,d=new r(-1,0,-1,1/0),u=new r(-1,0,-1,1/0);u.id=a.session.addMarker(u,"ace_active-line","fullLine"),a.setSelectOnHover=function(e){e?d.id&&(a.session.removeMarker(d.id),d.id=null):d.id=a.session.addMarker(d,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",function(e){if(!i)return void(i=e);if(i.x!=e.x||i.y!=e.y){i=e,i.scrollTop=a.renderer.scrollTop;var t=i.getDocumentPosition().row;d.start.row!=t&&(d.id||a.setRow(t),h(t))}}),a.renderer.on("beforeRender",function(){if(i&&-1!=d.start.row){i.$pos=null;var e=i.getDocumentPosition().row;d.id||a.setRow(e),h(e,!0)}}),a.renderer.on("afterRender",function(){var e=a.getRow(),t=a.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&l.addCssClass(n,"ace_selected"))});var m=function(){h(-1)},h=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))};a.getHoveredRow=function(){return d.start.row},s.addListener(a.container,"mouseout",m),a.on("hide",m),a.on("changeSelection",m),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(e){var t=a.data[e];return"string"==typeof t?t:t&&t.value||""};var p=a.session.bgTokenizer;return p.$tokenizeRow=function(e){var t=a.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);var i,r,s=-1;t.iconClass&&n.push({type:"icon ace_icon-"+t.iconClass,value:" "});for(var o=0;ol-2&&(c=c.substr(0,l-t.caption.length-3)+"…"),n.push({type:"rightAlignedText",value:c})}return n},p.$updateOnChange=n,p.start=n,a.session.$computeWidth=function(){return this.screenWidth=0},a.$blockScrolling=1/0,a.isOpen=!1,a.isTopdown=!1,a.data=[],a.setData=function(e){a.setValue(o.stringRepeat("\n",e.length),-1),a.data=e||[],a.setRow(0)},a.getData=function(e){return a.data[e]},a.getRow=function(){return u.start.row},a.setRow=function(e){e=Math.max(0,Math.min(this.data.length,e)),u.start.row!=e&&(a.selection.clearSelection(),u.start.row=u.end.row=e||0,a.session._emit("changeBackMarker"),a.moveCursorTo(e||0,0),a.isOpen&&a._signal("select"))},a.on("changeSelection",function(){a.isOpen&&a.setRow(a.selection.lead.row),a.renderer.scrollCursorIntoView()}),a.hide=function(){this.container.style.display="none",this._signal("hide"),a.isOpen=!1},a.show=function(e,t,n){var r=this.container,s=window.innerHeight,o=window.innerWidth,l=this.renderer,c=l.$maxLines*t*1.4,d=e.top+this.$borderSize,u=d>s/2&&!n;u&&d+t+c>s?(l.$maxPixelHeight=d-2*this.$borderSize,r.style.top="",r.style.bottom=s-d+"px",a.isTopdown=!1):(d+=t,l.$maxPixelHeight=s-d-.2*t,r.style.top=d+"px",r.style.bottom="",a.isTopdown=!0),r.style.display="",this.renderer.$textLayer.checkForSizeChanges();var m=e.left;m+r.offsetWidth>o&&(m=o-r.offsetWidth),r.style.left=m+"px",this._signal("show"),i=null,a.isOpen=!0},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a};l.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=d}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,a){t.parForEach=function(e,t,a){var n=0,i=e.length;0===i&&a();for(var r=0;i>r;r++)t(e[r],function(e,t){n++,n===i&&a(e,t)})};var n=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,a){a=a||n;for(var i=[],r=t-1;r>=0&&a.test(e[r]);r--)i.push(e[r]);return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,a){a=a||n;for(var i=[],r=t;r=t?a:t-1;break;case"down":t=t>=a?-1:t+1;break;case"start":t=0;break;case"end":t=a}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var a,n=this.editor.selection.getAllRanges(),i=0;a=n[i];i++)a.start.column-=this.completions.filterText.length,this.editor.session.remove(a);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();return t||e.tabstopManager?t:void e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var a=e.getSession(),n=e.getCursorPosition(),i=(a.getLine(n.row),r.getCompletionPrefix(e));this.base=a.doc.createAnchor(n.row,n.column-i.length),this.base.$insertRight=!0;var s=[],o=e.completers.length;return e.completers.forEach(function(r,l){r.getCompletions(e,a,n,i,function(n,r){!n&&r&&(s=s.concat(r));var l=e.getCursorPosition();a.getLine(l.row);t(null,{prefix:i,matches:s,finished:0===--o})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),a=this.editor.session.getTextRange({start:this.base,end:t});if(a==this.completions.filterText)return;return this.completions.setFilter(a),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=a||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,a,e):this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,a){var i=function(){return a.finished?this.detach():void 0}.bind(this),r=a.prefix,s=a&&a.matches;if(!s||!s.length)return i();if(0===r.indexOf(a.prefix)&&n==this.gatherCompletionsId){this.completions=new d(s),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(r);var o=this.completions.filtered;return o.length&&(1!=o.length||o[0].value!=r||o[0].snippet)?this.autoInsert&&1==o.length&&a.finished?this.insertMatch(o[0]):void this.openPopup(this.editor,r,e):i()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,a=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return a&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(n=e.getDocTooltip(a)),n}),n||(n=a),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=o.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var a=this.popup,n=a.container.getBoundingClientRect();t.style.top=a.container.style.top,t.style.bottom=a.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}}}).call(c.prototype),c.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new c),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var d=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var a=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===a?!1:(a=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var a=[],n=t.toUpperCase(),i=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var o=r.value||r.caption||r.snippet;if(o){var l,c,d=-1,u=0,m=0;if(this.exactMatch){if(t!==o.substr(0,t.length))continue e}else for(var h=0;h=0&&(0>g||g>p)?p:g,0>l)continue e;c=l-d-1,c>0&&(-1===d&&(m+=10),m+=c),u|=1<",s.escapeHTML(e.caption),"","
",s.escapeHTML(e.snippet)].join(""))}},u=[d,l,c];t.setCompleters=function(e){u.length=0,e&&u.push.apply(u,e)},t.addCompleter=function(e){u.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=d;var m,h={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){g(t.session.$mode)},g=function k(e){var t=e.$id;n.files||(n.files={}),b(t),e.modes&&e.modes.forEach(k)},b=function x(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},r.loadModule(t,function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){x("ace/mode/"+e)})))})}},f=function(e){var t=e.editor,a=t.completer&&t.completer.activated;if("backspace"===e.command.name)a&&!o.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){var n=o.getCompletionPrefix(t);n&&n.length>=t.$liveAutocompletionThreshold&&!a&&(t.completer||(t.completer=new i),t.completer.autoInsert=!1,t.completer.showPopup(t))}},v=s.delayedCall(function(){f(m)},0),y=function(e){m=e,v.delay(e.editor.$liveAutocompletionDelay)},w=e("../editor").Editor;e("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",y)):this.commands.removeListener("afterExec",y)},value:!1},liveAutocompletionThreshold:{value:0},liveAutocompletionDelay:{value:500},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(){})}(),ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,a){e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:""},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:""!=o.value?n="php":"support.php_tag"==o.type&&"?>"==o.value?n="html":"meta.tag.name.style"==o.type&&"css"!=n?n="css":"meta.tag.name.style"==o.type&&"css"==n?n="html":"meta.tag.name.script"==o.type&&"js"!=n?n="js":"meta.tag.name.script"==o.type&&"js"==n&&(n="html"),g=e.stepForward(),g&&0==g.type.indexOf("meta.tag.name")&&(s=g.value),"support.php_tag"==p.type&&"v;v++)u+=" ";break}if(h===!1)for(v in l)if(!(p.type!=l[v].type||l[v].value&&p.value!=l[v].value||l[v].blockTag&&-1!==d.indexOf(i)||l[v].context&&l[v].context!==n)){if(l[v].indent===!0&&m++,!l[v].dontBreak&&!b)for(u+="\n",v=0;m>v;v++)u+=" ";break}if(u+=f,"support.php_tag"==p.type&&"?>"==p.value&&(h=!1),r=i,p=o,o=g,null===o)break}else o=g;else o=e.stepForward();return u}}),ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,a){var n=e("ace/token_iterator").TokenIterator,i=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new n(e,0,0),a=(t.getCurrentToken(),e.$modeId.split("/").pop()),r=i(t,a);e.doc.setValue(r)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}),function(){ace.require(["ace/ext/beautify"],function(){})}(),ace.define("ace/mode/clickhouse_highlight_rules",["require","exports","$rootScope","module","ace/lib/oop","ace/snippets","ace/ext/language_tools","ace/mode/text_highlight_rules"],function(e,t,a){var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){var e=this,t="SELECT|CASE|THEN|DISTINCT|INSERT|UPDATE|DELETE|WHERE|AND|OR|OFFSET|HAVING|AS|FROM|WHEN|ELSE|END|TYPE|LEFT|RIGHT|JOIN|ON|OUTER|DESC|ASC|UNION|CREATE|TABLE|PRIMARY|KEY|FOREIGN|NOT|REFERENCES|INNER|CROSS|NATURAL|DATABASE|DROP|GRANT|ANY|BETWEEN|ATTACH|DETACH|CAST|WITH|BIT_AND|BIT_OR|TO|BIT_XOR|DESCRIBE|OPTIMIZE|PREWHERE|TOTALS|DATABASES|PROCESSLIST|SHOW|IF",a="INSERT\\W+INTO|RENAME\\WTABLE|IF\\W+NOT\\W+EXISTS|IF\\W+EXISTS|FORMAT\\W+Vertical|FORMAT\\W+JSONCompact|FORMAT\\W+JSONEachRow|FORMAT\\W+TSKV|FORMAT\\W+TabSeparatedWithNames|FORMAT\\W+TabSeparatedWithNamesAndTypes|FORMAT\\W+TabSeparatedRaw|FORMAT\\W+BlockTabSeparated|FORMAT\\W+CSVWithNames|FORMAT\\W+CSV|FORMAT\\W+JSON|FORMAT\\W+TabSeparated",n="true|false|NULL",i="sum|sumIf|avg|avgIf",r="date|integer|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|float64|datetime|enum8|enum16|fixedstring|array|tuple|stringMergeTree|SummingMergeTree|ReplacingMergeTree|ReplicatedMergeTree|Buffer|ReplicatedCollapsingMergeTree|CollapsingMergeTree|AggregatingMergeTree|Merge|Memory|GraphiteMergeTree|ReplicatedAggregatingMergeTree|ReplicatedSummingMergeTree",s=["IF NOT EXISTS","RENAME TABLE","IF EXISTS","GROUP BY","ORDER BY","UNION ALL","FORMAT JSON","FORMAT JSONCompact","FORMAT JSONEachRow","FORMAT TSV","FORMAT TabSeparated","FORMAT TabSeparatedWithNames","FORMAT TabSeparatedWithNamesAndTypes","FORMAT TabSeparatedRaw","FORMAT BlockTabSeparated","FORMAT TSKV","FORMAT CSV","FORMAT CSVWithNames","SYSTEM RELOAD CONFIG","DROP TEMPORARY TABLE","EXISTS TEMPORARY TABLE","SYSTEM RELOAD DICTIONARY","SYSTEM RELOAD DICTIONARIES","SYSTEM DROP DNS CACHE","SYSTEM SHUTDOWN","SYSTEM KILL","CLEAR COLUMN IN PARTITION"],o=["DRAW_GMAPS","DRAW_GRAPH","DRAW_PLOTLY","DRAW_CALENDAR","DRAW_TEXT","DRAW_HEATMAP","DRAW_CHART","DRAW_BAR","DRAW_GRIDCHART","DRAW_FLATTREE","DRAW_RIVER","DRAW_RAW","DRAW_SANKEYS","DRAW_TREEMAP","DRAW_C3","DRAW_MAP"],l="";if(window.aceJSRules&&window.aceJSRules.builtinFunctions){if(window.aceJSRules.builtinFunctions){var c=[];window.aceJSRules.builtinFunctions.forEach(function(e){c.push(e.name)}),i=c.join("|")}_.isArray(window.aceJSRules.tables)&&(l=window.aceJSRules.tables.join("|"))}var d="";d=window.global_delimiter?new RegExp(window.global_delimiter):new RegExp(";;");var u=[],m=t.toLowerCase();window.aceJSRules&&_.isArray(window.aceJSRules.fieldsList)&&window.aceJSRules.fieldsList.forEach(function(e){var t=e.name.toLowerCase()+"|";m.indexOf(t)>-1||u.push(e.name)});var h=this.createKeywordMapper({"support.function":i,keyword:t,"constant.language":n,"storage.type":r,"markup.bold":l,"markup.heading":u.join("|")},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$",caseInsensitive:!0},{token:"comment.block",start:"```",end:"```"},{token:"keyword",regex:"GROUP\\W+BY|ON\\W+CLUSTER|ORDER\\W+BY|LIMIT\\W+\\d+\\W*,\\W*\\d+|LIMIT\\W+\\d+\\W+BY\\W+|LIMIT\\W+\\d+"},{token:"variable.language",regex:/\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/@[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/\:[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/\{[\w]+(?:\[[\w\]+]|[=\-]>\w+)\}?/},{token:"comment",start:"/\\*",end:"\\*/"},{token:"constant",regex:'".*?"'},{token:"keyword",regex:a},{token:"invalid.illegal",regex:o.join("|")},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:h,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"constant.character.escape",regex:d},{token:"punctuation",regex:/[?:,;.]/},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(\\{]"},{token:"paren.rparen",regex:"[\\)\\}]"},{token:"text",regex:"\\s+"}]},this.normalizeRules(),this.completions=[],this.getCompletions=function(){return e.completions},this.addCompletions=function(e,t,a,n,i,r,s){this.completions.push({name:e,value:t,caption:a,score:n,meta:i,iconClass:r,docHTML:s})},this.addCompletionsDictionaries=function(e){this.addCompletions(e.dic,e.dic,e.title,0,"dic","dict",this.makeCompletionsDocFunctions(e.title,e.dic))},this.addCompletionsFunctions=function(e){this.addCompletions(e.name,e.name+"( )",e.name+"( )",e.score,"function","function",this.makeCompletionsDocFunctions(e.name,e.origin,e.comb))},this.addCompletionsTableFiled=function(e){var t=e.table+"."+e.name,a=e.name,n="type:"+e.type+"

default_type:"+e.default_type+"
"+e.default_expression;this.addCompletions(t,a,a,100,e.type,"field",this.makeCompletionsdocHTML(t,n))},this.addArrayCompletions=function(e,t,a){var n=this;e.forEach(function(e){n.addCompletions(e,e,e,0,t,a,!1)})},this.setKeywords=function(e){console.log("setKeywords > ",e),this.keywordRule.onMatch=this.createKeywordMapper(e,"identifier")},this.makeCompletionsDocFunctions=function(e,t,a){if(!window.global_chFunctionsHelp)return!1;if(!window.global_chFunctionsHelp.functions)return!1;var n="",i=e;if("undefined"!=typeof window.global_chFunctionsHelp.functions[e]?i=e:"undefined"!=typeof window.global_chFunctionsHelp.functions[t]&&(i=t),"undefined"!=typeof window.global_chFunctionsHelp.functions[i]){var r="en",s=window.global_chFunctionsHelp.functions[i],o="",l="";s.desc&&(o=s.bracket,l=s.desc[r],l||(l=s.desc.en?s.desc.en:s.desc.ru)),l&&(l=l.replace(/\.\s*/gm,".
")),n=''+e+o+'
'+l+" "}else n=''+e+"( )
"+t;return n+'
'},this.makeCompletionsdocHTML=function(e,t){return'
'+e+"
"+t+"
"},this.addArrayCompletions(t.split("|"),"keyword","keyword"),this.addArrayCompletions(s,"keyword","keyword"),this.addArrayCompletions(o,"draw","draw"),this.addArrayCompletions(r.split("|"),"type","type")};n.inherits(r,i),t.ClickhouseHighlightRules=r}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,a){var n=e("ace/range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var a=e.getLine(t),i=a.match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,s=e.findMatchingBracket({row:t,column:r});if(!s||s.row==t)return 0;var o=this.$getIndent(e.getLine(s.row));e.replace(new n(t,0,t,r-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/clickhouse_FoldMode",["$rootScope","require","exports","module","ace/lib/oop","ace/range","ace/mode/sqlserver","ace/mode/folding/cstyle"],function(e,t,a){var n=e("../lib/oop"),i=e("ace/mode/folding/cstyle").FoldMode,r=(e("ace/range").Range,e("ace/token_iterator").TokenIterator),s=t.FoldMode=function(){};n.inherits(s,i),function(){this.foldingRules="cStyle",this.foldingStartMarker=/\(|\{/,this.getFoldWidgetRange=function(e,t,a,n){for(var i=new r(e,a,0),s=i.getCurrentToken(),o=!1;s;){var l=s,c=i.getCurrentTokenPosition();if(s=i.stepForward(),"paren.lparen"!=l.type||"("!=l.value&&"{"!=l.value||(o=e.getBracketRange(c)),o)break}return o}}.call(s.prototype)}),window.global_chFunctionsHelp={functions:{corr:{bracket:"(x, y)",desc:{en:'Calculates the Pearson correlation coefficient: Σ((x - x̅)(y - y̅)) / sqrt(Σ((x - x̅)2) * Σ((y - y̅)2)).'}},stddevPop:{bracket:"(x)",desc:{en:"The result is equal to the square root of 'varPop(x)'."}},varPop:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / n%%."}},argMin:{bracket:"(arg, val)",desc:{en:"Calculates the 'arg' value for a minimal 'val' value. If there are several different values of 'arg' for minimal values of 'val', the first of these values encountered is output."}},quantileExactWeighted:{bracket:"(level)(x, weight)",desc:{en:"Вычисляет квантиль уровня level точно."}},min:{bracket:"(v)",desc:{en:"Minimal execution speed in rows per second. Checked on every data block when 'timeout_before_checking_execution_speed' expires. If the execution speed is lower, an exception is thrown."}},varSamp:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / (n - 1)%%.

Returns Float64. If n <= 1, it returns +∞."}},anyLast:{bracket:"(x)",desc:{en:"Selects the last value encountered.
The result is just as indeterminate as for the 'any' function."}},argMax:{bracket:"(arg, val)",desc:{en:"Calculates the 'arg' value for a maximum 'val' value. If there are several different values of 'arg' for maximum values of 'val', the first of these values encountered is output."}},count:{bracket:"()",desc:{en:"Counts the number of rows. "}},any:{bracket:"(x)",desc:{en:"Selects the last value encountered.
The result is just as indeterminate as for the 'any' function."}},avg:{bracket:"(x)",desc:{en:"Calculates the average.
Only works for numbers.
The result is always Float64."}},sequenceMatch:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"Pattern matching for event chains.

'pattern' is a string containing a pattern to match."}},stddevSamp:{bracket:"(x)",desc:{en:"The result is equal to the square root of 'varSamp(x)'."}},medianDeterministic:{bracket:"(x, determinator)",desc:{en:"This function works similarly to the 'median' function - it approximates the median."}},quantilesTimingWeighted:{bracket:"(level1, level2, ...)(x, weight)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianTimingWeighted' function."}},uniq:{bracket:"(N)(x)",desc:{en:"Calculates the number of different argument values, if it is less than or equal to N.
If the number of different argument values is greater than N, it returns N + 1."}},covarSamp:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / (n - 1)%%.

Returns Float64. If n <= 1, it returns +∞."}},max:{bracket:"(v)",desc:{en:"Maximum number of bytes (uncompressed data) that can be passed to a remote server or saved in a temporary table when using GLOBAL IN."}},quantileTDigest:{bracket:"(level)(x)",desc:{en:"t-digest"}},quantilesTiming:{bracket:"(level1, level2, ...)(x, weight)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianTimingWeighted' function."}},quantiles:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},quantile:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},groupArray:{bracket:"(x)",desc:{en:"Creates an array of argument values.
Values can be added to the array in any (indeterminate) order.

In some cases, you can rely on the order of execution. This applies to cases when SELECT comes from a subquery that uses ORDER BY."}},sum:{bracket:"(x)",desc:{en:"Calculates the sum.
Only works for numbers."}},median:{bracket:"(x, weight)",desc:{en:"Differs from the 'medianTiming' function in that it has a second argument - "weights". Weight is a non-negative integer.
The result is calculated as if the 'x' value were passed 'weight' number of times to the 'medianTiming' function."}},quantileTiming:{bracket:"(level)(x, weight)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianTimingWeighted' function."}},quantileTimingWeighted:{bracket:"(level)(x, weight)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianTimingWeighted' function."}},groupUniqArray:{bracket:"(x)",desc:{en:"Creates an array from different argument values. Memory consumption is the same as for the 'uniqExact' function."}},uniqHLL12:{bracket:"(x)",desc:{en:"Uses the HyperLogLog algorithm to approximate the number of different values of the argument. "}},covarPop:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / n%%."}},sequenceCount:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"sequenceMatch"}},quantileDeterministic:{bracket:"(level)(x, determinator)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianDeterministic' function."}},quantileExact:{bracket:"(level)(x, weight)",desc:{en:""}},quantilesDeterministic:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},medianTiming:{bracket:"(x, weight)",desc:{en:"Differs from the 'medianTiming' function in that it has a second argument - "weights"."}},medianTimingWeighted:{bracket:"(x, weight)",desc:{ru:"",en:"Differs from the 'medianTiming' function in that it has a second argument - "weights"."}},uniqExact:{bracket:"(x)",desc:{en:"Calculates the number of different values of the argument, exactly.
There is no reason to fear approximations, so it's better to use the 'uniq' function.
You should use the 'uniqExact' function if you definitely need an exact result. "}},uniqCombined:{bracket:"(x)",desc:{en:""}},uniqUpTo:{bracket:"(N)(x)",desc:{en:"Calculates the number of different argument values, if it is less than or equal to N.
If the number of different argument values is greater than N, it returns N + 1."}},substring:{bracket:"(s, offset, length)",desc:{en:"The same as 'substring', but for Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception)."}},notLike:{bracket:"(haystack, pattern), haystack NOT LIKE pattern operator",desc:{en:"The same thing as 'like', but negative."}},hostName:{bracket:"()",desc:{en:"Returns a string with the name of the host that this function was performed on. For distributed processing, this is the name of the remote server host, if the function is performed on a remote server."}},globalNotIn:{bracket:"(v)",desc:{en:"See the section "IN operators"."}},or:{bracket:"(v)",desc:{en:"The same thing as 'max_temporary_columns', but without counting constant columns.
Note that constant columns are formed fairly often when running a query, but they require approximately zero computing resources."}},extractAll:{bracket:"(haystack, pattern)",desc:{en:"Extracts all the fragments of a string using a regular expression. If 'haystack' doesn't match the 'pattern' regex, an empty string is returned. Returns an array of strings consisting of all matches to the regex."}},arrayFirst:{bracket:"(func, arr1, ...)",desc:{en:"Returns the index of the first element in the 'arr1' array for which 'func' returns something other than 0."}},notEquals:{bracket:"(v)",desc:{ru:"",en:""}},arrayExists:{bracket:"([func,] arr1, ...)",desc:{en:"Returns 1 if there is at least one element in 'arr' for which 'func' returns something other than 0. Otherwise, it returns 0."}},arrayCount:{bracket:"([func,] arr1, ...)",desc:{en:"Returns the number of elements in 'arr' for which 'func' returns something other than 0. If 'func' is not specified, it returns the number of non-zero items in the array."}},arrayMap:{bracket:"(func, arr1, ...)",desc:{en:"Returns an array obtained from the original application of the 'func' function to each element in the 'arr' array."}},now:{bracket:"(v)",desc:{en:"If the parameter is true, INSERT operation will skip columns with unknown names from input.
Otherwise, an exception will be generated, it is default behavior.
The parameter works only for JSONEachRow and TSKV input formats."}},intDiv:{bracket:"(a, b)",desc:{en:"Differs from 'intDiv' in that it returns zero when dividing by zero or when dividing a minimal negative number by minus one."}},topLevelDomain:{bracket:"(v)",desc:{en:"- Selects the top-level domain. Example: .ru."}},intHash32:{bracket:"(v)",desc:{en:"Calculates a 32-bit hash code from any type of integer.
This is a relatively fast non-cryptographic hash function of average quality for numbers."}},replaceOne:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replaces the first occurrence, if it exists, of the 'pattern' substring in 'haystack' with the 'replacement' substring.
Hereafter, 'pattern' and 'replacement' must be constants."}},cityHash64:{bracket:"(v)",desc:{en:"Calculates CityHash64 from a string or a similar hash function for any number of any type of arguments.
For String-type arguments, CityHash is used. This is a fast non-cryptographic hash function for strings with decent quality"}},OSToRoot:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the operating system from the Yandex.Metrica dictionary. If any OS matches the passed number, it returns a UInt8 number - the ID of the corresponding root OS (for example, it converts Windows Vista to Windows). Otherwise, returns 0."}},sipHash128:{bracket:"(v)",desc:{en:"Calculates SipHash from a string.
Accepts a String-type argument. Returns FixedString(16).
Differs from sipHash64 in that the final xor-folding state is only done up to 128 bits."}},SHA1:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32)."}},asin:{bracket:"(x)",desc:{en:"The arc sine."}},SHA256:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32)."}},MD5:{bracket:"(v)",desc:{en:"Calculates the MD5 from a string and returns the resulting set of bytes as FixedString(16)."}},bitmaskToList:{bracket:"(num)",desc:{en:"Accepts an integer. Returns a string containing the list of powers of two that total the source number when summed. They are comma-separated without spaces in text format, in ascending order."}},array:{bracket:"(v)",desc:{en:"The -%%Array%% suffix can be appended to any aggregate function. In this case, the aggregate function takes arguments of the 'Array(T)' type (arrays) instead of 'T' type arguments. If the aggregate function accepts multiple arguments, this must be arrays of equal lengths. "}},dictGetStringOrDefault:{bracket:"(v)",desc:{ru:"%%dictGetT('dict_name', 'attr_name', id, default)%%
Аналогично функциям dictGetT, но значение по умолчанию берётся из последнего аргумента функции.",en:""}},greaterOrEquals:{bracket:"(v)",desc:{ru:"",en:""}},e:{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},runningDifference:{bracket:"(x)",desc:{en:"Calculates the difference between consecutive values in the data block.
Result of the function depends on the order of the data in the blocks.

It works only inside of the each processed block of data. Data splitting in the blocks is not explicitly controlled by the user. "}},not:{bracket:"(v)",desc:{ru:'Смотрите раздел "Операторы IN".',en:"See the section "IN operators"."}},intHash64:{bracket:"(v)",desc:{en:"Calculates a 64-bit hash code from any type of integer.
It works faster than intHash32. Average quality."}},acos:{bracket:"(x)",desc:{ru:"Арккосинус.",en:"The arc cosine."}},dictGetString:{bracket:"(v)",desc:{en:""}},and:{bracket:"(x, determinator)",desc:{en:"This function works similarly to the 'median' function - it approximates the median. However, in contrast to 'median', the result is deterministic and does not depend on the order of query execution.

To achieve this, the function takes a second argument - the "determinator". "}},dictGetDate:{bracket:"(v)",desc:{ru:"",en:""}},dictGetFloat32:{bracket:"(v)",desc:{ru:"",en:""}},dictGetInt8:{bracket:"(v)",desc:{ru:"",en:""}},dictGetUInt32:{bracket:"(v)",desc:{ru:"",en:""}},OSIn:{bracket:"(lhs, rhs)",desc:{en:"Checks whether the 'lhs' operating system belongs to the 'rhs' operating system."}},arrayFirstIndex:{bracket:"(func, arr1, ...)",desc:{en:"Returns the index of the first element in the 'arr1' array for which 'func' returns something other than 0."}},ceil:{bracket:"(x[, N])",desc:{en:"Returns the smallest round number that is greater than or equal to 'x'. In every other way, it is the same as the 'floor' function (see above)."}},fragment:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},dictGetUInt8:{bracket:"(v)",desc:{ru:"",en:""}},dictHas:{bracket:"(v)",desc:{ru:"%%dictHas('dict_name', id)%%
- проверить наличие ключа в словаре. Возвращает значение типа UInt8, равное 0, если ключа нет и 1, если ключ есть.",en:""}},arraySum:{bracket:"([func,] arr1, ...)",desc:{en:"Returns the sum of the 'func' values. If the function is omitted, it just returns the sum of the array elements."}},emptyArrayDateTime:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},intDivOrZero:{bracket:"(a, b)",desc:{en:"Differs from 'intDiv' in that it returns zero when dividing by zero or when dividing a minimal negative number by minus one."}},SEHierarchy:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the search engine from the Yandex.Metrica dictionary. Returns an array with a hierarchy of search engines. Similar to the 'regionHierarchy' function."}},regionToContinent:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a continent. In every other way, this function is the same as 'regionToCity'.
Example: %%regionToContinent(toUInt32(213)) = 10001%% converts Moscow (213) to Eurasia (10001)."}},dictGetInt32:{bracket:"(v)",desc:{ru:"",en:""}},toInt8:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},materialize:{bracket:"(x)",desc:{en:"Turns a constant into a full column containing just one value.
In ClickHouse, full columns and constants are represented differently in memory. Functions work differently for constant arguments and normal arguments (different code is executed), although the result is almost always the same. This function is for debugging this behavior."}},regionToCountry:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a country. In every other way, this function is the same as 'regionToCity'.
Example: %%regionToCountry(toUInt32(213)) = 225%% converts Moscow (213) to Russia (225)."}},dictGetDateTime:{bracket:"(v)",desc:{ru:"",en:""}},xor:{bracket:"(v)",desc:{ru:"",en:""}},regionToCity:{bracket:"(id[, geobase])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. If this region is a city or part of a city, it returns the region ID for the appropriate city. Otherwise, returns 0."}},dictGetFloat64:{bracket:"(v)",desc:{ru:"",en:""}},timeSlot:{bracket:"(StartTime, Duration)",desc:{en:"For a time interval starting at 'StartTime' and continuing for 'Duration' seconds, it returns an array of moments in time, consisting of points from this interval rounded down to the half hour."}},toTime:{bracket:"(v)",desc:{en:"Converts a date with time to the date of the start of the Unix Epoch, while preserving the time."}},log2:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the binary logarithm of the argument."}},toRelativeHourNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the hour, starting from a certain fixed point in the past."}},toRelativeDayNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the day, starting from a certain fixed point in the past."}},toRelativeWeekNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the week, starting from a certain fixed point in the past."}},splitByString:{bracket:"(separator, s)",desc:{en:"The same as above, but it uses a string of multiple characters as the separator. The string must be non-empty."}},currentDatabase:{bracket:"()",desc:{en:"Returns the name of the current database.
You can use this function in table engine parameters in a CREATE TABLE query where you need to specify the database."}},toRelativeMonthNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the month, starting from a certain fixed point in the past."}},visibleWidth:{bracket:"(x)",desc:{en:"Calculates the approximate width when outputting values to the console in text format (tab-separated). This function is used by the system for implementing Pretty formats."}},bitShiftRight:{bracket:"(a, b)",desc:{en:""}},toRelativeYearNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the year, starting from a certain fixed point in the past."}},toStartOfHour:{bracket:"(v)",desc:{en:"Rounds down a date with time to the start of the hour."}},halfMD5:{bracket:"(v)",desc:{en:"Calculates the MD5 from a string. Then it takes the first 8 bytes of the hash and interprets them as UInt64 in big endian."}},toStartOfFiveMinute:{bracket:"(v)",desc:{en:""}},toUInt16OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument."}},toMonday:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the nearest Monday.
Returns the date."}},IPv6NumToString:{bracket:"(x)",desc:{en:"Accepts a FixedString(16) value containing the IPv6 address in binary format. Returns a string containing this address in text format. "}},indexOf:{bracket:"(arr, x)",desc:{ru:"Возвращает индекс элемента x (начиная с 1), если он есть в массиве, или 0, если его нет.",en:"Returns the index of the 'x' element (starting from 1) if it is in the array, or 0 if it is not."}},today:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает текущую дату на один из моментов выполнения запроса.
То же самое, что toDate(now())",en:"Accepts zero arguments and returns the current date at one of the moments of request execution.
The same as 'toDate(now())'."}},emptyArrayToSingle:{bracket:"(v)",desc:{ru:"Принимает пустой массив и возвращает массив из одного элемента, равного значению по умолчанию.",en:"Accepts an empty array as argument and returns an array of one element equal to the default value."}},sleep:{bracket:"(seconds)",desc:{ru:"Спит seconds секунд на каждый блок данных. Можно указать как целое число, так и число с плавающей запятой.",en:"Sleeps 'seconds' seconds on each data block. You can specify an integer or a floating-point number."}},extract:{bracket:"(params, name)",desc:{en:"Parses the string in double quotes. The value is unescaped. If unescaping failed, it returns an empty string. Examples: "}},emptyArrayInt8:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},regionToName:{bracket:"(id[, lang])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. A string with the name of the language can be passed as a second argument. Supported languages are: ru, en, ua, uk, by, kz, tr. If the second argument is omitted, the language 'ru' is used. "}},concat:{bracket:"(arr[, separator])",desc:{ru:"Склеивает строки, перечисленные в массиве, с разделителем separator.
separator - необязательный параметр, константная строка, по умолчанию равен пустой строке.
Возвращается строка.",en:"Concatenates strings from the array elements, using 'separator' as the separator.
'separator' is a string constant, an optional parameter. By default it is an empty string.
Returns a string."}},convertCharset:{bracket:"(s, from, to)",desc:{ru:"Возвращает сконвертированную из кодировки from в кодировку to строку s.",en:"Returns a string with the data %%s%% (encoded as %%from%% charset) that was converted to the %%to%% charset."}},toMonth:{bracket:"(v)",desc:{ru:"Переводит дату или дату-с-временем в число типа UInt8, содержащее номер месяца (1-12).",en:"Converts a date or date with time to a UInt8 number containing the month number (1-12)."}},IPv6StringToNum:{bracket:"(s)",desc:{ru:"Функция, обратная к IPv6NumToString. Если IPv6 адрес в неправильном формате, то возвращает строку из нулевых байт.
HEX может быть в любом регистре.",en:"The reverse function of IPv6NumToString. If the IPv6 address has an invalid format, it returns a string of null bytes.
HEX can be uppercase or lowercase."}},emptyArrayString:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},uptime:{bracket:"()",desc:{ru:"Возвращает аптайм сервера в секундах.",en:"Returns server's uptime in seconds."}},blockSize:{bracket:"()",desc:{en:"Gets the size of the block.
In ClickHouse, queries are always run on blocks (sets of column parts). This function allows getting the size of the block that you called it for."}},toInt64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},pathFull:{bracket:"(v)",desc:{ru:"То же самое, но включая query string и fragment. Пример: /top/news.html?page=2#comments",en:"- The same as above, but including query-string and fragment. Example: /top/news.html?page=2#comments"}},emptyArrayDate:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},emptyArrayInt64:{bracket:"(v)",desc:{ -ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},toInt32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},greater:{bracket:"(v)",desc:{ru:"",en:""}},emptyArrayInt32:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},toString:{bracket:"(str)",desc:{ru:"Принимает значение типа FixedString(16). Возвращает строку из 36 символов в текстовом виде.",en:"Accepts a FixedString(16) value containing the UUID in the binary format. Returns a readable string containing the UUID in the text format."}},greatest:{bracket:"(a, b)",desc:{ru:"Возвращает наибольшее значение из a и b.",en:"Returns the greatest element of a and b."}},emptyArrayUInt64:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},emptyArrayUInt32:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},formatReadableSize:{bracket:"(x)",desc:{en:"Gets a size (number of bytes). Returns a string that contains rounded size with the suffix (KiB, MiB etc.).

Example:

%% "}},toInt16OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},emptyArrayUInt8:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},protocol:{bracket:"(v)",desc:{ru:"Возвращает протокол. Примеры: http, ftp, mailto, magnet...",en:"- Selects the protocol. Examples: http, ftp, mailto, magnet..."}},regionToPopulation:{bracket:"(id[, geobase])",desc:{en:"Gets the population for a region.
The population can be recorded in files with the geobase. See the section "External dictionaries".
If the population is not recorded for the region, it returns 0.
In the Yandex geobase, the population might be recorded for child regions, but not for parent regions."}},notIn:{bracket:"(v)",desc:{ru:'Смотрите раздел "Операторы IN".',en:"See the section "IN operators"."}},position:{bracket:"(haystack, needle)",desc:{en:"The same as 'position', but the position is returned in Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
There's also positionCaseInsensitiveUTF8 function."}},arrayElement:{bracket:"(arr, n), arr[n] operator",desc:{en:"Get the element with the index 'n' from the array 'arr'.
'n' should be any integer type.
Indexes in an array begin from one.
Negative indexes are supported - in this case, it selects the corresponding element numbered from the end. "}},toStringCutToZero:{bracket:"(s)",desc:{en:"Accepts a String or FixedString argument. Returns a String that is cut to a first null byte occurrence."}},log:{bracket:"(x)",desc:{ru:"Принимает числовой аргумент, возвращает число типа Float64, близкое к десятичному логарифму от аргумента.",en:"Accepts a numeric argument and returns a Float64 number close to the decimal logarithm of the argument."}},SEIn:{bracket:"(lhs, rhs)",desc:{ru:"Проверяет принадлежность поисковой системы lhs поисковой системе rhs.",en:"Checks whether the 'lhs' search engine belongs to the 'rhs' search engine."}},replicate:{bracket:"(v)",desc:{en:"Create a MergeTree table with a different name. Move all the data from the directory with the ReplicatedMergeTree table data to the new table's data directory."}},sipHash64:{bracket:"(v)",desc:{en:'Calculates SipHash from a string.
Accepts a String-type argument. Returns UInt64.
SipHash is a cryptographic hash function. It works at least three times faster than MD5. For more information, see https://131002.net/siphash/'}},emptyArrayUInt16:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},hex:{bracket:"(str)",desc:{en:"Accepts a string containing any number of hexadecimal digits, and returns a string containing the corresponding bytes. Supports both uppercase and lowercase letters A-F. The number of hexadecimal digits doesn't have to be even."}},regionToDistrict:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a federal district (type 4 in the geobase). In every other way, this function is the same as 'regionToCity'. "}},arrayFilter:{bracket:"(func, arr1, ...)",desc:{en:"Returns an array containing only the elements in 'arr1' for which 'func' returns something other than 0.

Examples:

%%
SELECT arrayFilter(x -> x LIKE '%World%', ['Hello', 'abc World']) AS res "}},toStartOfQuarter:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the first day of the quarter.
The first day of the quarter is either 1 January, 1 April, 1 July, or 1 October. Returns the date."}},divide:{bracket:"(a, b), a / b operator",desc:{en:"Calculates the quotient of the numbers. The result type is always a floating-point type.
It is not integer division. For integer division, use the 'intDiv' function.
When dividing by zero you get 'inf', '-inf', or 'nan'."}},reverseUTF8:{bracket:"(v)",desc:{en:"Reverses a sequence of Unicode code points, assuming that the string contains a set of bytes representing a UTF-8 text. Otherwise, it does something else (it doesn't throw an exception)."}},toDate:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},emptyArrayFloat64:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},abs:{bracket:"(s, c)",desc:{en:"If the %%s%% string is non-empty and does not contain the %%c%% character at the end, it appends the %%c%% character to the end."}},yesterday:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns yesterday's date at one of the moments of request execution.
The same as 'today() - 1'."}},toMinute:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the minute of the hour (0-59)."}},bitXor:{bracket:"(a, b)",desc:{en:""}},minus:{bracket:"(a, b), a - b operator",desc:{en:"Calculates the difference. The result is always signed.

You can also calculate whole numbers from a date or date with time. The idea is the same - see above for 'plus'."}},toDateTime:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},modulo:{bracket:"(a, b), a % b operator",desc:{en:"Calculates the remainder after division.
If arguments are floating-point numbers, they are pre-converted to integers by dropping the decimal portion. The remainder is taken in the same sense as in C++. Truncated division is used for negative numbers.
An exception is thrown when dividing by zero or when dividing a minimal negative number by minus one."}},bitmaskToArray:{bracket:"(num)",desc:{en:"Accepts an integer. Returns an array of UInt64 numbers containing the list of powers of two that total the source number when summed. Numbers in the array are in ascending order."}},negate:{bracket:"(a), -a operator",desc:{en:"Calculates a number with the reverse sign. The result is always signed."}},emptyArrayFloat32:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},range:{bracket:"(N)",desc:{en:"Returns an array of numbers from 0 to N-1.
Just in case, an exception is thrown if arrays with a total length of more than 100,000,000 elements are created in a data block."}},arrayAll:{bracket:"([func,] arr1, ...)",desc:{en:"Returns 1 if 'func' returns something other than 0 for all the elements in 'arr'. Otherwise, it returns 0."}},toInt32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},unhex:{bracket:"(str)",desc:{en:"Accepts a string containing any number of hexadecimal digits, and returns a string containing the corresponding bytes. Supports both uppercase and lowercase letters A-F. The number of hexadecimal digits doesn't have to be even. If it is odd, the last digit is interpreted as the younger half of the 00-0F byte. If the argument string contains anything other than hexadecimal digits, some implementation-defined result is returned (an exception isn't thrown).
If you want to convert the result to a number, you can use the functions 'reverse' and 'reinterpretAsType'."}},toFloat64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},bitAnd:{bracket:"(a, b)",desc:{ru:"",en:""}},toStartOfYear:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the first day of the year.
Returns the date."}},bitOr:{bracket:"(a, b)",desc:{ru:"",en:""}},SEToRoot:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the search engine from the Yandex.Metrica dictionary. If any search engine matches the passed number, it returns a UInt8 number - the ID of the corresponding root search engine (for example, it converts Yandex.Images to Yandex). Otherwise, returns 0."}},toRelativeMinuteNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the minute, starting from a certain fixed point in the past."}},visitParamExtractInt:{bracket:"(params, name)",desc:{ru:"Аналогично для Int64.",en:"The same as for Int64."}},emptyArrayInt16:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},visitParamExtractString:{bracket:"(params, name)",desc:{en:"Parses the string in double quotes. The value is unescaped. If unescaping failed, it returns an empty string. "}},arrayEnumerateUniq:{bracket:"(arr, ...)",desc:{en:"Returns an array the same size as the source array, indicating for each element what its position is among elements with the same value. "}},visitParamExtractUInt:{bracket:"(params, name)",desc:{en:"Parses UInt64 from the value of the field named 'name'. If this is a string field, it tries to parse a number from the beginning of the string. If the field doesn't exist, or it exists but doesn't contain a number, it returns 0."}},toTypeName:{bracket:"(x)",desc:{en:"Gets the type name. Returns a string containing the type name of the passed argument."}},empty:{bracket:"(v)",desc:{en:"Accepts an empty array as argument and returns an array of one element equal to the default value."}},multiply:{bracket:"(a, b), a * b operator",desc:{en:"Calculates the product of the numbers."}},has:{bracket:"('database', 'table', 'column')",desc:{ru:"",en:"Accepts constant String columns - database name, table name and column name. Returns constant UInt8 value, equal to 1 if column exists,
otherwise 0.
If table doesn't exist than exception is thrown.
For elements of nested data structure function checks existence of column. For nested data structure 0 is returned."}},bitNot:{bracket:"(a)",desc:{ru:"",en:""}},lessOrEquals:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},reinterpretAsInt64:{bracket:"(v)",desc:{en:""}},IPv4NumToString:{bracket:"(num)",desc:{en:"Similar to IPv4NumToString, but using %%xxx%% instead of the last octet. "}},bitShiftLeft:{bracket:"(a, b)",desc:{ru:"",en:""}},dictGetInt16:{bracket:"(v)",desc:{ru:"",en:""}},toUInt32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},regionIn:{bracket:"(lhs, rhs[, geobase])",desc:{en:"Checks whether a 'lhs' region belongs to a 'rhs' region. Returns a UInt8 number equal to 1 if it belongs, or 0 if it doesn't belong.
The relationship is reflexive - any region also belongs to itself."}},reinterpretAsUInt8:{bracket:"(v)",desc:{en:""}},dictIsIn:{bracket:"(v)",desc:{en:"%%dictIsIn('dict_name', child_id, ancestor_id)%%
- For the 'dict_name' hierarchical dictionary, finds out whether the 'child_id' key is located inside 'ancestor_id' (or matches 'ancestor_id'). Returns UInt8."}},toSecond:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the second in the minute (0-59).
Leap seconds are not accounted for."}},least:{bracket:"(a, b)",desc:{en:"Returns the least element of a and b."}},countEqual:{bracket:"(arr, x)",desc:{en:'Returns the number of elements in the array equal to 'x'. Equivalent to arrayCount(elem -> elem = x, arr).'}},IPv4StringToNum:{bracket:"(s)",desc:{en:"The reverse function of IPv4NumToString. If the IPv4 address has an invalid format, it returns 0."}},replaceRegexpAll:{bracket:"(haystack, pattern, replacement)",desc:{en:"This does the same thing, but replaces all the occurrences"}},SHA224:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32).
The function works fairly slowly (SHA-1 processes about 5 million short strings per second per processor core, while SHA-224 and SHA-256 process about 2.2 million). "}},URLHash:{bracket:"(url[, N])",desc:{en:"A fast, decent-quality non-cryptographic hash function for a string obtained from a URL using some type of normalization.
URLHash(s) - Calculates a hash from a string without one of the trailing symbols /,? or # at the end, if present"}},equals:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},plus:{bracket:"(a, b), a + b operator",desc:{ru:"Вычисляет сумму чисел.

Также можно складывать целые числа с датой и датой-с-временем. В случае даты, прибавление целого числа означает прибавление соответствующего количества дней. В случае даты-с-временем - прибавление соответствующего количества секунд.",en:"Calculates the sum of the numbers.

You can also add whole numbers with a date or date and time. In the case of a date, adding a whole number means adding the corresponding number of days. For a date with time, it means adding the corresponding number of seconds."}},less:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},regionHierarchy:{bracket:"(id[, geobase])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. Returns an array of region IDs consisting of the passed region and all parents along the chain.
Example: %%regionHierarchy(toUInt32(213)) = [213,1,3,225,10001,10000]%%."}},toUInt64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},rowNumberInAllBlocks:{bracket:"()",desc:{en:"Returns an incremental row number within all blocks that were processed by this function."}},toDayOfWeek:{bracket:"(v)",desc:{en:"Converts a date or date with time to a UInt8 number containing the number of the day of the week (Monday is 1, and Sunday is 7)."}},bar:{bracket:"(v)",desc:{en:"Allows building a unicode-art diagram.

bar(x, min, max, width) - Draws a band with a width proportional to (x - min) and equal to 'width' characters when x"}},"if":{bracket:"(v)",desc:{en:"The suffix -%%If%% can be appended to the name of any aggregate function. In this case, the aggregate function accepts an extra argument - a condition (Uint8 type). "}},regionToArea:{bracket:"(id[, geobase])",desc:{en:"Converts a region to an area (type 5 in the geobase). In every other way, this function is the same as 'regionToCity'.──────────────────────────────────"}},dictGetUInt16:{bracket:"(v)",desc:{ru:"",en:""}},toUInt8:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toUInt16:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},path:{bracket:"(URL)",desc:{en:"- The same thing, but without the protocol and host in the result. The / element (root) is not included."}},extractURLParameters:{bracket:"(URL)",desc:{ru:"Возвращает массив строк вида name=value, соответствующих параметрам URL. Значения никак не декодируются.",en:"- Gets an array of name=value strings corresponding to the URL parameters. The values are not decoded in any way."}},OSHierarchy:{bracket:"(v)",desc:{ru:"Принимает число типа UInt8 - идентификатор операционной системы из словаря Яндекс.Метрики. Возвращает массив с иерархией операционных систем. Аналогично функции regionHierarchy.",en:"Accepts a UInt8 number - the ID of the operating system from the Yandex.Metrica dictionary. Returns an array with a hierarchy of operating systems. Similar to the 'regionHierarchy' function."}},cutQueryStringAndFragment:{bracket:"(v)",desc:{ru:"Удаляет query string и fragment identifier. Знак вопроса и символ решётки тоже удаляются.",en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},timeSlots:{bracket:"(StartTime, Duration)",desc:{ru:"Для интервала времени, начинающегося в StartTime и продолжающегося Duration секунд, возвращает массив моментов времени, состоящий из округлений вниз до получаса точек из этого интервала.
Например, %%timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600)) = [toDateTime('2012-01-01 12:00:00'), toDateTime('2012-01-01 12:30:00')]%%.
Это нужно для поиска хитов, входящих в соответствующий визит.",en:"For a time interval starting at 'StartTime' and continuing for 'Duration' seconds, it returns an array of moments in time, consisting of points from this interval rounded down to the half hour.
For example, %%timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600)) = [toDateTime('2012-01-01 12:00:00'), toDateTime('2012-01-01 12:30:00')]%%.
This is necessary for searching for pageviews in the corresponding session."}},toUInt32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toStartOfMinute:{bracket:"(v)",desc:{ru:"Округляет дату-с-временем вниз до начала минуты.",en:"Rounds down a date with time to the start of the minute."}},version:{bracket:"()",desc:{ru:"Возвращает версию сервера в виде строки.",en:"Returns server's version as a string."}},toUInt64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toInt16:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},reinterpretAsInt16:{bracket:"(v)",desc:{en:""}},toInt64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toFixedString:{bracket:"(s, N)",desc:{ru:"Преобразует аргумент типа String в тип FixedString(N) (строку фиксированной длины N). N должно быть константой.
Если строка имеет меньше байт, чем N, то она дополняется нулевыми байтами справа. Если строка имеет больше байт, чем N - кидается исключение.",en:"Converts a String type argument to a FixedString(N) type (a string with fixed length N). N must be a constant. If the string has fewer bytes than N, it is passed with null bytes to the right. If the string has more bytes than N, an exception is thrown."}},toFloat32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},dictGetHierarchy:{bracket:"(v)",desc:{ru:"%%dictGetHierarchy('dict_name', id)%%
- для иерархического словаря dict_name - вернуть массив ключей словаря, начиная с id и продолжая цепочкой родительских элементов. Возвращает Array(UInt64).",en:"%%dictGetHierarchy('dict_name', id)%%
- For the 'dict_name' hierarchical dictionary, returns an array of dictionary keys starting from 'id' and continuing along the chain of parent elements. Returns Array(UInt64)."}},dictGetInt64:{bracket:"(v)",desc:{ru:"",en:""}},CAST:{bracket:"(x, t)",desc:{en:"Casts x to the t data type.
The syntax %%CAST(x AS t)%% is also supported.
"}},toRelativeSecondNum:{bracket:"(v)",desc:{ru:"Переводит дату-с-временем в номер секунды, начиная с некоторого фиксированного момента в прошлом.",en:"Converts a date with time or date to the number of the second, starting from a certain fixed point in the past."}},toUInt8OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toStartOfMonth:{bracket:"(v)",desc:{ru:"Округляет дату или дату-с-временем вниз до первого дня месяца.
Возвращается дата.",en:"Rounds down a date or date with time to the first day of the month.
Returns the date."}},rand64:{bracket:"(v)",desc:{ru:"Возвращает псевдослучайное число типа UInt64, равномерно распределённое среди всех чисел типа UInt64.
Используется linear congruential generator.",en:"Returns a pseudo-random UInt64 number, evenly distributed among all UInt64-type numbers.
Uses a linear congruential generator."}},toInt8OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toFloat32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toYear:{bracket:"(v)",desc:{ru:"Переводит дату или дату-с-временем в число типа UInt16, содержащее номер года (AD).",en:"Converts a date or date with time to a UInt16 number containing the year number (AD)."}},atan:{bracket:"(x)",desc:{ru:"Арктангенс.",en:"The arc tangent."}},toFloat64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},arrayEnumerate:{bracket:"(arr, ...)",desc:{en:"Returns an array the same size as the source array, indicating for each element what its position is among elements with the same value.
"}},toDayOfMonth:{bracket:"(v)",desc:{en:"Converts a date or date with time to a UInt8 number containing the number of the day of the month (1-31)."}},dictGetUInt64:{bracket:"(v)",desc:{ru:"",en:""}},IPv4NumToStringClassC:{bracket:"(num)",desc:{en:"Similar to IPv4NumToString, but using %%xxx%% instead of the last octet. "}},reinterpretAsString:{bracket:"(v)",desc:{en:"This function accepts a number or date or date with time, and returns a string containing bytes representing the corresponding value in host order (little endian). Null bytes are dropped from the end. For example, a UInt32 type value of 255 is a string that is one byte long."}},toHour:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the hour in 24-hour time (0-23).
This function assumes that if clocks are moved ahead, it is by one hour and occurs at 2 a.m., and if clocks are moved back, it is by one hour and occurs at 3 a.m. (which is not always true - even in Moscow the clocks were once changed at a different time)."}},ignore:{bracket:"(...)",desc:{en:"A function that accepts any arguments and always returns 0.
However, the argument is still calculated. This can be used for benchmarks."}},arrayJoin:{bracket:"(v)",desc:{en:"This is a very unusual function.

Normal functions don't change a set of rows, but just change the values in each row (map). Aggregate functions compress a set of rows (fold or reduce).
The 'arrayJoin' function takes each row and generates a set of rows (unfold).

T"}},length:{bracket:"(v)",desc:{en:"Returns the length of a string in Unicode code points (not in characters), assuming that the string contains a set of bytes that make up UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
The result type is UInt64."}},tuple:{bracket:"(tuple, n), operator x.N",desc:{en:"A function that allows getting columns from a tuple.
'N' is the column index, starting from 1. 'N' must be a constant. 'N' must be a strict postive integer no greater than the size of the tuple.
There is no cost to execute the function."}},extractURLParameterNames:{bracket:"(URL)",desc:{en:"- Gets an array of name=value strings corresponding to the names of URL parameters. The values are not decoded in any way."}},tupleElement:{bracket:"(tuple, n), operator x.N",desc:{en:"A function that allows getting columns from a tuple.
'N' is the column index, starting from 1. 'N' must be a constant. 'N' must be a strict postive integer no greater than the size of the tuple.
There is no cost to execute the function."}},"in":{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},globalIn:{bracket:"(v)",desc:{en:"See the section "IN operators"."}},isFinite:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is not infinite and not a NaN, otherwise 0."}},isNaN:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is a NaN, otherwise 0."}},isInfinite:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is infinite, otherwise 0.
Note that 0 is returned for a NaN."}},transform:{bracket:"(v)",desc:{en:"Transforms a value according to the explicitly defined mapping of some elements to other ones.
There are two variations of this function:

1. %%transform(x, array_from, array_to, default)%% "}},rand:{bracket:"(v)",desc:{en:"Returns a pseudo-random UInt64 number, evenly distributed among all UInt64-type numbers.
Uses a linear congruential generator."}},reinterpretAsUInt16:{bracket:"(v)",desc:{en:""}},pi:{bracket:"(v)",desc:{en:"Maximum pipeline depth. Corresponds to the number of transformations that each data block goes through during query processing. Counted within the limits of a single server. If the pipeline depth is greater, an exception is thrown. By default, 1000."}},reinterpretAsUInt32:{bracket:"(v)",desc:{en:""}},reinterpretAsUInt64:{bracket:"(v)",desc:{en:""}},reinterpretAsInt8:{bracket:"(v)",desc:{en:""}},upperUTF8:{bracket:"(v)",desc:{en:"Converts a string to uppercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. So for Turkish the result might not be exactly correct. "}},reinterpretAsInt32:{bracket:"(v)",desc:{en:""}},reinterpretAsFloat32:{bracket:"(v)",desc:{en:""}},reinterpretAsFloat64:{bracket:"(v)",desc:{en:""}},reinterpretAsDate:{bracket:"(v)",desc:{en:""}},reinterpretAsDateTime:{bracket:"(v)",desc:{en:""}},roundToExp2:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than one, it returns 0. Otherwise, it rounds the number down to the nearest (whole non-negative) degree of two."}},upper:{bracket:"(v)",desc:{en:"Converts a string to uppercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. So for Turkish the result might not be exactly correct."}},positionUTF8:{bracket:"(haystack, needle)",desc:{en:"The same as 'position', but the position is returned in Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
There's also positionCaseInsensitiveUTF8 function."}},roundDuration:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than one, it returns 0. Otherwise, it rounds the number down to numbers from the set: 1, 10, 30, 60, 120, 180, 240, 300, 600, 1200, 1800, 3600, 7200, 18000, 36000. This function is specific to Yandex.Metrica and used for implementing the report on session length."}},roundAge:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than 18, it returns 0. Otherwise, it rounds the number down to numbers from the set: 18, 25, 35, 45. This function is specific to Yandex.Metrica and used for implementing the report on user age."}},round:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than 18, it returns 0. Otherwise, it rounds the number down to numbers from the set: 18, 25, 35, 45. This function is specific to Yandex.Metrica and used for implementing the report on user age."}},floor:{bracket:"(x[, N])",desc:{en:"Returns a rounder number that is less than or equal to 'x'."}},notEmpty:{bracket:"(v)",desc:{en:"Returns 0 for an empty array, or 1 for a non-empty array.
The result type is UInt8.
The function also works for strings."}},lengthUTF8:{bracket:"(v)",desc:{en:"Returns the length of a string in Unicode code points (not in characters), assuming that the string contains a set of bytes that make up UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
The result type is UInt64."}},lower:{bracket:"(v)",desc:{en:"Converts a string to lowercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. "}},lowerUTF8:{bracket:"(v)",desc:{en:"Converts a string to lowercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. "}},reverse:{bracket:"(v)",desc:{en:"Reverses a sequence of Unicode code points, assuming that the string contains a set of bytes representing a UTF-8 text. Otherwise, it does something else (it doesn't throw an exception)."}},URLPathHierarchy:{bracket:"(URL)",desc:{en:"- The same thing, but without the protocol and host in the result. The / element (root) is not included. "}},substringUTF8:{bracket:"(s, offset, length)",desc:{en:"The same as 'substring', but for Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception)."}},appendTrailingCharIfAbsent:{bracket:"(s, c)",desc:{en:"If the %%s%% string is non-empty and does not contain the %%c%% character at the end, it appends the %%c%% character to the end." -}},alphaTokens:{bracket:"(s)",desc:{en:"Selects substrings of consecutive bytes from the range a-z and A-Z.
Returns an array of selected substrings."}},splitByChar:{bracket:"(separator, s)",desc:{en:"Splits a string into substrings, using 'separator' as the separator.
'separator' must be a string constant consisting of exactly one character.
Returns an array of selected substrings"}},arrayStringConcat:{bracket:"(arr[, separator])",desc:{en:"Concatenates strings from the array elements, using 'separator' as the separator.
'separator' is a string constant, an optional parameter. By default it is an empty string.
Returns a string."}},replaceAll:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replaces all occurrences of the 'pattern' substring in 'haystack' with the 'replacement' substring."}},replaceRegexpOne:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replacement using the 'pattern' regular expression. A re2 regular expression. Replaces only the first occurrence, if it exists.
A pattern can be specified as 'replacement'. "}},cbrt:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the cubic root of the argument."}},match:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"Pattern matching for event chains.

'pattern' is a string containing a pattern to match. The pattern is similar to a regular expression."}},cutURLParameter:{bracket:"(URL, name)",desc:{en:"Removes the URL parameter named 'name', if present. This function works under the assumption that the parameter name is encoded in the URL exactly the same way as in the passed argument."}},like:{bracket:"(haystack, pattern), haystack NOT LIKE pattern operator",desc:{en:"The same thing as 'like', but negative."}},domain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},domainWithoutWWW:{bracket:"(v)",desc:{en:"- Selects the domain and removes no more than one 'www.' from the beginning of it, if present."}},firstSignificantSubdomain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},queryString:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},queryStringAndFragment:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},extractURLParameter:{bracket:"(URL)",desc:{en:"- Gets an array of name=value strings corresponding to the names of URL parameters. The values are not decoded in any way."}},URLHierarchy:{bracket:"(URL)",desc:{en:"- Gets an array containing the URL trimmed to the %%/%%, %%?%% characters in the path and query-string. Consecutive separator characters are counted as one. The cut is made in the position after all the consecutive separator characters. Example:"}},cutToFirstSignificantSubdomain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},cutWWW:{bracket:"(v)",desc:{en:"Removes no more than one 'www.' from the beginning of the URL's domain, if present."}},cutQueryString:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},cutFragment:{bracket:"(v)",desc:{en:"Removes the fragment identifier. The number sign is also removed."}},visitParamHas:{bracket:"(params, name)",desc:{en:"Checks whether there is a field with the 'name' name."}},visitParamExtractFloat:{bracket:"(params, name)",desc:{en:"The same as for Float64."}},visitParamExtractBool:{bracket:"(params, name)",desc:{en:"Parses a true/false value. The result is UInt8."}},visitParamExtractRaw:{bracket:"(params, name)",desc:{en:"Returns the value of a field, including separators."}},exp:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 10x."}},exp2:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 2x."}},exp10:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 10x."}},tgamma:{bracket:"(x)",desc:{en:"Gamma function."}},log10:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the decimal logarithm of the argument."}},sqrt:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the square root of the argument."}},erf:{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},erfc:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 1 - erf(x), but without loss of precision for large 'x' values."}},lgamma:{bracket:"(x)",desc:{en:"The logarithm of the gamma function."}},sin:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is infinite, otherwise 0.
Note that 0 is returned for a NaN."}},cos:{bracket:"(x)",desc:{ru:"Арккосинус.",en:"The arc cosine."}},tan:{bracket:"(x)",desc:{ru:"Арктангенс.",en:"The arc tangent."}},pow:{bracket:"(x, y)",desc:{ru:"xy.",en:"xy."}}}},/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(){angular.module(smi2.app.name).run(["$rootScope","$state","$mdTheming","ThemeService","localStorageService",function(e,t,a,n,i){e.breadcrumbs=[],e.currentDatabase=null;var r=e.$on("$stateChangeError",function(e,a,n,i,r,s){"notAuthorized"==s&&t.go("login")});e.$on("$destroy",function(){return r}),window.document.title="Tabix.IO ["+window.TabixBuildDate+"]",e.sqlLog=i.get("sqlLog")||[],e.$watch("sqlLog",function(e){i.set("sqlLog",e)}),e.isInitDatabaseStructure=!1,e.sidebar={letf_resizable_width:200,clickLetfResizable:function(){e.sidebar.letf_resizable_width<10?e.sidebar.letf_resizable_width=200:e.sidebar.letf_resizable_width=0}}}])}(),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){e.module(t.app.name).config(["$stateProvider",function(e){e.state("base",{"abstract":!0,resolve:{session:["$q","API",function(e,t){window.global_tabix_disable_exit=!1,_.isObject(window.global_tabix_default_settings)&&(_.isUndefined(window.global_tabix_default_settings.host)||_.isUndefined(window.global_tabix_default_settings.login)||(window.global_tabix_disable_exit=!0,t.setConnection(window.global_tabix_default_settings)));var a=e.defer();return t.isAuthorized()?a.resolve():a.reject("notAuthorized"),a.promise}]},templateUrl:"app/base/base.html"}).state("layout",{parent:"base","abstract":!0,views:{header:{templateUrl:"app/base/header.html",controller:"HeaderController"},sidebar:{templateUrl:"app/base/sidebar.html",controller:"SidebarController"},main:{template:""}}}).state("layoutDash",{parent:"base","abstract":!0,views:{header:{templateUrl:"app/base/header.html",controller:"HeaderController"},sidebar:{templateUrl:"app/dash/dashsidebar.html",controller:"DashSidebarController"},main:{template:""}}}).state("dashboard",{parent:"layout",url:"",controller:["$state",function(e){e.go("sql")}]}).state("dashId",{parent:"layoutDash",url:"/dash/{dashId}",templateUrl:"app/dash/dash.html",controller:"DashController"}).state("dash",{parent:"layoutDash",url:"/dash",templateUrl:"app/dash/dash.html",controller:"DashController"}).state("devplot",{parent:"layoutDash",url:"/devplot",templateUrl:"app/dev/plot.html",controller:"devplotController"}).state("devedit",{parent:"layoutDash",url:"/devedit",templateUrl:"app/dev/edit.html",controller:"EditController"}).state("preference",{parent:"layout",url:"/Preference",templateUrl:"app/preference/preference.html",controller:"PreferenceController"}).state("login",{url:"/login",templateUrl:"app/login/login.html",controller:"LoginController"}).state("sql",{parent:"layout",url:"/sql",templateUrl:"app/sql/sql.html",controller:"SqlController"}).state("table",{parent:"layout",url:"/database/{dbName}/table/{tableName}",templateUrl:"app/table/table.html",controller:"TableController"}).state("metrics",{parent:"layoutDash",url:"/metrics",templateUrl:"app/metrics/metrics.html",controller:"MetricsController"}).state("404",{parent:"layout",templateUrl:"app/base/404.html"})}])}(angular,smi2),/* - * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors - */ -function(e,t){e.module(t.app.name).config(["$locationProvider","$httpProvider","$sceProvider","$urlRouterProvider","ThemeServiceProvider","$mdThemingProvider",function(e,t,a,n,i,r){t.interceptors.push("HttpInterceptor"),a.enabled(!1);var s=!1;s=_.isFunction(i.$get[0])?i.$get[0]().isDark():i.$get().isDark(),console.log("isDark",s),s&&r.theme("default").dark().primaryPalette("blue").accentPalette("blue",{"default":"500"}),window.disableNgInspectWatchers=!1,n.otherwise(function(e){var t=e.get("$state");t.transitionTo("404")})}])}(angular,smi2); \ No newline at end of file diff --git a/build/scripts/app.js b/build/scripts/app.js index 6e1da8a7..1614d810 100644 --- a/build/scripts/app.js +++ b/build/scripts/app.js @@ -11,7 +11,7 @@ * * Date: 2017-03-20T18:59Z */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function i(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"===n||me.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return me.isFunction(t)?me.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return se.call(t,e)>-1!==n}):Ee.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return me.each(e.match(Re)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&me.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&me.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),me.ready()}function h(){this.expando=me.expando+h.uid++}function f(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:Ne.test(e)?JSON.parse(e):e}function p(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Be,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n=f(n)}catch(r){}Pe.set(e,t,n)}else n=void 0;return n}function m(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return me.css(e,t,"")},l=s(),c=n&&n[3]||(me.cssNumber[t]?"":"px"),u=(me.cssNumber[t]||"px"!==c&&+l)&&ze.exec(me.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do o=o||".5",u/=o,me.style(e,t,u+c);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function g(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ve[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ve[i]=r,r)}function _(e,t){for(var n,i,r=[],o=0,a=e.length;a>o;o++)i=e[o],i.style&&(n=i.style.display,t?("none"===n&&(r[o]=Fe.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&je(i)&&(r[o]=g(i))):"none"!==n&&(r[o]="none",Fe.set(i,"display",n)));for(o=0;a>o;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&r(e,t)?me.merge([e],n):n}function y(e,t){for(var n=0,i=e.length;i>n;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function b(e,t,n,i,r){for(var o,a,s,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;p>f;f++)if(o=e[f],o||0===o)if("object"===me.type(o))me.merge(h,o.nodeType?[o]:o);else if(Xe.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(Ge.exec(o)||["",""])[1].toLowerCase(),l=Ke[s]||Ke._default,a.innerHTML=l[1]+me.htmlPrefilter(o)+l[2],u=l[0];u--;)a=a.lastChild;me.merge(h,a.childNodes),a=d.firstChild,a.textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&me.inArray(o,i)>-1)r&&r.push(o);else if(c=me.contains(o.ownerDocument,o),a=v(d.appendChild(o),"script"),c&&y(a),n)for(u=0;o=a[u++];)Ye.test(o.type||"")&&n.push(o);return d}function w(){return!0}function x(){return!1}function C(){try{return ne.activeElement}catch(e){}}function k(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)k(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=x;else if(!r)return e;return 1===o&&(a=r,r=function(e){return me().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=me.guid++)),e.each(function(){me.event.add(this,t,r,i,n)})}function E(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?me(">tbody",e)[0]||e:e}function A(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function S(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function T(e,t){var n,i,r,o,a,s,l,c;if(1===t.nodeType){if(Fe.hasData(e)&&(o=Fe.access(e),a=Fe.set(t,o),c=o.events)){delete a.handle,a.events={};for(r in c)for(n=0,i=c[r].length;i>n;n++)me.event.add(t,r,c[r][n])}Pe.hasData(e)&&(s=Pe.access(e),l=me.extend({},s),Pe.set(t,l))}}function M(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function D(e,t,i,r){t=oe.apply([],t);var o,a,s,l,c,u,d=0,h=e.length,f=h-1,p=t[0],m=me.isFunction(p);if(m||h>1&&"string"==typeof p&&!fe.checkClone&&it.test(p))return e.each(function(n){var o=e.eq(n);m&&(t[0]=p.call(this,n,o.html())),D(o,t,i,r)});if(h&&(o=b(t,e[0].ownerDocument,!1,e,r),a=o.firstChild,1===o.childNodes.length&&(o=a),a||r)){for(s=me.map(v(o,"script"),A),l=s.length;h>d;d++)c=o,d!==f&&(c=me.clone(c,!0,!0),l&&me.merge(s,v(c,"script"))),i.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,me.map(s,S),d=0;l>d;d++)c=s[d],Ye.test(c.type||"")&&!Fe.access(c,"globalEval")&&me.contains(u,c)&&(c.src?me._evalUrl&&me._evalUrl(c.src):n(c.textContent.replace(ot,""),u))}return e}function R(e,t,n){for(var i,r=t?me.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||me.cleanData(v(i)),i.parentNode&&(n&&me.contains(i.ownerDocument,i)&&y(v(i,"script")),i.parentNode.removeChild(i));return e}function O(e,t,n){var i,r,o,a,s=e.style;return n=n||lt(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||me.contains(e.ownerDocument,e)||(a=me.style(e,t)),!fe.pixelMarginRight()&&st.test(a)&&at.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function $(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function I(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ft.length;n--;)if(e=ft[n]+t,e in pt)return e}function L(e){var t=me.cssProps[e];return t||(t=me.cssProps[e]=I(e)||e),t}function F(e,t,n){var i=ze.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function P(e,t,n,i,r){var o,a=0;for(o=n===(i?"border":"content")?4:"width"===t?1:0;4>o;o+=2)"margin"===n&&(a+=me.css(e,n+qe[o],!0,r)),i?("content"===n&&(a-=me.css(e,"padding"+qe[o],!0,r)),"margin"!==n&&(a-=me.css(e,"border"+qe[o]+"Width",!0,r))):(a+=me.css(e,"padding"+qe[o],!0,r),"padding"!==n&&(a+=me.css(e,"border"+qe[o]+"Width",!0,r)));return a}function N(e,t,n){var i,r=lt(e),o=O(e,t,r),a="border-box"===me.css(e,"boxSizing",!1,r);return st.test(o)?o:(i=a&&(fe.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),o=parseFloat(o)||0,o+P(e,t,n||(a?"border":"content"),i,r)+"px")}function B(e,t,n,i,r){return new B.prototype.init(e,t,n,i,r)}function H(){gt&&(ne.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(H):e.setTimeout(H,me.fx.interval),me.fx.tick())}function z(){return e.setTimeout(function(){mt=void 0}),mt=me.now()}function q(e,t){var n,i=0,r={height:e};for(t=t?1:0;4>i;i+=2-t)n=qe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function j(e,t,n){for(var i,r=(U.tweeners[t]||[]).concat(U.tweeners["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function W(e,t,n){var i,r,o,a,s,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&je(e),g=Fe.get(e,"fxshow");n.queue||(a=me._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,me.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(r=t[i],_t.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||me.style(e,i)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(f)){d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],c=g&&g.display,null==c&&(c=Fe.get(e,"display")),u=me.css(e,"display"),"none"===u&&(c?u=c:(_([e],!0),c=e.style.display||c,u=me.css(e,"display"),_([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===me.css(e,"float")&&(l||(h.done(function(){p.display=c}),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in f)l||(g?"hidden"in g&&(m=g.hidden):g=Fe.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&_([e],!0),h.done(function(){m||_([e]),Fe.remove(e,"fxshow");for(i in f)me.style(e,i,f[i])})),l=j(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}}function V(e,t){var n,i,r,o,a;for(n in e)if(i=me.camelCase(n),r=t[i],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=me.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function U(e,t,n){var i,r,o=0,a=U.prefilters.length,s=me.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=mt||z(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),1>o&&l?n:(l||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:mt||z(),duration:n.duration,tweens:[],createTween:function(t,n){var i=me.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(V(u,c.opts.specialEasing);a>o;o++)if(i=U.prefilters[o].call(c,e,u,c.opts))return me.isFunction(i.stop)&&(me._queueHooks(c.elem,c.opts.queue).stop=me.proxy(i.stop,i)),i;return me.map(u,j,c),me.isFunction(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),me.fx.timer(me.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}function G(e){var t=e.match(Re)||[];return t.join(" ")}function Y(e){return e.getAttribute&&e.getAttribute("class")||""}function K(e,t,n,i){var r;if(Array.isArray(t))me.each(t,function(t,r){n||Tt.test(e)?i(e,r):K(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==me.type(t))i(e,t);else for(r in t)K(e+"["+r+"]",t[r],n,i)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(Re)||[];if(me.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Z(e,t,n,i){function r(s){var l;return o[s]=!0,me.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===Ht;return r(t.dataTypes[0])||!o["*"]&&r("*")}function Q(e,t){var n,i,r=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&me.extend(!0,e,i),e}function J(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function ee(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=c[l+" "+o]||c["* "+o],!a)for(r in c)if(s=r.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[r]:c[r]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var te=[],ne=e.document,ie=Object.getPrototypeOf,re=te.slice,oe=te.concat,ae=te.push,se=te.indexOf,le={},ce=le.toString,ue=le.hasOwnProperty,de=ue.toString,he=de.call(Object),fe={},pe="3.2.1",me=function(e,t){return new me.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_e=/^-ms-/,ve=/-([a-z])/g,ye=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:pe,constructor:me,length:0,toArray:function(){return re.call(this)},get:function(e){return null==e?re.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:te.sort,splice:te.splice},me.extend=me.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||me.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(c&&i&&(me.isPlainObject(i)||(r=Array.isArray(i)))?(r?(r=!1,o=n&&Array.isArray(n)?n:[]):o=n&&me.isPlainObject(n)?n:{},a[t]=me.extend(c,o,i)):void 0!==i&&(a[t]=i));return a},me.extend({expando:"jQuery"+(pe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return e&&"[object Object]"===ce.call(e)?(t=ie(e))?(n=ue.call(t,"constructor")&&t.constructor,"function"==typeof n&&de.call(n)===he):!0:!1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(_e,"ms-").replace(ve,ye)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;n>r&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?me.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;r>a;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e)?(i=re.call(arguments,2),r=function(){return e.apply(t||this,i.concat(re.call(arguments)))},r.guid=e.guid=e.guid||me.guid++,r):void 0},now:Date.now,support:fe}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=te[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var be=/*! +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||ne;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function i(e){var t=!!e&&"length"in e&&e.length,n=me.type(e);return"function"===n||me.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function o(e,t,n){return me.isFunction(t)?me.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?me.grep(e,function(e){return se.call(t,e)>-1!==n}):Ee.test(t)?me.filter(t,e,n):(t=me.filter(t,e),me.grep(e,function(e){return se.call(t,e)>-1!==n&&1===e.nodeType}))}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return me.each(e.match(Re)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&me.isFunction(r=e.promise)?r.call(e).done(t).fail(n):e&&me.isFunction(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function d(){ne.removeEventListener("DOMContentLoaded",d),e.removeEventListener("load",d),me.ready()}function h(){this.expando=me.expando+h.uid++}function f(e){return"true"===e?!0:"false"===e?!1:"null"===e?null:e===+e+""?+e:Pe.test(e)?JSON.parse(e):e}function p(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Be,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n=f(n)}catch(r){}Ne.set(e,t,n)}else n=void 0;return n}function m(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return me.css(e,t,"")},l=s(),c=n&&n[3]||(me.cssNumber[t]?"":"px"),u=(me.cssNumber[t]||"px"!==c&&+l)&&ze.exec(me.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do o=o||".5",u/=o,me.style(e,t,u+c);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function g(e){var t,n=e.ownerDocument,i=e.nodeName,r=Ve[i];return r?r:(t=n.body.appendChild(n.createElement(i)),r=me.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Ve[i]=r,r)}function _(e,t){for(var n,i,r=[],o=0,a=e.length;a>o;o++)i=e[o],i.style&&(n=i.style.display,t?("none"===n&&(r[o]=Fe.get(i,"display")||null,r[o]||(i.style.display="")),""===i.style.display&&je(i)&&(r[o]=g(i))):"none"!==n&&(r[o]="none",Fe.set(i,"display",n)));for(o=0;a>o;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&r(e,t)?me.merge([e],n):n}function y(e,t){for(var n=0,i=e.length;i>n;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function b(e,t,n,i,r){for(var o,a,s,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;p>f;f++)if(o=e[f],o||0===o)if("object"===me.type(o))me.merge(h,o.nodeType?[o]:o);else if(Xe.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(Ge.exec(o)||["",""])[1].toLowerCase(),l=Ke[s]||Ke._default,a.innerHTML=l[1]+me.htmlPrefilter(o)+l[2],u=l[0];u--;)a=a.lastChild;me.merge(h,a.childNodes),a=d.firstChild,a.textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(i&&me.inArray(o,i)>-1)r&&r.push(o);else if(c=me.contains(o.ownerDocument,o),a=v(d.appendChild(o),"script"),c&&y(a),n)for(u=0;o=a[u++];)Ye.test(o.type||"")&&n.push(o);return d}function w(){return!0}function x(){return!1}function C(){try{return ne.activeElement}catch(e){}}function k(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)k(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=x;else if(!r)return e;return 1===o&&(a=r,r=function(e){return me().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=me.guid++)),e.each(function(){me.event.add(this,t,r,i,n)})}function E(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?me(">tbody",e)[0]||e:e}function A(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function S(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function T(e,t){var n,i,r,o,a,s,l,c;if(1===t.nodeType){if(Fe.hasData(e)&&(o=Fe.access(e),a=Fe.set(t,o),c=o.events)){delete a.handle,a.events={};for(r in c)for(n=0,i=c[r].length;i>n;n++)me.event.add(t,r,c[r][n])}Ne.hasData(e)&&(s=Ne.access(e),l=me.extend({},s),Ne.set(t,l))}}function M(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ue.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function D(e,t,i,r){t=oe.apply([],t);var o,a,s,l,c,u,d=0,h=e.length,f=h-1,p=t[0],m=me.isFunction(p);if(m||h>1&&"string"==typeof p&&!fe.checkClone&&it.test(p))return e.each(function(n){var o=e.eq(n);m&&(t[0]=p.call(this,n,o.html())),D(o,t,i,r)});if(h&&(o=b(t,e[0].ownerDocument,!1,e,r),a=o.firstChild,1===o.childNodes.length&&(o=a),a||r)){for(s=me.map(v(o,"script"),A),l=s.length;h>d;d++)c=o,d!==f&&(c=me.clone(c,!0,!0),l&&me.merge(s,v(c,"script"))),i.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,me.map(s,S),d=0;l>d;d++)c=s[d],Ye.test(c.type||"")&&!Fe.access(c,"globalEval")&&me.contains(u,c)&&(c.src?me._evalUrl&&me._evalUrl(c.src):n(c.textContent.replace(ot,""),u))}return e}function R(e,t,n){for(var i,r=t?me.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||me.cleanData(v(i)),i.parentNode&&(n&&me.contains(i.ownerDocument,i)&&y(v(i,"script")),i.parentNode.removeChild(i));return e}function $(e,t,n){var i,r,o,a,s=e.style;return n=n||lt(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||me.contains(e.ownerDocument,e)||(a=me.style(e,t)),!fe.pixelMarginRight()&&st.test(a)&&at.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0!==a?a+"":a}function O(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function I(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ft.length;n--;)if(e=ft[n]+t,e in pt)return e}function L(e){var t=me.cssProps[e];return t||(t=me.cssProps[e]=I(e)||e),t}function F(e,t,n){var i=ze.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function N(e,t,n,i,r){var o,a=0;for(o=n===(i?"border":"content")?4:"width"===t?1:0;4>o;o+=2)"margin"===n&&(a+=me.css(e,n+qe[o],!0,r)),i?("content"===n&&(a-=me.css(e,"padding"+qe[o],!0,r)),"margin"!==n&&(a-=me.css(e,"border"+qe[o]+"Width",!0,r))):(a+=me.css(e,"padding"+qe[o],!0,r),"padding"!==n&&(a+=me.css(e,"border"+qe[o]+"Width",!0,r)));return a}function P(e,t,n){var i,r=lt(e),o=$(e,t,r),a="border-box"===me.css(e,"boxSizing",!1,r);return st.test(o)?o:(i=a&&(fe.boxSizingReliable()||o===e.style[t]),"auto"===o&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)]),o=parseFloat(o)||0,o+N(e,t,n||(a?"border":"content"),i,r)+"px")}function B(e,t,n,i,r){return new B.prototype.init(e,t,n,i,r)}function H(){gt&&(ne.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(H):e.setTimeout(H,me.fx.interval),me.fx.tick())}function z(){return e.setTimeout(function(){mt=void 0}),mt=me.now()}function q(e,t){var n,i=0,r={height:e};for(t=t?1:0;4>i;i+=2-t)n=qe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function j(e,t,n){for(var i,r=(U.tweeners[t]||[]).concat(U.tweeners["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function W(e,t,n){var i,r,o,a,s,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&je(e),g=Fe.get(e,"fxshow");n.queue||(a=me._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,me.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(r=t[i],_t.test(r)){if(delete t[i],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||me.style(e,i)}if(l=!me.isEmptyObject(t),l||!me.isEmptyObject(f)){d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],c=g&&g.display,null==c&&(c=Fe.get(e,"display")),u=me.css(e,"display"),"none"===u&&(c?u=c:(_([e],!0),c=e.style.display||c,u=me.css(e,"display"),_([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===me.css(e,"float")&&(l||(h.done(function(){p.display=c}),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1;for(i in f)l||(g?"hidden"in g&&(m=g.hidden):g=Fe.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&_([e],!0),h.done(function(){m||_([e]),Fe.remove(e,"fxshow");for(i in f)me.style(e,i,f[i])})),l=j(m?g[i]:0,i,h),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}}function V(e,t){var n,i,r,o,a;for(n in e)if(i=me.camelCase(n),r=t[i],o=e[n],Array.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=me.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function U(e,t,n){var i,r,o=0,a=U.prefilters.length,s=me.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=mt||z(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,o=1-i,a=0,l=c.tweens.length;l>a;a++)c.tweens[a].run(o);return s.notifyWith(e,[c,o,n]),1>o&&l?n:(l||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:me.extend({},t),opts:me.extend(!0,{specialEasing:{},easing:me.easing._default},n),originalProperties:t,originalOptions:n,startTime:mt||z(),duration:n.duration,tweens:[],createTween:function(t,n){var i=me.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(V(u,c.opts.specialEasing);a>o;o++)if(i=U.prefilters[o].call(c,e,u,c.opts))return me.isFunction(i.stop)&&(me._queueHooks(c.elem,c.opts.queue).stop=me.proxy(i.stop,i)),i;return me.map(u,j,c),me.isFunction(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),me.fx.timer(me.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}function G(e){var t=e.match(Re)||[];return t.join(" ")}function Y(e){return e.getAttribute&&e.getAttribute("class")||""}function K(e,t,n,i){var r;if(Array.isArray(t))me.each(t,function(t,r){n||Tt.test(e)?i(e,r):K(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==me.type(t))i(e,t);else for(r in t)K(e+"["+r+"]",t[r],n,i)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(Re)||[];if(me.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Z(e,t,n,i){function r(s){var l;return o[s]=!0,me.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===Ht;return r(t.dataTypes[0])||!o["*"]&&r("*")}function Q(e,t){var n,i,r=me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&me.extend(!0,e,i),e}function J(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}a||(a=r)}o=o||a}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function ee(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=c[l+" "+o]||c["* "+o],!a)for(r in c)if(s=r.split(" "),s[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[r]:c[r]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}var te=[],ne=e.document,ie=Object.getPrototypeOf,re=te.slice,oe=te.concat,ae=te.push,se=te.indexOf,le={},ce=le.toString,ue=le.hasOwnProperty,de=ue.toString,he=de.call(Object),fe={},pe="3.2.1",me=function(e,t){return new me.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,_e=/^-ms-/,ve=/-([a-z])/g,ye=function(e,t){return t.toUpperCase()};me.fn=me.prototype={jquery:pe,constructor:me,length:0,toArray:function(){return re.call(this)},get:function(e){return null==e?re.call(this):0>e?this[e+this.length]:this[e]},pushStack:function(e){var t=me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return me.each(this,e)},map:function(e){return this.pushStack(me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(re.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:ae,sort:te.sort,splice:te.splice},me.extend=me.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||me.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(c&&i&&(me.isPlainObject(i)||(r=Array.isArray(i)))?(r?(r=!1,o=n&&Array.isArray(n)?n:[]):o=n&&me.isPlainObject(n)?n:{},a[t]=me.extend(c,o,i)):void 0!==i&&(a[t]=i));return a},me.extend({expando:"jQuery"+(pe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===me.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return e&&"[object Object]"===ce.call(e)?(t=ie(e))?(n=ue.call(t,"constructor")&&t.constructor,"function"==typeof n&&de.call(n)===he):!0:!1},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(_e,"ms-").replace(ve,ye)},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;n>r&&t.call(e[r],r,e[r])!==!1;r++);else for(r in e)if(t.call(e[r],r,e[r])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?me.merge(n,"string"==typeof e?[e]:e):ae.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;r>a;a++)o=t(e[a],a,n),null!=o&&s.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&s.push(o);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(n=e[t],t=e,e=n),me.isFunction(e)?(i=re.call(arguments,2),r=function(){return e.apply(t||this,i.concat(re.call(arguments)))},r.guid=e.guid=e.guid||me.guid++,r):void 0},now:Date.now,support:fe}),"function"==typeof Symbol&&(me.fn[Symbol.iterator]=te[Symbol.iterator]),me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){le["[object "+t+"]"]=t.toLowerCase()});var be=/*! * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * @@ -21,24 +21,32 @@ * * Date: 2016-08-08 */ -function(e){function t(e,t,n,i){var r,o,a,s,l,c,u,h=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:z)!==$&&O(t),t=t||$,L)){if(11!==p&&(l=_e.exec(e)))if(r=l[1]){if(9===p){if(!(a=t.getElementById(r)))return n;if(a.id===r)return n.push(a),n}else if(h&&(a=h.getElementById(r))&&B(t,a)&&a.id===r)return n.push(a),n}else{if(l[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((r=l[3])&&x.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(r)),n}if(x.qsa&&!U[e+" "]&&(!F||!F.test(e))){if(1!==p)h=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(we,xe):t.setAttribute("id",s=H),c=A(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);u=c.join(","),h=ve.test(e)&&d(t.parentNode)||t}if(u)try{return Q.apply(n,h.querySelectorAll(u)),n}catch(m){}finally{s===H&&t.removeAttribute("id")}}}return T(e.replace(se,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[H]=!0,e}function r(e){var t=$.createElement("fieldset");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ke(t)===e:t.disabled===e:"label"in t?t.disabled===e:!1}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function d(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function h(){}function f(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function p(e,t,n){var i=t.dir,r=t.next,o=r||i,a=n&&"parentNode"===o,s=j++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,r);return!1}:function(t,n,l){var c,u,d,h=[q,s];if(l){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||a)if(d=t[H]||(t[H]={}),u=d[t.uniqueID]||(d[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[o])&&c[0]===q&&c[1]===s)return h[2]=c[2];if(u[o]=h,h[2]=e(t,n,l))return!0}return!1}}function m(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function _(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),c&&t.push(s));return a}function v(e,t,n,r,o,a){return r&&!r[H]&&(r=v(r)),o&&!o[H]&&(o=v(o,a)),i(function(i,a,s,l){var c,u,d,h=[],f=[],p=a.length,m=i||g(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?m:_(m,h,e,s,l),y=n?o||(i?e:p||r)?[]:a:v;if(n&&n(v,y,s,l),r)for(c=_(y,f),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[f[u]]=!(v[f[u]]=d));if(i){if(o||e){if(o){for(c=[],u=y.length;u--;)(d=y[u])&&c.push(v[u]=d);o(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=o?ee(i,d):h[u])>-1&&(i[c]=!(a[c]=d))}}else y=_(y===a?y.splice(p,y.length):y),o?o(null,a,y,l):Q.apply(a,y)})}function y(e){for(var t,n,i,r=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),c=p(function(e){return ee(t,e)>-1},a,!0),u=[function(e,n,i){var r=!o&&(i||n!==M)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];r>s;s++)if(n=C.relative[e[s].type])u=[p(m(u),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[H]){for(i=++s;r>i&&!C.relative[e[i].type];i++);return v(s>1&&m(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,i>s&&y(e.slice(s,i)),r>i&&y(e=e.slice(i)),r>i&&f(e))}u.push(n)}return m(u)}function b(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,c){var u,d,h,f=0,p="0",m=i&&[],g=[],v=M,y=i||o&&C.find.TAG("*",c),b=q+=null==v?1:Math.random()||.1,w=y.length;for(c&&(M=a===$||a||c);p!==w&&null!=(u=y[p]);p++){if(o&&u){for(d=0,a||u.ownerDocument===$||(O(u),s=!L);h=e[d++];)if(h(u,a||$,s)){l.push(u);break}c&&(q=b)}r&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=p,r&&p!==f){for(d=0;h=n[d++];)h(m,g,a,s);if(i){if(f>0)for(;p--;)m[p]||g[p]||(g[p]=X.call(l));g=_(g)}Q.apply(l,g),c&&!i&&g.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(q=b,M=v),m};return r?i(a):a}var w,x,C,k,E,A,S,T,M,D,R,O,$,I,L,F,P,N,B,H="sizzle"+1*new Date,z=e.document,q=0,j=0,W=n(),V=n(),U=n(),G=function(e,t){return e===t&&(R=!0),0},Y={}.hasOwnProperty,K=[],X=K.pop,Z=K.push,Q=K.push,J=K.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\x00-\\xa0])+",re="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",oe=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(oe),he=new RegExp("^"+ie+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,_e=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),be=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,xe=function(e,t){return t?"\x00"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){O()},ke=p(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Q.apply(K=J.call(z.childNodes),z.childNodes),K[z.childNodes.length].nodeType}catch(Ee){Q={apply:K.length?function(e,t){Z.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},O=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:z;return i!==$&&9===i.nodeType&&i.documentElement?($=i,I=$.documentElement,L=!E($),z!==$&&(n=$.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild($.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test($.getElementsByClassName),x.getById=r(function(e){return I.appendChild(e).id=H,!$.getElementsByName||!$.getElementsByName(H).length}),x.getById?(C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){return e.getAttribute("id")===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var n=t.getElementById(e);return n?[n]:[]}}):(C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&L){var n,i,r,o=t.getElementById(e);if(o){if(n=o.getAttributeNode("id"),n&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if(n=o.getAttributeNode("id"),n&&n.value===e)return[o]}return[]}}),C.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=x.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&L?t.getElementsByClassName(e):void 0},P=[],F=[],(x.qsa=ge.test($.querySelectorAll))&&(r(function(e){I.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||F.push(".#.+[+~]")}),r(function(e){e.innerHTML="";var t=$.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&F.push(":enabled",":disabled"),I.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(x.matchesSelector=ge.test(N=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&r(function(e){x.disconnectedMatch=N.call(e,"*"),N.call(e,"[s!='']:x"),P.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),P=P.length&&new RegExp(P.join("|")),t=ge.test(I.compareDocumentPosition),B=t||ge.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return R=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===$||e.ownerDocument===z&&B(z,e)?-1:t===$||t.ownerDocument===z&&B(z,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return R=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!r||!o)return e===$?-1:t===$?1:r?-1:o?1:D?ee(D,e)-ee(D,t):0;if(r===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===z?-1:l[i]===z?1:0},$):$},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==$&&O(e),n=n.replace(ue,"='$1']"),x.matchesSelector&&L&&!U[n+" "]&&(!P||!P.test(n))&&(!F||!F.test(n)))try{var i=N.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,$,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==$&&O(e),B(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==$&&O(e);var n=C.attrHandle[t.toLowerCase()],i=n&&Y.call(C.attrHandle,t.toLowerCase())?n(e,t,!L):void 0;return void 0!==i?i:x.attributes||!L?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(we,xe)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(R=!x.detectDuplicates,D=!x.sortStable&&e.slice(0),e.sort(G),R){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return D=null,e},k=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=k(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=A(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,_=s&&t.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(o){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===_:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&v){for(h=g,d=h[H]||(h[H]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===q&&c[1],y=f&&c[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(y=f=0)||p.pop();)if(1===h.nodeType&&++y&&h===t){u[e]=[q,f,y];break}}else if(v&&(h=t,d=h[H]||(h[H]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===q&&c[1],y=f),y===!1)for(;(h=++f&&h&&h[m]||(y=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==_:1!==h.nodeType)||!++y||(v&&(d=h[H]||(h[H]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),u[e]=[q,y]),h!==t)););return y-=r,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(e,n){var r,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[H]?o(n):o.length>1?(r=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=ee(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(se,"$1"));return r[H]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ye,be),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,be).toLowerCase(),function(t){var n;do if(n=L?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===$.activeElement&&(!$.hasFocus||$.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i2&&"ID"===(a=o[0]).type&&9===t.nodeType&&L&&C.relative[o[1].type]){if(t=(C.find.ID(a.matches[0].replace(ye,be),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=fe.needsContext.test(e)?0:o.length;r--&&(a=o[r],!C.relative[s=a.type]);)if((l=C.find[s])&&(i=l(a.matches[0].replace(ye,be),ve.test(o[0].type)&&d(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&f(o),!e)return Q.apply(n,i),n;break}}return(c||S(e,u))(i,t,!L,n,!t||ve.test(e)&&d(t.parentNode)||t),n},x.sortStable=H.split("").sort(G).join("")===H,x.detectDuplicates=!!R,O(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition($.createElement("fieldset"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);me.find=be,me.expr=be.selectors,me.expr[":"]=me.expr.pseudos,me.uniqueSort=me.unique=be.uniqueSort,me.text=be.getText,me.isXMLDoc=be.isXML,me.contains=be.contains,me.escapeSelector=be.escape;var we=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&me(e).is(n))break;i.push(e)}return i},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ce=me.expr.match.needsContext,ke=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Ee=/^.[^:#\[\.,]*$/;me.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?me.find.matchesSelector(i,e)?[i]:[]:me.find.matches(e,me.grep(t,function(e){return 1===e.nodeType}))},me.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(me(e).filter(function(){for(t=0;i>t;t++)if(me.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;i>t;t++)me.find(e,r[t],n);return i>1?me.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Ce.test(e)?me(e):e||[],!1).length}});var Ae,Se=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Te=me.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Ae,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Se.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof me?t[0]:t,me.merge(this,me.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),ke.test(i[1])&&me.isPlainObject(t))for(i in t)me.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=ne.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):me.isFunction(e)?void 0!==n.ready?n.ready(e):e(me):me.makeArray(e,this)};Te.prototype=me.fn,Ae=me(ne);var Me=/^(?:parents|prev(?:Until|All))/,De={children:!0,contents:!0,next:!0,prev:!0};me.fn.extend({has:function(e){var t=me(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(me.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,r=this.length,o=[],a="string"!=typeof e&&me(e);if(!Ce.test(e))for(;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&me.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?me.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(me(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(me.uniqueSort(me.merge(this.get(),me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,n){return we(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,n){return we(e,"nextSibling",n)},prevUntil:function(e,t,n){return we(e,"previousSibling",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),me.merge([],e.childNodes))}},function(e,t){me.fn[e]=function(n,i){var r=me.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=me.filter(i,r)),this.length>1&&(De[e]||me.uniqueSort(r),Me.test(e)&&r.reverse()),this.pushStack(r)}});var Re=/[^\x20\t\r\n\f]+/g;me.Callbacks=function(e){e="string"==typeof e?s(e):me.extend({},e);var t,n,i,r,o=[],a=[],l=-1,c=function(){for(r=r||e.once,i=t=!0;a.length;l=-1)for(n=a.shift();++l-1;)o.splice(n,1),l>=n&&l--}),this},has:function(e){return e?me.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=a=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},me.extend({Deferred:function(t){var n=[["notify","progress",me.Callbacks("memory"),me.Callbacks("memory"),2],["resolve","done",me.Callbacks("once memory"),me.Callbacks("once memory"),0,"resolved"],["reject","fail",me.Callbacks("once memory"),me.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return r.then(null,e)},pipe:function(){var e=arguments;return me.Deferred(function(t){me.each(n,function(n,i){var r=me.isFunction(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&me.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(t,i,r){function o(t,n,i,r){return function(){var s=this,u=arguments,d=function(){var e,d;if(!(a>t)){if(e=i.apply(s,u),e===n.promise())throw new TypeError("Thenable self-resolution");d=e&&("object"==typeof e||"function"==typeof e)&&e.then,me.isFunction(d)?r?d.call(e,o(a,n,l,r),o(a,n,c,r)):(a++,d.call(e,o(a,n,l,r),o(a,n,c,r),o(a,n,l,n.notifyWith))):(i!==l&&(s=void 0,u=[e]),(r||n.resolveWith)(s,u))}},h=r?d:function(){try{d()}catch(e){me.Deferred.exceptionHook&&me.Deferred.exceptionHook(e,h.stackTrace),t+1>=a&&(i!==c&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?h():(me.Deferred.getStackHook&&(h.stackTrace=me.Deferred.getStackHook()),e.setTimeout(h))}}var a=0;return me.Deferred(function(e){n[0][3].add(o(0,e,me.isFunction(r)?r:l,e.notifyWith)),n[1][3].add(o(0,e,me.isFunction(t)?t:l)),n[2][3].add(o(0,e,me.isFunction(i)?i:c))}).promise()},promise:function(e){return null!=e?me.extend(e,r):r}},o={};return me.each(n,function(e,t){var a=t[2],s=t[5];r[t[1]]=a.add,s&&a.add(function(){i=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=re.call(arguments),o=me.Deferred(),a=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?re.call(arguments):n,--t||o.resolveWith(i,r)}};if(1>=t&&(u(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||me.isFunction(r[n]&&r[n].then)))return o.then();for(;n--;)u(r[n],a(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;me.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Oe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},me.readyException=function(t){e.setTimeout(function(){throw t})};var $e=me.Deferred();me.fn.ready=function(e){return $e.then(e)["catch"](function(e){me.readyException(e)}),this},me.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--me.readyWait:me.isReady)||(me.isReady=!0,e!==!0&&--me.readyWait>0||$e.resolveWith(ne,[me]))}}),me.ready.then=$e.then,"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll?e.setTimeout(me.ready):(ne.addEventListener("DOMContentLoaded",d),e.addEventListener("load",d));var Ie=function(e,t,n,i,r,o,a){var s=0,l=e.length,c=null==n;if("object"===me.type(n)){r=!0;for(s in n)Ie(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,me.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(me(e),n)})),t))for(;l>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:c?t.call(e):l?t(e[0],n):o},Le=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};h.uid=1,h.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Le(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,r=this.cache(e);if("string"==typeof t)r[me.camelCase(t)]=n;else for(i in t)r[me.camelCase(i)]=t[i];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][me.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){Array.isArray(t)?t=t.map(me.camelCase):(t=me.camelCase(t),t=t in i?[t]:t.match(Re)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||me.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!me.isEmptyObject(t)}};var Fe=new h,Pe=new h,Ne=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Be=/[A-Z]/g;me.extend({hasData:function(e){return Pe.hasData(e)||Fe.hasData(e)},data:function(e,t,n){return Pe.access(e,t,n)},removeData:function(e,t){Pe.remove(e,t)},_data:function(e,t,n){return Fe.access(e,t,n)},_removeData:function(e,t){Fe.remove(e,t)}}),me.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=Pe.get(o),1===o.nodeType&&!Fe.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=me.camelCase(i.slice(5)),p(o,i,r[i])));Fe.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each(function(){Pe.set(this,e)}):Ie(this,function(t){var n;if(o&&void 0===t){if(n=Pe.get(o,e),void 0!==n)return n;if(n=p(o,e),void 0!==n)return n}else this.each(function(){Pe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Pe.remove(this,e)})}}),me.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=Fe.get(e,t),n&&(!i||Array.isArray(n)?i=Fe.access(e,t,me.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=me.queue(e,t),i=n.length,r=n.shift(),o=me._queueHooks(e,t),a=function(){me.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:me.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Ye=/^$|\/(?:java|ecma)script/i,Ke={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead, -Ke.th=Ke.td;var Xe=/<|&#?\w+;/;!function(){var e=ne.createDocumentFragment(),t=e.appendChild(ne.createElement("div")),n=ne.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),fe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",fe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Ze=ne.documentElement,Qe=/^key/,Je=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,et=/^([^.]*)(?:\.(.+)|)/;me.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,c,u,d,h,f,p,m,g=Fe.get(e);if(g)for(n.handler&&(o=n,n=o.handler,r=o.selector),r&&me.find.matchesSelector(Ze,r),n.guid||(n.guid=me.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(t){return"undefined"!=typeof me&&me.event.triggered!==t.type?me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Re)||[""],c=t.length;c--;)s=et.exec(t[c])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f&&(d=me.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=me.event.special[f]||{},u=me.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&me.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||(h=l[f]=[],h.delegateCount=0,d.setup&&d.setup.call(e,i,p,a)!==!1||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),me.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,a,s,l,c,u,d,h,f,p,m,g=Fe.hasData(e)&&Fe.get(e);if(g&&(l=g.events)){for(t=(t||"").match(Re)||[""],c=t.length;c--;)if(s=et.exec(t[c])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f){for(d=me.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)u=h[o],!r&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));a&&!h.length&&(d.teardown&&d.teardown.call(e,p,g.handle)!==!1||me.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)me.event.remove(e,f+t[c],n,i,!0);me.isEmptyObject(l)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,a,s=me.event.fix(e),l=new Array(arguments.length),c=(Fe.get(this,"events")||{})[s.type]||[],u=me.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(o=[],a={},n=0;l>n;n++)i=t[n],r=i.selector+" ",void 0===a[r]&&(a[r]=i.needsContext?me(r,this).index(c)>-1:me.find(r,this,null,[c]).length),a[r]&&o.push(i);o.length&&s.push({elem:c,handlers:o})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,nt=/\s*$/g;me.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var i,r,o,a,s=e.cloneNode(!0),l=me.contains(e.ownerDocument,e);if(!(fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||me.isXMLDoc(e)))for(a=v(s),o=v(e),i=0,r=o.length;r>i;i++)M(o[i],a[i]);if(t)if(n)for(o=o||v(e),a=a||v(s),i=0,r=o.length;r>i;i++)T(o[i],a[i]);else T(e,s);return a=v(s,"script"),a.length>0&&y(a,!l&&v(e,"script")),s},cleanData:function(e){for(var t,n,i,r=me.event.special,o=0;void 0!==(n=e[o]);o++)if(Le(n)){if(t=n[Fe.expando]){if(t.events)for(i in t.events)r[i]?me.event.remove(n,i):me.removeEvent(n,i,t.handle);n[Fe.expando]=void 0}n[Pe.expando]&&(n[Pe.expando]=void 0)}}}),me.fn.extend({detach:function(e){return R(this,e,!0)},remove:function(e){return R(this,e)},text:function(e){return Ie(this,function(e){return void 0===e?me.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=E(this,e);t.appendChild(e)}})},prepend:function(){return D(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=E(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return D(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(me.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return me.clone(this,e,t)})},html:function(e){return Ie(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!nt.test(e)&&!Ke[(Ge.exec(e)||["",""])[1].toLowerCase()]){e=me.htmlPrefilter(e);try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(me.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return D(this,arguments,function(t){var n=this.parentNode;me.inArray(this,e)<0&&(me.cleanData(v(this)),n&&n.replaceChild(t,this))},e)}}),me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){me.fn[e]=function(e){for(var n,i=[],r=me(e),o=r.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),me(r[a])[t](n),ae.apply(i,n.get());return this.pushStack(i)}});var at=/^margin/,st=new RegExp("^("+He+")(?!px)[a-z%]+$","i"),lt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Ze.appendChild(a);var t=e.getComputedStyle(s);n="1%"!==t.top,o="2px"===t.marginLeft,i="4px"===t.width,s.style.marginRight="50%",r="4px"===t.marginRight,Ze.removeChild(a),s=null}}var n,i,r,o,a=ne.createElement("div"),s=ne.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),me.extend(fe,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),i},pixelMarginRight:function(){return t(),r},reliableMarginLeft:function(){return t(),o}}))}();var ct=/^(none|table(?!-c[ea]).+)/,ut=/^--/,dt={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},ft=["Webkit","Moz","ms"],pt=ne.createElement("div").style;me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=O(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=me.camelCase(t),l=ut.test(t),c=e.style;return l||(t=L(s)),a=me.cssHooks[t]||me.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:c[t]:(o=typeof n,"string"===o&&(r=ze.exec(n))&&r[1]&&(n=m(e,t,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(me.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n)),void 0)}},css:function(e,t,n,i){var r,o,a,s=me.camelCase(t),l=ut.test(t);return l||(t=L(s)),a=me.cssHooks[t]||me.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,n)),void 0===r&&(r=O(e,t,i)),"normal"===r&&t in ht&&(r=ht[t]),""===n||n?(o=parseFloat(r),n===!0||isFinite(o)?o||0:r):r}}),me.each(["height","width"],function(e,t){me.cssHooks[t]={get:function(e,n,i){return n?!ct.test(me.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?N(e,t,i):We(e,dt,function(){return N(e,t,i)}):void 0},set:function(e,n,i){var r,o=i&<(e),a=i&&P(e,t,i,"border-box"===me.css(e,"boxSizing",!1,o),o);return a&&(r=ze.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=me.css(e,t)),F(e,n,a)}}}),me.cssHooks.marginLeft=$(fe.reliableMarginLeft,function(e,t){return t?(parseFloat(O(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),me.each({margin:"",padding:"",border:"Width"},function(e,t){me.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+qe[i]+t]=o[i]||o[i-2]||o[0];return r}},at.test(e)||(me.cssHooks[e+t].set=F)}),me.fn.extend({css:function(e,t){return Ie(this,function(e,t,n){var i,r,o={},a=0;if(Array.isArray(t)){for(i=lt(e),r=t.length;r>a;a++)o[t[a]]=me.css(e,t[a],!1,i);return o}return void 0!==n?me.style(e,t,n):me.css(e,t)},e,t,arguments.length>1)}}),me.Tween=B,B.prototype={constructor:B,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(me.cssNumber[n]?"":"px")},cur:function(){var e=B.propHooks[this.prop];return e&&e.get?e.get(this):B.propHooks._default.get(this)},run:function(e){var t,n=B.propHooks[this.prop];return this.options.duration?this.pos=t=me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){me.fx.step[e.prop]?me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[me.cssProps[e.prop]]&&!me.cssHooks[e.prop]?e.elem[e.prop]=e.now:me.style(e.elem,e.prop,e.now+e.unit)}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},me.fx=B.prototype.init,me.fx.step={};var mt,gt,_t=/^(?:toggle|show|hide)$/,vt=/queueHooks$/;me.Animation=me.extend(U,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,ze.exec(t),n),n}]},tweener:function(e,t){me.isFunction(e)?(t=e,e=["*"]):e=e.match(Re);for(var n,i=0,r=e.length;r>i;i++)n=e[i],U.tweeners[n]=U.tweeners[n]||[],U.tweeners[n].unshift(t)},prefilters:[W],prefilter:function(e,t){t?U.prefilters.unshift(e):U.prefilters.push(e)}}),me.speed=function(e,t,n){var i=e&&"object"==typeof e?me.extend({},e):{complete:n||!n&&t||me.isFunction(e)&&e,duration:e,easing:n&&t||t&&!me.isFunction(t)&&t};return me.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in me.fx.speeds?i.duration=me.fx.speeds[i.duration]:i.duration=me.fx.speeds._default),(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){me.isFunction(i.old)&&i.old.call(this),i.queue&&me.dequeue(this,i.queue)},i},me.fn.extend({fadeTo:function(e,t,n,i){return this.filter(je).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=me.isEmptyObject(e),o=me.speed(t,n,i),a=function(){var t=U(this,me.extend({},e),o);(r||Fe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=me.timers,a=Fe.get(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&vt.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&me.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Fe.get(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=me.timers,a=i?i.length:0;for(n.finish=!0,me.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),me.each(["toggle","show","hide"],function(e,t){var n=me.fn[t];me.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,i,r)}}),me.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){me.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),me.timers=[],me.fx.tick=function(){var e,t=0,n=me.timers;for(mt=me.now();t1)},removeAttr:function(e){return this.each(function(){me.removeAttr(this,e)})}}),me.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?me.prop(e,t,n):(1===o&&me.isXMLDoc(e)||(r=me.attrHooks[t.toLowerCase()]||(me.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void me.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=me.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Re);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return t===!1?me.removeAttr(e,n):e.setAttribute(n,n),n}},me.each(me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=bt[t]||me.find.attr;bt[t]=function(e,t,i){var r,o,a=t.toLowerCase();return i||(o=bt[a],bt[a]=r,r=null!=n(e,t,i)?a:null,bt[a]=o),r}});var wt=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;me.fn.extend({prop:function(e,t){return Ie(this,me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[me.propFix[e]||e]})}}),me.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&me.isXMLDoc(e)||(t=me.propFix[t]||t,r=me.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=me.find.attr(e,"tabindex");return t?parseInt(t,10):wt.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.optSelected||(me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){me.propFix[this.toLowerCase()]=this}),me.fn.extend({addClass:function(e){var t,n,i,r,o,a,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).addClass(e.call(this,t,Y(this)))});if("string"==typeof e&&e)for(t=e.match(Re)||[];n=this[l++];)if(r=Y(n),i=1===n.nodeType&&" "+G(r)+" "){for(a=0;o=t[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=G(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,o,a,s,l=0;if(me.isFunction(e))return this.each(function(t){me(this).removeClass(e.call(this,t,Y(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Re)||[];n=this[l++];)if(r=Y(n),i=1===n.nodeType&&" "+G(r)+" "){for(a=0;o=t[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");s=G(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):me.isFunction(e)?this.each(function(n){me(this).toggleClass(e.call(this,n,Y(this),t),t)}):this.each(function(){var t,i,r,o;if("string"===n)for(i=0,r=me(this),o=e.match(Re)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(void 0===e||"boolean"===n)&&(t=Y(this),t&&Fe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Fe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+G(Y(n))+" ").indexOf(t)>-1)return!0;return!1}});var Ct=/\r/g;me.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=me.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,me(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=me.map(r,function(e){return null==e?"":e+""})),t=me.valHooks[this.type]||me.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=me.valHooks[r.type]||me.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Ct,""):null==n?"":n)}}}),me.extend({valHooks:{option:{get:function(e){var t=me.find.attr(e,"value");return null!=t?t:G(me.text(e))}},select:{get:function(e){var t,n,i,o=e.options,a=e.selectedIndex,s="select-one"===e.type,l=s?null:[],c=s?a+1:o.length;for(i=0>a?c:s?a:0;c>i;i++)if(n=o[i],(n.selected||i===a)&&!n.disabled&&(!n.parentNode.disabled||!r(n.parentNode,"optgroup"))){if(t=me(n).val(),s)return t;l.push(t)}return l},set:function(e,t){for(var n,i,r=e.options,o=me.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=me.inArray(me.valHooks.option.get(i),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),me.each(["radio","checkbox"],function(){me.valHooks[this]={set:function(e,t){return Array.isArray(t)?e.checked=me.inArray(me(e).val(),t)>-1:void 0}},fe.checkOn||(me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var kt=/^(?:focusinfocus|focusoutblur)$/;me.extend(me.event,{trigger:function(t,n,i,r){var o,a,s,l,c,u,d,h=[i||ne],f=ue.call(t,"type")?t.type:t,p=ue.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||ne,3!==i.nodeType&&8!==i.nodeType&&!kt.test(f+me.event.triggered)&&(f.indexOf(".")>-1&&(p=f.split("."),f=p.shift(),p.sort()),c=f.indexOf(":")<0&&"on"+f,t=t[me.expando]?t:new me.Event(f,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:me.makeArray(n,[t]),d=me.event.special[f]||{},r||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!r&&!d.noBubble&&!me.isWindow(i)){for(l=d.delegateType||f,kt.test(l+f)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(i.ownerDocument||ne)&&h.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)t.type=o>1?l:d.bindType||f,u=(Fe.get(a,"events")||{})[t.type]&&Fe.get(a,"handle"),u&&u.apply(a,n),u=c&&a[c],u&&u.apply&&Le(a)&&(t.result=u.apply(a,n),t.result===!1&&t.preventDefault());return t.type=f,r||t.isDefaultPrevented()||d._default&&d._default.apply(h.pop(),n)!==!1||!Le(i)||c&&me.isFunction(i[f])&&!me.isWindow(i)&&(s=i[c],s&&(i[c]=null),me.event.triggered=f,i[f](),me.event.triggered=void 0,s&&(i[c]=s)),t.result}},simulate:function(e,t,n){var i=me.extend(new me.Event,n,{type:e,isSimulated:!0});me.event.trigger(i,null,t)}}),me.fn.extend({trigger:function(e,t){return this.each(function(){me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?me.event.trigger(e,t,n,!0):void 0}}),me.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),fe.focusin="onfocusin"in e,fe.focusin||me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){me.event.simulate(t,e.target,me.event.fix(e))};me.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Fe.access(i,t);r||i.addEventListener(e,n,!0),Fe.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Fe.access(i,t)-1;r?Fe.access(i,t,r):(i.removeEventListener(e,n,!0),Fe.remove(i,t))}}});var Et=e.location,At=me.now(),St=/\?/;me.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(i){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&me.error("Invalid XML: "+t),n};var Tt=/\[\]$/,Mt=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;me.param=function(e,t){var n,i=[],r=function(e,t){var n=me.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!me.isPlainObject(e))me.each(e,function(){r(this.name,this.value)});else for(n in e)K(n,e[n],t,r);return i.join("&")},me.fn.extend({serialize:function(){return me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=me.prop(this,"elements");return e?me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!me(this).is(":disabled")&&Rt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!Ue.test(e))}).map(function(e,t){var n=me(this).val();return null==n?null:Array.isArray(n)?me.map(n,function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}}):{name:t.name,value:n.replace(Mt,"\r\n")}}).get()}});var Ot=/%20/g,$t=/#.*$/,It=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Pt=/^(?:GET|HEAD)$/,Nt=/^\/\//,Bt={},Ht={},zt="*/".concat("*"),qt=ne.createElement("a");qt.href=Et.href,me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:Ft.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Q(Q(e,me.ajaxSettings),t):Q(me.ajaxSettings,e)},ajaxPrefilter:X(Bt),ajaxTransport:X(Ht),ajax:function(t,n){function i(t,n,i,s){var c,h,f,b,w,x=n;u||(u=!0,l&&e.clearTimeout(l),r=void 0,a=s||"",C.readyState=t>0?4:0,c=t>=200&&300>t||304===t,i&&(b=J(p,C,i)),b=ee(p,b,C,c),c?(p.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(me.lastModified[o]=w),w=C.getResponseHeader("etag"),w&&(me.etag[o]=w)),204===t||"HEAD"===p.type?x="nocontent":304===t?x="notmodified":(x=b.state,h=b.data,f=b.error,c=!f)):(f=x,(t||!x)&&(x="error",0>t&&(t=0))),C.status=t,C.statusText=(n||x)+"",c?_.resolveWith(m,[h,x,C]):_.rejectWith(m,[C,x,f]),C.statusCode(y),y=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?h:f]),v.fireWith(m,[C,x]),d&&(g.trigger("ajaxComplete",[C,p]),--me.active||me.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,o,a,s,l,c,u,d,h,f,p=me.ajaxSetup({},n),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?me(m):me.event,_=me.Deferred(),v=me.Callbacks("once memory"),y=p.statusCode||{},b={},w={},x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Lt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),i(0,t),this}};if(_.promise(C),p.url=((t||p.url||Et.href)+"").replace(Nt,Et.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Re)||[""],null==p.crossDomain){c=ne.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=qt.protocol+"//"+qt.host!=c.protocol+"//"+c.host}catch(k){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=me.param(p.data,p.traditional)),Z(Bt,p,n,C),u)return C;d=me.event&&p.global,d&&0===me.active++&&me.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Pt.test(p.type),o=p.url.replace($t,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ot,"+")):(f=p.url.slice(o.length),p.data&&(o+=(St.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(o=o.replace(It,"$1"),f=(St.test(o)?"&":"?")+"_="+At++ +f),p.url=o+f),p.ifModified&&(me.lastModified[o]&&C.setRequestHeader("If-Modified-Since",me.lastModified[o]),me.etag[o]&&C.setRequestHeader("If-None-Match",me.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]);for(h in p.headers)C.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(p.beforeSend.call(m,C,p)===!1||u))return C.abort();if(x="abort",v.add(p.complete),C.done(p.success),C.fail(p.error),r=Z(Ht,p,n,C)){if(C.readyState=1,d&&g.trigger("ajaxSend",[C,p]),u)return C;p.async&&p.timeout>0&&(l=e.setTimeout(function(){C.abort("timeout")},p.timeout));try{u=!1,r.send(b,i)}catch(k){if(u)throw k;i(-1,k)}}else i(-1,"No Transport");return C},getJSON:function(e,t,n){return me.get(e,t,n,"json")},getScript:function(e,t){return me.get(e,void 0,t,"script")}}),me.each(["get","post"],function(e,t){me[t]=function(e,n,i,r){return me.isFunction(n)&&(r=r||i,i=n,n=void 0),me.ajax(me.extend({url:e,type:t,dataType:r,data:n,success:i},me.isPlainObject(e)&&e))}}),me._evalUrl=function(e){return me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},me.fn.extend({wrapAll:function(e){var t;return this[0]&&(me.isFunction(e)&&(e=e.call(this[0])),t=me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return me.isFunction(e)?this.each(function(t){me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=me.isFunction(e);return this.each(function(n){me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){me(this).replaceWith(this.childNodes)}),this}}),me.expr.pseudos.hidden=function(e){return!me.expr.pseudos.visible(e); -},me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},me.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var jt={0:200,1223:204},Wt=me.ajaxSettings.xhr();fe.cors=!!Wt&&"withCredentials"in Wt,fe.ajax=Wt=!!Wt,me.ajaxTransport(function(t){var n,i;return fe.cors||Wt&&!t.crossDomain?{send:function(r,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);n=function(e){return function(){n&&(n=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(jt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),i=s.onerror=n("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}:void 0}),me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return me.globalEval(e),e}}}),me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=me("
\ No newline at end of file +
\ No newline at end of file diff --git a/build/scripts/app-65ac869b2e.js b/build/scripts/app-65ac869b2e.js new file mode 100644 index 00000000..ac2de745 --- /dev/null +++ b/build/scripts/app-65ac869b2e.js @@ -0,0 +1,80 @@ +"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t
favorite

{{vars.dash.title}}

favoritePinSave


Apply
'),e.put("app/dash/dashsidebar.html",'
'),e.put("app/base/404.html",'

404 not found

Back
'),e.put("app/base/addVarsDialog.html",'

Mango (Fruit)

Add var (no space)
TextIntDateCode
CloseAdd
'),e.put("app/base/base.html",'
Open table
'),e.put("app/base/breadcrumbs.html",''),e.put("app/base/header.html",'
Requirements Chrome! Dashboard SQL Metrics & Processes Settings Help Sign out [{{user}}]
'),e.put("app/base/helpDialogLogin.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

* Work only in "Google chrome" version up 55

* Clickhouse server version up v1.1.54164

* Not readonly CH user




https://tabix.ioOk
'),e.put("app/base/helpDialogRu.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

ClickHouse Manual


Tabix.IO Manual

Hot keys

⌘ + Enter

Exec current query

⌘ + Shift + Enter

Exec all query

⌘ + Y

Drop current line

⌘ + ⇧ + F

Reformat

⌘ + ⇧ + Plus|Minus

свернуть все/развернуть

⌘ + Right|Left

переключает вкладки

⌘ + ⌥ + Up|Down

Copy lines Up/Down

⌥ + Up|Down

Move lines Up/Down

Ctrl + K

Remove to line end

⌘ + Backspace

Remove to linestart

Ace Editor Default Keyboard Shortcuts

DrawChart

DrawChart

DrawMap

DrawMap

https://tabix.ioOk
'),e.put("app/base/sidebar.html",''),e.put("app/base/sidebarhelper.html",'

{{ hist }}

'),e.put("app/dev/edit.html",'
'),e.put("app/dev/plot.html",'openEditorWidget
code:
{{code}}
'),e.put("app/login/login.html",'
Requirements Chrome or Chromium engine Browser! Requirements & helpUi Theme{{theme.title}}
'),e.put("app/panels/sendtodashboard.html",'
Send to dashboard
ApplicationWebsite


AppendBottom





CloseApply
'),e.put("app/panels/share.html",'
Share


Can refresh dataPassword protectSupport variablesBoardJsonTSVCSV
CloseApply
'),e.put("app/preference/preference.html",'

Preference & settings

{{theme}}{{theme}}Save sessionLive AutocompletionDisable auto-helpDisable hotKey left+rightUse WrapModeShow invisible charsApply
'),e.put("app/metrics/dialog.kill.html",'

Kill query

{{ q.elapsed }}

{{ q.query }}

{{ q.bytes_read }}

{{ q.hash }}

Cancel
'),e.put("app/metrics/metrics.html",'Processes
Overview
Metrics
'),e.put("app/metrics/metricschart.html",'

Metrics

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+(\'sec\')}}{{interval}}system.eventsRefreshReset
'), +e.put("app/metrics/overview.html",'

Overview

'),e.put("app/metrics/processes.html",'

Processes

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+\'sec\'}}Select/Read onlyLog ModeClusterRefreshResetKILL Query
'),e.put("app/render/WidgetsList.html",'
{{::w.title}}
'),e.put("app/sql/PlotlyEditor.tmpl.html",'
PlotLy JavaScript editor ( alpha )

Tab One

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi.

Tab Two

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor, orci enim rutrum enim, vel tempor sapien arcu a tellus. Vivamus convallis sodales ante varius gravida. Curabitur a purus vel augue ultrices ultricies id a nisl. Nullam malesuada consequat diam, a facilisis tortor volutpat et. Sed urna dolor, aliquet vitae posuere vulputate, euismod ac lorem. Sed felis risus, pulvinar at interdum quis, vehicula sed odio. Phasellus in enim venenatis, iaculis tortor eu, bibendum ante. Donec ac tellus dictum neque volutpat blandit. Praesent efficitur faucibus risus, ac auctor purus porttitor vitae. Phasellus ornare dui nec orci posuere, nec luctus mauris semper.

Morbi viverra, ante vel aliquet tincidunt, leo dolor pharetra quam, at semper massa orci nec magna. Donec posuere nec sapien sed laoreet. Etiam cursus nunc in condimentum facilisis. Etiam in tempor tortor. Vivamus faucibus egestas enim, at convallis diam pulvinar vel. Cras ac orci eget nisi maximus cursus. Nunc urna libero, viverra sit amet nisl at, hendrerit tempor turpis. Maecenas facilisis convallis mi vel tempor. Nullam vitae nunc leo. Cras sed nisl consectetur, rhoncus sapien sit amet, tempus sapien.

Integer turpis erat, porttitor vitae mi faucibus, laoreet interdum tellus. Curabitur posuere molestie dictum. Morbi eget congue risus, quis rhoncus quam. Suspendisse vitae hendrerit erat, at posuere mi. Cras eu fermentum nunc. Sed id ante eu orci commodo volutpat non ac est. Praesent ligula diam, congue eu enim scelerisque, finibus commodo lectus.

Close
'),e.put("app/sql/renderResult.html",'
{{resultContainer.cellsCalc}}{{::tableData.data.progressQuery}}CSV with headersCSV without headersTSV with headersTSV without headersPinnedTable
Draw
'),e.put("app/sql/showDialogUpload.html",'

Upload CSV to View

'),e.put("app/sql/sql.html",'
{{tab.name + (tab.changed ? \' *\' : \'\')}}
Make snippetAutoFormatExpandCollapseCollapse All
{{tab.buttonTitle}}Run current ⌘ + ⏎Full screenSave{{item.name}}Query log
USE {{::dbb.name}}{{vars.LastStatistics.elapsed| number:2}} sec.| {{vars.LastStatistics.rows_read| number}} rows.| {{vars.LastStatistics.bytes_read|filesize}}
..... {{tab.progress.query}}
'),e.put("app/table/table-container.html",'

{{vars.currentDatabase}} {{vars.currentTable}}

Structure
NameTypeDefault typeValueSizeCompress
{{$index + 1}}{{field[key]}}
Information
1Size{{vars.statistics.size}}
2Size,bytes{{vars.statistics.sizeBytes}}
3First row{{vars.statistics.minDate}}
4Last row{{vars.statistics.maxDate}}

SHOW CREATE TABLE
{{vars.createtable}}
Data
Data From {{vars.offset}} To {{vars.offset + vars.limit}}
No data
'),e.put("app/table/table.html",'
')}]),function(e,t){function a(e,t){var a=t.dbName,n=t.tableName;e.vars={dbName:a,tableName:n}}e.module(t.app.name).controller("TableController",a),a.$inject=["$scope","$stateParams"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.tablewidget={},t.vars={columns:{},ugrid:{},sortColumn:!1,isDark:i.isDark(),createtable:{},data:null,grid:null,limit:100,offset:0,statistics:{},loading:!0,isRawStatistics:!1,rawstatistics:"",scrollConfig:{autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},t.initContainer=function(){a.$watch("currentTable",function(e){e&&(t.vars.currentTable=a.currentTable,t.vars.currentDatabase=a.currentDatabase,t.init())})},t.onAfterInit=function(){},t.updateHandTable=function(){l.getInstance("hotTableContain").render()},t.initOnGo=function(){t.$parent.vars&&(o.get("tableSiedenav")&&s("tableSiedenav").close(),t.vars.currentTable=t.$parent.vars.tableName,t.vars.currentDatabase=t.$parent.vars.dbName,t.init())},t.load=function(){console.warn("LOAD DATA! IN TABLES"),t.vars.data=-1,n.fetchQuery("\n select * from "+t.vars.currentDatabase+"."+t.vars.currentTable+" limit "+t.vars.offset+", "+t.vars.limit+"\n ").then(function(e){var a="ch";t.tablewidget=new WidgetTable(new DataProvider(e,a)),t.vars.loading=!1},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.calcRawSize=function(){t.vars.isRawStatistics=!0,n.fetchQuery("SELECT any(ignore(*)) FROM "+t.vars.currentDatabase+"."+t.vars.currentTable+" SAMPLE 1 / 10000 ").then(function(e){t.vars.rawstatistics=e.statistics},function(e){t.vars.rawstatistics=e.data})},t.init=function(){t.vars.loading=!0,t.vars.createtable="N/A",n.fetchQuery("SHOW CREATE TABLE "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(e){t.vars.createtable=window.sqlFormatter.format(e.data[0].statement)}),n.fetchQuery("SELECT table, formatReadableSize(sum(bytes)) as size, sum(bytes) as sizeBytes, min(min_date) as minDate, max(max_date) as maxDate FROM system.parts WHERE database = '"+t.vars.currentDatabase+"' AND ( table = '"+t.vars.currentTable+"' OR table = '"+t.vars.currentTable+"_sharded' ) GROUP BY table ").then(function(e){return t.vars.statistics=e&&e.data.length&&e.data[0]||{}}),n.fetchQuery("SELECT * FROM system.columns WHERE database='"+t.vars.currentDatabase+"' AND table='"+t.vars.currentTable+"'").then(function(a){n.fetchQuery("describe table "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(n){_.map(n.data,function(t){var n=_.find(a.data,{name:t.name});return _.merge(t,n),t.size="-",t.ratio="-",!e.isUndefined(t.default_kind)&&e.isUndefined(t.default_type)&&(t.default_type=t.default_kind),t.data_compressed_bytes&&(t.size=numbro(t.data_compressed_bytes).format("0.0 b")+" / "+numbro(t.data_uncompressed_bytes).format("0.0 b"),t.ratio=numbro(parseInt(t.data_uncompressed_bytes)/parseInt(t.data_compressed_bytes)).format("0.0")),t}),t.vars.columns=n,t.vars.sortColumn=!1;var i=0;n.data.forEach(function(e){3>i&&("Date"==e.type&&(t.vars.sortColumn=e.name),"DateTime"==e.type&&(t.vars.sortColumn=e.name)),i+=1}),t.load()})})},t.loadNext=function(){t.vars.loading=!0,t.vars.offset+=t.vars.limit,t.load()},t.loadPrev=function(){t.vars.offset>0&&(t.vars.loading=!0,t.vars.offset-=t.vars.limit,t.load())}}e.module(t.app.name).controller("TableContainerController",a),a.$inject=["$scope","$rootScope","API","ThemeService","$stateParams","$mdSidenav","$mdComponentRegistry","hotRegisterer"]}(angular,smi2),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +window.global_delimiter=";;",window.aceJSRules={builtinFunctions:[],lang:"en",dictionaries:[],fieldsList:[],tables:[]},function(e,t){function a(t,a,n,i,r,s,o,l,c,d,u,m,h,p,g){var b="sqlHistory2",f="saveTabs",v="sessionData",y=255;t.AceEditorInLoad=!1,t.vars={EditorIsInit:!1,sqlHistory:i.get(b)||[],dictionaries:[],isDictionariesLoad:!1,tabs:[],enableLiveAutocompletion:h.get("liveAutocompletion"),disableAutohelp:h.get("disableAutohelp"),disableHotKeyCmdLeft:h.get("disableHotKeyCmdLeft"),saveTabs:i.get(f)||!0,LastStatistics:!1,delimiters:[{name:";; Double",delimiter:";;"},{name:"; Single",delimiter:";"}],databasesList:[],searchQueryOnServer:"",currentTab:{},selectedTab:0,formats:[{name:"Table",sql:" format JSON",render:"html"},{name:"JSON compact",sql:" format JSONCompact"}],db:null,limitTimes:h.get("limitTimes"),limitRows:h.get("limitRows"),fontSize:h.get("fontSize"),theme:h.get("editorTheme")},t.vars.delimiter=i.get("delimiter")||";;",t.vars.format=t.vars.formats[0],t.vars.themes=["ambiance","eclipse","mono_industrial","tomorrow_night_blue","chaos","github","monokai","tomorrow_night_bright","chrome","idle_fingers","pastel_on_dark","tomorrow_night_eighties","clouds","iplastic","solarized_dark","tomorrow_night","clouds_midnight","katzenmilch","solarized_light","twilight","cobalt","kr_theme","sqlserver","vibrant_ink","crimson_editor","kuroir","terminal","xcode","dawn","merbivore","textmate","dreamweaver","merbivore_soft","tomorrow"],n.onbeforeunload=function(e){if(""!==t.vars.currentTab.sql&&"localhost"!=location.hostname){var a="Do you want to leave this page?";return"undefined"==typeof e&&(e=window.event),e&&(e.returnValue=a),a}};var w=t.$on("$stateChangeStart",function(e){var a="Do you want to leave this page?";e.defaultPrevented||""===t.vars.currentTab||confirm(a)||e.preventDefault()}),k=function(){if(t.vars.saveTabs){var e=t.vars.tabs.map(function(e){return e.editor?e.sql=e.editor.getValue():e.sql="",{name:e.name,sql:e.sql,buttonTitle:e.buttonTitle,format:e.format,delimiter:e.delimiter,results:[],editor:null,selectedResultTab:0}});i.set(v,e),console.info("Save session , localStorageService.set(SQL_SESSION_KEY)")}};t.$watch("$root.isInitDatabaseStructure",function(){t.vars.EditorIsInit=a.isInitDatabaseStructure}),t.InitDatabaseStructure=function(){console.warn(">>>>>>>>>>>>>>>InitDatabaseStructure<<<<<<<",a.isInitDatabaseStructure)},t.executeQuery=function(a,n,i){var s="result_overflow_mode=throw";t.vars.currentTab.loading=!0,t.vars.limitRows&&(s+="&max_result_rows="+t.vars.limitRows),t.vars.limitTimes&&(s+="&timeout_overflow_mode=throw&max_execution_time="+t.vars.limitTimes);var o=a.sql.replace(/(\r\n|\n|\r)$/gm,"").substr(0,130);t.vars.currentTab.progress.query=o;var d="";a.qid&&(d=" /*TABIX_QUERY_ID_"+a.qid+"*/ "),r.fetchQuery(d+a.sql,!0,a.format,s).then(function(r){try{var s=r;e.isObject(r)||(r={data:s,meta:null,rows:null,statistics:null}),r.error=!1,r.query=a,r.countAllQuery=n.length;var l={time:moment().format("HH:mm:ss")};e.isObject(r.statistics)&&Object.assign(l,r.statistics),l.query=o,_.isArray(t.vars.currentTab.statistics)&&t.vars.currentTab.statistics.push(l),t.vars.LastStatistics=l;var c=new DataProvider(r,"ch");c.progressQuery=o,i.widgets.tables.push(new WidgetTable(c)),"drawCommand"in a&&a.drawCommand.length?(c.countAll=a.drawCommand.length>r.countAllQuery?a.drawCommand.length:r.countAllQuery,console.info("query.drawCommand",a.drawCommand),a.drawCommand.forEach(function(e){i.widgets.draw.push(new WidgetDraw(c,e))})):i.widgets.draw.push(new WidgetDraw(c,!1)),i.data.push(a),t.$applyAsync(),a.index+1-1&&r>-1&&t.vars.currentTab.editor.gotoLine(s,r),console.log("move cursor to",s,r)}var d="ch";console.warn("ERROR",n);var u=new DataProvider(n,d);i.data.push(a),i.widgets.tables.push(new WidgetTable(u)),t.finalizeResult(i)})},t.renderResult=function(e){},t.finalizeResult=function(e){if(t.vars.currentTab.loading=!1,t.vars.currentTab.progress=!1,e.data.find(function(e){return e.keyword&&-1!=["DROP","CREATE","ALTER"].indexOf(e.keyword.toUpperCase())})&&l.show(l.simple().content("Press `Reload Structure` for reload").theme(c.theme).position("bottom right")),t.$applyAsync(),t.vars.currentTab.statistics[0]){var a=DataProvider.convertArrayToDataProvider(t.vars.currentTab.statistics,"statistics");a.sort="time",a.sortOrder="desc",e.widgets.stats.push(new WidgetTable(a,!1))}},t.execute=function(n,s){t.$applyAsync(),console.groupCollapsed("Execute query"),t.vars.LastStatistics=!1,s.sql=s.editor.getValue();var o=s.sql,d=0,m=s.editor,h=[],p=m.getSelectedText();e.isUndefined(s.selectedTabResultIndex)&&(s.selectedTabResultIndex=0);var b={data:[],time:u("date")(new Date,"HH:mm:ss"),pinned:!1,widgets:{tables:[],pivot:[],draw:[],stats:[]}};if(""!==p&&null!==p&&(o=p),console.info("[EDITOR TEXT]> ",o),""===o||null===o)return void l.show(l.simple().content("SQL query is empty").theme(c.theme).position("bottom right"));s.results=[b],k();var f=window.global_delimiter;f||(f=";;"),m.session.$mode.splitByTokens(o,"constant.character.escape",f).forEach(function(t){if(!("current"==n&&d>0)){var s=[],o=t.sql;if(!(o.length<5)){if("current"==n&&!p){var l=m.selection.getCursor();if(!l||e.isUndefined(l))return;var c=t.range.compare(l.row,l.column);if(0!==c)return}var u=o.trim();-1==a.sqlLog.indexOf(u)&&(a.sqlLog.unshift(u),a.sqlLog.length>y&&a.sqlLog.splice(0,y),i.set("sqlLog",a.sqlLog));var b=m.session.$mode.replaceVars(o,g.get());o=b.sql;b.vars;if(console.log("replacedVars",b),m.session.$mode.findTokens(o,"invalid.illegal",!0)){var f=m.session.$mode.splitByTokens(o,"invalid.illegal",!0);o=f[0].sql,f.forEach(function(t){if(e.isDefined(t.keyword)&&t.keyword){var a=/DRAW_(\w+)/gim,n=a.exec(t.keyword);n&&n[1]&&s.push({drawtype:n[1].toLowerCase(),code:t.sql})}})}console.info("[SQL]>",o),s&&console.info("[DRAW]>",s);var v=null,w=!1,k=!1,x=null,C=m.session.$mode.findTokens(o,"storage",!0),S=m.session.$mode.findTokens(o,"keyword",!0);C.hasOwnProperty("value")?(v=!1,k=C.value):(v=" FORMAT JSON ",w=!0),S.hasOwnProperty("value")&&(x=S.value),"select"!=x&&"with"!=x&&(v=!1,w=!1),h.push({sql:o,index:d,format:v,setedformat:w,keyword:x,storage:k,drawCommand:s,itemRange:t.range,qid:r.makeQueryId()}),d++}}}),console.groupEnd("Execute query"),h.length&&(t.vars.currentTab.progress={},t.vars.currentTab.statistics||(t.vars.currentTab.statistics=[]),t.executeQuery(h[0],h,b))},t.setTheme=function(e){t.vars.theme=e,t.vars.tabs.forEach(function(t){return t.editor.setTheme("ace/theme/"+e)}),i.set("editorTheme",e)},t.reloadCache=function(){console.log("reloadCache"),r.resetDatabaseStructure(),l.show(l.simple().content("Reload page - for reset cache").theme(c.theme).position("bottom right"))},t.selectDatabase=function(e,a){e&&(r.setDatabase(e),t.vars.db!=e&&(t.vars.db=e,t.AceEditorInLoad||(t.aceLoadDatabaseFields(),t.aceApply(!1))))},t.insertWordInEditor=function(e){var a=t.vars.currentTab.editor,n=a.getCursorPosition();n.column+=e.length,a.clearSelection(),a.insert(e),t.vars.currentTab.sql=a.getValue(),d(function(){a.focus(),a.moveCursorToPosition(n)})},t.aceLoadDatabaseFields=function(){var e=t.vars.db;window.aceJSRules.fieldsList=[],r.databaseStructure(function(t){window.aceJSRules.fieldsList=t.getAllFieldsInDatabase(e)})},t.aceLoadDatabaseStructure=function(){var e=t.vars.db;window.aceJSRules.tables=[],r.databaseStructure(function(a){t.vars.databasesList=a.getDatabases(),Object.keys(a.getUniqueDatabaseTables()).forEach(function(e){window.aceJSRules.tables.push(e)}),window.aceJSRules.fieldsList=a.getAllFieldsInDatabase(e)})},t.loadInAce=function(e){e.session.setMode({path:"ace/mode/clickhouse"});for(var t in window.aceJSRules.builtinFunctions){var a=window.aceJSRules.builtinFunctions[t];e.session.$mode.$highlightRules.addCompletionsFunctions(a)}e.session.$mode.$highlightRules.addArrayCompletions(window.aceJSRules.tables,"[table]","table");for(var n in window.aceJSRules.dictionaries){var i=window.aceJSRules.dictionaries[n];e.session.$mode.$highlightRules.addCompletionsDictionaries(i)}for(var r in window.aceJSRules.fieldsList){var s=window.aceJSRules.fieldsList[r];e.session.$mode.$highlightRules.addCompletionsTableFiled(s)}var o=g.getCompletions(),l=p.getCompletions();e.session.$mode.$highlightRules.addArrayCompletions(o,"[var]","var"),e.session.$mode.$highlightRules.addArrayCompletions(l,"[snippet]","snippet"),e.session.bgTokenizer.start(0)},t.aceApply=function(e){e?(console.log(""),t.loadInAce(e)):t.vars.tabs.forEach(function(e){e.editor&&(console.log(""),t.loadInAce(e.editor))}),a.$watch("currentDatabase",t.selectDatabase)},t.changeRootSelectDatabase=function(e){a.currentDatabase!=e&&(a.currentDatabase=e)},t.aceLoadDictionaries=function(){t.vars.isDictionariesLoad||(window.aceJSRules.dictionaries=[],t.vars.dictionaries=[],window.aceJSRules.builtinFunctions=[],t.vars.isDictionariesLoad=!0,r.databaseStructure(function(e){e.getFunctions().forEach(function(e){if(window.aceJSRules.builtinFunctions.push({name:e.name,isaggr:e.is_aggregate,score:101,comb:!1,origin:e.name}),e.is_aggregate){var t={name:e.name+"If",isaggr:e.is_aggregate,score:3,comb:"If",origin:e.name};window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"Array",isaggr:e.is_aggregate,score:2,comb:"Array",origin:e.name},window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"State",isaggr:e.is_aggregate,score:1,comb:"State",origin:e.name},window.aceJSRules.builtinFunctions.push(t)}}),e.getDictionaries().forEach(function(e){var a=e.name;a=a.replace(/^.*\./gm,""),"news"!=a&&(a=a.replace(/s$/gm,"")),a=a?a.toLowerCase()+"_id":"ID";var n="dictGet"+e["attribute.types"]+"('"+e.name+"','"+e["attribute.names"]+"',to"+e.key+"( "+a+" ) ) AS "+e["attribute.names"]+",";window.aceJSRules.dictionaries.push({dic:n,title:"dic_"+e.name+"."+e["attribute.names"]}),t.vars.dictionaries.push({dic:n,title:e.name+"."+e["attribute.names"]+" as "+e["attribute.types"]})})}))};for(var x=function(e){t.vars.tabs.length>=e&&(t.vars.currentTab=t.vars.tabs[e],t.vars.selectedTab=e,d(function(){t.vars.currentTab.editor.focus()}))},C=function(){t.vars.selectedTab>0&&x(t.vars.selectedTab-1)},S=function(){t.vars.selectedTabD;D++)A(D);m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+right":"ctrl+right",callback:S}),m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+left":"ctrl+left",callback:C}),m.add({combo:"ctrl+shift+f",callback:T}),t.aceLoaded=function(e){t.editorVisiable=!1,d(function(){t.editorVisiable=!0,t.AceEditorInLoad=!0,a.currentDatabase&&t.selectDatabase(a.currentDatabase),t.aceLoadDictionaries(),t.aceLoadDatabaseStructure(),t.aceLoadDatabaseFields();var n=t.vars.tabs.find(function(e){return!e.editor})||t.vars.currentTab;n.editor=e,e.$blockScrolling=1/0,e.setOptions({fontSize:t.vars.fontSize+"px",enableBasicAutocompletion:!0,behavioursEnabled:!0,wrapBehavioursEnabled:!0,highlightSelectedWord:!0,showGutter:!0,enableLiveAutocompletion:t.vars.enableLiveAutocompletion,liveAutocompletionDelay:500,liveAutocompletionThreshold:1}),e.setTheme("ace/theme/"+t.vars.theme),e.session.setUseWrapMode(h.get("useWrapMode")),e.commands.addCommand({name:"runCurrentCommand",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:function(){t.execute("current",n)}}),e.commands.addCommand({name:"removeLiness",bindKey:{win:"Ctrl-Y",mac:"Cmd-Y"},exec:function(e){e.removeLines()}}),e.commands.addCommand({name:"collapseAll",bindKey:{win:"Ctrl-Shift--",mac:"Command+Shift+-"},exec:function(e){e.session.$mode.collapseAll(e.session)}}),e.commands.addCommand({name:"unfold",bindKey:{win:"Ctrl-Shift-+",mac:"Command+Shift+="},exec:function(e){e.session.unfold()}}),e.commands.addCommand({name:"runAllCommand",bindKey:{win:"Shift-Ctrl-Enter",mac:"Shift-Command-Enter"},exec:function(){t.execute("all",n)}});for(var i=function(t){e.commands.addCommand({name:"selecttab"+t,bindKey:{win:"Ctrl-Shift-"+(t+1),mac:"Command-Shift-"+(t+1)},exec:function(){return x(t)}})},r=0;9>r;r++)i(r);e.commands.addCommand({name:"selectnexttab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Right":"Ctrl-Right",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Right":"Command-Right"},exec:S}),e.commands.addCommand({name:"selectprevtab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Left":"Ctrl-Left",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Left":"Command-Left"},exec:C}),e.commands.addCommand({name:"formatcode",bindKey:{win:"Ctrl-Shift-F",mac:"Command-Shift-F"},exec:T}),e.setValue(n.sql),e.clearSelection(),e.focus(),e.selection.moveTo(0,0),e.on("changeSelection",function(){d(function(){n.buttonTitle=""!==e.getSelectedText()?"Run selected ⌘ + ⏎":"Run all ⇧ + ⌘ + ⏎",n.originalSql&&(n.changed=n.originalSql!=n.sql)})}),t.AceEditorInLoad=!1,t.aceApply(e)},100)},t.save=function(e,a){return o.show(o.prompt().title("Save SQL as?").placeholder("Title").initialValue(e.name).targetEvent(a).ok("Save").cancel("")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n?(t.vars.sqlHistory[n].sql=e.sql,t.vars.sqlHistory[n].name=a):t.vars.sqlHistory.push({sql:e.sql,name:a}),e.originalSql=e.sql,e.name=a,i.set(b,t.vars.sqlHistory),k()})},t.load=function(e){t.vars.currentTab.sql=e.sql,t.vars.currentTab.originalSql=e.sql,t.vars.currentTab.name=e.name,t.vars.currentTab.editor.setValue(e.sql),t.aceApply(t.vars.currentTab.editor)},t.getExportData=function(t){return t.data.data.map(function(t){return Object.keys(t).map(function(a){return e.isArray(t[a])?t[a].join(", "):t[a]})})},t.getExportHeaders=function(e){return e.data.meta.map(function(e){return e.name})},t.addTab=function(){t.vars.currentTab={name:"new SQL",sql:"",buttonTitle:"Run ⌘ + ⏎",format:{},editor:null,results:[],selectedResultTab:0},t.vars.tabs.push(t.vars.currentTab),k()},t.changeTab=function(e){k(),t.vars.currentTab=e},t.removeTab=function(e,a){a.stopPropagation();var n=function(){t.vars.tabs.splice(t.vars.tabs.indexOf(e),1),t.vars.tabs.length==t.vars.selectedTab&&t.vars.selectedTab--};e.changed?o.show(o.confirm().title("SQL was changed. Save it before exit?").targetEvent(a).ok("Yes").cancel("No")).then(function(){var a=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=a&&(t.vars.sqlHistory[a].sql=e.sql,t.vars.sqlHistory[a].name=e.name),i.set(b,t.vars.sqlHistory),n()},n):n()},t.removeResult=function(e,t,a){},a.$on("handleBroadcastUpdateVarsAndSnippets",function(e,a){t.aceApply()}),a.$on("handleBroadcastCalcSumCells",function(e,a){_.isObject(t.vars.currentTab.results[0])&&(t.vars.currentTab.results[0].cellsCalc=a,t.$applyAsync())}),a.$on("handleBroadcastInsertInActive",function(e,a){a.value&&t.insertWordInEditor(" "+a.value+" ")}),t.toggleSidenav=function(e){s(e).toggle()},t.removeHistory=function(e,a){a.preventDefault();var n=t.vars.sqlHistory.indexOf(e);-1!=n&&o.show(o.confirm().title("Delete "+e.name+"?").targetEvent(a).ok("Yes").cancel("No")).then(function(){t.vars.sqlHistory.splice(n,1),i.set(b,t.vars.sqlHistory)})},t.setSql=function(e){t.vars.currentTab.sql=e,t.toggleSidenav("log"),t.vars.currentTab.editor.setValue(e),d(function(){return t.vars.currentTab.editor.focus()},500)},t.changeTabName=function(e,a){a.stopPropagation(),o.show(o.prompt().title("Title tab").placeholder("title").initialValue(e.name).targetEvent(a).ok("Apply").cancel("Cancel")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n&&(e.originalSql=e.sql,t.vars.sqlHistory[n].name=a,i.set(b,t.vars.sqlHistory)),e.name=a,k()})},t.vars.saveTabs?(t.vars.tabs=i.get(v),_.isArray(t.vars.tabs)||(t.vars.tabs=[]),t.vars.tabs.length>0?d(function(){return t.vars.currentTab=t.vars.tabs[0]},500):t.addTab()):(i.set(v,[]),t.addTab()),t.$on("$destroy",function(){r.setDatabase(a.currentDatabase),w(),n.onbeforeunload=null}),t.rightAceMenuList=[],t.showDialogUpload=function(t,a){function n(e,t){e.vars={UploadCsv:{content:null,header:!0,headerVisible:!0,separator:",",separatorVisible:!0,result:null,encoding:"ISO-8859-1",encodingVisible:!0,uploadButtonLabel:"Upload",callback:function(e){t.hide()}}},e.$watch("vars.UploadCsv.result",function(e){e&&t.hide(e)}),e.hide=function(){t.hide()},e.cancel=function(){t.cancel()}}n.$inject=["$scope","$mdDialog"],o.show({controller:n,templateUrl:"app/sql/showDialogUpload.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0}).then(function(e){if(e&&t&&t.tables){var a=DataProvider.convertArrayToDataProvider(e,"csv");t.tables.push(new WidgetTable(a))}},function(){})},t.rightMenuProcess=function(e){t.vars.currentTab.sql=t.vars.currentTab.editor.getValue();var a=t.vars.currentTab.editor.session;if(t.vars.currentTab.editor.resize(),"Snippet"==e){var n=t.vars.currentTab.editor.getSelectedText();n&&(p.add(n),t.aceApply())}else"AutoFormat"==e?T():"Expand"==e?a.unfold():"Collapse All"==e?a.$mode.collapseAll(a):"Collapse"==e&&a.foldAll();t.vars.currentTab.editor.focus()}}e.module(t.app.name).controller("SqlController",a),a.$inject=["$scope","$rootScope","$window","localStorageService","API","$mdSidenav","$mdDialog","$mdToast","ThemeService","$timeout","$filter","hotkeys","Preference","Snippets","Variables"]}(angular,smi2),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors + */ +function(e,t,a){function n(t,a,n,i,r,s,o,l,c,d,u){function m(e,t){this.apply=function(){l.show(l.simple().content("Share OK, link in clipboard").theme(c.theme).position("top right")),e&&e.close()},this.close=function(){e&&e.close()}}function h(e,t){this.apply=function(){l.show(l.simple().content("Add to dashboard - OK").theme(c.theme).position("top right")),e&&e.close()},this.close=function(){e&&e.close()}}t.tabsRender=!0,t.vars={rsw:0,uiTheme:c.themeObject,isChartReady:!1,staticGrid:!0,stackType:"false",isDark:c.isDark(),active:{table:!1,pivot:!1,draw:!1}},t.staticGrid=!0,t.gridStackOptions={cellHeight:200,verticalMargin:3,disableDrag:!0},t.switchStaticGrid=function(){t.vars.staticGrid=!t.vars.staticGrid,t.staticGrid=t.vars.staticGrid,console.info("staticGrid",t.staticGrid)},t.shareResult=function(){var t=u.newPanelPosition().absolute().right().top();u.open({controller:m,templateUrl:"app/panels/share.html",attachTo:e.element(document.body),position:t,panelClass:"demo-dialog-example",trapFocus:!0,zIndex:150,clickOutsideToClose:!0,clickEscapeToClose:!0,hasBackdrop:!0,controllerAs:"ctrl",locals:{$widget:""}})},t.SendToDashboard=function(t,a){var n=u.newPanelPosition().absolute().right().top();u.open({controller:h,templateUrl:"app/panels/sendtodashboard.html",attachTo:e.element(document.body),position:n,panelClass:"demo-dialog-example",trapFocus:!0,zIndex:150,clickOutsideToClose:!0,clickEscapeToClose:!0,hasBackdrop:!0,controllerAs:"ctrl",locals:{$widget:t}})},t.initNoTabs=function(){t.vars.active.table=!0,t.vars.active.draw=!0,t.vars.active.pivot=!0},t.initTableTab=function(){t.vars.active.table=!0},t.initDrawTab=function(){t.vars.active.draw=!0},t.onResizeStop=function(){},t.openEditor=function(a){o.show({controller:PlotlyEditorController,templateUrl:"app/sql/PlotlyEditor.tmpl.html",parent:e.element(document.body),locals:{w:a}}).then(function(e){t.status='You said the information was "'+e+'".'},function(){t.status="You cancelled the dialog."})},t.openEditorPlotLy=function(e){console.log("openEditorPlotLy",e),t.openEditor(e)},t.initPivotTab=function(){t.vars.active.pivot=!0}}e.module(t.app.name).controller("RenderCtrl",n),n.$inject=["$scope","$rootScope","$window","localStorageService","API","$mdSidenav","$mdDialog","$mdToast","ThemeService","$timeout","$mdPanel"]}(angular,smi2,window.$),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar, SMI2 LLC and other contributors + */ +function(e,t){function a(e){var t=this,a={date:"calendar",text:"message-text-outline","int":"numeric",code:"cow"};this.vars={},this.getIcon=function(e){return a[e]},this.constructor=function(){var a=e.get("UserVariables");_.isObject(a)||(a={});for(var n in a){var i=a[n];t.vars[n]={id:n,name:i.name,title:i.name,value:i.value,typeEdit:"text",type:i.type,icon:t.getIcon(i.type)}}},this.constructor(),this.drop=function(e){delete t.vars[e]},this.update=function(e){console.info("Update value",e),t.apply()},this.getCompletions=function(){var e=[];for(var a in t.vars){var n=t.vars[a];e.push("$"+n.name)}return e},this.get=function(){return t.vars},this.addVar=function(e,a,n){var i=a;t.vars[i]={id:i,name:a,title:a,value:n,typeEdit:"text",type:e,icon:t.getIcon(e)},t.apply()},this.apply=function(){var a={};_.forEach(t.vars,function(e,t){var n={id:e.id,name:e.title,type:e.type,value:e.value};a[e.id]=n}),e.set("UserVariables",a)}}e.module(t.app.name).service("Variables",a),a.$inject=["localStorageService"]}(angular,smi2),function(e,t){function a(t,a){var n=t.get("themeName")||"dark",i=[{isDark:!1,name:"light",title:"Light theme"},{isDark:!0,name:"dark",title:"Dark theme"}],r=i.find(function(e){return e.name==n})||i[1];return r.isDark&&e.element("body").addClass("dark"),this.isDark=function(){return r.isDark},this.get=function(){return r},{isDark:function(){return r.isDark},list:i,set:function(e){console.warn(e,n),e!=n&&(console.log("localStorageService.set('themeName', ",e),t.set("themeName",e),a.reload(),window.location.reload())},get:function(){},theme:r.name,themeObject:r}}e.module(t.app.name).service("ThemeService",a),a.$inject=["localStorageService","$state"]}(angular,smi2),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar/SMI2 LLC and other contributors + */ +function(e,t){function a(e){var t=this;this.snippets={},this.constructor=function(){var a=e.get("UserSnippets");_.isObject(a)||(a={});for(var n in a){var i=a[n];t.snippets[n]={id:n,code:i.code,dt:i.dt}}console.log("UserSnippets",t.snippets)},this.constructor(),this.getCompletions=function(){var e=[];for(var a in t.snippets){var n=t.snippets[a];e.push(n.code)}return e},this.getSnippets=function(){return t.snippets},this.drop=function(e){delete t.snippets[e]},this.update=function(e){console.info("Update value",e),t.apply()},this.hashCode=function(e){return e.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)},this.add=function(e){e=e.trim();var a="SQL_"+Math.abs(t.hashCode(e));console.log("UserSnippets",e,a),t.snippets[a]={id:a,code:e,dt:Date.now()},t.apply()},this.apply=function(){var a={};_.forEach(t.snippets,function(e,t){var n={id:e.id,code:e.code,dt:e.dt};a[e.id]=n}),e.set("UserSnippets",a)}}e.module(t.app.name).service("Snippets",a),a.$inject=["localStorageService"]}(angular,smi2),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +function(e,t){function a(e,t){var a=this,n={limitRows:5e3,limitTimes:5,fontSize:14,editorTheme:"cobalt",theme:"dark",saveTabs:!0,liveAutocompletion:!0,disableAutohelp:!1,disableHotKeyCmdLeft:!0,delimiter:";;",liveAutocompletionDelay:500,liveAutocompletionThreshold:1,useWrapMode:!0,showInvisibles:!1},i=["ligth","dark"],r=["ambiance","eclipse","mono_industrial","tomorrow_night_blue","chaos","github","monokai","tomorrow_night_bright","chrome","idle_fingers","pastel_on_dark","tomorrow_night_eighties","clouds","iplastic","solarized_dark","tomorrow_night","clouds_midnight","katzenmilch","solarized_light","twilight","cobalt","kr_theme","sqlserver","vibrant_ink","crimson_editor","kuroir","terminal","xcode","dawn","merbivore","textmate","dreamweaver","merbivore_soft","tomorrow","dracula"];this.current={},this.constructor=function(){var t=e.get("UserPreference");a.current=_.merge(n,t)},this.constructor(),this.getThemes=function(){return i},this.getEditorThemes=function(){return r},this.apply=function(e){_.forEach(e,function(e,t){a.set(t,e)}),a.save()},this.save=function(){console.log("localStorageService,set",a.current),e.set("UserPreference",a.current)},this.getCurrentState=function(){return a.current},this.get=function(e){return n[e]},this.set=function(e,t){("limitRows"==e||"limitTimes"==e||"fontSize"==e||"liveAutocompletionDelay"==e||"liveAutocompletionThreshold"==e)&&(t=parseInt(t)),a.current[e]=t}}e.module(t.app.name).service("Preference",a),a.$inject=["localStorageService","ThemeService"]}(angular,smi2),function(e,t){function a(e,t){return{responseError:function(a){return 401==a.status&&t.get("$state").go("login"),e.reject(a)}}}e.module(t.app.name).service("HttpInterceptor",a),a.$inject=["$q","$injector"]}(angular,smi2),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +function(e,t){function a(t,a,n,i,r){var s=this,o="currentBaseConfig",l=new DatabaseStructure,c=null,d={},u=n.get(o);u&&(u.host||u.tabix)&&(d=u),this.setConnection=function(t){n.set(o,t),d=e.copy(t)},this.isAuthorized=function(){return s.isTabixServer()?d&&d.tabix?d.tabix.server:!1:d?d.host:!1},this.clear=function(){c=null,d={},n.set(o,{}),l=new DatabaseStructure},this.hashCode=function(e){return e.split("").reduce(function(e,t){return e=(e<<5)-e+t.charCodeAt(0),e&e},0)},this.DS_CacheKey=function(){var e="_databaseStructure:"+JSON.stringify(d);return e=s.hashCode(e)},this.DS_storeCache=function(e,t,a,i,r){var o={columns:e,tables:t,databases:a,dictionaries:i,functions:r,ttl:Date.now()};return n.set(s.DS_CacheKey(),o)},this.DS_fetchFromCache=function(){var e=n.get(s.DS_CacheKey());if(!e||!e.ttl)return!1;var t=(Date.now()-e.ttl)/36e5;return t>1.5?!1:e&&e.functions&&e.functions.length>1?(l.init(e.columns,e.tables,e.databases,e.dictionaries,e.functions),!0):!1},this.memory=function(e){},this.resetDatabaseStructure=function(){console.log("reset databaseStructure"),n.set("_databaseStructure:"+s.getHost()+":"+s.getLogin(),[])},this.databaseStructure=function(e,t){return!t&&l.isInit()?e(l):!t&&s.DS_fetchFromCache()&&l.isInit()?(console.info("restore from cache : database Structure!"),e(l)):(t&&(l=new DatabaseStructure),console.time("Load Database Structure!"),void s.fetchQuery("SELECT * FROM system.columns").then(function(t){s.fetchQuery("SELECT database,name,engine FROM system.tables").then(function(a){s.fetchQuery("SELECT name FROM system.databases").then(function(n){s.fetchQuery("SELECT name,key,attribute.names,attribute.types from system.dictionaries ARRAY JOIN attribute ORDER BY name,attribute.names",null).then(function(i){s.fetchQuery("SELECT name,is_aggregate from system.functions",null).then(function(r){return console.timeEnd("Load Database Structure!"),s.DS_storeCache(t.data,a.data,n.data,i.data,r.data),l.init(t.data,a.data,n.data,i.data,r.data),e(l)},function(e){throw e})},function(e){throw e})},function(e){throw e})},function(e){throw e})},function(e){throw e}))},this.getConnectionInfo=function(){return d},this.setDatabase=function(e){return c=e},this.getDatabase=function(){return c},this.getHost=function(){return d.host},this.getPassword=function(){return d.password},this.getLogin=function(){return d.login},this.makeQueryId=function(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=0;8>a;a++)e+=t.charAt(Math.floor(Math.random()*t.length));return e},this.isTabixServer=function(){return d.tabix&&d.tabix.server?!0:!1},this.makeSqlQuery=function(e,t){var a="";return t!==!1?(t=t||" FoRmAt JSON","null"==t&&(t=""),a=e+"\n\n"+t):a=e,a},this.direct_makeUrlRequest=function(e,t){var a="",n="";d.host.indexOf("://")>0||0==d.host.indexOf("/")||(n="http://"),a=n+d.host,a+="/?",a+="add_http_cors_header=1&log_queries=1&output_format_json_quote_64bit_integers=1",d.NotCH1_1_54276||(a+="&output_format_json_quote_denormals=1");return d.baseauth||(a+=d.password?"&user="+encodeURIComponent(d.login)+"&password="+encodeURIComponent(d.password):"&user="+encodeURIComponent(d.login)),e&&(a+="&database="+encodeURIComponent(c)),t&&(a+="&"+t),d.params&&(a+="&"+d.params),a},this.fetchQuery=function(e,t,a,n){return s.isTabixServer()?s.ts_fetchQuery(e,t,a,n):s.direct_fetchQuery(e,t,a,n)},this.pushProjectState=function(e){return s.fetchTabixServer("projectstate/push",e)},this.getProjectState=function(e){return s.fetchTabixServer("projectstate/fetch",e)},this.getStructure=function(e){return s.fetchTabixServer("structure",e)},this.getWidget=function(e,t){return s.fetchTabixServer("widget/"+e,t)},this.getDashboard=function(e,t){return s.fetchTabixServer("dashboard/"+e,t)},this.getDashboardsTree=function(e){return s.fetchTabixServer("dashboards",e)},this.fetchTabixServer=function(e,t,a){_.isObject(t)||(t={});var n=d.tabix.server;n=n+"/"+e+"?tabix_client="+window.TabixVersion+"&random="+Math.round(1e8*Math.random()),a&&(n+="&"+a);var i={version:window.TabixVersion,auth:{login:d.tabix.login,password:d.tabix.password,confid:d.tabix.confid}};i=Object.assign(t,i);var r={mode:"cors",method:"post",headers:{"Content-type":"application/json; charset=UTF-8"},body:JSON.stringify(i)};console.info("TS Request",n,r);var s=new Request(n,r);return fetch(s).then(function(e){var t=e.headers.get("content-type");return t.includes("text/plain")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t&&t.includes("application/json")&&e.status>=200&&e.status<300?Promise.resolve(e):e.text().then(Promise.reject.bind(Promise))}).then(function(e){return"OK"===e?"OK":e.json()},function(e){return Promise.reject(e)})},this.ts_fetchQuery=function(e,t,a,n){return s.fetchTabixServer("query",{query:s.makeSqlQuery(e,a)},n)},this.direct_fetchQuery=function(e,t,a,n){var i=s.makeSqlQuery(e,a),r=s.direct_makeUrlRequest(t,n),o={mode:"cors",method:"post",headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8"},body:i};d.includeCredentials&&(o.credentials="include");var l=new Request(r,o);return fetch(l).then(function(e){var t=e.headers.get("content-type");return t.includes("text/tab-separated-values")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t.includes("text/plain")&&200==e.status&&"ok"==e.statusText.toLowerCase()?"OK":t&&t.includes("application/json")&&e.status>=200&&e.status<300?Promise.resolve(e):e.text().then(Promise.reject.bind(Promise))}).then(function(e){return"OK"===e?"OK":e.json()},function(e){return Promise.reject(e)})}}e.module(t.app.name).service("API",a),a.$inject=["$http","$q","localStorageService","$sanitize","ThemeService"]}(angular,smi2);var DatabaseStructure=function(){function e(){_classCallCheck(this,e),this._init=!1,this.uciq_fields=[],this.all_fields=[],this.all_db_fields=[],this.uciq_dbtables=[]}return _createClass(e,[{key:"init",value:function(e,t,a,n,i){var r=this;console.log("Try init DS...."),this._init||(this.columns=e,this.tables=t,this.databases=a,this.functions=i,this.dictionaries=n,this.columns.forEach(function(e){!angular.isUndefined(e.default_kind)&&angular.isUndefined(e.default_type)&&(e.default_type=e.default_kind),r.all_fields[e.database+"."+e.table]||(r.all_fields[e.database+"."+e.table]=[]),_.isArray(r.all_db_fields[e.database])||(r.all_db_fields[e.database]=[]),_.isArray(r.all_db_fields[e.database][e.table])||(r.all_db_fields[e.database][e.table]=[]),r.all_db_fields[e.database][e.table].push(e),r.all_fields[e.database+"."+e.table].push({name:e.name,type:e.type,active:!0}),r.uciq_fields[e.database]||(r.uciq_fields[e.database]=[]),_.isArray(r.uciq_fields[e.database])||(r.uciq_fields[e.database]=[]),_.isArray(r.uciq_fields[e.database])||(r.uciq_fields[e.database]=[]),r.uciq_fields[e.database].push(e),r.uciq_dbtables[e.database+"."+e.table]=1}),console.log("DS init ... done"),this._init=!0)}},{key:"isInit",value:function(){return this._init&&this.functions&&this.functions.length>1}},{key:"getTables",value:function(){return this.tables}},{key:"getDatabases",value:function(){return this.databases}},{key:"getFieldsByDatabase",value:function(e){return this.all_db_fields[e]}},{key:"getFunctions",value:function(){return this.functions}},{key:"getFields",value:function(){return this.all_fields}},{key:"getUniqueDatabaseTables",value:function(){return this.uciq_dbtables}},{key:"getAllFieldsInDatabase",value:function(e){return this.uciq_fields[e]}},{key:"getDictionaries",value:function(){return this.dictionaries}},{key:"getColumns",value:function(){return this.columns}}]),e}();/* + * Copyright (C) 2017 IgorStrykhar in SMI2 + * All rights reserved. + */ +!function(e,t,a){function n(e,t,a){e.vars={AceThemes:t.getEditorThemes(),Themes:t.getThemes()},e.state=t.getCurrentState(),e.apply=function(){t.apply(e.state),e.state=t.getCurrentState(),a.go("sql")},e.reloadCache=function(){}}e.module(t.app.name).controller("PreferenceController",n),n.$inject=["$scope","Preference","$state"]}(angular,smi2,window.$),function(e,t){function a(t,a,n,i,r,s,o){var l="proc.interval",c="proc.key";t.widgets=[],t.staticGrid=!0,t.gridStackOptions={cellHeight:200,verticalMargin:0,disableDrag:!0,disableResize:!0,staticGrid:!0},t.logData={},t.vars={readOnlyRows:!0,canShowTable:!1,WidgetTable:!1,queryesToKill:{},clusterMode:!0,logMode:!0,loading:!1,isClusterLoad:!1,clusterList:!1,isDark:n.isDark(),sort:/^[a-z0-9_]+$/.test(r.get(c))?r.get(c):null,interval:r.get(l)||-1};var d=null;t.initClusterConfig=function(){var e="SELECT host_address,port FROM system.clusters GROUP BY host_address,port LIMIT 10";t.vars.clusterList=[],a.fetchQuery(e).then(function(e){e.data.forEach(function(e){t.vars.clusterList.push(e.host_address+":"+e.port)}),t.vars.isClusterLoad=!0,console.log("Cluster nodes list",t.vars.clusterList.join(",")),t.load()},function(e){t.vars.isClusterLoad=!0,console.error("Error "+e)})},t.flush=function(){t.logData={}},t.megreProcessData=function(e){return e.forEach(function(e){if(t.logData[e.hash]){var a=t.logData[e.hash].count;t.logData[e.hash].initial_query_id!=e.initial_query_id&&(a+=1),e.count=a,t.logData[e.hash]=e}else e.count=1,t.logData[e.hash]=e}),_.values(t.logData)},t.load=function(){console.info("Call load processes");var e="SELECT now() as dt, query, 1 as count,\n toUInt64(toUInt64(read_rows) + toUInt64(written_rows)) as rows,\n round(elapsed,1) as elapsed ,\n formatReadableSize(toUInt64(read_bytes)+toUInt64(written_bytes)) as bytes, \n formatReadableSize(memory_usage) as memory_usage,\n formatReadableSize(read_bytes) as bytes_read,\n formatReadableSize(written_bytes) as bytes_written, \n * , \n cityHash64(query) as hash, \n hostName()";t.vars.isClusterLoad&&t.vars.clusterList&&t.vars.clusterMode?e=e+" FROM remote('"+t.vars.clusterList.join(",")+"',system.processes, '"+a.getLogin()+"','"+a.getPassword()+"') ":e+=" FROM system.processes ",e+=" /* 12XQWE3X1X2XASDF */ WHERE query not like '%12XQWE3X1X2XASDF%'",t.vars.readOnlyRows&&(e+=" AND read_rows>0"),a.fetchQuery(e).then(function(e){var a=new DataProvider(e);t.widgets[0]?t.vars.logMode?t.widgets[0].updateData(t.megreProcessData(a.data)):t.widgets[0].updateData(a.data):(a.setColumnsHumanSort(["bytes","memory_usage","bytes_read","bytes_written"]),a.setSort("rows",-1),t.widgets[0]=new WidgetTable(a,!1,12,9),a.data.forEach(function(e){t.logData[e.hash]=e})),t.vars.canShowTable=!0,t.vars.data=!0,t.vars.loading=!1,t.$applyAsync()},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.setInterval=function(){r.set(l,t.vars.interval),d&&(i.cancel(d),d=null),t.vars.interval>-1&&(d=i(t.load,1e3*t.vars.interval))},t.$on("$destroy",function(){t.vars.interval=-1,i.cancel(d),t.setInterval()}),t.initClusterConfig(),t.vars.interval>-1&&t.setInterval(),t.dialogKill=function(n){var i="SELECT now() as dt,query,1 as count,\n \n formatReadableSize(read_bytes) as read_bytes, \n formatReadableSize(written_bytes) as written_bytes, \n formatReadableSize(memory_usage) as memory_usage,\n read_rows,written_rows,\n \n query_id as hash,\n round(elapsed,4) as elapsed \n FROM system.processes /* 12XQWE3X1X2XASDF */ WHERE query not like '%12XQWE3X1X2XASDF%' ORDER BY elapsed DESC";a.fetchQuery(i).then(function(i){s.show({controller:["$scope",function(e){e.queryesToKill=i.data,e.kill=function(e){var t="KILL QUERY WHERE query_id='"+e.hash+"' SYNC",i=s.confirm().title(t+" ?").textContent(e.query).ariaLabel("Lucky day").targetEvent(n).ok("Please do it!").cancel("Sounds like a scam");s.show(i).then(function(){a.fetchQuery(t,!1).then(function(e){s.show(s.alert().clickOutsideToClose(!0).title("Result: "+t).textContent(e).ariaLabel("Alert").ok("Ok!").targetEvent(n))},function(e){s.show(s.alert().clickOutsideToClose(!0).title("Error: "+t).textContent(e.data).ariaLabel("Error on Kill").ok("Ok!").targetEvent(n))})},function(){})},e.cancel=function(){s.cancel()}}],templateUrl:"app/metrics/dialog.kill.html",parent:e.element(document.body),targetEvent:n,clickOutsideToClose:!0}).then(function(e){t.status='You said the information was "'+e+'".'},function(){t.status="You cancelled the dialog."})})}}e.module(t.app.name).controller("ProcessesController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","hotRegisterer"]}(angular,smi2),/* + * Copyright (C) 2017 IgorStrykhar in Tabix LLC + * All rights reserved. + */ +function(e,t,a){function n(e,t,a){e.widgets=[],e.staticGrid=!0,e.gridStackOptions={cellHeight:200,verticalMargin:0,disableDrag:!0,disableResize:!0,staticGrid:!0},e.vars={uiTheme:a.themeObject,isDark:a.isDark()},e.dumpStaticGridSizes=function(){console.info("dumpStaticGridSizes");var t=[];e.widgets.map(function(e){var a={id:e.id,x:e.x,y:e.y,sizeX:e.sizeX,sizeY:e.sizeY};t.push(a),console.log(a)}),console.log(t)},e.initTab=function(){console.info("initPivotTab")},e.setWidgets=function(t,a){a.id=t,a.x=e.widgets[t].x,a.y=e.widgets[t].y,a.sizeX=e.widgets[t].sizeX,a.sizeY=e.widgets[t].sizeY,e.widgets[t]=a,e.$applyAsync()},e.init=function(){e.widgets=[{id:0,x:0,y:0,sizeX:4,sizeY:2},{id:1,x:8,y:0,sizeX:4,sizeY:2},{id:2,x:4,y:0,sizeX:4,sizeY:2},{id:3,x:0,y:4,sizeX:8,sizeY:3},{id:4,x:8,y:2,sizeX:4,sizeY:4},{id:5,x:0,y:2,sizeX:8,sizeY:2}],console.info("Init OverviewController"),t.fetchQuery("SELECT * FROM system.build_options").then(function(t){e.setWidgets(0,new WidgetTable(new DataProvider(t)))}),t.fetchQuery("SELECT database,table,name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns").then(function(t){var a={path:"database.table.name.data_compressed_bytes",title:"columns data_compressed_bytes",tooltip:"Size",valueformat:"0.00 b"},n={drawtype:"TREEMAP",code:a};e.setWidgets(1,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("SELECT database,table,sum(data_compressed_bytes) as data_compressed_bytes FROM system.columns GROUP BY database,table").then(function(t){var a={path:"database.table.data_compressed_bytes",title:"columns data_compressed_bytes",tooltip:"Size",valueformat:"0.00 b"},n={drawtype:"TREEMAP",code:a};e.setWidgets(2,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("select toStartOfDay(modification_time) as dt,\n sum(bytes) as bytes FROM system.parts group by dt order by dt LIMIT 30000").then(function(t){var a={autoAxis:!0,markLine:!0,title:"system.parts bytes"},n={drawtype:"CHART",code:a};e.setWidgets(3,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("select concat(database,'.',table) as table,sum(bytes) as bytes from system.parts\n group by table order by bytes desc LIMIT 3000").then(function(t){var a={title:"table bytes"},n={drawtype:"BAR",code:a};e.setWidgets(4,new WidgetDraw(new DataProvider(t),n))}),t.fetchQuery("SELECT * FROM system.clusters").then(function(t){e.setWidgets(5,new WidgetTable(new DataProvider(t)))})},e.init()}e.module(t.app.name).controller("OverviewController",n),n.$inject=["$scope","API","ThemeService"]}(angular,smi2,window.$),function(e,t){function a(t,a,n,i,r,s,o){var l="proc.metrica",c="proc.metrica_max";t.data=[],t.metrcisChart=!1,t.maxlength=r.get(c)||50,t.chartData={},t.orderKeys={},t.preState={},t.EChartOptions={},t.vars={logEvents:!1,initChart:!1,isDark:n.isDark(),interval:r.get(l)||-1,scrollConfig:{autoHideScrollbar:!1,theme:n.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},e.element(o).bind("resize",function(){t.metrcisChart&&t.vars.initChart&&t.metrcisChart.resize()}),t.initChart=function(e){if(t.vars.initChart){for(var a in e)if("time"!=a){t.chartData[a].length>t.maxlength&&t.chartData[a].shift();var i=parseInt(e[a]);i-parseInt(t.preState[a]);t.chartData[a].push([e.time,i])}return t.metrcisChart.setOption(t.EChartOptions),void(t.preState=e)}if(e.time){t.preState=e;var r=[],s=[],o=[],l=[],c=[],d=0,u=0;for(var m in e)if("time"!=m){t.orderKeys[m]=d;var h=parseInt(e[m]);t.chartData[m]=[],t.chartData[m].push([e.time,h]),r.push({show:!0,borderWidth:0,shadowBlur:2}),s.push({show:!1,type:"time",splitLine:{show:!1},gridIndex:d}),o.push({type:"value",show:!1,scale:!0,splitLine:{show:!1},name:"value",boundaryGap:[0,"100%"],min:"dataMin",max:"dataMax",gridIndex:d}),c.push({textAlign:"center",text:m,textStyle:{fontSize:10,fontWeight:"normal"}}),l.push({name:m,type:"line",data:t.chartData[m],xAxisIndex:d,yAxisIndex:u,showSymbol:!1,hoverAnimation:!1}),d+=1,u+=1}var p=Math.ceil(Math.sqrt(d));r.forEach(function(e,t){e.left=t%p/p*100+.5+"%",e.top=Math.floor(t/p)/p*100+.5+"%",e.width=1/p*100-2+"%",e.height=1/p*100-2+"%",c[t].left=parseFloat(e.left)+parseFloat(e.width)/2+"%",c[t].top=parseFloat(e.top)+"%"});var g={version:3,title:c.concat([{text:"Metrics",top:"bottom",left:"center"}]),toolbox:{show:!0,feature:{saveAsImage:{show:!0}}},width:"100%",group:"group",grid:r,xAxis:s,yAxis:o,series:l,tooltip:{showDelay:0,backgroundColor:"#2c343c",trigger:"axis",formatter:function(e){e=e[0];var t=new Date(e.value[0]),a=e.value[1],n=a;return e.seriesName.toLowerCase().includes("bytes")?a=numbro(a).format("0.0000b"):a>1e4&&(a=numbro(a).format("0.0000a")),e.seriesName+"

"+moment(t).format("h:mm:ss")+"
"+a+"
"+(n!=a?"
"+n+"
":"")},axisPointer:{animation:!1}}};t.vars.initChart=!0,t.EChartOptions=Object.assign(g,t.EChartOptions);var b="macarons";n.isDark()&&(b="dark"),t.metrcisChart=echarts.init(document.querySelector("#metrcisChart"),b),t.metrcisChart.setOption(t.EChartOptions),t.metrcisChart.resize()}};var d=null;t.$watch("vars.logEvents",function(){t.flushChart()},!0),t.flushChart=function(){t.vars.initChart&&(t.chartData={},t.metrcisChart.dispose(),t.EChartOptions={},t.vars.initChart=!1,t.load())},t.flush=function(){for(var e in t.chartData)for(var a=t.chartData[e].length,n=0;a-2>n;n++)t.chartData[e].shift();t.metrcisChart.setOption(t.EChartOptions),t.metrcisChart.resize(),t.load()},t.load=function(){t.vars.loading=!0;var e=" SELECT metric,toInt64(value) as value,'metrics' as type FROM system.metrics ORDER BY metric ";e+=" UNION ALL SELECT metric,toInt64(value) as value,'async' as type FROM system.asynchronous_metrics ORDER BY metric ",t.vars.logEvents&&(e+=" UNION ALL SELECT event as metric, toInt64( value) as value,'events' as type FROM system.events ORDER BY metric"),a.fetchQuery(e).then(function(e){t.vars.loading=!1;var a={time:Date.now()};e.data.forEach(function(e){var t="";"events"==e.type&&(t=" "),a[e.metric+t]=e.value}),t.initChart(a)},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.setMaxlength=function(){r.set(c,t.maxlength)},t.setInterval=function(){r.set(l,t.vars.interval),d&&(i.cancel(d),d=null),t.vars.interval>-1&&(d=i(t.load,1e3*t.vars.interval))},t.$on("$destroy",function(){t.vars.interval=-1,i.cancel(d),t.setInterval()}),t.load(),t.vars.interval>-1&&t.setInterval()}e.module(t.app.name).controller("MetricschartController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","$window"]}(angular,smi2),function(e,t){function a(e,t,a,n,i,r,s){e.vars={uiTheme:a.themeObject,isDark:a.isDark(),selectedTabResultIndex:0,active:{Overview:!1,Chart:!1,Processes:!1}},e.initProcessesTab=function(t){e.vars.active.Processes=!0},e.initChartTab=function(t){e.vars.active.Chart=!0},e.initOverviewTab=function(t){e.vars.active.Overview=!0}}e.module(t.app.name).controller("MetricsController",a),a.$inject=["$scope","API","ThemeService","$interval","localStorageService","$mdDialog","$window"]}(angular,smi2),function(e,t){function a(a,n,i,r,s,o,l){var c="basesConfig";a.isChrome=/Chrome/.test(navigator.userAgent),a.vars={bases:i.get(c)||[],db:{},loading:!1,version:t.app.version,themes:o.list},a.loginCheckDone=function(){r.databaseStructure(function(e){console.log("loginCheckDone ... DS ... done"),n.go("sql")},!0)},a.login=function(){if(a.vars.loading=!0,a.vars.db.id){for(var t=0;t=1024;)t/=1024,n++;return t.toFixed(+a)+" "+e[n]}})}(angular,smi2);/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors + */ +var Widget=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:!1;_classCallCheck(this,e),this._scheduledResize=!1,this.data=t,this.drawCommnads=a,this.title=!1,this._draw=!1,a&&this.drawCommnads.drawtype?this.drawType=this.drawCommnads.drawtype.toUpperCase():this.drawType=!1,this.error=this.data.error,this.text=this.data.text,this.name="Widget",this.element=!1,this.init=!1,_.isNumber(n)&&(this.sizeX=n),_.isNumber(i)&&(this.sizeY=i),this.type=!1;var r=angular.element("*[ng-app]").injector().get("ThemeService").isDark();this.isDark=r,window.isDarkTheme=r}return _createClass(e,[{key:"applySettings",value:function(e){console.log("applySettings",e),_.isObject(e)&&e.title&&(this.title=e.title)}},{key:"onDrag",value:function(){}},{key:"getSizeElementHeight",value:function(){var e=this.element[0].offsetHeight;return 100>e&&(e=100),e}},{key:"getSizeElementWidth",value:function(){return this.element[0].offsetWidth}},{key:"destroy",value:function(e){return console.info("Destroy widget is empty"),!1}},{key:"onResize",value:function(){}},{key:"scheduledResize",value:function(){if(!this._scheduledResize){this._scheduledResize=!0;var e=this;setTimeout(function(){e._scheduledResize=!1,e.onResize()},200)}}},{key:"toString",value:function(){return"("+this.name+", "+this.y+")"}}]),e}(),WidgetTable=function(e){function t(e,a,n,i){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,n,i));if(r.type="table",r.table={},r.sort=!1,r.hotId="hotIdTable"+Math.floor(1e7*Math.random()),r.handsonTable={},r.error)return r.sizeY=2,r.sizeX=12,r.init=!1,_possibleConstructorReturn(r);if(r.text)return r.sizeY=4,r.sizeX=12,r.init=!1,_possibleConstructorReturn(r);var s=new HandsTable(r.isDark,r.data.meta,{sort:r.data.sortByColl(),sortOrder:r.data.sortOrderBy(),humanSortCols:r.data.getColumnsHumanSort()});if(r.table={settings:s.makeSettings()},r.table.settings.hotId=r.hotId,!r.sizeX&&!r.sizeY){var o=s.countColumns();r.initTableWSize(o)}return r.init=!0,r}return t.$inject=["DataProvider","draw","sizeX","sizeY"],_inherits(t,e),_createClass(t,[{key:"initTableWSize",value:function(e){var t=1;e>2&&(t=2),e>5&&(t=3),e>10&&(t=4),e>15&&(t=6),"statistics"==this.data.sourceType&&(t=6),this.sizeX=t,this.sizeY=1,this.data.rows>60&&(this.sizeY=1),this.data.rows>250&&(this.sizeY=2),this.data.rows>500&&(this.sizeY=3),1==this.data.countAll&&(this.sizeX=6,this.sizeY=3),this.sizeY=2*this.sizeY,this.sizeX=2*this.sizeX}},{key:"destroy",value:function(e){return function(){e.handsonTable.destroy(),e.handsonTable=null,e.data.data=null,e.settings=null,e.table=null,e.init=!1,e.element.html()}}},{key:"preProcessor",value:function(){}},{key:"postProcessor",value:function(){var e=this.table.settings;e.width=this.getSizeElementWidth(),e.height=this.getSizeElementHeight(),e.data=this.data.data,this.handsonTable=new Handsontable(this.element[0],e)}},{key:"onDrag",value:function(){this.onResize()}},{key:"updateData",value:function(e){var t=this.handsonTable,a=t.sortColumn,n=t.sortOrder;this.data.update(e),this.handsonTable.loadData(e),this.handsonTable.updateSettings({columnSorting:{column:a,sortOrder:n}}),this.handsonTable.render()}},{key:"onResize",value:function(){if(console.info("table.onResize()"),this.init&&this.handsonTable){var e=this.getSizeElementWidth(),t=this.getSizeElementHeight();if(this.handsonTable.getSettings().width!=e||this.handsonTable.getSettings().height!=t)return this.handsonTable.updateSettings({width:e,height:t}),this.handsonTable.render(),!0}}}]),t}(Widget);angular.module(smi2.app.name).service("WidgetTable",WidgetTable);/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +var WidgetPivot=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a));return n.type="pivot",n.error||n.text?_possibleConstructorReturn(n):(n.init=!0,n.renderers=$.extend($.pivotUtilities.renderers,$.pivotUtilities.c3_renderers,$.pivotUtilities.d3_renderers,$.pivotUtilities.export_renderers,$.pivotUtilities.subtotal_renderers),n.pivot={config:{dataClass:$.pivotUtilities.SubtotalPivotData,renderer:n.renderers}},1==n.data.countAll&&(n.sizeX=6,n.sizeY=3),n.sizeY=2*n.sizeY,n.sizeX=2*n.sizeX,n)}return t.$inject=["DataProvider","draw"],_inherits(t,e),t}(Widget);angular.module(smi2.app.name).service("WidgetPivot",WidgetPivot);/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +var WidgetDraw=function(e){function t(e,a,n,i){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,a,n,i));return r.type="draw",r.error||r.text?_possibleConstructorReturn(r):(r.library=!1,r._list={GRAPH:DrawEchartsGraph,PLOTLY:DrawPlotly,HEATMAP:DrawEchartsHeatmap,CALENDAR:DrawEchartsCalendar,RAW:DrawEchartsMap,BAR:DrawEchartsBar,RIVER:DrawEchartsRiver,MAP:DrawEchartsMap,GMAPS:DrawGoogleMap,TREEMAP:DrawEchartsTreemap,FLATTREE:DrawEchartsFlatTree,SANKEYS:DrawEchartsSunkeys,CHART:DrawEchartsChart,GRIDCHART:DrawEchartsGridChart,TEXT:DrawText,D3:DrawD3,C3:DrawC3},r.init=r.getChartClass(),r.sizeX||r.sizeY||(r.sizeX=6,r.sizeY=3,"TEXT"==r.drawType&&(r.sizeX=1,r.sizeY=2),1==r.data.countAll&&(r.sizeX=12,r.sizeY=3)),r)}return t.$inject=["DataProvider","draw","sizeX","sizeY"],_inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this._draw&&this._draw.onResize()}},{key:"getChartClass",value:function(){return this.drawType||(this.drawType="CHART",console.error("Un support DrawType:null")),this._list[this.drawType]?!0:(console.error("Un support DrawType:"+this.drawType),!1)}},{key:"draw",get:function(){return this.drawType&&!this._draw&&(this._draw=new this._list[this.drawType](this,this.drawType)),this._draw}}]),t}(Widget);angular.module(smi2.app.name).service("WidgetDraw",WidgetDraw);/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Igor Strykhar,SMI2 LLC and other contributors + */ +var HandsTable=function(){function e(t,a,n){_classCallCheck(this,e),this.isDarkTheme=t,this.meta=a,this.Preset=n}return e.$inject=["isDark","metaData","Preset"],_createClass(e,[{key:"_handsRenderer",value:function(e,t,a,n,i,r,s){"numeric"==s.type?null==r||"-nan"==r||"inf"==r||"+nan"==r||"+inf"==r||"-inf"==r||"nan"==r?(null==r&&(arguments[5]="NULL"),t.style.color="black",t.style.background="red",Handsontable.renderers.TextRenderer.apply(this,arguments)):Handsontable.renderers.NumericRenderer.apply(this,arguments):"date"==s.type||"time"==s.type?(moment(new Date(r)).isValid()&&s.renderDateFormat&&(r=moment(r).format(s.renderDateFormat)),arguments[5]=r,Handsontable.renderers.TextRenderer.apply(this,arguments)):Handsontable.renderers.TextRenderer.apply(this,arguments),s.backgroundColor&&(t.style.backgroundColor=s.backgroundColor),s.color&&(t.style.color=s.color)}},{key:"countColumns",value:function(){return this.meta.length}},{key:"makeColumns",value:function(){var e=this,t=this.Preset.humanSortCols,a=[],n=[],i={},r=0;return this.meta.forEach(function(s){i[s.name]=r,r++,a.push(s.name);var o={};switch(o.type="text",o.width=100,o.typeOriginal=s.type,o.isDark=e.isDarkTheme,s.type.includes("Int64")?(o.type="text",o.width=100,_.isObject(e.meta.prepareInt64Cols)&&e.meta.prepareInt64Cols[s.name]&&(o.type="numeric")):s.type.includes("Int")&&(o.width=80,o.type="numeric"),s.type){case"Date":o.width=90,o.type="date",o.dateFormat="YYYY-MM-DD";break;case"DateTime":o.width=150,o.type="time",o.timeFormat="YYYY-MM-DD HH:mm:ss";break;case"Float32":o.width=80,o.type="numeric",o.format="0.[0000000]";break;case"Float64":o.width=80,o.type="numeric",o.format="0.[0000000]";break;case"String":o.width=180}o.renderer=e._handsRenderer,o.data=s.name,_.isArray(t)&&_.indexOf(t,s.name)>-1&&(o.sortFunction=function(e){var t=Handsontable.helper.objectEach,a={TiB:1099511627776,GiB:1073741824,MiB:1048576,KiB:1024,B:1},n=function(e,t,a){return _.isUndefined(e)?e:(isNaN(e)&&e.indexOf(" "+t)>-1&&(e=parseFloat(e.replace(t,""))*a),e)};return function(i,r){var s=i[1],o=r[1];return t(a,function(e,t){s=n(s,t,e),o=n(o,t,e)}),o>s?e?-1:1:s>o?e?1:-1:0}}),n.push(o)}),{colHeaders:a,columns:n,colPositions:i}}},{key:"fecthContextMenu",value:function(){return{items:{columnformat:{name:"Column format",submenu:{items:[{name:"Reset",key:"columnformat:1",callback:function(t,a,n){e.makeFormat(this,"Reset")}},{name:"Money",key:"columnformat:2",callback:function(t,a,n){e.makeFormat(this,"Money")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Human",key:"columnformat:3",callback:function(t,a,n){e.makeFormat(this,"Human")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Bytes",key:"columnformat:4",callback:function(t,a,n){e.makeFormat(this,"Bytes")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Percentages",key:"columnformat:5",callback:function(t,a,n){e.makeFormat(this,"Percentages")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Time only",key:"columnformat:6",callback:function(t,a,n){e.makeFormat(this,"Time")},disabled:function(){return!e.isFormatColl(this,"Time")}},{name:"Date only",key:"columnformat:7",callback:function(t,a,n){e.makeFormat(this,"Date")},disabled:function(){return!e.isFormatColl(this,"Date")}},{name:"Date loc.",key:"columnformat:8",callback:function(t,a,n){e.makeFormat(this,"DateLoc")},disabled:function(){return!e.isFormatColl(this,"Date")}},{name:"Float",key:"columnformat:9",callback:function(t,a,n){e.makeFormat(this,"Float")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Heatmaps",key:"columnformat:10",callback:function(t,a,n){e.makeHeatmaps(this,"Heatmaps")},disabled:function(){return!e.isFormatColl(this,"numeric")}},{name:"Negative & Positive",key:"columnformat:11",callback:function(t,a,n){e.makeHeatmaps(this,"NegaPosi")},disabled:function(){return!e.isFormatColl(this,"numeric")}}]}},style:{name:"Style",submenu:{items:[{name:"Normal",callback:function(t,a,n){e.makeStyle(this,"Normal")},key:"style:normal"},{name:"Bold",callback:function(t,a){e.makeStyle(this,"Bold")},key:"style:makebold"},{name:"Red color",callback:function(t,a){e.makeStyle(this,"Red")},key:"style:red"},{name:"Green color",callback:function(t,a){e.makeStyle(this,"Green")},key:"style:green"},{name:"Yellow color",callback:function(t,a){e.makeStyle(this,"Yellow")},key:"style:yellow"},{name:"Orange color",callback:function(t,a){e.makeStyle(this,"Orange")},key:"style:orange"}]}},hsep1:"---------",copyTo:{name:"To Clipboard",submenu:{items:[{name:"Redmine Markdown",callback:function(t,a,n){console.info("copyToClipboard"),e.copyToClipboard(this,"Redmine")},key:"copyTo:1"},{name:"Redmine Markdown (full)",callback:function(t,a,n){console.info("copyToClipboard"),e.copyToClipboard(this,"Redmine",!0)},key:"copyTo:2"},{name:"WHERE col1 IN (val,val),col2 IN ...",callback:function(t,a,n){console.info("makeWhereIn"),e.makeWhereIn(this)},key:"copyTo:3"},{name:"Create TABLE...",callback:function(t,a,n){e.makeCreateTable(this)},key:"copyTo:4"}]}},hsep3:"---------",Transform:{name:"Transpose full table",callback:function(t,a,n){e.Transpose(this,"Transpose")}},Calculate:{name:"Calc Avg & Sum & Median",callback:function(t,a,n){e.Calc(this,"All")}},hsep4:"---------",undo:{},make_read_only:{},alignment:{},hsep5:"---------"}}}},{key:"makeSettings",value:function(){var e=this.makeColumns(),t={observeChanges:!1,observeDOMVisibility:!0,dropdownMenu:!0,manualColumnMove:!0,manualColumnResize:!0,rowHeaders:!0,colWidths:100,fillHandle:!1,stretchH:"all",customBorders:!0,isDark:this.isDarkTheme,filters:!0,columnSorting:!0,sortIndicator:!0,manualRowResize:!0,viewportColumnRenderingOffset:"auto",wordWrap:!1,autoColumnSize:{samplingRatio:23},columns:e.columns,colHeaders:e.colHeaders,contextMenu:this.fecthContextMenu(),currentRowClassName:this.isDarkTheme?"currentRowDark":"currentRowWhite",currentColClassName:"currentCol",renderAllRows:!1,visibleRows:1500};return this.Preset.sort&&(t.columnSorting={column:e.colPositions[this.Preset.sort]},t.columnSorting.sortOrder=this.Preset.sortOrder),t}}],[{key:"isDark",value:function(){return window.isDarkTheme}},{key:"makeHeatmaps",value:function(e,t){for(var a=e.getSelectedRange(),n=Math.min(a.from.col,a.to.col),i=Math.max(a.from.col,a.to.col),r="#a900e5",s="#3668ff",o=chroma.scale([r,s]),l=n;i>=l;l++){var c=e.countRows(),d=e.getDataAtCol(l),u=Math.min.apply(null,d),m=Math.max.apply(null,d);if(null!==u&&null!==m)for(var h=0;c>=h;h++){var p=parseFloat(e.getDataAtCell(h,l));if("Heatmaps"==t){var g=(p-u)/(m-u),b=o(g).hex(),f=e.getCellMeta(h,l);f&&e.setCellMeta(h,l,"backgroundColor",b)}if("NegaPosi"==t){var v=!1;0>p&&(v="#e27137"),p>0&&(v="#31b3e5");var y=e.getCellMeta(h,l);y&&v&&e.setCellMeta(h,l,"color",v)}}else console.warn("Can`t find Min&Max in column",l)}e.render()}},{key:"getSelected",value:function(e,t,a){var n=e.getSelectedRange(),i=!1;if(!n&&t||a)return{isSelection:!1,fromRow:0,toRow:e.countRows(),toCol:e.countCols(),fromCol:0};if(!n)return{isSelection:!1,fromRow:-1,toRow:-1,toCol:-1,fromCol:-1};var r=Math.min(n.from.col,n.to.col),s=Math.max(n.from.col,n.to.col),o=Math.min(n.from.row,n.to.row),l=Math.max(n.from.row,n.to.row);return{isSelection:i,fromRow:o,toRow:l,toCol:s,fromCol:r}}},{key:"makeFormat",value:function(t,a){for(var n=e.getSelected(t,!0),i=t.getSettings().columns,r=n.fromCol;r<=n.toCol;r++)switch(console.log("makeFormat for coll ="+r,a),a){case"Reset":i[r].format=!1,i[r].renderDateFormat=!1;break;case"Money":i[r].format="$0,0.00";break;case"Human":i[r].format="5a";break;case"Bytes":i[r].format="0.0b";break;case"Percentages":i[r].format="(0.00 %)";break;case"Time":i[r].renderDateFormat="HH:mm:ss";break;case"Date":i[r].renderDateFormat="YYYY-MM-DD";break;case"DateTime":i[r].renderDateFormat="YYYY-MM-DD HH:mm:ss";break;case"DateLoc":i[r].renderDateFormat="LLLL";break;case"Float":i[r].format="0.[0000000]"}t.updateSettings({columns:i}),t.render()}},{key:"isFormatColl",value:function(e,t){t=t.toLowerCase();for(var a=e.getSelectedRange(),n=Math.min(a.from.col,a.to.col),i=Math.max(a.from.col,a.to.col),r=e.getSettings().columns,s=n;i>=s;s++)if(!r[s].type.toLowerCase().includes(t))return!1;return!0}},{key:"pushToClipboardText",value:function(e){var t=document.createElement("textarea");t.style.width=0,t.style.height=0,t.style.border=0,t.style.position="absolute",t.style.top=0,document.body.append(t),t.value=e,t.focus(),t.select();try{document.execCommand("copy")}catch(a){console.log("Oops, unable to copy")}document.body.removeChild(t)}},{key:"makeCreateTable",value:function(t){for(var a=e.getSelected(t,!0),n="\nCREATE TABLE x (\n",i=[],r=t.getSettings().columns,s=a.fromCol;s<=a.toCol;s++){var o=r[s].typeOriginal;i.push(" "+t.colToProp(s)+" "+o)}n=n+i.join(",\n")+"\n)\nENGINE = TinyLog\n;;\n",console.log(n),e.pushToClipboardText(n)}},{key:"Calc",value:function(t,a){for(var n=e.getSelected(t,!0),i=t.getSettings().columns,r=[],s=n.fromCol;s<=n.toCol;s++)for(var o=n.fromRow;o<=n.toRow;o++){var l=i[s].type.toLowerCase();l.includes("numeric")&&r.push(t.getDataAtCell(o,s))}if(_.isArray(r)&&r.length){var c={median:_.round(_.median(r),3),sum:_.round(_.sum(r),3),average:_.round(_.average(r),3),std:_.round(_.stdDeviation(r),3)};angular.element(document).scope().$emit("handleBroadcastCalcSumCells",c)}}},{key:"Transpose",value:function(t,a){var n=e.transpose(t.getSourceData()),i=[],r=[],s=!0,o=!1,l=void 0;try{for(var c,d=n.columns[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var u=c.value,m={};m.renderer=this._handsRenderer,m.data=u,m.type="text",m.width=100,r.push(m),i.push(u)}}catch(h){o=!0,l=h}finally{try{!s&&d["return"]&&d["return"]()}finally{if(o)throw l}}t.updateSettings({columns:r,colHeaders:i,data:n.data})}},{key:"transpose",value:function(e){var t=[],a=1,n=[];t.push(0);var i=!0,r=!1,s=void 0;try{for(var o,l=e[Symbol.iterator]();!(i=(o=l.next()).done);i=!0){var c=o.value,d=0,u=!0,m=!1,h=void 0;try{for(var p,g=Object.entries(c)[Symbol.iterator]();!(u=(p=g.next()).done);u=!0){var b=_slicedToArray(p.value,2),f=b[0],v=b[1];n[d]||(n[d]={}),1==a&&(n[d][0]=f),n[d][a]=v,d++}}catch(y){m=!0,h=y}finally{try{!u&&g["return"]&&g["return"]()}finally{if(m)throw h}}t.push(a),a++}}catch(y){r=!0,s=y}finally{try{!i&&l["return"]&&l["return"]()}finally{if(r)throw s}}return{data:n,columns:t}}},{key:"makeWhereIn",value:function(t){for(var a=e.getSelected(t,!0),n=[],i=t.getSettings().columns,r=a.fromCol;r<=a.toCol;r++){for(var s=[],o=a.fromRow;o<=a.toRow;o++)s.push(t.getDataAtCell(o,r));var l=s.filter(function(e,t,a){return a.indexOf(e)===t}),c=i[r].type.toLowerCase();c.includes("numeric")?n.push(t.colToProp(r)+" IN ( "+l.join(" , ")+") "):n.push(t.colToProp(r)+" IN ( '"+l.join("' , '")+"') ")}n="\n"+n.join("\n AND\n")+"\n\n",console.log(n),e.pushToClipboardText(n)}},{key:"copyToClipboard",value:function(t,a,n){for(var i=e.getSelected(t,!0,n),r="",s=[],o=i.fromCol;o<=i.toCol;o++)s.push(t.colToProp(o));r=r+" | "+s.join(" | ")+" |\n",s=[];for(var l=i.fromRow;l<=i.toRow;l++){for(var c=i.fromCol;c<=i.toCol;c++)s.push(t.getDataAtCell(l,c));r=r+" | "+s.join(" | ")+" |\n",s=[]}e.pushToClipboardText(r)}},{key:"HideColumn",value:function(t){for(var a=e.getSelected(t,!0),n=t.getSettings().columns,i=a.fromCol;i<=a.toCol;i++)n[i].width=0;t.updateSettings({columns:n})}},{key:"ShowAllColumns",value:function(e){var t=e.getSettings().columns;console.info("SHOWALL",t);var a=!0,n=!1,i=void 0;try{for(var r,s=t[Symbol.iterator]();!(a=(r=s.next()).done);a=!0){var o=r.value;console.info("COL",t[o])}}catch(l){n=!0,i=l}finally{try{!a&&s["return"]&&s["return"]()}finally{if(n)throw i}}e.updateSettings({columns:t})}},{key:"makeStyle",value:function(t,a){console.log("makeStyle",a);for(var n=e.getSelected(t,!0),i=n.fromRow;i<=n.toRow;i++)for(var r=n.fromCol;r<=n.toCol;r++){var s=t.getCellMeta(i,r),o="htCell"+a;(!s.className||s.className&&s.className.indexOf(o)<0)&&t.setCellMeta(i,r,"className",o)}t.render()}}]),e}();angular.module(smi2.app.name).service("HandsTable",HandsTable);var DrawBasicChart=function(){function DrawBasicChart(e){_classCallCheck(this,DrawBasicChart),this.widget=e,this.chart=!1,this.init=!1,this.options={},this.widget.height=1,this.widget.width=1,this.errorMessage="",this.drawCodeObject={type:!1};try{this.drawCodeObject=this.initDrawCodeObject()}catch(t){console.error("error eval ",t)}console.info("isExecutableCode()",this.isExecutableCode())}return _createClass(DrawBasicChart,[{key:"setWidgetSize",value:function(e,t){console.log("setWidgetSize",e,t,this.widget.sizeX,this.widget.sizeY),this.widget.sizeX=e,this.widget.sizeY=t}},{key:"setError",value:function(e){this.errorMessage=e;var t="",a="";_.isUndefined(this.help)||(t=this.help),_.isUndefined(this.helpLink)||(a=this.helpLink),this.widget.error="Draw error message:"+e+"\n\n"+t+"\n\n"+(a?''+a+"":"")}},{key:"isDark",value:function(){return this.widget.isDark}},{key:"getError",value:function(){return this.errorMessage}},{key:"isExecutableCode",value:function(){return this.drawCodeObject&&this.drawCodeObject.type?this.drawCodeObject.exec:!1}},{key:"executableCode",value:function(){var e={};return this.isExecutableCode()&&(console.log(this.drawCodeObject.code),e=this.drawCodeObject.code.call(window,this.widget.data)),console.warn("executableCode:ResultFunction",e),e}},{key:"initChartByJsCode",value:function(){if(this.isExecutableCode()){var e=this.executableCode();return this.options=Object.assign(this.options,e),!0}return!1}},{key:"data",value:function(){return this.widget.data.data}},{key:"meta",value:function(){return this.widget.data.meta}},{key:"isNumericColumn",value:function(e){var t=this.getColumnPosition(e);if(!_.isUndefined(t)){var a=this.meta()[t].type;return a?(a=a.toLowerCase(),a.includes("int")||a.includes("float")?!0:!1):!1}}},{key:"isStringColumn",value:function(e){var t=this.getColumnPosition(e);if(!_.isUndefined(t)){var a=this.meta()[t].type;return a?(a=a.toLowerCase(),a.includes("string")||a.includes("enum")?!0:!1):!1}}},{key:"getColumnPosition",value:function(e){return parseInt(_.findKey(this.meta(),{name:e}))}},{key:"haveColumn",value:function(e){if(_.isNaN(e)||_.isNull(e)||_.isUndefined(e))return!1;var t=this.getColumnPosition(e);return _.isNaN(t)||_.isNull(t)||_.isUndefined(t)?!1:!0}},{key:"getColumnByType",value:function(e){var t=_.findIndex(this.meta(),{type:e});return 0>t?!1:this.getColumns(t)}},{key:"getDateTimeColumn",value:function(){return this.getColumnByType("DateTime")}},{key:"getDateColumn",value:function(){return this.getColumnByType("Date")}},{key:"findDateTimeAxis",value:function(){var e=this.getDateTimeColumn();if(e)return e;var t=this.getDateColumn();return t?t:!1}},{key:"getColumns",value:function(e){var t=_.map(this.meta(),"name");return _.isUndefined(e)?t:t[e]}},{key:"getFirstColumn",value:function(){return this.getColumns(0)}},{key:"getDrawCommandObject",value:function(){return this.drawCodeObject&&this.drawCodeObject.type?this.drawCodeObject.code:!1}},{key:"updateCode",value:function updateCode(codejs,showErrors){var drawCommand=this.widget.drawCommnads;if(drawCommand&&drawCommand.code)try{var data={},code="("+codejs+")",obj=eval(code);_.isObject(obj)&&(console.info("Apply code",codejs),drawCommand.code=codejs,this.applyCode())}catch(E){showErrors&&console.error("error eval ",codejs,E)}}},{key:"getCode",value:function(){var e=!1,t=this.widget.drawCommnads;return t&&t.code&&(e=t.code),e.length<9?!1:e}},{key:"initDrawCodeObject",value:function initDrawCodeObject(){var drawCommand=this.widget.drawCommnads;if(!drawCommand)return[];var codeDrawText=!1;if(drawCommand&&drawCommand.code&&(codeDrawText=drawCommand.code),!codeDrawText)return[];var draw={code:!1,type:!1};if(_.isObject(codeDrawText))return draw={isok:!0,code:codeDrawText,type:"undefined"==typeof codeDrawText?"undefined":_typeof(codeDrawText),exec:!1};if("text"==drawCommand.drawtype.toLowerCase()){var obj=codeDrawText.trim();return draw={isok:!0,code:obj,type:"undefined"==typeof obj?"undefined":_typeof(obj),exec:!1}}try{var code="("+codeDrawText+")",_obj=eval(code),type="undefined"==typeof _obj?"undefined":_typeof(_obj);draw={isok:!0,code:_obj,type:type,exec:!!(_obj&&_obj.constructor&&_obj.call&&_obj.apply)}}catch(E){console.error("error eval ",codeDrawText,E)}return draw}}]),DrawBasicChart}(),DrawText=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type=a.toUpperCase(),n.library="text",n.widget.sizeX=0,n.widget.sizeY=0,n}return _inherits(t,e),_createClass(t,[{key:"preProcessor",value:function(){var e=this.getDrawCommandObject();this.init=this.applyText(e)}},{key:"applyText",value:function(e){return this.isDark()&&(this.widget.element[0].style.background="#404a59"),e?this.widget.element[0].innerHTML=Mustache.render(e,this.widget.data):this.widget.element[0].innerHTML="
"+JSON.stringify(this.widget.data,null,"	")+"
",!0}},{key:"onResize",value:function(){}}]),t}(DrawBasicChart),DrawPlotly=function(_DrawBasicChart2){function DrawPlotly(e,t){_classCallCheck(this,DrawPlotly);var a=_possibleConstructorReturn(this,(DrawPlotly.__proto__||Object.getPrototypeOf(DrawPlotly)).call(this,e));return a.type=t.toUpperCase(),a.library="plotly",a.chart=null,a.setWidgetSize(6,3),a._datajs=!1,a}return _inherits(DrawPlotly,_DrawBasicChart2),_createClass(DrawPlotly,[{key:"onResize",value:function(){if(this.plotly){var e=this.widget.getSizeElementHeight(),t=this.widget.getSizeElementWidth();(this.layout.height!=e||this.layout.width!=t)&&(this.layout.height=e,this.layout.width=t,this.relayout())}}},{key:"preProcessor",value:function(){return this.init=this.create(),this.getError()?(console.error(this.getError()),this.chart.before("

"+this.getError()+"

"),this.init=!1,!1):void console.info("preProcessor",this.init)}},{key:"initDrawCodeObject",value:function(){return!1}},{key:"getElement",value:function(){return this.widget.element[0]}},{key:"relayout",value:function(){Plotly.relayout(this.getElement(),this.layout)}},{key:"editor",value:function(){console.info("editoreditoreditor")}},{key:"getDataForCodeJS",value:function(){if(this._datajs)return this._datajs;for(var e={},t=this.getColumns(),a=this.data().length,n=0;a>n;++n){var i=this.data()[n];for(var r in t){var s=t[r];e[s]||(e[s]=[]),e[s].push(i[s])}}return this._datajs=e,e}},{key:"applyCode",value:function applyCode(){try{var codeJS=this.getCode();console.info("applyCode",codeJS);var data=this.getDataForCodeJS();console.log("getDataForCodeJS",data),console.log("this.data()",this.data()),codeJS="("+codeJS+")";var obj=eval(codeJS);_.isObject(obj)&&this.applyObject(obj)}catch(E){console.log(E)}}},{key:"applyLayout",value:function(e){console.info("<<<<<<< applyLayout >>>>>>>>>>",e),this.layout=e;var t=this.widget.getSizeElementHeight(),a=this.widget.getSizeElementWidth();this.layout.height=t,this.layout.width=a}},{key:"applyObject",value:function(e){var t={data:[],layout:{}};_.isObject(e)&&(_.isObject(e.data)&&(t.data=e.data),_.isObject(e.trace)&&t.data.push(e.trace),_.isObject(e.trace1)&&t.data.push(e.trace1),_.isObject(e.trace2)&&t.data.push(e.trace2),_.isObject(e.trace3)&&t.data.push(e.trace3),_.isObject(e.trace4)&&t.data.push(e.trace4),_.isObject(e.layout)&&(t.layout=e.layout)),console.info(t),console.log("llll:",t);var a={editable:!1};t=Object.assign(t,this.getDarkThemeSettings()),this.applyLayout(t.layout),console.warn("this.layout",this.layout),this.plotly?(console.info("UPDATE!"),this.plotly=Plotly.newPlot(this.getElement(),t.data,this.layout,a)):this.plotly=Plotly.newPlot(this.getElement(),t.data,this.layout,a)}},{key:"makeAutoDraw",value:function(){var e=this;console.info("<<<<<<< makeAutoDraw >>>>>>>>>>");var t={autoAxis:!1,markLine:!0,stack:!1,path:!1,sort:!0,xAxis:!1,yAxis:!1},a={},n=this.getColumns(),i=this.getFirstColumn(),r=i,s=this.findDateTimeAxis(),o=this.data();s&&(i=s),t.sort&&(o=_.sortBy(o,i)),r=i;var l=0,c=[],d=[];for(var u in n){var m=n[u],h=!1;_.size(a)&&(h=_.isUndefined(a[m])),m==r||h||(this.isStringColumn(m)&&2>l&&!groupPath?(_.isArray(c)||(c=[]),c.push(m),l++):this.isNumericColumn(m)&&d.push(m))}var p=o.length,g=0,b=[],f={};for(console.log("DATA LEN",p,o),g=0;p>g;++g){var v=o[g];b.push(v[r])}for(b=_.uniq(b),g=0;p>g;++g){var y=o[g],w=function(t){var i=n[t],s=[r],o=!1;if(_.size(a)&&(o=_.isUndefined(a[i])),i!==r&&!o&&e.isNumericColumn(i)&&_.findIndex(c,i)<0){if(c)for(var l=0;l"+this.getError()+"

"),!1;var e=this.getDrawCommandObject();e.raw&&(this.options=_.merge(this.options,e.raw)),this.isDark(),console.info("preProcessor",this.init,this.options)}},{key:"loadGoogleMapJS",value:function(e){if(window._sendGoogleMapLoad)return void this.afterLoadMapProcessor();window._sendGoogleMapLoad=!0,window._isGoogleMapLoaded=!1,console.info("YA_MAP>Start load map : api-maps.yandex.ru");var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCRQH39oyrPnfPPgADuOp0eSRsDHRUMyyY",t.charset="utf-8",t.onload=t.onreadystatechange=function(){t.readyState&&"complete"!==t.readyState&&"loaded"!==t.readyState||(t.onload=t.onreadystatechange=null,e.afterLoadMapProcessor(),window._isGoogleMapLoaded=!0)};var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a)}},{key:"getDarkStyle",value:function(){return[{featureType:"all",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{color:"#000000"},{lightness:13}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#144b53"},{lightness:14},{weight:1.4}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#08304b"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#0c4152"},{lightness:5}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#0b434f"},{lightness:25}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#000000"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#0b3d51"},{lightness:16}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"}]},{featureType:"transit",elementType:"all",stylers:[{color:"#146474"}]},{featureType:"water",elementType:"all",stylers:[{color:"#021019"}]}]}},{key:"getLightStyle",value:function(){return[{featureType:"landscape",stylers:[{hue:"#FFBB00"},{saturation:43.400000000000006},{lightness:37.599999999999994},{gamma:1}]},{featureType:"road.highway",stylers:[{hue:"#FFC200"},{saturation:-61.8},{lightness:45.599999999999994},{gamma:1}]},{featureType:"road.arterial",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:51.19999999999999},{gamma:1}]},{featureType:"road.local",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:52},{gamma:1}]},{featureType:"water",stylers:[{hue:"#0078FF"},{saturation:-13.200000000000003},{lightness:2.4000000000000057},{gamma:1}]},{featureType:"poi",stylers:[{hue:"#00FF6A"},{saturation:-1.0989010989011234},{lightness:11.200000000000017},{gamma:1}]}]}},{key:"create",value:function(){console.warn("CREATE"),this._map=new google.maps.Map(this.widget.element[0],this.mapOptions);var e=this.getLightStyle();this.isDark()&&(e=this.getDarkStyle()),this._map.setOptions({styles:e});var t=this,a=this.getDrawCommandObject(),n={longitude:"longitude",latitude:"latitude",count:"count",title:"title"},i=new google.maps.LatLngBounds,r=0;a&&(n=Object.assign(n,a)),this.data().forEach(function(e,a){var s=parseInt(e[n.count]);s>r&&(r=s);var o={lat:e[n.latitude],lng:e[n.longitude]},l=!1;e[n.title]&&(l=new google.maps.InfoWindow({content:'
'+e[n.title]+"
"})),i.extend(o);var c=new google.maps.Marker({position:o,map:t._map,title:"Value:"+s});l&&c.addListener("click",function(){l.open(this._map,c)})}),this._map.fitBounds(i),this._map.panToBounds(i)}}]),t}(DrawBasicChart),DrawEcharts=function(e){function t(e,a){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.help="",n.type=a.toUpperCase(),n.library="echarts",n.preference={gridchart:!1,bar:!1},n.options={version:3,textStyle:{fontFamily:"Menlo"},toolbox:{show:!0,feature:{dataZoom:{yAxisIndex:"none",title:"data Zoom"},dataView:{readOnly:!1,title:"data View"},magicType:{type:["line","bar","stack","tiled"],title:{line:"line",bar:"bar",stack:"stack",tiled:"tiled"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image"}}}},n}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){console.log("onResize Chart"),this.chart&&this.init&&this.chart.resize()}},{key:"preProcessor",value:function(){if(this.initChartByJsCode())this.init=!0;else try{this.init=this.create()}catch(e){this.setError(this.getError()+"\n\n\n"+e.name+":"+e.message+"\n"+e.stack)}if(this.getError())return console.error(this.getError()),!1;var t=this.getDrawCommandObject();if(t.raw&&(this.options=_.merge(this.options,t.raw)),this.isDark()&&(this.options.backgroundColor="#404a59",this.options.textStyle={color:"rgba(255, 255, 255, 0.3)"},this.options.lineStyle={color:"rgba(255, 255, 255, 0.3)"}),_.isArray(this.options.series)&&_.isObject(this.options.series[0])){if(_.isObject(t))if(_.isArray(t.series))for(var a=0;a<=t.series.length;a++)_.isObject(this.options.series[a])&&(this.options.series[a]=_.merge(this.options.series[a],t.series[a]));else this.options.series[0]=_.merge(this.options.series[0],t);this.isDark()&&_.set(this.options.series[0],"label.normal.textStyle.color","white")}this.chart.setOption(this.options),console.info("preProcessor",this.init,this.options)}},{key:"getParameterPath",value:function(){var e=this.getDrawCommandObject(),t={path:""};e&&(t=Object.assign(t,e));var a="";if(_.isString(e)?a=e:t.path&&(a=t.path),!a)return!1;for(var n=_.split(a,"."),i=0;is;s+=1){var o=this.getColumns(s);if(!i&&this.isNumericColumn(o)){i=o;break}}t.date=n,t.value=i}if(!this.haveColumn(t.date)||!this.haveColumn(t.value))return this.setError("Not set date | value cols"),!1;var l=0,c=Number.MAX_VALUE,d=_.map(this.data(),function(e){var a=parseFloat(e[t.value]);return a&&a>l&&(l=a),a&&c>a&&(c=a),[e[t.date],a]});d=_.groupBy(d,function(e){var t=(""+e[0]).substring(0,4);return t});var u={tooltip:{position:"top"},calendar:[],series:[],visualMap:{min:c,max:l,calculable:!0,orient:"horizontal",left:"center",top:"top"}},m=60,h=0;return _.forEach(d,function(e,t){u.calendar.push({top:m,range:t,right:0,cellSize:["auto",20]}),u.series.push({type:"heatmap",coordinateSystem:"calendar",data:e,calendarIndex:h}),h+=1,m+=200}),this.options=Object.assign(u,this.options),!0}}]),t}(DrawEcharts),DrawEchartsTreemap=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"getSerieSettings",value:function(e){var t=echarts.format;return{tooltip:{formatter:function(a){var n=a.value,i=[],r=a.treePathInfo;if(_.isArray(r))for(var s=1;s'+t.encodeHTML(i.join("."))+"",e.tooltip+" : "+numbro(n).format(o)].join("")}},itemStyle:{normal:{borderColor:"#fff"}},type:"treemap"}}},{key:"getLevelOption",value:function(){return[{itemStyle:{normal:{borderWidth:0,gapWidth:5}}},{itemStyle:{normal:{gapWidth:1}}},{colorSaturation:[.35,.5],itemStyle:{normal:{gapWidth:1,borderColorSaturation:.6}}}]}},{key:"buildTreeData",value:function(e,t){var a=[],n=this;return _.forEach(e,function(e,i){var r=t[i],s={};if(s.value=r.__value,_.isObject(e)){var o=n.buildTreeData(e,r);_.isArray(o)&&o.length&&(s.children=o)}s.name=i,a.push(s)}),a}},{key:"create",value:function(){var e=this.getDrawCommandObject(),t={path:"",title:"TreeMap",tooltip:"Usage",valueformat:!1};e&&(t=Object.assign(t,e));var a="";t.path&&(a=t.path),_.isString(e)&&(a=e);var n=_.split(a,"."),i=n.length;if(!i)return this.setError("Not set path"),!1;for(var r=0;i>r;r+=1)if(!this.haveColumn(n[r]))return this.setError("bad path, no column:"+n[r]),!1;if(!this.isNumericColumn(n[i-1]))return this.setError("bad column:"+n[i-1]+" must be number"),!1;var s={},o={};this.data().forEach(function(e){for(var t=e[n[i-1]],a=[],r=0;i-1>r;r+=1){a.push(e[n[r]]);var l=_.get(s,a.join("_"),0);_.set(s,a.join(".")+".__value",parseFloat(l)+parseFloat(t))}_.set(o,a.join("."),t)});var l=this.buildTreeData(o,s),c={tooltip:{trigger:"item"}};return c.series=[{name:t.title,label:{show:!0,formatter:"{b}"},levels:this.getLevelOption(),data:l}],this.options=Object.assign(c,this.options),this.options.series[0]=Object.assign(this.getSerieSettings(t),this.options.series[0]),!0}}]),t}(DrawEcharts),DrawEchartsSunkeys=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments)); +}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){this.helpLink="https://tabix.io/doc/draw/Draw_Sankeys/",this.help="Default config : {path:''} or {value:'',source:'',target:''}, if empty path or not set, try auto create path, then find columns [String] : [Integer|Float] : [String] ";var e=this.getDrawCommandObject(),t={path:"",value:"value",source:"source",target:"target"};e&&(t=Object.assign(t,e));var a="";_.isString(e)?a=e:t.path?a=t.path:this.haveColumn(t.source)&&this.haveColumn(t.value)&&this.haveColumn(t.target)&&(a=t.source+"."+t.value+"."+t.target);var n=[];if(a)n=_.split(a,".");else{var i=!1,r=this.getColumns();for(var s in r){var o=r[s];this.isNumericColumn(o)&&i&&(n.push(o),i=!1),this.isStringColumn(o)&&!i&&(n.push(o),i=!0)}}if(console.log("patharr>",n),!n.length)return this.setError("The value of the variable 'path' - empty"),!1;if(!(1&n.length))return this.setError("The value of the variable 'path' must be odd"),!1;var l=[],c=[];this.data().forEach(function(e){for(var t=0;ta&&(a=s),e[t.destination.longitude]&&e[t.destination.latitude]){var o="";e[t.destination.name]&&(o=e[t.destination.name]),i.push({fromName:e[t.name],toName:o,coords:[[e[t.longitude],e[t.latitude]],[e[t.destination.longitude],e[t.destination.latitude]]]})}n.push({name:e[t.name],value:[e[t.longitude],e[t.latitude],s],label:{emphasis:{position:"right",show:!0}}})});var r=[{name:t.title,type:"effectScatter",coordinateSystem:"geo",data:n,showEffectOn:"render",rippleEffect:{brushType:"stroke"},symbolSize:function(e){return a?e[2]/a*15:e[2]/1e4},hoverAnimation:!0,label:{normal:{formatter:"{b}",position:"right",show:!0}},itemStyle:{normal:{color:"#f4e925",shadowBlur:10,shadowColor:"#333"}},zlevel:1}];if(i.length>0){var s="path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z";r.push({name:t.title,type:"lines",zlevel:1,effect:{show:!0,period:6,trailLength:.7,color:"#fff",symbolSize:3},lineStyle:{normal:{width:0,curveness:.2}},data:i}),r.push({name:t.title,type:"lines",zlevel:2,symbol:["none","arrow"],symbolSize:10,effect:{show:!0,period:6,trailLength:0,symbol:s,symbolSize:15},lineStyle:{normal:{width:1,opacity:.6,curveness:.2}},data:i})}var o={tooltip:{trigger:"item"},geo:{name:t.title,type:"map",map:"world",label:{emphasis:{show:!1}},visualMap:{show:!0,min:0,max:100,inRange:{symbolSize:[6,60]}},roam:!0,itemStyle:{normal:{areaColor:"#323c48",borderColor:"#404a59"},emphasis:{areaColor:"#2a333d"}}},series:r};return this.options=Object.assign(this.options,o),!0}}]),t}(DrawEcharts),DrawEchartsHeatmap=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){var e=this.getParameterPath();if(!e)return this.setError("Not set path"),!1;var t={},a={},n={};this.data().forEach(function(i){_.set(t,i[e[0]],1),_.set(a,i[e[1]],1),_.set(n,i[e[0]]+"."+i[e[1]],parseFloat(i[e[2]]))});var i=[],r=_.keys(t),s=_.keys(a),o=0,l=0;_.mapKeys(t,function(e,t){_.mapKeys(a,function(e,a){var r=_.get(n,t+"."+a,"-");o>r&&(o=r),r>l&&(l=r),i.push([t,a,r])})});var c={tooltip:{position:"top"},animation:!1,grid:{height:"50%",y:"10%"},xAxis:{type:"category",data:r,splitArea:{show:!0}},yAxis:{type:"category",data:s,splitArea:{show:!0}},visualMap:{min:o,max:l,calculable:!0,orient:"horizontal",left:"center",bottom:"15%"},series:[{name:"Punch Card",type:"heatmap",data:i,label:{normal:{show:!0}},itemStyle:{emphasis:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};return this.options=Object.assign(c,this.options),!0}}]),t}(DrawEcharts),DrawEchartsGraph=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){this.helpLink="https://tabix.io/doc/draw/Draw_Graph/",this.help="Default config : {path:''} or {value:'',source:'',target:''}, if empty path or not set, try auto create path, then find columns [String] : [Integer|Float] : [String] ";var e=this.getDrawCommandObject(),t={path:"",categories:"categories",name:"name",value:"value",target:"target",targetValue:"",sourceValue:"",layout:"",edgeSymbol:""};e&&(t=Object.assign(t,e));var a="";_.isString(e)?a=e:t.path?a=t.path:this.haveColumn(t.source)&&this.haveColumn(t.value)&&this.haveColumn(t.target)&&(a=t.source+"."+t.value+"."+t.target);var n=[],i=this.haveColumn(t.targetValue),r=this.haveColumn(t.sourceValue);this.haveColumn(t.categories);if(a)n=_.split(a,".");else{var s=!1,o=this.getColumns();for(var l in o){var c=o[l];this.isNumericColumn(c)&&s&&(n.push(c),s=!1),this.isStringColumn(c)&&!s&&(n.push(c),s=!0)}}if(console.log("patharr>",n),!n.length)return this.setError("The value of the variable 'path' - empty"),!1;if(!(1&n.length))return this.setError("The value of the variable 'path' must be odd"),!1;var d=[],u=[];this.data().forEach(function(e){for(var a=0;a10}}}}else u[e[s]]={symbolSize:1};if(i){var m=e[t.targetValue]/1.5;u[e[l]]={symbolSize:m,label:{normal:{show:m>10}}}}else u[e[l]]={symbolSize:1};d.push({source:e[s],target:e[l],value:e[o]})}});var m=[];for(var h in u)m.push(_.merge({name:h},u[h]));console.log("result_nodes",m);var p={tooltip:{trigger:"item",triggerOn:"mousemove"},series:[{type:"graph",layout:"circular",data:m,circular:{rotateLabel:!0},animationThreshold:300,animationDuration:300,links:d,itemStyle:{normal:{borderWidth:1,borderColor:"#aaa"}},roam:!0,label:{normal:{position:"right",formatter:"{b}"}},lineStyle:{normal:{color:"source",curveness:.3}}}]};return p=Object.assign(p,this.options),this.options=p,!0}}]),t}(DrawEcharts),DrawEchartsFlatTree=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"getSerieSettings",value:function(){return{symbolSize:7,type:"tree",label:{normal:{position:"left",verticalAlign:"middle",align:"right"}},leaves:{label:{color:this.isDark()?"white":"auto",normal:{position:"right",verticalAlign:"middle",align:"left"}}},expandAndCollapse:!0}}}]),t}(DrawEchartsTreemap),DrawEchartsChart=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"create",value:function(){console.log("DrawEchartsChart");var e=this.getDrawCommandObject(),t=this.preCreate(e),a=this.createChart(e),n={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0}};return e.title&&this.applyTitle(e.title),this.applyDataZoom(),this.applyLegend(),this.options=Object.assign(a,this.options,n,t),this.postCreate(e),!0}},{key:"postCreate",value:function(e){return{}}},{key:"preCreate",value:function(e){return{}}},{key:"createChart",value:function(e){var t=this,a={autoAxis:!1,markLine:!0,stack:!1,path:!1,sort:!0,xAxis:!1,yAxis:!1};e&&(a=Object.assign(a,e));var n={},i=this.getColumns(),r=this.getFirstColumn(),s=r,o=this.findDateTimeAxis(),l={},c=[],d=[],u=[],m={},h=this.data();if(o&&(r=o),a.xAxis){if(!this.haveColumn(a.xAxis))throw"xAxis column not exists";s=a.xAxis}else a.sort&&(h=_.sortBy(h,r)),s=r;if(d=[{name:s,type:"category",data:[]}],a.yAxis)if(_.isString(a.yAxis)){if(!this.haveColumn(a.yAxis))throw"yAxis column not exists";n[a.yAxis]=1}else{if(!_.isArray(a.yAxis))throw"yAxis column must string or array";var p=void 0;for(p=0;pk&&!w?(_.isArray(y)||(y=[]),y.push(S),k++):this.isNumericColumn(S)&&x.push(S))}var A=h.length;for(console.log("DATA LEN",A,h),v=0;A>v;++v){var D=h[v];d[0].data.push(D[d[0].name])}for(d[0].data=_.uniq(d[0].data),console.log("xAxis[0].data.",d[0].data),v=0;A>v;++v){var R=h[v],E=function(e){var a=i[e],r=[s],o=!1;if(_.size(n)&&(o=_.isUndefined(n[a])),a!==s&&!o&&t.isNumericColumn(a)&&_.findIndex(y,a)<0){if(y)for(var l=0;l1){var P=_.groupBy(b,function(e){return Math.floor(e.median/1e3)});if(_.size(P)>1){var q=function(e){var t=P[e],n=_.map(t,"column").join(",");_.forEach(t,function(e){u[e.index].yAxisIndex=c.length,a.stack&&(u[e.index].stack=n,u[e.index].areaStyle={normal:{}})}),c.push({name:n,type:"value"})};for(var N in P)q(N)}}return c.length||(c=[{name:f,type:"value"}]),l.series=u,l.yAxis=c,l.xAxis=d,console.info("Make Chart Done : Options",l),l}}]),t}(DrawEcharts),DrawEchartsGridChart=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"preCreate",value:function(e){return this.preference.gridchart=!0,{}}},{key:"postCreate",value:function(e){var t=[],a=[],n=[],i=[],r=0;console.info("postCreate!!!!!!",this.options);var s=[],o=this.options.xAxis[0],l=this.options.yAxis[0];for(var c in this.options.series){c=parseInt(c);var d=this.options.series[c].name;this.options.series[c].xAxisIndex=c,this.options.series[c].yAxisIndex=r,console.log(d,this.options.series[c]),o.show=!1,o.gridIndex=c,l.gridIndex=c,l.show=!1,l.name=d,t.push({show:!0,borderWidth:0,shadowBlur:2}),n.push(_.clone(o)),a.push(_.clone(l)),i.push({textAlign:"center",text:d,textStyle:{fontSize:11,fontWeight:"normal"}}),s.push(c),r+=1}var u=Math.ceil(Math.sqrt(r));t.forEach(function(e,t){e.left=t%u/u*100+.5+"%",e.top=Math.floor(t/u)/u*100+.5+"%",e.width=1/u*100-1+"%",e.height=1/u*100-1+"%",i[t].left=parseFloat(e.left)+parseFloat(e.width)/2+"%",i[t].top=parseFloat(e.top)+"%"}),this.options.dataZoom&&this.options.dataZoom[0]&&(this.options.dataZoom[0].xAxisIndex=s),this.options.titles=i,this.options.grid=t,this.options.xAxis=n,this.options.yAxis=a}}]),t}(DrawEchartsChart),DrawEchartsBar=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"preCreate",value:function(e){return this.preference.bar=!0,{}}}]),t}(DrawEchartsChart),DrawD3=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="d3",a}return _inherits(t,e),t}(DrawBasicChart),DrawC3=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="c3",a.bindto=!1,a}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this.chart&&this.init}},{key:"preProcessor",value:function(){return console.log("preProcessor>c3.generate"),this.initChartByJsCode()?(console.log("c3.options>",this.options),this.bindto.className+=" c3",console.log("this.bindto.className",this.bindto.className),this.options.bindto=this.bindto,console.log("c3.options>",this.options),void(this.chart=c3.generate(this.options))):(console.error("C3.Init by code"),!1)}}]),t}(DrawBasicChart),DrawAMcharts=function(e){function t(e){_classCallCheck(this,t),console.warn("DrawAMcharts constructor");var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.library="amchart",a}return _inherits(t,e),_createClass(t,[{key:"onResize",value:function(){this.makeLegend()}},{key:"preProcessor",value:function(){this.createChart()&&(this.init=!0),console.log("!preProcessor,done",this.init,this.options)}},{key:"createChart",value:function(){var e=this,t={},a=this.widget.data.meta,n=!1,i="",r="mm",s=[],o=0,l=[];a.forEach(function(a){if("DateTime"==a.type)n="YYYY-MM-DD JJ:NN:SS",i=a.name;else if("Date"==a.type)n="YYYY-MM-DD",r="DD",i=a.name;else{if(!i)return void(i=a.name);o+=1;var c=e.getChartGraph(a,t[a.name]);c.id="g"+o,"v1"!==c.valueAxis&&l.push(c.valueAxis),s.push(c)}});var c={theme:Widget.isDark?"dark":"light",color:Widget.isDark?"#eee":"#333",type:"serial",categoryField:i,valueAxes:[{id:"v1",axisAlpha:1,gridAlpha:.07,axisColor:Widget.isDark?"#eee":"#333",gridColor:Widget.isDark?"#eee":"#333",ignoreAxisWidth:!0}],balloon:{borderThickness:1,shadowAlpha:0},graphs:s,chartCursor:{valueLineEnabled:!0,valueLineBalloonEnabled:!0,cursorAlpha:0,zoomable:!1,valueZoomable:!0,valueLineAlpha:.5},chartScrollbar:{graph:"g1",gridAlpha:0,color:"#888888",scrollbarHeight:25,backgroundAlpha:0,selectedBackgroundAlpha:.1,selectedBackgroundColor:"#888888",graphFillAlpha:0,autoGridCount:!0,selectedGraphFillAlpha:0,graphLineAlpha:.2,graphLineColor:"#c2c2c2",selectedGraphLineColor:"#888888",selectedGraphLineAlpha:1},categoryAxis:{dashLength:1,minorGridEnabled:!0,axisColor:Widget.isDark?"#eee":"#333",gridColor:Widget.isDark?"#eee":"#333"},data:this.widget.data.data};if(c.categoryAxis.parseDates=!1,n&&(c.dataDateFormat=n,c.categoryAxis.parseDates=!0,c.categoryAxis.minPeriod=r),l){var d=0;l.forEach(function(e){d++;var t={id:e,axisAlpha:1,axisThickness:1,position:"right",ignoreAxisWidth:!0,offset:1*d};c.valueAxes.push(t)})}return this.options=c,this.init=!0,this.makeLegend(),!0}},{key:"makeLegend",value:function(){console.log("this.widget.sizeY",this.widget.sizeY),this.widget.sizeY<2?delete this.options.legend:this.options.legend={align:"center",equalWidths:!1,periodValueText:"total: [[value.sum]]",valueAlign:"left",valueText:"[[value]] ([[percents]]%)",valueWidth:100},console.warn(this.options)}},{key:"getChartGraph",value:function(e,t){var a=e.name,n=e.name,i="v1";a=a.replace(/_axis\d+/gm,"");var r=/.*_axis(\d+).*/i,s=n.match(r);s&&s[1]&&(i="v"+s[1]);var o={id:"g1",valueAxis:i,fillAlphas:.2,bullet:"round",bulletSize:8,hideBulletsCount:50,lineThickness:1,title:a,useLineColorForBulletBorder:!0,valueField:n,type:"smoothedLine",balloonText:"[[title]] [[category]]
[[value]]"};return t||(t={}),Object.assign(o,t)}}]),t}(DrawBasicChart),DataProvider=function(){function e(t,a){if(_classCallCheck(this,e),t.totals&&t.data&&t.data.push(t.totals),this._humanSortCols=[],this._sortBy=!1,this._sortOrder=!1,this.data=t.data,this.text=!1,this.progressQuery="",this.sort=!1,this.sortOrder=!1,t.error||angular.isObject(t.data)||(angular.isString(t.data)?this.text=t.data:this.text=angular.toJson(t.data,!0),this.text=this.text.replace(/&/g,"&").replace(//g,">")),a||(a="ch"),this.sourceType=a,this.meta=t.meta,this.prepareInt64Cols={},this.data){try{this.prepareInt64()}catch(n){console.error("Error in prepareInt64",n)}_.isObject(this.meta)&&(this.meta.prepareInt64Cols=this.prepareInt64Cols)}t.query?this.query=t.query:this.query={index:0,drawCommands:!1},t.error?(this.error=t.error.replace("
","\n").replace(/&/g,"&").replace(//g,">"),this.error=this.error.replace("\\n","
")):this.error=!1,this.draw=this.query.drawCommands,this.rows=t.rows,this.position=this.query.index,this.countAll=t.countAllQuery}return e.$inject=["result","sourceType"],_createClass(e,[{key:"prepareInt64",value:function(){var e=this,t=[];return _.isArray(this.data)&&this.data.length>1?(this.prepareInt64Cols={},this.meta.forEach(function(a){if(a.type.includes("Int64")&&!a.type.includes("Array(")){var n=0;try{n=_.maxBy(e.data,function(e){return _.isEmpty(e[a.name])?void 0:parseInt(e[a.name])})[a.name]}catch(i){console.error("prepareInt64,maxBy",i,"in cell",a,"meta",e.meta)}var r=parseInt(n);r0?void(this.data=_.map(this.data,function(e){return t.forEach(function(t){e[t]=parseInt(e[t])}),e})):!1):!1}},{key:"isNormalInt64Col",value:function(e){return this.prepareInt64Cols[e]}},{key:"isText",value:function(){return this.text?!0:!1}},{key:"isError",value:function(){return this.error?!0:!1}},{key:"getError",value:function(){return this.error}},{key:"update",value:function(e){this.data=e}},{key:"data",value:function(){return this.data}},{key:"getData",value:function(){return this.data}},{key:"meta",value:function(){return this.meta}},{key:"toString",value:function(){return"("+this.name+", "+this.y+")"}},{key:"getColumnsHumanSort",value:function(){return this._humanSortCols}},{key:"setColumnsHumanSort",value:function(e){this._humanSortCols=e}},{key:"setSort",value:function(e,t){this._sortBy=e,this._sortOrder=t,_.isNumber(t)&&(this._sortOrder=parseInt(t)<0?!1:!0)}},{key:"sortByColl",value:function(){return this._sortBy}},{key:"sortOrderBy",value:function(){return this._sortOrder}}],[{key:"convertArrayToDataProvider",value:function(t,a){var n={};return n.data=t,n.meta=[],n.error=!1,n.query={drawCommands:!1},n.rows=t.length,n.position=0,n.countAll=0,Object.keys(t[0]).map(function(e){return n.meta.push({name:e,type:"string"})}),new e(n,a)}}]),e}();angular.module(smi2.app.name).service("DataProvider",DataProvider),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(e){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");return{restrict:"EA",scope:{onChange:"=?",load:"=?"},link:function(e,t,a){var n=window.ace.edit(t[0]);e.load(n),e.onChange&&(console.warn("Ace+bind:scope.onChange"),n.session.on("change",function(t){e.onChange(n.session)})),t.on("$destroy",function(){n.session.$stopWorker(),n.destroy()}),e.$watch(function(){return[t[0].offsetWidth,t[0].offsetHeight]},function(){n.resize(),n.renderer.updateFull()},!0)}}}]),/* + * Copyright (c) 2017. Smi2 + */ +angular.module(smi2.app.name).directive("pivot",[function(){return{restrict:"AE",scope:{data:"=",config:"=",editMode:"="},link:function(e,t,a){var n=$.extend($.pivotUtilities.renderers);null==e.config&&(e.config={rows:[],cols:[]}),e.renderPivotTable=function(){$(t).pivot(e.data,{renderers:n,rendererName:"Table",cols:e.config.cols,rows:e.config.rows,onRefresh:function(t){var a=JSON.parse(JSON.stringify(t));delete a.aggregators,delete a.renderers,delete a.derivedAttributes,delete a.rendererOptions,delete a.localeStrings,e.config=a,e.$apply()}})},e.renderPivotUITable=function(){$(t).pivotUI(e.data)},e.$watch("scope.editMode",function(t,a){console.log("watch"+e.editMode),t&&(e.editMode?e.renderPivotUITable():e.renderPivotTable())},!0),e.renderPivotUITable()}}}]),/** + * ng-handsontable 0.13.0 + * + * Copyright 2012-2015 Marcin Warpechowski + * Copyright 2015 Handsoncode sp. z o.o. + * Licensed under the MIT license. + * https://github.com/handsontable/ngHandsontable + * Date: Wed Oct 26 2016 10:00:05 GMT+0200 (CEST) +*/ +document.all&&!document.addEventListener&&(document.createElement("hot-table"),document.createElement("hot-column"),document.createElement("hot-autocomplete")),angular.module("ngHandsontable.services",[]),angular.module("ngHandsontable.directives",[]),angular.module("ngHandsontable",["ngHandsontable.services","ngHandsontable.directives"]),Handsontable.hooks.add("afterContextMenuShow",function(){Handsontable.EventManager.isHotTableEnv=!1}),function(){function e(e){return{parseAutoComplete:function(t,a,n){t.source=function(i,r){var s=this.instance.getSelected()[0],o=[],l=a[s];if(l){var c=t.optionList;if(c&&c.object){if(angular.isArray(c.object))o=c.object;else{var d=e(c.object)(l);if(angular.isArray(d))if(n)for(var u=0,m=d.length;m>u;u++){var h=d[u][c.property];null!==h&&void 0!==h&&o.push(h)}else o=d;else o=d}r(o)}}}}}}e.$inject=["$parse"],angular.module("ngHandsontable.services").factory("autoCompleteFactory",e)}(),function(){function e(){var e={};return{getInstance:function(t){return e[t]},registerInstance:function(t,a){e[t]=a},removeInstance:function(t){e[t]=void 0}}}e.$inject=[],angular.module("ngHandsontable.services").factory("hotRegisterer",e)}(),function(){function e(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.charAt(0).toLowerCase()})}function t(e){return e.substr(0,1).toUpperCase()+e.substr(1,e.length-1)}function a(a){return{containerClassName:"handsontable-container",initializeHandsontable:function(e,t){var n,i=document.createElement("div");return i.className=this.containerClassName,t.hotId&&(i.id=t.hotId),e[0].appendChild(i),n=new Handsontable(i,t),t.hotId&&a.registerInstance(t.hotId,n),n},updateHandsontableSettings:function(e,t){e&&e.updateSettings(t)},renderHandsontable:function(e){e&&e.render()},mergeSettingsFromScope:function(e,t){var a,n,i,r=angular.extend({},t);for(e=e||{},angular.extend(r,t.settings||{}),a=this.getAvailableSettings(),n=0,i=a.length;i>n;n++)"undefined"!=typeof r[a[n]]&&(e[a[n]]=r[a[n]]);return e},mergeHooksFromScope:function(e,a){var n,i,r,s,o=angular.extend({},a);for(e=e||{},angular.extend(o,a.settings||{}),n=this.getAvailableHooks(),i=0,r=n.length;r>i;i++)s="on"+t(n[i]),("function"==typeof o[n[i]]||"function"==typeof o[s])&&(e[n[i]]=o[n[i]]||o[s]);return e},trimScopeDefinitionAccordingToAttrs:function(e,t){for(var a in e)e.hasOwnProperty(a)&&void 0===t[a]&&void 0===t[e[a].substr(1,e[a].length)]&&delete e[a];return e},getTableScopeDefinition:function(){var e={};return this.applyAvailableSettingsScopeDef(e),this.applyAvailableHooksScopeDef(e),e.datarows="=",e.dataschema="=",e.observeDomVisibility="=",e},getColumnScopeDefinition:function(){var e={};return this.applyAvailableSettingsScopeDef(e),e.data="@",e},applyAvailableSettingsScopeDef:function(e){var t,a,n;for(t=this.getAvailableSettings(),a=0,n=t.length;n>a;a++)e[t[a]]="=";return e},applyAvailableHooksScopeDef:function(e){var a,n,i;for(a=this.getAvailableHooks(),n=0,i=a.length;i>n;n++)e[a[n]]="=on"+t(a[n]);return e},getAvailableSettings:function(t){var a=Object.keys(Handsontable.DefaultSettings.prototype);return-1===a.indexOf("contextMenuCopyPaste")&&a.push("contextMenuCopyPaste"),-1===a.indexOf("handsontable")&&a.push("handsontable"),a.indexOf("settings")>=0&&a.splice(a.indexOf("settings"),1),t&&(a=a.map(e)),a},getAvailableHooks:function(t){var a=Handsontable.hooks.getRegistered();return t&&(a=a.map(function(t){return"on-"+e(t)})),a}}}a.$inject=["hotRegisterer"],angular.module("ngHandsontable.services").factory("settingFactory",a)}(),function(){function e(){return{restrict:"EA",scope:!0,require:"^hotColumn",link:function(e,t,a,n){var i=a.datarows;n.setColumnOptionList(i)}}}e.$inject=[],angular.module("ngHandsontable.directives").directive("hotAutocomplete",e)}(),function(){function e(e){return{restrict:"EA",require:"^hotTable",scope:{},controller:["$scope",function(e){this.setColumnOptionList=function(t){e.column||(e.column={});var a={},n=t.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);n?(a.property=n[1],a.object=n[2]):a.object=t.split(","),e.column.optionList=a}}],compile:function(t,a){var n=this;return this.scope=e.trimScopeDefinitionAccordingToAttrs(e.getColumnScopeDefinition(),a),angular.forEach(Object.keys(this.scope),function(e){n.$$isolateBindings[e]={attrName:e,collection:!1,mode:"data"===e?"@":"=",optional:!1}}),function(t,a,n,i){var r={};angular.forEach(Object.keys(n),function(e){"$"!==e.charAt(0)&&""===n[e]&&(r[e]=!0)}),e.mergeSettingsFromScope(r,t),t.column||(t.column={}),angular.extend(t.column,r),i.setColumnSetting(t.column),t.$on("$destroy",function(){i.removeColumnSetting(t.column)})}}}}e.$inject=["settingFactory"],angular.module("ngHandsontable.directives").directive("hotColumn",e)}(),function(){function e(e,t,a,n){return{restrict:"EA",scope:{},priority:-400,controller:["$scope",function(t){this.setColumnSetting=function(a){t.htSettings||(t.htSettings={}),t.htSettings.columns||(t.htSettings.columns=[]),t.htSettings.columns.push(a),e.updateHandsontableSettings(t.hotInstance,t.htSettings)},this.removeColumnSetting=function(a){t.htSettings.columns.indexOf(a)>-1&&(t.htSettings.columns.splice(t.htSettings.columns.indexOf(a),1),e.updateHandsontableSettings(t.hotInstance,t.htSettings))}}],compile:function(i,r){var s,o=this;return this.scope=e.trimScopeDefinitionAccordingToAttrs(e.getTableScopeDefinition(),r),s=Object.keys(this.scope),angular.forEach(s,function(e){var t=o.scope[e].charAt(0);o.$$isolateBindings[e]={attrName:o.scope[e].length>1?o.scope[e].substr(1,o.scope[e].length):e,collection:"datarows"===e,mode:t,optional:!1}}),function(i,r,o){if(i.settings=n(o.settings)(i.$parent),i.htSettings||(i.htSettings={}),angular.forEach(Object.keys(o),function(e){"$"!==e.charAt(0)&&""===o[e]&&(i.htSettings[e]=!0)}),e.mergeSettingsFromScope(i.htSettings,i),e.mergeHooksFromScope(i.htSettings,i),i.htSettings.data||(i.htSettings.data=i.datarows),i.htSettings.dataSchema=i.dataschema,i.htSettings.hotId=o.hotId,i.htSettings.observeDOMVisibility=i.observeDomVisibility,i.htSettings.columns)for(var l=0,c=i.htSettings.columns.length;c>l;l++){var d=i.htSettings.columns[l];if("autocomplete"===d.type&&d.optionList){if("string"==typeof d.optionList){var u={},m=d.optionList.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/);m?(u.property=m[1],u.object=m[2]):u.object=u,d.optionList=u}t.parseAutoComplete(d,i.datarows,!0)}}var h=i.htSettings.afterChange;i.htSettings.afterChange=function(){h&&h.apply(this,arguments),a.$$phase||i.$apply()},i.hotInstance=e.initializeHandsontable(r,i.htSettings),angular.forEach(s,function(t){i.$watch(t,function(a,n){void 0!==a&&("datarows"===t?i.hotInstance.getSettings().data===a?e.renderHandsontable(i.hotInstance):(i.hotInstance.loadData(a),i.htSettings.data=a):a!==n&&(i.htSettings[t]=a,e.updateHandsontableSettings(i.hotInstance,i.htSettings)))},["datarows","columns","rowHeights","colWidths","rowHeaders","colHeaders"].indexOf(t)>=0)})}}}}e.$inject=["settingFactory","autoCompleteFactory","$rootScope","$parse"],angular.module("ngHandsontable.directives").directive("hotTable",e),angular.module("ngHandsontable.directives").directive("hotAutoDestroy",["hotRegisterer",function(e){return{restrict:"A",link:function(t,a,n){a.on("$destroy",function(){try{var t=e.getInstance(n.hotId);t?(console.info("hotInstance.destroy();"),t.destroy()):console.log("Failed to destroy hot-instance")}catch(a){console.log(a)}})}}}])}(),function(e,t){function a(e){return function(t,a,n){var i=e(n.ngRightClick);a.bind("contextmenu",function(e){t.$apply(function(){e.preventDefault(),i(t,{$event:e})})})}}e.module(t.app.name).directive("ngRightClick",a),a.$inject=["$parse"]}(angular,smi2),function(e,t){function a(){return{restrict:"A",require:"mdMenu",link:function(t,a,n,i){t.$mdOpenMousepointMenu=function(t){var a=e.element(t.currentTarget).offset();i.offsets=function(){return{left:t.pageX-a.left,top:t.pageY-a.top+8}},i.open(t)}}}}e.module(t.app.name).directive("mousepointMenu",a)}(angular,smi2),/** + * gridstack-angular - Angular Gridstack.js directive + * @version v0.6.0-dev + * @author Kevin Dietrich + * @link https://github.com/kdietrich/gridstack-angular#readme + * @license MIT + */ +function(){angular.module("gridstack-angular",[]);var e=angular.module("gridstack-angular");e.controller("GridstackController",["$scope",function(e){var t=this;e.$watch("staticGrid",function(e,a){e=!e,e?t.gridstackHandler.enable():t.gridstackHandler.disable(),t.gridstackHandler.commit()},!0),this.init=function(e,a){return t.gridstackHandler=e.gridstack(a).data("gridstack"),t.gridstackHandler},this.removeItem=function(e){return t.gridstackHandler?t.gridstackHandler.removeWidget(e,!1):null},this.addItem=function(e){return t.gridstackHandler?(t.gridstackHandler.makeWidget(e),e):null}}])}(),function(){var e=angular.module("gridstack-angular");e.directive("gridstack",["$timeout",function(e){return{restrict:"A",controller:"GridstackController",controllerAs:"$gridstack",bindToController:{onChange:"&",onDragStart:"&",onDragStop:"&",onResizeStart:"&",onResizeStop:"&",gridstackHandler:"=?",options:"=",staticGrid:"="},link:function(t,a,n,i,r){i.init(a,i.options),a.on("change",function(a,n){e(function(){t.$apply(),i.onChange({event:a,items:n})})}),a.on("dragstart",function(e,t){i.onDragStart({event:e,ui:t})}),a.on("dragstop",function(a,n){e(function(){t.$apply(),i.onDragStop({event:a,ui:n})})}),a.on("resizestart",function(e,t){i.onResizeStart({event:e,ui:t})}),a.on("resizestop",function(a,n){e(function(){t.$apply(),i.onResizeStop({event:a,ui:n})})})}}}])}(),function(){var e=angular.module("gridstack-angular");e.directive("gridstackItem",["$timeout",function(e){return{restrict:"A",require:"^gridstack",scope:{gridstackItem:"=",onItemAdded:"&",onItemRemoved:"&",gsItemId:"=?",gsItemX:"=",gsItemY:"=",gsItemWidth:"=",gsItemHeight:"=",gsItemAutopos:"="},link:function(t,a,n,i){t.gsItemId&&a.attr("data-gs-id",t.gsItemId),a.attr("data-gs-x",t.gsItemX),a.attr("data-gs-y",t.gsItemY),a.attr("data-gs-width",t.gsItemWidth),a.attr("data-gs-height",t.gsItemHeight),a.attr("data-gs-auto-position",t.gsItemAutopos);var r=(i.addItem(a),a.data("_gridstack_node"));e(function(){t.onItemAdded({item:r})}),t.$watchGroup(["gsItemX","gsItemY","gsItemWidth","gsItemHeight"],function(){(Number(a.attr("data-gs-x"))!==t.gsItemX||Number(a.attr("data-gs-y"))!==t.gsItemY||Number(a.attr("data-gs-width"))!==t.gsItemWidth||Number(a.attr("data-gs-height"))!==t.gsItemHeight)&&i.gridstackHandler.update(a,t.gsItemX,t.gsItemY,t.gsItemWidth,t.gsItemHeight)}),t.$watch(function(){return a.attr("data-gs-id")},function(e){t.gsItemId=e}),t.$watch(function(){return a.attr("data-gs-x")},function(e){t.gsItemX=Number(e)}),t.$watch(function(){return a.attr("data-gs-y")},function(e){t.gsItemY=Number(e)}),t.$watch(function(){return a.attr("data-gs-width")},function(e){t.gsItemWidth=Number(e)}),t.$watch(function(){return a.attr("data-gs-height")},function(e){t.gsItemHeight=Number(e)}),a.bind("$destroy",function(){var e=a.data("_gridstack_node");t.onItemRemoved({item:e}),i.removeItem(a)})}}}])}(),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +function(e,t){function a(t,a,n){var i="";if("echarts"==t.draw.library){var r="macarons";t.isDark&&(r="dark"),t.draw.chart=echarts.init(a[0],r),i=!1}if("plotly"==t.draw.library&&(t.element=e.element('
 
'),i=!1),"c3"==t.draw.library){var s=document.createElement("div");t.draw.bindto=s,a[0].appendChild(s),i=!1}return"text"==t.draw.library&&(t.element=e.element('
 
'),i=!1),"d3"==t.draw.library&&console.info("DW:d3"),"gmaps"==t.draw.library&&(t.element=e.element('
 
'),i=!1),console.group("widget.draw.preProcessor"),console.time("widget.draw.preProcessor time took"),t.draw.preProcessor instanceof Function&&t.draw.preProcessor(),console.timeEnd("widget.draw.preProcessor time took"),console.groupEnd(),i}function n(t,n){return function(i,r,s){i.widget.type;if(console.time("drawWidget.buildLinkFunc"),i.widget.isDark=i.isdark,i.widget.preProcessor instanceof Function&&i.widget.preProcessor(),i.widget.error||i.widget.textformat||i.widget.text||i.widget.empty)return console.log("widget Have Error",i.widget.error),i.widget.error&&r.html("
"+i.widget.error+"
"),i.widget.text&&r.html("
"+i.widget.text+"
"),i.widget.empty&&r.html("NO DATA"),void r.addClass("grid-monospace");if("table"==i.widget.type&&(i.widget.element=e.element('
')),"draw"==i.widget.type){i.widget.element=!1;var o=a(i.widget,r,n);o&&(i.widget.element=e.element(o))}"pivot"==i.widget.type&&(i.widget.element=e.element('')),i.widget.element?(r.append(i.widget.element),t(i.widget.element)(i),i.widget.element.on("$destroy",i.widget.destroy(i.widget))):r.on("$destroy",i.widget.destroy(i.widget)),i.widget.postProcessor instanceof Function&&i.widget.postProcessor(),i.$watch(function(){return[r[0].offsetWidth,r[0].offsetHeight].join("x")},function(e){i.widget.scheduledResize()}),i.events={resize:function(e,t){n(function(){t.widget.scheduledResize()},300)}},n(function(){i.widget.scheduledResize()},300),console.timeEnd("drawWidget.buildLinkFunc")}}e.module(t.app.name).directive("drawWidget",["$compile","$timeout",function(e,t){return{restrict:"EA",template:'
',scope:{widget:"=widget",isdark:"=isdark"},replace:!0,link:n(e,t)}}])}(angular,smi2),angular.module("angularResizable",[]).directive("resizable",function(){function e(e){void 0===t?(t=e,setTimeout(function(){t(),t=void 0},100)):t=e}var t;return{restrict:"AE",scope:{rDirections:"=",rCenteredX:"=",rCenteredY:"=",rWidth:"=",rHeight:"=",rFlex:"=",rGrabber:"@",rDisabled:"@",rNoThrottle:"=",resizable:"@"},link:function(t,a,n){if("false"!==t.resizable){var i="flexBasis"in document.documentElement.style?"flexBasis":"webkitFlexBasis"in document.documentElement.style?"webkitFlexBasis":"msFlexPreferredSize"in document.documentElement.style?"msFlexPreferredSize":"flexBasis";t.$watch("rWidth",function(e){a[0].style[t.rFlex?i:"width"]=e!==!1?e+"px":""}),t.$watch("rHeight",function(e){a[0].style[t.rFlex?i:"height"]=e!==!1?e+"px":""}),a.addClass("resizable");var r,s,o,l,c,d=window.getComputedStyle(a[0],null),u=t.rDirections||["right"],m=t.rCenteredX?2:1,h=t.rCenteredY?2:1,p=t.rGrabber?t.rGrabber:"",g={},b=function(e){g.width=!1,g.height=!1,"x"===c?g.width=parseInt(a[0].style[t.rFlex?i:"width"]):g.height=parseInt(a[0].style[t.rFlex?i:"height"]),g.id=a[0].id,g.evt=e},f=function(e){return e.touches?e.touches[0].clientX:e.clientX},v=function(e){return e.touches?e.touches[0].clientY:e.clientY},y=function(n){function d(){t.$emit("angular-resizable.resizing",g)}var u,p="x"===c?o-f(n):o-v(n);switch(l){case"top":u=t.rFlex?i:"height",a[0].style[u]=s+p*h+"px";break;case"bottom":u=t.rFlex?i:"height",a[0].style[u]=s-p*h+"px";break;case"right":u=t.rFlex?i:"width",a[0].style[u]=r-p*m+"px";break;case"left":u=t.rFlex?i:"width",a[0].style[u]=r+p*m+"px"}b(n),t.rNoThrottle?d():e(d)},w=function C(e){b(),t.$emit("angular-resizable.resizeEnd",g),t.$apply(),document.removeEventListener("mouseup",C,!1),document.removeEventListener("mousemove",y,!1),document.removeEventListener("touchend",C,!1),document.removeEventListener("touchmove",y,!1),a.removeClass("no-transition")},k=function(e){var n={},r=!1,s=!1;n.width=parseInt(a[0].style[t.rFlex?i:"width"]),n.height=parseInt(a[0].style[t.rFlex?i:"height"]),"right"==l&&(n.width>10?(t.preState=n,r=0,s=0):(t.preState&&t.preState.width||(t.preState.width=100),s=t.preState.height,r=t.preState.width)),"bottom"==l&&(n.height>10?(t.preState=n,s=0):(t.preState&&t.preState.height||(t.preState.height=100),s=t.preState.height,r=t.preState.width)),r!==!1&&(a[0].style[t.rFlex?i:"width"]=r+"px"),s!==!1&&(a[0].style[t.rFlex?i:"height"]=s+"px"),t.$apply()},x=function(e,n){l=n,c="left"===l||"right"===l?"x":"y",o="x"===c?f(e):v(e),r=parseInt(d.getPropertyValue("width")),s=parseInt(d.getPropertyValue("height")),a.addClass("no-transition"),document.addEventListener("mouseup",w,!1),document.addEventListener("mousemove",y,!1),document.addEventListener("touchend",w,!1),document.addEventListener("touchmove",y,!1),e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,b(e),t.$emit("angular-resizable.resizeStart",g),t.$apply()};u.forEach(function(e){var n=document.createElement("div");n.setAttribute("class","rg-"+e),n.innerHTML=p,a[0].appendChild(n),n.ondragstart=function(){return!1};var i=function(a){var n="true"===t.rDisabled;n||1!==a.which&&!a.touches||x(a,e)};n.addEventListener("dblclick",k,!1),n.addEventListener("mousedown",i,!1),n.addEventListener("touchstart",i,!1)})}}}});var csvImport=angular.module("ngCsvImport",[]);csvImport.directive("ngCsvImport",function(){return{restrict:"E",transclude:!0,replace:!0,scope:{content:"=?",header:"=?",headerVisible:"=?",separator:"=?",separatorVisible:"=?",result:"=?",encoding:"=?",encodingVisible:"=?",accept:"=?",acceptSize:"=?",acceptSizeExceedCallback:"=?",callback:"=?",mdButtonClass:"@?",mdInputClass:"@?",mdButtonTitle:"@?",mdSvgIcon:"@?",uploadButtonLabel:"="},template:function(e,t){var a=angular.isDefined(t.material),n=angular.isDefined(t.multiple);return'
Header
'+(a?'
':'')+'
Encoding
{{encoding}}
Seperator
'+(a?' {{mdButtonTitle}}':"")+"
"},link:function(e,t,a){if(e.separatorVisible=!!e.separatorVisible,e.headerVisible=!!e.headerVisible,e.acceptSize=e.acceptSize||Number.POSITIVE_INFINITY,e.material=angular.isDefined(a.material),e.multiple=angular.isDefined(a.multiple),e.multiple)throw new Error("Multiple attribute is not supported yet.");var n=angular.element(t[0].querySelector('input[type="file"]')),i=angular.element(t[0].querySelector("md-input-container"));if(e.material&&n){if(n.removeClass("ng-show"),n.addClass("ng-hide"),i){var r=angular.element(i[0].querySelector("div.md-errors-spacer"));r&&r.remove()}e.onClick=function(){n.click()}}angular.element(t[0].querySelector(".separator-input")).on("keyup",function(t){if(null!=e.content){var a={csv:e.content,header:e.header,separator:t.target.value,encoding:e.encoding};e.result=s(a),e.$apply(),"function"==typeof e.callback&&e.callback(t)}}),t.on("change",function(t){if(t.target.files&&t.target.files.length){if(t.target.files[0].size>e.acceptSize)return void("function"==typeof e.acceptSizeExceedCallback&&e.acceptSizeExceedCallback(t.target.files[0]));e.filename=t.target.files[0].name;var a=new FileReader;if(a.onload=function(a){e.$apply(function(){var n={csv:a.target.result.replace(/\r\n|\r/g,"\n"),header:e.header,separator:e.separator};e.content=n.csv,e.result=s(n),e.result.filename=e.filename,e.$$postDigest(function(){"function"==typeof e.callback&&e.callback(t)})})},"file"!==t.target.type||null==t.target.files&&null==t.srcElement.files){if(null!=e.content){var n={csv:e.content,header:!e.header,separator:e.separator};e.result=s(n),e.$$postDigest(function(){"function"==typeof e.callback&&e.callback(t)})}}else a.readAsText((t.srcElement||t.target).files[0],e.encoding)}});var s=function(e){var t=e.csv.split(new RegExp('\n(?![^"]*"(?:(?:[^"]*"){2})*[^"]*$)')),a=[],n=0,i=t[0].split(e.separator).length,r=[];e.header&&(r=t[0].split(e.separator),n=1);for(var s=n;s3e4&&(a=3e4),t.fetchQuery("SELECT now(),number,sin(number),sin(number),SHA1(toString(number)),SHA1(toString(number)) as xx from system.numbers limit "+a).then(function(t){var a="ch",n=new DataProvider(t,a);n.progressQuery="SQL";var i=new WidgetTable(n);e.w=i,e.vars.show=!0,e.vars.counter++,console.info("Load done",e.vars.counter,e.vars.show)})},e._widgetsx=[],e.removeResult=function(t,a,n){n.stopPropagation(),delete e.listDashboards[a]},e.inits=function(){e.listDashboards={}},e.inits(),e.moveWidget=function(){e.widgets[0].x=1,e.widgets[0].width=2,e.widgets[0].height=2},e.removeWidget=function(t){var a=e.widgets.indexOf(t);e.widgets.splice(a,1)},e.onChange=function(e,t){console.log("onChange event: "+e+" items:"+t)},e.onDragStart=function(e,t){console.log("onDragStart event: "+e+" ui:"+t)},e.onDragStop=function(e,t){console.log("onDragStop event: "+e+" ui:"+t)},e.onResizeStart=function(e,t){console.log("onResizeStart event: "+e+" ui:"+t)},e.onResizeStop=function(e,t){console.log("onResizeStop ",t.size)},e.onItemAdded=function(e){console.log("onItemAdded item: "+e)},e.onItemRemoved=function(e){console.log("onItemRemoved item: "+e)}}e.module(t.app.name).controller("DashController",a),a.$inject=["$scope","API","ThemeService","$stateParams","localStorageService","$mdDialog","$window","$mdToast"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.vars={isDark:i.isDark(),historysql:a.sqlLog,charthelp:[],active:{chart:!0,history:!0,snippet:!0,vars:!0},snippets:o.snippets,variables:s.vars},t.vars.scrollConfig2={autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:400,setHeight:200,advanced:{updateOnContentResize:!0}},t.showAddVarsDialog=function(a){l.show({controller:["$scope","$mdDialog",function(e,t){e.v={name:"Var1",type:"text",value:""},e.close=function(){t.cancel()},e.add=function(e){t.hide(e)}}],templateUrl:"app/base/addVarsDialog.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0}).then(function(e){e.name&&e.value&&e.type&&(s.addVar(e.type,e.name,e.value),t.broadcast())},function(){})},t.broadcast=function(){a.$emit("handleBroadcastUpdateVarsAndSnippets",{value:!0})},t.changed=function(e){s.update(e),t.broadcast()},t.showState=function(){console.warn(t.vars.variables)},t.addVar=function(){s.addVar("int","limit",1e3),t.broadcast()},t.actionHistory=function(e){a.$emit("handleBroadcastInsertInActive",{value:e})},t.dropSnippet=function(e){o.drop(e),t.broadcast()},t.dropVar=function(e){s.drop(e),t.broadcast()},t.init=function(){(!_.isObject(t.vars)||_.isUndefined(t.vars.variables.limit))&&s.addVar("int","limit",1e3)},t.init()}e.module(t.app.name).controller("SidebarHelperCtrl",a),a.$inject=["$scope","$rootScope","API","ThemeService","localStorageService","Variables","Snippets","$mdDialog"]}(angular,smi2),function(e,t){function a(e,t,a,n,i,r,s,o,l,c){e.vars={searchline:"",counter:0,loaded:!1,error:!1,databases:[]},e.vars.scrollConfig={autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:400,advanced:{updateOnContentResize:!0}},e.vars.metis={config:{toggle:!1,preventDefault:!1}},e.clickInsertField=function(e){t.$emit("handleBroadcastInsertInActive",{value:e.name})},e.clickAndSelect=function(a,n){return a.name==t.currentDatabase?(n.stopPropagation(),!1):void e.selectDatabase(a)},e.selectDatabase=function(e){console.time("sidebar.selectDatabase time took"),t.currentDatabase=e.name,s.show(s.simple().content("USE "+e.name+" database").theme(i.theme).position("bottom right")),console.timeEnd("sidebar.selectDatabase time took")},e.openTable=function(e){console.log("openTable!!!!!!!!!!!!!!!!!!!!!!!"),r("tableSiedenav").close(),t.currentDatabase!=e.database&&(s.show(s.simple().content("USE "+e.database+" database").theme(i.theme).position("bottom right")),t.currentDatabase=e.database),t.currentTable=e.name,r("tableSiedenav").open()},t.$on("handleBroadcastDatabases",function(){e.reLoad(!0),e.$applyAsync()}),e.updateDS=function(){n.databaseStructure(function(e){a.reload()},!0)},e.rightMenuProcessTable=function(e,a,i,r){console.log("rightMenuProcessTable",e,a,i),"InsertSQLDrop"==e&&(-1!==i.indexOf(".")&&(i='"'+i+'"'),t.$emit("handleBroadcastInsertInActive",{value:"DROP TABLE IF EXISTS "+a+"."+i})),"InsertName"==e&&t.$emit("handleBroadcastInsertInActive",{value:a+"."+i}),"InsertSQLDescribe"==e&&n.fetchQuery("SHOW CREATE TABLE "+a+'."'+i+'"').then(function(e){var a=window.sqlFormatter.format(e.data[0].statement);t.$emit("handleBroadcastInsertInActive",{value:a})}),"OpenTables"==e&&(window.location="/#/database/"+a+"/table/"+i),"InsertDescribe"==e&&n.fetchQuery("SELECT * FROM system.columns WHERE database='"+a+"' AND table='"+i+"'").then(function(e){var n=[],r=[];e.data.forEach(function(e){n.push(e.name),"Date"==e.type&&r.push(e.name+"=today()")}),-1!==i.indexOf(".")&&(i='"'+i+'"');var s="\nSELECT\n "+n.join(",\n ")+"\nFROM\n "+a+"."+i+"\n";r.length&&(s=s+"\nWHERE\n "+r.join("\n AND \n")),s+="\nLIMIT 100\n\n",console.log(s),t.$emit("handleBroadcastInsertInActive",{value:s})})},e.showAlertDatabaseStructure=function(e){o.show(o.alert().clickOutsideToClose(!0).title("Error on load database structure").textContent(e).ariaLabel("Error on load database structure").ok("OK")).then(function(e){n.clear(),a.go("login")})},e.reLoad=function(a){e.vars.loaded=!1,e.vars.error=!1,e.vars.databases=[],t.isInitDatabaseStructure=!1,n.fetchQuery("SELECT 1").then(function(i){e.$applyAsync(),n.databaseStructure(function(a){console.log("isInitDatabaseStructure-true"),t.isInitDatabaseStructure=Date.now(),e.$applyAsync(),console.log("databaseStructure - done");var n=a.getFields();e.vars.databases=a.getTables().reduce(function(e,t){var a=[{active:!0,value:"Select",key:"OpenTables",icon:"arrow-expand",db:t.database}],i=[{active:!0,value:"Open table",key:"OpenTables",icon:"arrow-expand",db:t.database,table:t.name},{active:!0,value:"Code Select from",key:"InsertDescribe",icon:"format-size",db:t.database,table:t.name},{active:!0,value:"Insert table name",key:"InsertName",icon:"bing",db:t.database,table:t.name},{active:!0,value:"Make SQL Describe",key:"InsertSQLDescribe",icon:"border-vertical",db:t.database,table:t.name},{active:!0,value:"Make SQL Drop",key:"InsertSQLDrop",icon:"delete",db:t.database,table:t.name}],r="table";t.engine.match(/Dictionary.*/)&&(r="library"),t.engine.match(/Distributed.*/)&&(r="soundcloud"),t.engine.match(/AggregatingMergeTree.*/)&&(r="cube"),t.engine.match(/MaterializedView.*/)&&(r="border-bottom"),t.engine.match(/SummingMergeTree.*/)&&(r="table-row-plus-after"),t.engine.match(/CollapsingMergeTree.*/)&&(r="table-row-height"),t.engine.match(/$Merge^/)&&(r="source-fork"),t.active=!0,t.classEngine=r,t.rightMenuListTable=i;var s=!0,o=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var u=c.value;if("-"!==t.name&&u.name==t.database)return u.tables.push({active:!0,database:t.database,name:t.name,engine:t.engine,classEngine:t.classEngine,fields:n[t.database+"."+t.name],rightMenuList:t.rightMenuListTable}),e}}catch(m){o=!0,l=m}finally{try{!s&&d["return"]&&d["return"]()}finally{if(o)throw l}}return[].concat(_toConsumableArray(e),[{name:t.database,rightMenuList:a,tables:[{active:!0,database:t.database,name:t.name,engine:t.engine,classEngine:t.classEngine,rightMenuList:t.rightMenuListTable,fields:n[t.database+"."+t.name]}]}])},[]),e.selectDatabase(e.vars.databases[0]),a.getDatabases().forEach(function(t){var a=!1;e.vars.databases.forEach(function(e){e.name==t.name&&(a=!0)}),a||e.vars.databases.push({name:t.name,tables:[],active:!0})}),l(function(){e.vars.loaded=!0,e.vars.error=!1,$("#sideBarMetismenu").metisMenu()},100)},a)},function(t){e.showAlertDatabaseStructure(t)})},e.reLoad()}e.module(t.app.name).controller("SidebarController",a),a.$inject=["$scope","$rootScope","$state","API","ThemeService","$mdSidenav","$mdToast","$mdDialog","$timeout","localStorageService"]}(angular,smi2),function(e,t){function a(a,n,i,r,s){a.user=i.getConnectionInfo().name,a.themes=r.list,a.isTabixServer=i.isTabixServer(),a.isChrome=/Chrome/.test(navigator.userAgent),a.vars={disable_exit:window.global_tabix_disable_exit,hideExitButton:!window.global_tabix_disable_exit},a.help=function(a){function n(e,a){e.vars={version:t.app.version,buildDate:t.app.buildDate},e.hide=function(){a.hide()},e.cancel=function(){a.cancel()},e.answer=function(e){a.hide(e)}}n.$inject=["$scope","$mdDialog"],s.show({controller:n,templateUrl:"app/base/helpDialogRu.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0})},a.logout=function(){i.clear(),n.go("login")},a.setUiTheme=function(e){r.set(e.name),window.location.reload()}}e.module(t.app.name).controller("HeaderController",a),a.$inject=["$scope","$state","API","ThemeService","$mdDialog"]}(angular,smi2),ace.define("ace/theme/dracula",["require","exports","module","ace/lib/dom"],function(e,t,a){t.isDark=!0,t.cssClass="ace-dracula",t.cssText="ace-dracula .ace_gutter {background: #282a36;color: rgb(144,145,148)}.ace-dracula .ace_print-margin {width: 1px;background: #e8e8e8}.ace-dracula {background-color: #282a36;color: #f8f8f2}.ace-dracula .ace_cursor {color: #f8f8f0}.ace-dracula .ace_marker-layer .ace_selection {background: #44475a}.ace-dracula.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #282a36;border-radius: 2px}.ace-dracula .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-dracula .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #3B3A32}.ace-dracula .ace_marker-layer .ace_active-line {background: #44475a}.ace-dracula .ace_gutter-active-line {background-color: #44475a}.ace-dracula .ace_marker-layer .ace_selected-word {border: 1px solid #44475a}.ace-dracula .ace_fold {background-color: #50fa7b;border-color: #f8f8f2}.ace-dracula .ace_keyword {color: #ff79c6}.ace-dracula .ace_constant.ace_language {color: #bd93f9}.ace-dracula .ace_constant.ace_numeric {color: #bd93f9}.ace-dracula .ace_constant.ace_character {color: #bd93f9}.ace-dracula .ace_constant.ace_character.ace_escape {color: #ff79c6}.ace-dracula .ace_constant.ace_other {color: #bd93f9}.ace-dracula .ace_support.ace_function {color: #8be9fd}.ace-dracula .ace_support.ace_constant {color: #6be5fd}.ace-dracula .ace_support.ace_class {font-style: italic;color: #66d9ef}.ace-dracula .ace_support.ace_type {font-style: italic;color: #66d9ef}.ace-dracula .ace_storage {color: #ff79c6}.ace-dracula .ace_storage.ace_type {font-style: italic;color: #8be9fd}.ace-dracula .ace_invalid {color: #F8F8F0;background-color: #ff79c6}.ace-dracula .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #bd93f9}.ace-dracula .ace_string {color: #f1fa8c}.ace-dracula .ace_comment {color: #6272a4}.ace-dracula .ace_variable {color: #50fa7b}.ace-dracula .ace_variable.ace_parameter {font-style: italic;color: #ffb86c}.ace-dracula .ace_entity.ace_other.ace_attribute-name {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_function {color: #50fa7b}.ace-dracula .ace_entity.ace_name.ace_tag {color: #ff79c6}";var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),ace.define("ace/mode/clickhouse",["require","exports","module","ace/lib/oop","ace/mode/text","ace/token_iterator","ace/mode/folding","ace/mode/clickhouse_FoldMode","ace/mode/clickhouse_highlight_rules"],function(e,t){var a=e("../lib/oop"),n=e("./text").Mode,i=e("./clickhouse_highlight_rules").ClickhouseHighlightRules,r=e("./clickhouse_FoldMode").FoldMode,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./behaviour/cstyle").CstyleBehaviour,l=function(){this.foldingRules=new r,this.$outdent=new s,this.$behaviour=new o,this.HighlightRules=i};a.inherits(l,n),function(){var t=this;this.lineCommentStart="--",this.getHighlightRule=function(){return t.session.$mode.$highlightRules},this.getCompletions=function(e,t,a,n){return t.$mode.$highlightRules.completions},this.$id="ace/mode/clickhouse",this.checkOutdent=function(e,t,a){return this.$outdent.checkOutdent(t,a)},this.autoOutdent=function(e,t,a){this.$outdent.autoOutdent(t,a)},this.findTokens=function(t,a,n){t=t.replace(/^(\r\n|\n|\r)/gm,"").replace(/(\r\n|\n|\r)$/gm,"");for(var i=e("ace/token_iterator").TokenIterator,r=e("ace/edit_session").EditSession,s=new r(t,this),o=new i(s,0,0),l=o.getCurrentToken(),c=[];l;){var d=l;if(d.row=o.getCurrentTokenRow(),d.col=o.getCurrentTokenColumn(),d.type==a&&(c.push(d),n))return d.value=d.value.toLowerCase(),d;l=o.stepForward()}return c},this.trim=function(e,t){return t!==!0&&"string"==typeof t&&t.length>0&&(e=e.replace("^("+t+")"," ").replace(t+"$"," "),e=e.replace(new RegExp("^"+t+"|"+t+"$","g")," ")),e},this.collapseAll=function(e){for(var t=e,a=t.foldWidgets,n=t.getLength(),i=0,r=i;n>r;r++)if(null==a[r]&&(a[r]=t.getFoldWidget(r)),"start"==a[r]){var s=t.getFoldWidgetRange(r);if(s&&s.end.row<=n&&s.start.row>=i){r=s.end.row;try{var o=t.addFold("...",s);o&&(o.collapseChildren=depth)}catch(t){}}}},this.replaceVars=function(e,t){var a={},n=this.fetchTokens(e);if(console.warn("Find tokens",n,t),n.vars.length>0)for(var i in n.vars){var r=n.vars[i],s=r;r=r.indexOf("{")>-1?r.replace("{","").replace("}",""):r.replace("$","").replace("@","").replace(":","");for(var o in t){var l=t[o];l.name.toLowerCase()==r.toLowerCase()&&(console.info(l.name.toLowerCase(),"==",r.toLowerCase()),e=e.replace(s,l.value))}}return{sql:e,tokens:n,vars:a}},this.fetchTokens=function(t){var a={groupby:[],where:[],vars:[],limit:-1},n=e("ace/token_iterator").TokenIterator,i=e("ace/edit_session").EditSession,r=new i(t,this);r.bgTokenizer.start(0);for(var s=new n(r,0,0),o=s.getCurrentToken();o;){var l=o;if(l.row=s.getCurrentTokenRow(),l.col=s.getCurrentTokenColumn(),"variable.language"==l.type&&l.value&&a.vars.push(l.value),"keyword"==l.type&&l.value.toLowerCase().includes("limit")!==!1){var c=l.value.toLowerCase().match(/LIMIT\W+(\d+)\W*\,\W*(\d+)/i);c||(c=l.value.toLowerCase().match(/LIMIT\W+(\d+)/i)),c[0]&&c[1]&&c[2]?a.limit={from:c[1],to:c[2]}:c[0]&&c[1]&&(a.limit={from:c[1],to:!1})}o=s.stepForward()}return console.info("Parse & Find tokens result",a),a},this.splitByTokens=function(t,a,n){var i=e("ace/token_iterator").TokenIterator,r=e("ace/edit_session").EditSession,s=e("ace/range").Range,o=new r(t,this);o.bgTokenizer.start(0);var l=new i(o,0,0),c=l.getCurrentToken();if(_.isUndefined(c)){var d=0;do d++,l=new i(o,d,0),c=l.getCurrentToken();while(100>d&&!c)}for(var u=[],m=0,h=0,p=!1,g=void 0,b=void 0;c;){var f=c;if(f.row=l.getCurrentTokenRow(),f.col=l.getCurrentTokenColumn(),f.type==a&&(n!==!0&&f.value==n||n===!0)){var v=0;n instanceof String&&(v=n.length),g=new s(m,h,f.row,f.col+v),b=o.getTextRange(g),m=f.row,h=f.col+v,b=this.trim(b,f.value),b.length>2&&("string"==typeof p&&(b=this.trim(b,p)),u.push({sql:b,range:g,keyword:p}),p=f.value)}c=l.stepForward()}return g=new s(m,h,Number.MAX_VALUE,Number.MAX_VALUE),b=o.getTextRange(g),b=this.trim(b,n),"string"==typeof p&&(b=this.trim(b,p)),b.length>2&&u.push({sql:b,range:g,keyword:p}),u}}.call(l.prototype),t.Mode=l}),ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,a){var n=e("../lib/lang");t.$detectIndentation=function(e,t){function a(e){for(var t=0,a=e;al;l++){var c=e[l];if(/^\s*[^*+\-\s]/.test(c)){if(" "==c[0])r++,s=-Number.MAX_VALUE;else{var d=c.match(/^ */)[0].length;if(d&&" "!=c[d]){var u=d-s;!(u>0)||s%u||d%u||(i[u]=(i[u]||0)+1),n[d]=(n[d]||0)+1}s=d}for(;o>l&&"\\"==c[c.length-1];)c=e[l++]}}for(var m=i.reduce(function(e,t){return e+t},0),h={score:0,length:0},p=0,l=1;12>l;l++){var g=a(l);1==l?(p=g,g=n[1]?.9:.8,n.length||(g=0)):g/=p,i[l]&&(g+=i[l]/m),g>h.score&&(h={score:g,length:l})}if(h.score&&h.score>1.4)var b=h.length;return r>p+1?((1==b||r/4>p||h.score<1.8)&&(b=void 0),{ch:" ",length:b}):p>r+1?{ch:" ",length:b}:void 0},t.detectIndentation=function(e){var a=e.getLines(0,1e3),n=t.$detectIndentation(a)||{};return n.ch&&e.setUseSoftTabs(" "==n.ch),n.length&&e.setTabSize(n.length),n},t.trimTrailingSpace=function(e,t){for(var a=e.getDocument(),n=a.getAllLines(),i=t?-1:0,r=0,s=n.length;s>r;r++){var o=n[r],l=o.search(/\s+$/);l>i&&a.removeInLine(r,l,o.length)}},t.convertIndentation=function(e,t,a){var i=e.getTabString()[0],r=e.getTabSize();a||(a=r),t||(t=i);for(var s=" "==t?t:n.stringRepeat(t,a),o=e.doc,l=o.getAllLines(),c={},d={},u=0,m=l.length;m>u;u++){var h=l[u],p=h.match(/^\s*/)[0];if(p){var g=e.$getStringScreenWidth(p)[0],b=Math.floor(g/r),f=g%r,v=c[b]||(c[b]=n.stringRepeat(s,b)); +v+=d[f]||(d[f]=n.stringRepeat(" ",f)),v!=p&&(o.removeInLine(u,0,p.length),o.insertInLine({row:u,column:0},v))}}e.setTabSize(a),e.setUseSoftTabs(" "==t)},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var a=e.match(/\d+/);return a&&(t.length=parseInt(a[0],10)),t},t.$parseArg=function(e){return e?"string"==typeof e?t.$parseStringArg(e):"string"==typeof e.text?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,a){var n=t.$parseArg(a);t.convertIndentation(e.session,n.ch,n.length)}},{name:"setIndentation",exec:function(e,a){var n=t.$parseArg(a);n.length&&e.session.setTabSize(n.length),n.ch&&e.session.setUseSoftTabs(" "==n.ch)}}]}),function(){ace.require(["ace/ext/whitespace"],function(){})}(),ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,a){var n=e("ace/lib/dom"),i=e("ace/lib/lang"),r=function(e,t){this.element=n.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var a=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",a),e.on("changeSelection",a),e.on("keyboardActivity",a)};(function(){this.updateStatus=function(e){function t(e,t){e&&a.push(e,t||"|")}var a=[];t(e.keyBinding.getStatusText(e)),e.commands.recording&&t("REC");var n=e.selection,i=n.lead;if(!n.isEmpty()){var r=e.getSelectionRange();t("("+(r.end.row-r.start.row)+":"+(r.end.column-r.start.column)+")"," ")}t(i.row+":"+i.column," "),n.rangeCount&&t("["+n.rangeCount+"]"," "),a.pop(),this.element.textContent=a.join("")}}).call(r.prototype),t.StatusBar=r}),function(){ace.require(["ace/ext/statusbar"],function(){})}(),ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,a){var n=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,a=t.textInput.getElement();if(t.selection.isEmpty()){var i=t.getCursorPosition(),r=t.session.getWordRange(i.row,i.column),s=t.session.getTextRange(r);if(t.session.tokenRe.lastIndex=0,t.session.tokenRe.test(s)){var o="",l=s+" "+o;a.value=l,a.setSelectionRange(s.length,s.length+1),a.setSelectionRange(0,0),a.setSelectionRange(0,s.length);var c=!1;n.addListener(a,"keydown",function d(){n.removeListener(a,"keydown",d),c=!0}),t.textInput.setInputHandler(function(e){if(console.log(e,l,a.selectionStart,a.selectionEnd),e==l)return"";if(0===e.lastIndexOf(l,0))return e.slice(l.length);if(e.substr(a.selectionEnd)==l)return e.slice(0,-l.length);if(e.slice(-2)==o){var n=e.slice(0,-2);if(" "==n.slice(-1))return c?n.substring(0,a.selectionEnd):(n=n.slice(0,-1),t.session.replace(r,n),"")}return e})}}};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var a=this.textInput.getElement();a.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}),function(){ace.require(["ace/ext/spellcheck"],function(){})}(),ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,a){a.exports.createOption=function(e){var t,a=document.createElement("option");for(t in e)e.hasOwnProperty(t)&&("selected"===t?a.setAttribute(t,e[t]):a[t]=e[t]);return a},a.exports.createCheckbox=function(e,t,a){var n=document.createElement("input");return n.setAttribute("type","checkbox"),n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("value",t),n.setAttribute("class",a),t&&n.setAttribute("checked","checked"),n},a.exports.createInput=function(e,t,a){var n=document.createElement("input");return n.setAttribute("type","text"),n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("value",t),n.setAttribute("class",a),n},a.exports.createLabel=function(e,t){var a=document.createElement("label");return a.setAttribute("for",t),a.textContent=e,a},a.exports.createSelection=function(e,t,n){var i=document.createElement("select");return i.setAttribute("id",e),i.setAttribute("name",e),i.setAttribute("class",n),t.forEach(function(e){i.appendChild(a.exports.createOption(e))}),i}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,a){function n(e){for(var t=l.text,a=e.split(/[\/\\]/).pop(),n=0;n +/g,">"),u=function(e,t,a){var i=n.createElement("div");i.innerHTML=d,this.element=i.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},this.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;r.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),r.stopPropagation(e)}),r.addListener(e,"click",function(e){var a=e.target||e.srcElement,n=a.getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),r.stopPropagation(e)}),r.addCommandKeyListener(e,function(e,a,n){var i=l.keyCodeToString(n),s=t.$searchBarKb.findKeyCommand(a,i);s&&s.exec&&(s.exec(t),r.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),r.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),r.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),r.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new o([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new o,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]),this.setSearchRange=function(e){this.searchRange=e,e?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(e){n.setCssClass(this.replaceOption,"checked",this.searchRange),n.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.replaceBox.style.display=this.replaceOption.checked?"":"none",this.find(!1,!1,e)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t,a){var i=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:a,range:this.searchRange}),r=!i&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",r),this.editor._emit("findSearchBox",{match:!r}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,a=0,n=0;if(t){var i=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),r=e.session.doc.positionToIndex(e.selection.anchor);this.searchRange&&(r-=e.session.doc.positionToIndex(this.searchRange.start));for(var s,o=t.lastIndex=0;(s=t.exec(i))&&(a++,o=s.index,r>=o&&n++,!(a>c))&&(s[0]||(t.lastIndex=o+=1,!(o>=i.length))););}this.searchCounter.textContent=n+" of "+(a>c?c+"+":a)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(u.prototype),t.SearchBox=u,t.Search=function(e,t){var a=e.searchBox||new u(e);a.show(e.session.getTextRange(),t)}}),function(){ace.require(["ace/ext/searchbox"],function(){})}(),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,a){var n=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),s=e("./range").Range,o=e("./anchor").Anchor,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,d=s.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,i),this.getTokenizer=function(){function e(e,t,a){return e=e.substr(1),/^\d+$/.test(e)&&!a.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new c({start:[{regex:/:/,onMatch:function(e,t,a){return a.length&&a[0].expectIf?(a[0].expectIf=!1,a[0].elseBranch=a[0],[a[0]]):":"}},{regex:/\\./,onMatch:function(e,t,a){var n=e[1];return"}"==n&&a.length?e=n:-1!="`$\\".indexOf(n)?e=n:a.inFormatString&&("n"==n?e="\n":"t"==n?e="\n":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,a){return[a.length?a.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,a,n){var i=e(t.substr(1),a,n);return n.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,a){a[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,a){var n=a[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,a){return a[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,a){a[0]&&(a[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,a){a.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var a=t.substr(1);return(this.variables[t[0]+"__"]||{})[a]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var i=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(i);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,a){var n=t.flag||"",i=t.guard;i=new RegExp(i,n.replace(/[^gi]/,""));var r=this.tokenizeTmSnippet(t.fmt,"formatString"),s=this,o=e.replace(i,function(){s.variables.__=arguments;for(var e=s.resolveVariables(r,a),t="E",n=0;n1?(v=t[t.length-1].length,f+=t.length-1):v+=e.length,y+=e}else e.start?e.end={row:f,column:v}:e.start={row:f,column:v}});var w=e.getSelectionRange(),k=e.session.replace(w,y),x=new m(e),C=e.inVirtualSelectionMode&&e.selection.index;x.addTabstops(l,w.start,k,C)},this.insertSnippet=function(e,t){var a=this;return e.inVirtualSelectionMode?a.insertSnippetForSelection(e,t):(e.forEachSelection(function(){a.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),void(e.tabstopManager&&e.tabstopManager.tabNext()))},this.$getScope=function(e){var t=e.session.$mode.$id||"";if(t=t.split("/").pop(),"html"===t||"php"===t){"php"!==t||e.session.$mode.inlinePhp||(t="html");var a=e.getCursorPosition(),n=e.session.getState(a.row);"object"===("undefined"==typeof n?"undefined":_typeof(n))&&(n=n[0]),n.substring&&("js-"==n.substring(0,3)?t="javascript":"css-"==n.substring(0,4)?t="css":"php-"==n.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),a=[t],n=this.snippetMap;return n[t]&&n[t].includeScopes&&a.push.apply(a,n[t].includeScopes),a.push("_"),a},this.expandWithTab=function(e,t){var a=this,n=e.forEachSelection(function(){return a.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return n&&e.tabstopManager&&e.tabstopManager.tabNext(),n},this.expandSnippetForSelection=function(e,t){var a,n=e.getCursorPosition(),i=e.session.getLine(n.row),r=i.substring(0,n.column),s=i.substr(n.column),o=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(a=this.findMatchingSnippet(t,r,s)),!!a},this),a?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-a.replaceBefore.length,n.column+a.replaceAfter.length),this.variables.M__=a.matchBefore,this.variables.T__=a.matchAfter,this.insertSnippetForSelection(e,a.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,a){for(var n=e.length;n--;){var i=e[n];if((!i.startRe||i.startRe.test(t))&&(!i.endRe||i.endRe.test(a))&&(i.startRe||i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(a):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(a)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function a(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function n(e,t,n){return e=a(e),t=a(t),n?(e=t+e,e&&"$"!=e[e.length-1]&&(e+="$")):(e+=t,e&&"^"!=e[0]&&(e="^"+e)),new RegExp(e)}function i(e){e.scope||(e.scope=t||"_"),t=e.scope,s[t]||(s[t]=[],o[t]={});var a=o[t];if(e.name){var i=a[e.name];i&&l.unregister(i),a[e.name]=e}s[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=n(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=n(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0))}var s=this.snippetMap,o=this.snippetNameMap,l=this;e||(e=[]),e&&e.content?i(e):Array.isArray(e)&&e.forEach(i),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function a(e){var a=i[e.scope||t];if(a&&a[e.name]){delete a[e.name];var r=n[e.scope||t],s=r&&r.indexOf(e);s>=0&&r.splice(s,1)}}var n=this.snippetMap,i=this.snippetNameMap;e.content?a(e):Array.isArray(e)&&e.forEach(a)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,a=[],n={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=i.exec(e);){if(t[1])try{n=JSON.parse(t[1]),a.push(n)}catch(r){}if(t[4])n.content=t[4].replace(/^\t/gm,""),a.push(n),n={};else{var s=t[2],o=t[3];if("regex"==s){var l=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=l.exec(o)[1],n.trigger=l.exec(o)[1],n.endTrigger=l.exec(o)[1],n.endGuard=l.exec(o)[1]}else"snippet"==s?(n.tabTrigger=o.match(/^\S*/)[0],n.name||(n.name=o)):n[s]=o}}return a},this.getSnippetByName=function(e,t){var a,n=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(a=i[e]),!!a},this),a}}).call(u.prototype);var m=function(e){return e.tabstopManager?e.tabstopManager:(e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),void this.attach(e))};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t="r"==e.action[0],a=e.start,n=e.end,i=a.row,r=n.row,s=r-i,o=n.column-a.column;if(t&&(s=-s,o=-o),!this.$inChange&&t){var l=this.selectedTabstop,c=l&&!l.some(function(e){return d(e.start,a)<=0&&d(e.end,n)>=0});if(c)return this.detach()}for(var u=this.ranges,m=0;m0?(this.removeRange(h),m--):(h.start.row==i&&h.start.column>a.column&&(h.start.column+=o),h.end.row==i&&h.end.column>=a.column&&(h.end.column+=o),h.start.row>=i&&(h.start.row+=s),h.end.row>=i&&(h.end.row+=s),d(h.start,h.end)>0&&this.removeRange(h)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var a=this.editor.session,n=a.getTextRange(e.firstNonLinked),i=e.length;i--;){var r=e[i];if(r.linked){var s=t.snippetManager.tmStrFormat(n,r.original);a.replace(r,s)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,a=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var i=this.ranges[n].contains(e.row,e.column),r=a||this.ranges[n].contains(t.row,t.column);if(i&&r)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,a=this.index+(e||1);a=Math.min(Math.max(a,1),t),a==t&&(a=0),this.selectTabstop(a),0===a&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var a=this.editor.multiSelect;a.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||a.addRange(t[n].clone(),!0);a.ranges[0]&&a.addRange(a.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,a){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=s.fromPoints(a,a);g(n.start,t),g(n.end,t),e[0]=[n],e[0].index=0}var i=this.index,r=[i+1,0],o=this.ranges;e.forEach(function(e,a){for(var n=this.$openTabstops[a]||e,i=e.length;i--;){var l=e[i],c=s.fromPoints(l.start,l.end||l.start);p(c.start,t),p(c.end,t),c.original=l,c.tabstop=n,o.push(c),n!=e?n.unshift(c):n[i]=c,l.fmtString?(c.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=c)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(r.push(n),this.$openTabstops[a]=n),this.addTabstopMarkers(n)},this),r.length>2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),-1!=t&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(m.prototype);var h={};h.onChange=o.prototype.onChange,h.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},h.update=function(e,t,a){this.$insertRight=a,this.pos=e,this.onChange(t)};var p=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},g=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,a){return t.snippetManager.insertSnippet(this,e,a)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,a){var n=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),o=e("../lib/lang"),l=e("../lib/dom"),c=function(e){var t=new n(e);t.$maxLines=4;var a=new i(t);return a.setHighlightActiveLine(!1),a.setShowPrintMargin(!1),a.renderer.setShowGutter(!1),a.renderer.setHighlightGutterLine(!1),a.$mouseHandler.$focusWaitTimout=0,a.$highlightTagPending=!0,a},d=function(e){var t=l.createElement("div"),a=new c(t);e&&e.appendChild(t),t.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150);var n=function(){};a.focus=n,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=n,a.renderer.$cursorLayer.element.style.opacity=0,a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",function(e){var t=e.getDocumentPosition();a.selection.moveToPosition(t),u.start.row=u.end.row=t.row,e.stop()});var i,d=new r(-1,0,-1,1/0),u=new r(-1,0,-1,1/0);u.id=a.session.addMarker(u,"ace_active-line","fullLine"),a.setSelectOnHover=function(e){e?d.id&&(a.session.removeMarker(d.id),d.id=null):d.id=a.session.addMarker(d,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",function(e){if(!i)return void(i=e);if(i.x!=e.x||i.y!=e.y){i=e,i.scrollTop=a.renderer.scrollTop;var t=i.getDocumentPosition().row;d.start.row!=t&&(d.id||a.setRow(t),h(t))}}),a.renderer.on("beforeRender",function(){if(i&&-1!=d.start.row){i.$pos=null;var e=i.getDocumentPosition().row;d.id||a.setRow(e),h(e,!0)}}),a.renderer.on("afterRender",function(){var e=a.getRow(),t=a.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&l.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&l.addCssClass(n,"ace_selected"))});var m=function(){h(-1)},h=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))};a.getHoveredRow=function(){return d.start.row},s.addListener(a.container,"mouseout",m),a.on("hide",m),a.on("changeSelection",m),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(e){var t=a.data[e];return"string"==typeof t?t:t&&t.value||""};var p=a.session.bgTokenizer;return p.$tokenizeRow=function(e){var t=a.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);var i,r,s=-1;t.iconClass&&n.push({type:"icon ace_icon-"+t.iconClass,value:" "});for(var o=0;ol-2&&(c=c.substr(0,l-t.caption.length-3)+"…"),n.push({type:"rightAlignedText",value:c})}return n},p.$updateOnChange=n,p.start=n,a.session.$computeWidth=function(){return this.screenWidth=0},a.$blockScrolling=1/0,a.isOpen=!1,a.isTopdown=!1,a.data=[],a.setData=function(e){a.setValue(o.stringRepeat("\n",e.length),-1),a.data=e||[],a.setRow(0)},a.getData=function(e){return a.data[e]},a.getRow=function(){return u.start.row},a.setRow=function(e){e=Math.max(0,Math.min(this.data.length,e)),u.start.row!=e&&(a.selection.clearSelection(),u.start.row=u.end.row=e||0,a.session._emit("changeBackMarker"),a.moveCursorTo(e||0,0),a.isOpen&&a._signal("select"))},a.on("changeSelection",function(){a.isOpen&&a.setRow(a.selection.lead.row),a.renderer.scrollCursorIntoView()}),a.hide=function(){this.container.style.display="none",this._signal("hide"),a.isOpen=!1},a.show=function(e,t,n){var r=this.container,s=window.innerHeight,o=window.innerWidth,l=this.renderer,c=l.$maxLines*t*1.4,d=e.top+this.$borderSize,u=d>s/2&&!n;u&&d+t+c>s?(l.$maxPixelHeight=d-2*this.$borderSize,r.style.top="",r.style.bottom=s-d+"px",a.isTopdown=!1):(d+=t,l.$maxPixelHeight=s-d-.2*t,r.style.top=d+"px",r.style.bottom="",a.isTopdown=!0),r.style.display="",this.renderer.$textLayer.checkForSizeChanges();var m=e.left;m+r.offsetWidth>o&&(m=o-r.offsetWidth),r.style.left=m+"px",this._signal("show"),i=null,a.isOpen=!0},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a};l.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=d}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,a){t.parForEach=function(e,t,a){var n=0,i=e.length;0===i&&a();for(var r=0;i>r;r++)t(e[r],function(e,t){n++,n===i&&a(e,t)})};var n=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,a){a=a||n;for(var i=[],r=t-1;r>=0&&a.test(e[r]);r--)i.push(e[r]);return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,a){a=a||n;for(var i=[],r=t;r=t?a:t-1;break;case"down":t=t>=a?-1:t+1;break;case"start":t=0;break;case"end":t=a}this.popup.setRow(t)},this.insertMatch=function(e,t){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var a,n=this.editor.selection.getAllRanges(),i=0;a=n[i];i++)a.start.column-=this.completions.filterText.length,this.editor.session.remove(a);e.snippet?l.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();return t||e.tabstopManager?t:void e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var a=e.getSession(),n=e.getCursorPosition(),i=(a.getLine(n.row),r.getCompletionPrefix(e));this.base=a.doc.createAnchor(n.row,n.column-i.length),this.base.$insertRight=!0;var s=[],o=e.completers.length;return e.completers.forEach(function(r,l){r.getCompletions(e,a,n,i,function(n,r){!n&&r&&(s=s.concat(r));var l=e.getCursorPosition();a.getLine(l.row);t(null,{prefix:i,matches:s,finished:0===--o})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),a=this.editor.session.getTextRange({start:this.base,end:t});if(a==this.completions.filterText)return;return this.completions.setFilter(a),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=a||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,a,e):this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,a){var i=function(){return a.finished?this.detach():void 0}.bind(this),r=a.prefix,s=a&&a.matches;if(!s||!s.length)return i();if(0===r.indexOf(a.prefix)&&n==this.gatherCompletionsId){this.completions=new d(s),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(r);var o=this.completions.filtered;return o.length&&(1!=o.length||o[0].value!=r||o[0].snippet)?this.autoInsert&&1==o.length&&a.finished?this.insertMatch(o[0]):void this.openPopup(this.editor,r,e):i()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,a=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return a&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(n=e.getDocTooltip(a)),n}),n||(n=a),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=o.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var a=this.popup,n=a.container.getBoundingClientRect();t.style.top=a.container.style.top,t.style.bottom=a.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}}}).call(c.prototype),c.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new c),e.completer.autoInsert=!1,e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var d=function(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var a=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===a?!1:(a=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var a=[],n=t.toUpperCase(),i=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var o=r.value||r.caption||r.snippet;if(o){var l,c,d=-1,u=0,m=0;if(this.exactMatch){if(t!==o.substr(0,t.length))continue e}else for(var h=0;h=0&&(0>g||g>p)?p:g,0>l)continue e;c=l-d-1,c>0&&(-1===d&&(m+=10),m+=c),u|=1<",s.escapeHTML(e.caption),"","
",s.escapeHTML(e.snippet)].join(""))}},u=[d,l,c];t.setCompleters=function(e){u.length=0,e&&u.push.apply(u,e)},t.addCompleter=function(e){u.push(e)},t.textCompleter=l,t.keyWordCompleter=c,t.snippetCompleter=d;var m,h={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},p=function(e,t){g(t.session.$mode)},g=function k(e){var t=e.$id;n.files||(n.files={}),b(t),e.modes&&e.modes.forEach(k)},b=function x(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},r.loadModule(t,function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){x("ace/mode/"+e)})))})}},f=function(e){var t=e.editor,a=t.completer&&t.completer.activated;if("backspace"===e.command.name)a&&!o.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){var n=o.getCompletionPrefix(t);n&&n.length>=t.$liveAutocompletionThreshold&&!a&&(t.completer||(t.completer=new i),t.completer.autoInsert=!1,t.completer.showPopup(t))}},v=s.delayedCall(function(){f(m)},0),y=function(e){m=e,v.delay(e.editor.$liveAutocompletionDelay)},w=e("../editor").Editor;e("../config").defineOptions(w.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",y)):this.commands.removeListener("afterExec",y)},value:!1},liveAutocompletionThreshold:{value:0},liveAutocompletionDelay:{value:500},enableSnippets:{set:function(e){e?(this.commands.addCommand(h),this.on("changeMode",p),p(null,this)):(this.commands.removeCommand(h),this.off("changeMode",p))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(){})}(),ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,a){e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:""},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:""!=o.value?n="php":"support.php_tag"==o.type&&"?>"==o.value?n="html":"meta.tag.name.style"==o.type&&"css"!=n?n="css":"meta.tag.name.style"==o.type&&"css"==n?n="html":"meta.tag.name.script"==o.type&&"js"!=n?n="js":"meta.tag.name.script"==o.type&&"js"==n&&(n="html"),g=e.stepForward(),g&&0==g.type.indexOf("meta.tag.name")&&(s=g.value),"support.php_tag"==p.type&&"v;v++)u+=" ";break}if(h===!1)for(v in l)if(!(p.type!=l[v].type||l[v].value&&p.value!=l[v].value||l[v].blockTag&&-1!==d.indexOf(i)||l[v].context&&l[v].context!==n)){if(l[v].indent===!0&&m++,!l[v].dontBreak&&!b)for(u+="\n",v=0;m>v;v++)u+=" ";break}if(u+=f,"support.php_tag"==p.type&&"?>"==p.value&&(h=!1),r=i,p=o,o=g,null===o)break}else o=g;else o=e.stepForward();return u}}),ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,a){var n=e("ace/token_iterator").TokenIterator,i=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new n(e,0,0),a=(t.getCurrentToken(),e.$modeId.split("/").pop()),r=i(t,a);e.doc.setValue(r)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}),function(){ace.require(["ace/ext/beautify"],function(){})}(),ace.define("ace/mode/clickhouse_highlight_rules",["require","exports","$rootScope","module","ace/lib/oop","ace/snippets","ace/ext/language_tools","ace/mode/text_highlight_rules"],function(e,t,a){var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){var e=this,t="SELECT|CASE|THEN|DISTINCT|INSERT|UPDATE|DELETE|WHERE|AND|OR|OFFSET|HAVING|AS|FROM|WHEN|ELSE|END|TYPE|LEFT|RIGHT|JOIN|ON|OUTER|DESC|ASC|UNION|CREATE|TABLE|PRIMARY|KEY|FOREIGN|NOT|REFERENCES|INNER|CROSS|NATURAL|DATABASE|DROP|GRANT|ANY|BETWEEN|ATTACH|DETACH|CAST|WITH|BIT_AND|BIT_OR|TO|BIT_XOR|DESCRIBE|OPTIMIZE|PREWHERE|TOTALS|DATABASES|PROCESSLIST|SHOW|IF",a="INSERT\\W+INTO|RENAME\\WTABLE|IF\\W+NOT\\W+EXISTS|IF\\W+EXISTS|FORMAT\\W+Vertical|FORMAT\\W+JSONCompact|FORMAT\\W+JSONEachRow|FORMAT\\W+TSKV|FORMAT\\W+TabSeparatedWithNames|FORMAT\\W+TabSeparatedWithNamesAndTypes|FORMAT\\W+TabSeparatedRaw|FORMAT\\W+BlockTabSeparated|FORMAT\\W+CSVWithNames|FORMAT\\W+CSV|FORMAT\\W+JSON|FORMAT\\W+TabSeparated",n="true|false|NULL",i="sum|sumIf|avg|avgIf",r="date|integer|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|float64|datetime|enum8|enum16|fixedstring|array|tuple|stringMergeTree|SummingMergeTree|ReplacingMergeTree|ReplicatedMergeTree|Buffer|ReplicatedCollapsingMergeTree|CollapsingMergeTree|AggregatingMergeTree|Merge|Memory|GraphiteMergeTree|ReplicatedAggregatingMergeTree|ReplicatedSummingMergeTree",s=["IF NOT EXISTS","RENAME TABLE","IF EXISTS","GROUP BY","ORDER BY","UNION ALL","FORMAT JSON","FORMAT JSONCompact","FORMAT JSONEachRow","FORMAT TSV","FORMAT TabSeparated","FORMAT TabSeparatedWithNames","FORMAT TabSeparatedWithNamesAndTypes","FORMAT TabSeparatedRaw","FORMAT BlockTabSeparated","FORMAT TSKV","FORMAT CSV","FORMAT CSVWithNames","SYSTEM RELOAD CONFIG","DROP TEMPORARY TABLE","EXISTS TEMPORARY TABLE","SYSTEM RELOAD DICTIONARY","SYSTEM RELOAD DICTIONARIES","SYSTEM DROP DNS CACHE","SYSTEM SHUTDOWN","SYSTEM KILL","CLEAR COLUMN IN PARTITION"],o=["DRAW_GMAPS","DRAW_GRAPH","DRAW_PLOTLY","DRAW_CALENDAR","DRAW_TEXT","DRAW_HEATMAP","DRAW_CHART","DRAW_BAR","DRAW_GRIDCHART","DRAW_FLATTREE","DRAW_RIVER","DRAW_RAW","DRAW_SANKEYS","DRAW_TREEMAP","DRAW_C3","DRAW_MAP"],l="";if(window.aceJSRules&&window.aceJSRules.builtinFunctions){if(window.aceJSRules.builtinFunctions){var c=[];window.aceJSRules.builtinFunctions.forEach(function(e){c.push(e.name)}),i=c.join("|")}_.isArray(window.aceJSRules.tables)&&(l=window.aceJSRules.tables.join("|"))}var d="";d=window.global_delimiter?new RegExp(window.global_delimiter):new RegExp(";;");var u=[],m=t.toLowerCase();window.aceJSRules&&_.isArray(window.aceJSRules.fieldsList)&&window.aceJSRules.fieldsList.forEach(function(e){var t=e.name.toLowerCase()+"|";m.indexOf(t)>-1||u.push(e.name)});var h=this.createKeywordMapper({"support.function":i,keyword:t,"constant.language":n,"storage.type":r,"markup.bold":l,"markup.heading":u.join("|")},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$",caseInsensitive:!0},{token:"comment.block",start:"```",end:"```"},{token:"keyword",regex:"GROUP\\W+BY|ON\\W+CLUSTER|ORDER\\W+BY|LIMIT\\W+\\d+\\W*,\\W*\\d+|LIMIT\\W+\\d+\\W+BY\\W+|LIMIT\\W+\\d+"},{token:"variable.language",regex:/\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/@[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/\:[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable.language",regex:/\{[\w]+(?:\[[\w\]+]|[=\-]>\w+)\}?/},{token:"comment",start:"/\\*",end:"\\*/"},{token:"constant",regex:'".*?"'},{token:"keyword",regex:a},{token:"invalid.illegal",regex:o.join("|")},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:h,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"constant.character.escape",regex:d},{token:"punctuation",regex:/[?:,;.]/},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(\\{]"},{token:"paren.rparen",regex:"[\\)\\}]"},{token:"text",regex:"\\s+"}]},this.normalizeRules(),this.completions=[],this.getCompletions=function(){return e.completions},this.addCompletions=function(e,t,a,n,i,r,s){this.completions.push({name:e,value:t,caption:a,score:n,meta:i,iconClass:r,docHTML:s})},this.addCompletionsDictionaries=function(e){this.addCompletions(e.dic,e.dic,e.title,0,"dic","dict",this.makeCompletionsDocFunctions(e.title,e.dic))},this.addCompletionsFunctions=function(e){this.addCompletions(e.name,e.name+"( )",e.name+"( )",e.score,"function","function",this.makeCompletionsDocFunctions(e.name,e.origin,e.comb))},this.addCompletionsTableFiled=function(e){var t=e.table+"."+e.name,a=e.name,n="type:"+e.type+"

default_type:"+e.default_type+"
"+e.default_expression;this.addCompletions(t,a,a,100,e.type,"field",this.makeCompletionsdocHTML(t,n))},this.addArrayCompletions=function(e,t,a){var n=this;e.forEach(function(e){n.addCompletions(e,e,e,0,t,a,!1)})},this.setKeywords=function(e){console.log("setKeywords > ",e),this.keywordRule.onMatch=this.createKeywordMapper(e,"identifier")},this.makeCompletionsDocFunctions=function(e,t,a){if(!window.global_chFunctionsHelp)return!1;if(!window.global_chFunctionsHelp.functions)return!1;var n="",i=e;if("undefined"!=typeof window.global_chFunctionsHelp.functions[e]?i=e:"undefined"!=typeof window.global_chFunctionsHelp.functions[t]&&(i=t),"undefined"!=typeof window.global_chFunctionsHelp.functions[i]){var r="en",s=window.global_chFunctionsHelp.functions[i],o="",l="";s.desc&&(o=s.bracket,l=s.desc[r],l||(l=s.desc.en?s.desc.en:s.desc.ru)),l&&(l=l.replace(/\.\s*/gm,".
")),n=''+e+o+'
'+l+" "}else n=''+e+"( )
"+t;return n+'
'},this.makeCompletionsdocHTML=function(e,t){return'
'+e+"
"+t+"
"},this.addArrayCompletions(t.split("|"),"keyword","keyword"),this.addArrayCompletions(s,"keyword","keyword"),this.addArrayCompletions(o,"draw","draw"),this.addArrayCompletions(r.split("|"),"type","type")};n.inherits(r,i),t.ClickhouseHighlightRules=r}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,a){var n=e("ace/range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var a=e.getLine(t),i=a.match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,s=e.findMatchingBracket({row:t,column:r});if(!s||s.row==t)return 0;var o=this.$getIndent(e.getLine(s.row));e.replace(new n(t,0,t,r-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/clickhouse_FoldMode",["$rootScope","require","exports","module","ace/lib/oop","ace/range","ace/mode/sqlserver","ace/mode/folding/cstyle"],function(e,t,a){var n=e("../lib/oop"),i=e("ace/mode/folding/cstyle").FoldMode,r=(e("ace/range").Range,e("ace/token_iterator").TokenIterator),s=t.FoldMode=function(){};n.inherits(s,i),function(){this.foldingRules="cStyle",this.foldingStartMarker=/\(|\{/,this.getFoldWidgetRange=function(e,t,a,n){for(var i=new r(e,a,0),s=i.getCurrentToken(),o=!1;s;){var l=s,c=i.getCurrentTokenPosition();if(s=i.stepForward(),"paren.lparen"!=l.type||"("!=l.value&&"{"!=l.value||(o=e.getBracketRange(c)),o)break}return o}}.call(s.prototype)}),window.global_chFunctionsHelp={functions:{corr:{bracket:"(x, y)",desc:{en:'Calculates the Pearson correlation coefficient: Σ((x - x̅)(y - y̅)) / sqrt(Σ((x - x̅)2) * Σ((y - y̅)2)).'}},stddevPop:{bracket:"(x)",desc:{en:"The result is equal to the square root of 'varPop(x)'."}},varPop:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / n%%."}},argMin:{bracket:"(arg, val)",desc:{en:"Calculates the 'arg' value for a minimal 'val' value. If there are several different values of 'arg' for minimal values of 'val', the first of these values encountered is output."}},quantileExactWeighted:{bracket:"(level)(x, weight)",desc:{en:"Вычисляет квантиль уровня level точно."}},min:{bracket:"(v)",desc:{en:"Minimal execution speed in rows per second. Checked on every data block when 'timeout_before_checking_execution_speed' expires. If the execution speed is lower, an exception is thrown."}},varSamp:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / (n - 1)%%.

Returns Float64. If n <= 1, it returns +∞."}},anyLast:{bracket:"(x)",desc:{en:"Selects the last value encountered.
The result is just as indeterminate as for the 'any' function."}},argMax:{bracket:"(arg, val)",desc:{en:"Calculates the 'arg' value for a maximum 'val' value. If there are several different values of 'arg' for maximum values of 'val', the first of these values encountered is output."}},count:{bracket:"()",desc:{en:"Counts the number of rows. "}},any:{bracket:"(x)",desc:{en:"Selects the last value encountered.
The result is just as indeterminate as for the 'any' function."}},avg:{bracket:"(x)",desc:{en:"Calculates the average.
Only works for numbers.
The result is always Float64."}},sequenceMatch:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"Pattern matching for event chains.

'pattern' is a string containing a pattern to match."}},stddevSamp:{bracket:"(x)",desc:{en:"The result is equal to the square root of 'varSamp(x)'."}},medianDeterministic:{bracket:"(x, determinator)",desc:{en:"This function works similarly to the 'median' function - it approximates the median."}},quantilesTimingWeighted:{bracket:"(level1, level2, ...)(x, weight)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianTimingWeighted' function."}},uniq:{bracket:"(N)(x)",desc:{en:"Calculates the number of different argument values, if it is less than or equal to N.
If the number of different argument values is greater than N, it returns N + 1."}},covarSamp:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / (n - 1)%%.

Returns Float64. If n <= 1, it returns +∞."}},max:{bracket:"(v)",desc:{en:"Maximum number of bytes (uncompressed data) that can be passed to a remote server or saved in a temporary table when using GLOBAL IN."}},quantileTDigest:{bracket:"(level)(x)",desc:{en:"t-digest"}},quantilesTiming:{bracket:"(level1, level2, ...)(x, weight)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianTimingWeighted' function."}},quantiles:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},quantile:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},groupArray:{bracket:"(x)",desc:{en:"Creates an array of argument values.
Values can be added to the array in any (indeterminate) order.

In some cases, you can rely on the order of execution. This applies to cases when SELECT comes from a subquery that uses ORDER BY."}},sum:{bracket:"(x)",desc:{en:"Calculates the sum.
Only works for numbers."}},median:{bracket:"(x, weight)",desc:{en:"Differs from the 'medianTiming' function in that it has a second argument - "weights". Weight is a non-negative integer.
The result is calculated as if the 'x' value were passed 'weight' number of times to the 'medianTiming' function."}},quantileTiming:{bracket:"(level)(x, weight)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianTimingWeighted' function."}},quantileTimingWeighted:{bracket:"(level)(x, weight)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianTimingWeighted' function."}},groupUniqArray:{bracket:"(x)",desc:{en:"Creates an array from different argument values. Memory consumption is the same as for the 'uniqExact' function."}},uniqHLL12:{bracket:"(x)",desc:{en:"Uses the HyperLogLog algorithm to approximate the number of different values of the argument. "}},covarPop:{bracket:"(x, y)",desc:{en:"Calculates the value of %%Σ((x - x̅)(y - y̅)) / n%%."}},sequenceCount:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"sequenceMatch"}},quantileDeterministic:{bracket:"(level)(x, determinator)",desc:{en:"Calculates the quantile of 'level' using the same algorithm as the 'medianDeterministic' function."}},quantileExact:{bracket:"(level)(x, weight)",desc:{en:""}},quantilesDeterministic:{bracket:"(level1, level2, ...)(x, determinator)",desc:{en:"Calculates the quantiles of all specified levels using the same algorithm as the 'medianDeterministic' function."}},medianTiming:{bracket:"(x, weight)",desc:{en:"Differs from the 'medianTiming' function in that it has a second argument - "weights"."}},medianTimingWeighted:{bracket:"(x, weight)",desc:{ru:"",en:"Differs from the 'medianTiming' function in that it has a second argument - "weights"."}},uniqExact:{bracket:"(x)",desc:{en:"Calculates the number of different values of the argument, exactly.
There is no reason to fear approximations, so it's better to use the 'uniq' function.
You should use the 'uniqExact' function if you definitely need an exact result. "}},uniqCombined:{bracket:"(x)",desc:{en:""}},uniqUpTo:{bracket:"(N)(x)",desc:{en:"Calculates the number of different argument values, if it is less than or equal to N.
If the number of different argument values is greater than N, it returns N + 1."}},substring:{bracket:"(s, offset, length)",desc:{en:"The same as 'substring', but for Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception)."}},notLike:{bracket:"(haystack, pattern), haystack NOT LIKE pattern operator",desc:{en:"The same thing as 'like', but negative."}},hostName:{bracket:"()",desc:{en:"Returns a string with the name of the host that this function was performed on. For distributed processing, this is the name of the remote server host, if the function is performed on a remote server."}},globalNotIn:{bracket:"(v)",desc:{en:"See the section "IN operators"."}},or:{bracket:"(v)",desc:{en:"The same thing as 'max_temporary_columns', but without counting constant columns.
Note that constant columns are formed fairly often when running a query, but they require approximately zero computing resources."}},extractAll:{bracket:"(haystack, pattern)",desc:{en:"Extracts all the fragments of a string using a regular expression. If 'haystack' doesn't match the 'pattern' regex, an empty string is returned. Returns an array of strings consisting of all matches to the regex."}},arrayFirst:{bracket:"(func, arr1, ...)",desc:{en:"Returns the index of the first element in the 'arr1' array for which 'func' returns something other than 0."}},notEquals:{bracket:"(v)",desc:{ru:"",en:""}},arrayExists:{bracket:"([func,] arr1, ...)",desc:{en:"Returns 1 if there is at least one element in 'arr' for which 'func' returns something other than 0. Otherwise, it returns 0."}},arrayCount:{bracket:"([func,] arr1, ...)",desc:{en:"Returns the number of elements in 'arr' for which 'func' returns something other than 0. If 'func' is not specified, it returns the number of non-zero items in the array."}},arrayMap:{bracket:"(func, arr1, ...)",desc:{en:"Returns an array obtained from the original application of the 'func' function to each element in the 'arr' array."}},now:{bracket:"(v)",desc:{en:"If the parameter is true, INSERT operation will skip columns with unknown names from input.
Otherwise, an exception will be generated, it is default behavior.
The parameter works only for JSONEachRow and TSKV input formats."}},intDiv:{bracket:"(a, b)",desc:{en:"Differs from 'intDiv' in that it returns zero when dividing by zero or when dividing a minimal negative number by minus one."}},topLevelDomain:{bracket:"(v)",desc:{en:"- Selects the top-level domain. Example: .ru."}},intHash32:{bracket:"(v)",desc:{en:"Calculates a 32-bit hash code from any type of integer.
This is a relatively fast non-cryptographic hash function of average quality for numbers."}},replaceOne:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replaces the first occurrence, if it exists, of the 'pattern' substring in 'haystack' with the 'replacement' substring.
Hereafter, 'pattern' and 'replacement' must be constants."}},cityHash64:{bracket:"(v)",desc:{en:"Calculates CityHash64 from a string or a similar hash function for any number of any type of arguments.
For String-type arguments, CityHash is used. This is a fast non-cryptographic hash function for strings with decent quality"}},OSToRoot:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the operating system from the Yandex.Metrica dictionary. If any OS matches the passed number, it returns a UInt8 number - the ID of the corresponding root OS (for example, it converts Windows Vista to Windows). Otherwise, returns 0."}},sipHash128:{bracket:"(v)",desc:{en:"Calculates SipHash from a string.
Accepts a String-type argument. Returns FixedString(16).
Differs from sipHash64 in that the final xor-folding state is only done up to 128 bits."}},SHA1:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32)."}},asin:{bracket:"(x)",desc:{en:"The arc sine."}},SHA256:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32)."}},MD5:{bracket:"(v)",desc:{en:"Calculates the MD5 from a string and returns the resulting set of bytes as FixedString(16)."}},bitmaskToList:{bracket:"(num)",desc:{en:"Accepts an integer. Returns a string containing the list of powers of two that total the source number when summed. They are comma-separated without spaces in text format, in ascending order."}},array:{bracket:"(v)",desc:{en:"The -%%Array%% suffix can be appended to any aggregate function. In this case, the aggregate function takes arguments of the 'Array(T)' type (arrays) instead of 'T' type arguments. If the aggregate function accepts multiple arguments, this must be arrays of equal lengths. "}},dictGetStringOrDefault:{bracket:"(v)",desc:{ru:"%%dictGetT('dict_name', 'attr_name', id, default)%%
Аналогично функциям dictGetT, но значение по умолчанию берётся из последнего аргумента функции.",en:""}},greaterOrEquals:{bracket:"(v)",desc:{ru:"",en:""}},e:{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},runningDifference:{bracket:"(x)",desc:{en:"Calculates the difference between consecutive values in the data block.
Result of the function depends on the order of the data in the blocks.

It works only inside of the each processed block of data. Data splitting in the blocks is not explicitly controlled by the user. "}},not:{bracket:"(v)",desc:{ru:'Смотрите раздел "Операторы IN".',en:"See the section "IN operators"."}},intHash64:{bracket:"(v)",desc:{en:"Calculates a 64-bit hash code from any type of integer.
It works faster than intHash32. Average quality."}},acos:{bracket:"(x)",desc:{ru:"Арккосинус.",en:"The arc cosine."}},dictGetString:{bracket:"(v)",desc:{en:""}},and:{bracket:"(x, determinator)",desc:{en:"This function works similarly to the 'median' function - it approximates the median. However, in contrast to 'median', the result is deterministic and does not depend on the order of query execution.

To achieve this, the function takes a second argument - the "determinator". "}},dictGetDate:{bracket:"(v)",desc:{ru:"",en:""}},dictGetFloat32:{bracket:"(v)",desc:{ru:"",en:""}},dictGetInt8:{bracket:"(v)",desc:{ru:"",en:""}},dictGetUInt32:{bracket:"(v)",desc:{ru:"",en:""}},OSIn:{bracket:"(lhs, rhs)",desc:{en:"Checks whether the 'lhs' operating system belongs to the 'rhs' operating system."}},arrayFirstIndex:{bracket:"(func, arr1, ...)",desc:{en:"Returns the index of the first element in the 'arr1' array for which 'func' returns something other than 0."}},ceil:{bracket:"(x[, N])",desc:{en:"Returns the smallest round number that is greater than or equal to 'x'. In every other way, it is the same as the 'floor' function (see above)."}},fragment:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},dictGetUInt8:{bracket:"(v)",desc:{ru:"",en:""}},dictHas:{bracket:"(v)",desc:{ru:"%%dictHas('dict_name', id)%%
- проверить наличие ключа в словаре. Возвращает значение типа UInt8, равное 0, если ключа нет и 1, если ключ есть.",en:""}},arraySum:{bracket:"([func,] arr1, ...)",desc:{en:"Returns the sum of the 'func' values. If the function is omitted, it just returns the sum of the array elements."}},emptyArrayDateTime:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},intDivOrZero:{bracket:"(a, b)",desc:{en:"Differs from 'intDiv' in that it returns zero when dividing by zero or when dividing a minimal negative number by minus one."}},SEHierarchy:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the search engine from the Yandex.Metrica dictionary. Returns an array with a hierarchy of search engines. Similar to the 'regionHierarchy' function."}},regionToContinent:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a continent. In every other way, this function is the same as 'regionToCity'.
Example: %%regionToContinent(toUInt32(213)) = 10001%% converts Moscow (213) to Eurasia (10001)."}},dictGetInt32:{bracket:"(v)",desc:{ru:"",en:""}},toInt8:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},materialize:{bracket:"(x)",desc:{en:"Turns a constant into a full column containing just one value.
In ClickHouse, full columns and constants are represented differently in memory. Functions work differently for constant arguments and normal arguments (different code is executed), although the result is almost always the same. This function is for debugging this behavior."}},regionToCountry:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a country. In every other way, this function is the same as 'regionToCity'.
Example: %%regionToCountry(toUInt32(213)) = 225%% converts Moscow (213) to Russia (225)."}},dictGetDateTime:{bracket:"(v)",desc:{ru:"",en:""}},xor:{bracket:"(v)",desc:{ru:"",en:""}},regionToCity:{bracket:"(id[, geobase])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. If this region is a city or part of a city, it returns the region ID for the appropriate city. Otherwise, returns 0."}},dictGetFloat64:{bracket:"(v)",desc:{ru:"",en:""}},timeSlot:{bracket:"(StartTime, Duration)",desc:{en:"For a time interval starting at 'StartTime' and continuing for 'Duration' seconds, it returns an array of moments in time, consisting of points from this interval rounded down to the half hour."}},toTime:{bracket:"(v)",desc:{en:"Converts a date with time to the date of the start of the Unix Epoch, while preserving the time."}},log2:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the binary logarithm of the argument."}},toRelativeHourNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the hour, starting from a certain fixed point in the past."}},toRelativeDayNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the day, starting from a certain fixed point in the past."}},toRelativeWeekNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the week, starting from a certain fixed point in the past."}},splitByString:{bracket:"(separator, s)",desc:{en:"The same as above, but it uses a string of multiple characters as the separator. The string must be non-empty."}},currentDatabase:{bracket:"()",desc:{en:"Returns the name of the current database.
You can use this function in table engine parameters in a CREATE TABLE query where you need to specify the database."}},toRelativeMonthNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the month, starting from a certain fixed point in the past."}},visibleWidth:{bracket:"(x)",desc:{en:"Calculates the approximate width when outputting values to the console in text format (tab-separated). This function is used by the system for implementing Pretty formats."}},bitShiftRight:{bracket:"(a, b)",desc:{en:""}},toRelativeYearNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the year, starting from a certain fixed point in the past."}},toStartOfHour:{bracket:"(v)",desc:{en:"Rounds down a date with time to the start of the hour."}},halfMD5:{bracket:"(v)",desc:{en:"Calculates the MD5 from a string. Then it takes the first 8 bytes of the hash and interprets them as UInt64 in big endian."}},toStartOfFiveMinute:{bracket:"(v)",desc:{en:""}},toUInt16OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument."}},toMonday:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the nearest Monday.
Returns the date."}},IPv6NumToString:{bracket:"(x)",desc:{en:"Accepts a FixedString(16) value containing the IPv6 address in binary format. Returns a string containing this address in text format. "}},indexOf:{bracket:"(arr, x)",desc:{ru:"Возвращает индекс элемента x (начиная с 1), если он есть в массиве, или 0, если его нет.",en:"Returns the index of the 'x' element (starting from 1) if it is in the array, or 0 if it is not."}},today:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает текущую дату на один из моментов выполнения запроса.
То же самое, что toDate(now())",en:"Accepts zero arguments and returns the current date at one of the moments of request execution.
The same as 'toDate(now())'."}},emptyArrayToSingle:{bracket:"(v)",desc:{ru:"Принимает пустой массив и возвращает массив из одного элемента, равного значению по умолчанию.",en:"Accepts an empty array as argument and returns an array of one element equal to the default value."}},sleep:{bracket:"(seconds)",desc:{ru:"Спит seconds секунд на каждый блок данных. Можно указать как целое число, так и число с плавающей запятой.",en:"Sleeps 'seconds' seconds on each data block. You can specify an integer or a floating-point number."}},extract:{bracket:"(params, name)",desc:{en:"Parses the string in double quotes. The value is unescaped. If unescaping failed, it returns an empty string. Examples: "}},emptyArrayInt8:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},regionToName:{bracket:"(id[, lang])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. A string with the name of the language can be passed as a second argument. Supported languages are: ru, en, ua, uk, by, kz, tr. If the second argument is omitted, the language 'ru' is used. "}},concat:{bracket:"(arr[, separator])",desc:{ru:"Склеивает строки, перечисленные в массиве, с разделителем separator.
separator - необязательный параметр, константная строка, по умолчанию равен пустой строке.
Возвращается строка.",en:"Concatenates strings from the array elements, using 'separator' as the separator.
'separator' is a string constant, an optional parameter. By default it is an empty string.
Returns a string."}},convertCharset:{bracket:"(s, from, to)",desc:{ru:"Возвращает сконвертированную из кодировки from в кодировку to строку s.",en:"Returns a string with the data %%s%% (encoded as %%from%% charset) that was converted to the %%to%% charset."}},toMonth:{bracket:"(v)",desc:{ru:"Переводит дату или дату-с-временем в число типа UInt8, содержащее номер месяца (1-12).",en:"Converts a date or date with time to a UInt8 number containing the month number (1-12)."}},IPv6StringToNum:{bracket:"(s)",desc:{ru:"Функция, обратная к IPv6NumToString. Если IPv6 адрес в неправильном формате, то возвращает строку из нулевых байт.
HEX может быть в любом регистре.",en:"The reverse function of IPv6NumToString. If the IPv6 address has an invalid format, it returns a string of null bytes.
HEX can be uppercase or lowercase."}},emptyArrayString:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},uptime:{bracket:"()",desc:{ru:"Возвращает аптайм сервера в секундах.",en:"Returns server's uptime in seconds."}},blockSize:{bracket:"()",desc:{en:"Gets the size of the block.
In ClickHouse, queries are always run on blocks (sets of column parts). This function allows getting the size of the block that you called it for."}},toInt64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},pathFull:{bracket:"(v)",desc:{ru:"То же самое, но включая query string и fragment. Пример: /top/news.html?page=2#comments",en:"- The same as above, but including query-string and fragment. Example: /top/news.html?page=2#comments"}},emptyArrayDate:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},emptyArrayInt64:{bracket:"(v)",desc:{ +ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},toInt32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},greater:{bracket:"(v)",desc:{ru:"",en:""}},emptyArrayInt32:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},toString:{bracket:"(str)",desc:{ru:"Принимает значение типа FixedString(16). Возвращает строку из 36 символов в текстовом виде.",en:"Accepts a FixedString(16) value containing the UUID in the binary format. Returns a readable string containing the UUID in the text format."}},greatest:{bracket:"(a, b)",desc:{ru:"Возвращает наибольшее значение из a и b.",en:"Returns the greatest element of a and b."}},emptyArrayUInt64:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},emptyArrayUInt32:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},formatReadableSize:{bracket:"(x)",desc:{en:"Gets a size (number of bytes). Returns a string that contains rounded size with the suffix (KiB, MiB etc.).

Example:

%% "}},toInt16OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},emptyArrayUInt8:{bracket:"(v)",desc:{ru:"Принимает ноль аргументов и возвращает пустой массив соответствующего типа.",en:"Accepts zero arguments and returns an empty array of the appropriate type."}},protocol:{bracket:"(v)",desc:{ru:"Возвращает протокол. Примеры: http, ftp, mailto, magnet...",en:"- Selects the protocol. Examples: http, ftp, mailto, magnet..."}},regionToPopulation:{bracket:"(id[, geobase])",desc:{en:"Gets the population for a region.
The population can be recorded in files with the geobase. See the section "External dictionaries".
If the population is not recorded for the region, it returns 0.
In the Yandex geobase, the population might be recorded for child regions, but not for parent regions."}},notIn:{bracket:"(v)",desc:{ru:'Смотрите раздел "Операторы IN".',en:"See the section "IN operators"."}},position:{bracket:"(haystack, needle)",desc:{en:"The same as 'position', but the position is returned in Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
There's also positionCaseInsensitiveUTF8 function."}},arrayElement:{bracket:"(arr, n), arr[n] operator",desc:{en:"Get the element with the index 'n' from the array 'arr'.
'n' should be any integer type.
Indexes in an array begin from one.
Negative indexes are supported - in this case, it selects the corresponding element numbered from the end. "}},toStringCutToZero:{bracket:"(s)",desc:{en:"Accepts a String or FixedString argument. Returns a String that is cut to a first null byte occurrence."}},log:{bracket:"(x)",desc:{ru:"Принимает числовой аргумент, возвращает число типа Float64, близкое к десятичному логарифму от аргумента.",en:"Accepts a numeric argument and returns a Float64 number close to the decimal logarithm of the argument."}},SEIn:{bracket:"(lhs, rhs)",desc:{ru:"Проверяет принадлежность поисковой системы lhs поисковой системе rhs.",en:"Checks whether the 'lhs' search engine belongs to the 'rhs' search engine."}},replicate:{bracket:"(v)",desc:{en:"Create a MergeTree table with a different name. Move all the data from the directory with the ReplicatedMergeTree table data to the new table's data directory."}},sipHash64:{bracket:"(v)",desc:{en:'Calculates SipHash from a string.
Accepts a String-type argument. Returns UInt64.
SipHash is a cryptographic hash function. It works at least three times faster than MD5. For more information, see https://131002.net/siphash/'}},emptyArrayUInt16:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},hex:{bracket:"(str)",desc:{en:"Accepts a string containing any number of hexadecimal digits, and returns a string containing the corresponding bytes. Supports both uppercase and lowercase letters A-F. The number of hexadecimal digits doesn't have to be even."}},regionToDistrict:{bracket:"(id[, geobase])",desc:{en:"Converts a region to a federal district (type 4 in the geobase). In every other way, this function is the same as 'regionToCity'. "}},arrayFilter:{bracket:"(func, arr1, ...)",desc:{en:"Returns an array containing only the elements in 'arr1' for which 'func' returns something other than 0.

Examples:

%%
SELECT arrayFilter(x -> x LIKE '%World%', ['Hello', 'abc World']) AS res "}},toStartOfQuarter:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the first day of the quarter.
The first day of the quarter is either 1 January, 1 April, 1 July, or 1 October. Returns the date."}},divide:{bracket:"(a, b), a / b operator",desc:{en:"Calculates the quotient of the numbers. The result type is always a floating-point type.
It is not integer division. For integer division, use the 'intDiv' function.
When dividing by zero you get 'inf', '-inf', or 'nan'."}},reverseUTF8:{bracket:"(v)",desc:{en:"Reverses a sequence of Unicode code points, assuming that the string contains a set of bytes representing a UTF-8 text. Otherwise, it does something else (it doesn't throw an exception)."}},toDate:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},emptyArrayFloat64:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},abs:{bracket:"(s, c)",desc:{en:"If the %%s%% string is non-empty and does not contain the %%c%% character at the end, it appends the %%c%% character to the end."}},yesterday:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns yesterday's date at one of the moments of request execution.
The same as 'today() - 1'."}},toMinute:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the minute of the hour (0-59)."}},bitXor:{bracket:"(a, b)",desc:{en:""}},minus:{bracket:"(a, b), a - b operator",desc:{en:"Calculates the difference. The result is always signed.

You can also calculate whole numbers from a date or date with time. The idea is the same - see above for 'plus'."}},toDateTime:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},modulo:{bracket:"(a, b), a % b operator",desc:{en:"Calculates the remainder after division.
If arguments are floating-point numbers, they are pre-converted to integers by dropping the decimal portion. The remainder is taken in the same sense as in C++. Truncated division is used for negative numbers.
An exception is thrown when dividing by zero or when dividing a minimal negative number by minus one."}},bitmaskToArray:{bracket:"(num)",desc:{en:"Accepts an integer. Returns an array of UInt64 numbers containing the list of powers of two that total the source number when summed. Numbers in the array are in ascending order."}},negate:{bracket:"(a), -a operator",desc:{en:"Calculates a number with the reverse sign. The result is always signed."}},emptyArrayFloat32:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},range:{bracket:"(N)",desc:{en:"Returns an array of numbers from 0 to N-1.
Just in case, an exception is thrown if arrays with a total length of more than 100,000,000 elements are created in a data block."}},arrayAll:{bracket:"([func,] arr1, ...)",desc:{en:"Returns 1 if 'func' returns something other than 0 for all the elements in 'arr'. Otherwise, it returns 0."}},toInt32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},unhex:{bracket:"(str)",desc:{en:"Accepts a string containing any number of hexadecimal digits, and returns a string containing the corresponding bytes. Supports both uppercase and lowercase letters A-F. The number of hexadecimal digits doesn't have to be even. If it is odd, the last digit is interpreted as the younger half of the 00-0F byte. If the argument string contains anything other than hexadecimal digits, some implementation-defined result is returned (an exception isn't thrown).
If you want to convert the result to a number, you can use the functions 'reverse' and 'reinterpretAsType'."}},toFloat64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},bitAnd:{bracket:"(a, b)",desc:{ru:"",en:""}},toStartOfYear:{bracket:"(v)",desc:{en:"Rounds down a date or date with time to the first day of the year.
Returns the date."}},bitOr:{bracket:"(a, b)",desc:{ru:"",en:""}},SEToRoot:{bracket:"(v)",desc:{en:"Accepts a UInt8 number - the ID of the search engine from the Yandex.Metrica dictionary. If any search engine matches the passed number, it returns a UInt8 number - the ID of the corresponding root search engine (for example, it converts Yandex.Images to Yandex). Otherwise, returns 0."}},toRelativeMinuteNum:{bracket:"(v)",desc:{en:"Converts a date with time or date to the number of the minute, starting from a certain fixed point in the past."}},visitParamExtractInt:{bracket:"(params, name)",desc:{ru:"Аналогично для Int64.",en:"The same as for Int64."}},emptyArrayInt16:{bracket:"(v)",desc:{en:"Accepts zero arguments and returns an empty array of the appropriate type."}},visitParamExtractString:{bracket:"(params, name)",desc:{en:"Parses the string in double quotes. The value is unescaped. If unescaping failed, it returns an empty string. "}},arrayEnumerateUniq:{bracket:"(arr, ...)",desc:{en:"Returns an array the same size as the source array, indicating for each element what its position is among elements with the same value. "}},visitParamExtractUInt:{bracket:"(params, name)",desc:{en:"Parses UInt64 from the value of the field named 'name'. If this is a string field, it tries to parse a number from the beginning of the string. If the field doesn't exist, or it exists but doesn't contain a number, it returns 0."}},toTypeName:{bracket:"(x)",desc:{en:"Gets the type name. Returns a string containing the type name of the passed argument."}},empty:{bracket:"(v)",desc:{en:"Accepts an empty array as argument and returns an array of one element equal to the default value."}},multiply:{bracket:"(a, b), a * b operator",desc:{en:"Calculates the product of the numbers."}},has:{bracket:"('database', 'table', 'column')",desc:{ru:"",en:"Accepts constant String columns - database name, table name and column name. Returns constant UInt8 value, equal to 1 if column exists,
otherwise 0.
If table doesn't exist than exception is thrown.
For elements of nested data structure function checks existence of column. For nested data structure 0 is returned."}},bitNot:{bracket:"(a)",desc:{ru:"",en:""}},lessOrEquals:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},reinterpretAsInt64:{bracket:"(v)",desc:{en:""}},IPv4NumToString:{bracket:"(num)",desc:{en:"Similar to IPv4NumToString, but using %%xxx%% instead of the last octet. "}},bitShiftLeft:{bracket:"(a, b)",desc:{ru:"",en:""}},dictGetInt16:{bracket:"(v)",desc:{ru:"",en:""}},toUInt32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},regionIn:{bracket:"(lhs, rhs[, geobase])",desc:{en:"Checks whether a 'lhs' region belongs to a 'rhs' region. Returns a UInt8 number equal to 1 if it belongs, or 0 if it doesn't belong.
The relationship is reflexive - any region also belongs to itself."}},reinterpretAsUInt8:{bracket:"(v)",desc:{en:""}},dictIsIn:{bracket:"(v)",desc:{en:"%%dictIsIn('dict_name', child_id, ancestor_id)%%
- For the 'dict_name' hierarchical dictionary, finds out whether the 'child_id' key is located inside 'ancestor_id' (or matches 'ancestor_id'). Returns UInt8."}},toSecond:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the second in the minute (0-59).
Leap seconds are not accounted for."}},least:{bracket:"(a, b)",desc:{en:"Returns the least element of a and b."}},countEqual:{bracket:"(arr, x)",desc:{en:'Returns the number of elements in the array equal to 'x'. Equivalent to arrayCount(elem -> elem = x, arr).'}},IPv4StringToNum:{bracket:"(s)",desc:{en:"The reverse function of IPv4NumToString. If the IPv4 address has an invalid format, it returns 0."}},replaceRegexpAll:{bracket:"(haystack, pattern, replacement)",desc:{en:"This does the same thing, but replaces all the occurrences"}},SHA224:{bracket:"(v)",desc:{en:"Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32).
The function works fairly slowly (SHA-1 processes about 5 million short strings per second per processor core, while SHA-224 and SHA-256 process about 2.2 million). "}},URLHash:{bracket:"(url[, N])",desc:{en:"A fast, decent-quality non-cryptographic hash function for a string obtained from a URL using some type of normalization.
URLHash(s) - Calculates a hash from a string without one of the trailing symbols /,? or # at the end, if present"}},equals:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},plus:{bracket:"(a, b), a + b operator",desc:{ru:"Вычисляет сумму чисел.

Также можно складывать целые числа с датой и датой-с-временем. В случае даты, прибавление целого числа означает прибавление соответствующего количества дней. В случае даты-с-временем - прибавление соответствующего количества секунд.",en:"Calculates the sum of the numbers.

You can also add whole numbers with a date or date and time. In the case of a date, adding a whole number means adding the corresponding number of days. For a date with time, it means adding the corresponding number of seconds."}},less:{bracket:"(v)",desc:{ru:"",en:"

greaterOrEquals, >= operator

"}},regionHierarchy:{bracket:"(id[, geobase])",desc:{en:"Accepts a UInt32 number - the region ID from the Yandex geobase. Returns an array of region IDs consisting of the passed region and all parents along the chain.
Example: %%regionHierarchy(toUInt32(213)) = [213,1,3,225,10001,10000]%%."}},toUInt64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},rowNumberInAllBlocks:{bracket:"()",desc:{en:"Returns an incremental row number within all blocks that were processed by this function."}},toDayOfWeek:{bracket:"(v)",desc:{en:"Converts a date or date with time to a UInt8 number containing the number of the day of the week (Monday is 1, and Sunday is 7)."}},bar:{bracket:"(v)",desc:{en:"Allows building a unicode-art diagram.

bar(x, min, max, width) - Draws a band with a width proportional to (x - min) and equal to 'width' characters when x"}},"if":{bracket:"(v)",desc:{en:"The suffix -%%If%% can be appended to the name of any aggregate function. In this case, the aggregate function accepts an extra argument - a condition (Uint8 type). "}},regionToArea:{bracket:"(id[, geobase])",desc:{en:"Converts a region to an area (type 5 in the geobase). In every other way, this function is the same as 'regionToCity'.──────────────────────────────────"}},dictGetUInt16:{bracket:"(v)",desc:{ru:"",en:""}},toUInt8:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toUInt16:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},path:{bracket:"(URL)",desc:{en:"- The same thing, but without the protocol and host in the result. The / element (root) is not included."}},extractURLParameters:{bracket:"(URL)",desc:{ru:"Возвращает массив строк вида name=value, соответствующих параметрам URL. Значения никак не декодируются.",en:"- Gets an array of name=value strings corresponding to the URL parameters. The values are not decoded in any way."}},OSHierarchy:{bracket:"(v)",desc:{ru:"Принимает число типа UInt8 - идентификатор операционной системы из словаря Яндекс.Метрики. Возвращает массив с иерархией операционных систем. Аналогично функции regionHierarchy.",en:"Accepts a UInt8 number - the ID of the operating system from the Yandex.Metrica dictionary. Returns an array with a hierarchy of operating systems. Similar to the 'regionHierarchy' function."}},cutQueryStringAndFragment:{bracket:"(v)",desc:{ru:"Удаляет query string и fragment identifier. Знак вопроса и символ решётки тоже удаляются.",en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},timeSlots:{bracket:"(StartTime, Duration)",desc:{ru:"Для интервала времени, начинающегося в StartTime и продолжающегося Duration секунд, возвращает массив моментов времени, состоящий из округлений вниз до получаса точек из этого интервала.
Например, %%timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600)) = [toDateTime('2012-01-01 12:00:00'), toDateTime('2012-01-01 12:30:00')]%%.
Это нужно для поиска хитов, входящих в соответствующий визит.",en:"For a time interval starting at 'StartTime' and continuing for 'Duration' seconds, it returns an array of moments in time, consisting of points from this interval rounded down to the half hour.
For example, %%timeSlots(toDateTime('2012-01-01 12:20:00'), toUInt32(600)) = [toDateTime('2012-01-01 12:00:00'), toDateTime('2012-01-01 12:30:00')]%%.
This is necessary for searching for pageviews in the corresponding session."}},toUInt32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toStartOfMinute:{bracket:"(v)",desc:{ru:"Округляет дату-с-временем вниз до начала минуты.",en:"Rounds down a date with time to the start of the minute."}},version:{bracket:"()",desc:{ru:"Возвращает версию сервера в виде строки.",en:"Returns server's version as a string."}},toUInt64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toInt16:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},reinterpretAsInt16:{bracket:"(v)",desc:{en:""}},toInt64:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toFixedString:{bracket:"(s, N)",desc:{ru:"Преобразует аргумент типа String в тип FixedString(N) (строку фиксированной длины N). N должно быть константой.
Если строка имеет меньше байт, чем N, то она дополняется нулевыми байтами справа. Если строка имеет больше байт, чем N - кидается исключение.",en:"Converts a String type argument to a FixedString(N) type (a string with fixed length N). N must be a constant. If the string has fewer bytes than N, it is passed with null bytes to the right. If the string has more bytes than N, an exception is thrown."}},toFloat32:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},dictGetHierarchy:{bracket:"(v)",desc:{ru:"%%dictGetHierarchy('dict_name', id)%%
- для иерархического словаря dict_name - вернуть массив ключей словаря, начиная с id и продолжая цепочкой родительских элементов. Возвращает Array(UInt64).",en:"%%dictGetHierarchy('dict_name', id)%%
- For the 'dict_name' hierarchical dictionary, returns an array of dictionary keys starting from 'id' and continuing along the chain of parent elements. Returns Array(UInt64)."}},dictGetInt64:{bracket:"(v)",desc:{ru:"",en:""}},CAST:{bracket:"(x, t)",desc:{en:"Casts x to the t data type.
The syntax %%CAST(x AS t)%% is also supported.
"}},toRelativeSecondNum:{bracket:"(v)",desc:{ru:"Переводит дату-с-временем в номер секунды, начиная с некоторого фиксированного момента в прошлом.",en:"Converts a date with time or date to the number of the second, starting from a certain fixed point in the past."}},toUInt8OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toStartOfMonth:{bracket:"(v)",desc:{ru:"Округляет дату или дату-с-временем вниз до первого дня месяца.
Возвращается дата.",en:"Rounds down a date or date with time to the first day of the month.
Returns the date."}},rand64:{bracket:"(v)",desc:{ru:"Возвращает псевдослучайное число типа UInt64, равномерно распределённое среди всех чисел типа UInt64.
Используется linear congruential generator.",en:"Returns a pseudo-random UInt64 number, evenly distributed among all UInt64-type numbers.
Uses a linear congruential generator."}},toInt8OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toFloat32OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},toYear:{bracket:"(v)",desc:{ru:"Переводит дату или дату-с-временем в число типа UInt16, содержащее номер года (AD).",en:"Converts a date or date with time to a UInt16 number containing the year number (AD)."}},atan:{bracket:"(x)",desc:{ru:"Арктангенс.",en:"The arc tangent."}},toFloat64OrZero:{bracket:"(v)",desc:{en:"Functions for converting between numbers, strings (but not fixed strings), dates, and dates with times. All these functions accept one argument. "}},arrayEnumerate:{bracket:"(arr, ...)",desc:{en:"Returns an array the same size as the source array, indicating for each element what its position is among elements with the same value.
"}},toDayOfMonth:{bracket:"(v)",desc:{en:"Converts a date or date with time to a UInt8 number containing the number of the day of the month (1-31)."}},dictGetUInt64:{bracket:"(v)",desc:{ru:"",en:""}},IPv4NumToStringClassC:{bracket:"(num)",desc:{en:"Similar to IPv4NumToString, but using %%xxx%% instead of the last octet. "}},reinterpretAsString:{bracket:"(v)",desc:{en:"This function accepts a number or date or date with time, and returns a string containing bytes representing the corresponding value in host order (little endian). Null bytes are dropped from the end. For example, a UInt32 type value of 255 is a string that is one byte long."}},toHour:{bracket:"(v)",desc:{en:"Converts a date with time to a UInt8 number containing the number of the hour in 24-hour time (0-23).
This function assumes that if clocks are moved ahead, it is by one hour and occurs at 2 a.m., and if clocks are moved back, it is by one hour and occurs at 3 a.m. (which is not always true - even in Moscow the clocks were once changed at a different time)."}},ignore:{bracket:"(...)",desc:{en:"A function that accepts any arguments and always returns 0.
However, the argument is still calculated. This can be used for benchmarks."}},arrayJoin:{bracket:"(v)",desc:{en:"This is a very unusual function.

Normal functions don't change a set of rows, but just change the values in each row (map). Aggregate functions compress a set of rows (fold or reduce).
The 'arrayJoin' function takes each row and generates a set of rows (unfold).

T"}},length:{bracket:"(v)",desc:{en:"Returns the length of a string in Unicode code points (not in characters), assuming that the string contains a set of bytes that make up UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
The result type is UInt64."}},tuple:{bracket:"(tuple, n), operator x.N",desc:{en:"A function that allows getting columns from a tuple.
'N' is the column index, starting from 1. 'N' must be a constant. 'N' must be a strict postive integer no greater than the size of the tuple.
There is no cost to execute the function."}},extractURLParameterNames:{bracket:"(URL)",desc:{en:"- Gets an array of name=value strings corresponding to the names of URL parameters. The values are not decoded in any way."}},tupleElement:{bracket:"(tuple, n), operator x.N",desc:{en:"A function that allows getting columns from a tuple.
'N' is the column index, starting from 1. 'N' must be a constant. 'N' must be a strict postive integer no greater than the size of the tuple.
There is no cost to execute the function."}},"in":{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},globalIn:{bracket:"(v)",desc:{en:"See the section "IN operators"."}},isFinite:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is not infinite and not a NaN, otherwise 0."}},isNaN:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is a NaN, otherwise 0."}},isInfinite:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is infinite, otherwise 0.
Note that 0 is returned for a NaN."}},transform:{bracket:"(v)",desc:{en:"Transforms a value according to the explicitly defined mapping of some elements to other ones.
There are two variations of this function:

1. %%transform(x, array_from, array_to, default)%% "}},rand:{bracket:"(v)",desc:{en:"Returns a pseudo-random UInt64 number, evenly distributed among all UInt64-type numbers.
Uses a linear congruential generator."}},reinterpretAsUInt16:{bracket:"(v)",desc:{en:""}},pi:{bracket:"(v)",desc:{en:"Maximum pipeline depth. Corresponds to the number of transformations that each data block goes through during query processing. Counted within the limits of a single server. If the pipeline depth is greater, an exception is thrown. By default, 1000."}},reinterpretAsUInt32:{bracket:"(v)",desc:{en:""}},reinterpretAsUInt64:{bracket:"(v)",desc:{en:""}},reinterpretAsInt8:{bracket:"(v)",desc:{en:""}},upperUTF8:{bracket:"(v)",desc:{en:"Converts a string to uppercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. So for Turkish the result might not be exactly correct. "}},reinterpretAsInt32:{bracket:"(v)",desc:{en:""}},reinterpretAsFloat32:{bracket:"(v)",desc:{en:""}},reinterpretAsFloat64:{bracket:"(v)",desc:{en:""}},reinterpretAsDate:{bracket:"(v)",desc:{en:""}},reinterpretAsDateTime:{bracket:"(v)",desc:{en:""}},roundToExp2:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than one, it returns 0. Otherwise, it rounds the number down to the nearest (whole non-negative) degree of two."}},upper:{bracket:"(v)",desc:{en:"Converts a string to uppercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. So for Turkish the result might not be exactly correct."}},positionUTF8:{bracket:"(haystack, needle)",desc:{en:"The same as 'position', but the position is returned in Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
There's also positionCaseInsensitiveUTF8 function."}},roundDuration:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than one, it returns 0. Otherwise, it rounds the number down to numbers from the set: 1, 10, 30, 60, 120, 180, 240, 300, 600, 1200, 1800, 3600, 7200, 18000, 36000. This function is specific to Yandex.Metrica and used for implementing the report on session length."}},roundAge:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than 18, it returns 0. Otherwise, it rounds the number down to numbers from the set: 18, 25, 35, 45. This function is specific to Yandex.Metrica and used for implementing the report on user age."}},round:{bracket:"(num)",desc:{en:"Accepts a number. If the number is less than 18, it returns 0. Otherwise, it rounds the number down to numbers from the set: 18, 25, 35, 45. This function is specific to Yandex.Metrica and used for implementing the report on user age."}},floor:{bracket:"(x[, N])",desc:{en:"Returns a rounder number that is less than or equal to 'x'."}},notEmpty:{bracket:"(v)",desc:{en:"Returns 0 for an empty array, or 1 for a non-empty array.
The result type is UInt8.
The function also works for strings."}},lengthUTF8:{bracket:"(v)",desc:{en:"Returns the length of a string in Unicode code points (not in characters), assuming that the string contains a set of bytes that make up UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception).
The result type is UInt64."}},lower:{bracket:"(v)",desc:{en:"Converts a string to lowercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. "}},lowerUTF8:{bracket:"(v)",desc:{en:"Converts a string to lowercase, assuming the string contains a set of bytes that make up a UTF-8 encoded text. It doesn't detect the language. "}},reverse:{bracket:"(v)",desc:{en:"Reverses a sequence of Unicode code points, assuming that the string contains a set of bytes representing a UTF-8 text. Otherwise, it does something else (it doesn't throw an exception)."}},URLPathHierarchy:{bracket:"(URL)",desc:{en:"- The same thing, but without the protocol and host in the result. The / element (root) is not included. "}},substringUTF8:{bracket:"(s, offset, length)",desc:{en:"The same as 'substring', but for Unicode code points. Works under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. If this assumption is not met, it returns some result (it doesn't throw an exception)."}},appendTrailingCharIfAbsent:{bracket:"(s, c)",desc:{en:"If the %%s%% string is non-empty and does not contain the %%c%% character at the end, it appends the %%c%% character to the end." +}},alphaTokens:{bracket:"(s)",desc:{en:"Selects substrings of consecutive bytes from the range a-z and A-Z.
Returns an array of selected substrings."}},splitByChar:{bracket:"(separator, s)",desc:{en:"Splits a string into substrings, using 'separator' as the separator.
'separator' must be a string constant consisting of exactly one character.
Returns an array of selected substrings"}},arrayStringConcat:{bracket:"(arr[, separator])",desc:{en:"Concatenates strings from the array elements, using 'separator' as the separator.
'separator' is a string constant, an optional parameter. By default it is an empty string.
Returns a string."}},replaceAll:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replaces all occurrences of the 'pattern' substring in 'haystack' with the 'replacement' substring."}},replaceRegexpOne:{bracket:"(haystack, pattern, replacement)",desc:{en:"Replacement using the 'pattern' regular expression. A re2 regular expression. Replaces only the first occurrence, if it exists.
A pattern can be specified as 'replacement'. "}},cbrt:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the cubic root of the argument."}},match:{bracket:"(pattern)(time, cond1, cond2, ...)",desc:{en:"Pattern matching for event chains.

'pattern' is a string containing a pattern to match. The pattern is similar to a regular expression."}},cutURLParameter:{bracket:"(URL, name)",desc:{en:"Removes the URL parameter named 'name', if present. This function works under the assumption that the parameter name is encoded in the URL exactly the same way as in the passed argument."}},like:{bracket:"(haystack, pattern), haystack NOT LIKE pattern operator",desc:{en:"The same thing as 'like', but negative."}},domain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},domainWithoutWWW:{bracket:"(v)",desc:{en:"- Selects the domain and removes no more than one 'www.' from the beginning of it, if present."}},firstSignificantSubdomain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},queryString:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},queryStringAndFragment:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},extractURLParameter:{bracket:"(URL)",desc:{en:"- Gets an array of name=value strings corresponding to the names of URL parameters. The values are not decoded in any way."}},URLHierarchy:{bracket:"(URL)",desc:{en:"- Gets an array containing the URL trimmed to the %%/%%, %%?%% characters in the path and query-string. Consecutive separator characters are counted as one. The cut is made in the position after all the consecutive separator characters. Example:"}},cutToFirstSignificantSubdomain:{bracket:"(v)",desc:{en:"- Selects the part of the domain that includes top-level subdomains up to the "first significant subdomain" (see the explanation above).
For example, cutToFirstSignificantSubdomain('https://news.yandex.com.tr/') = 'yandex.com.tr'."}},cutWWW:{bracket:"(v)",desc:{en:"Removes no more than one 'www.' from the beginning of the URL's domain, if present."}},cutQueryString:{bracket:"(v)",desc:{en:"Removes the query-string and fragment identifier. The question mark and number sign are also removed."}},cutFragment:{bracket:"(v)",desc:{en:"Removes the fragment identifier. The number sign is also removed."}},visitParamHas:{bracket:"(params, name)",desc:{en:"Checks whether there is a field with the 'name' name."}},visitParamExtractFloat:{bracket:"(params, name)",desc:{en:"The same as for Float64."}},visitParamExtractBool:{bracket:"(params, name)",desc:{en:"Parses a true/false value. The result is UInt8."}},visitParamExtractRaw:{bracket:"(params, name)",desc:{en:"Returns the value of a field, including separators."}},exp:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 10x."}},exp2:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 2x."}},exp10:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 10x."}},tgamma:{bracket:"(x)",desc:{en:"Gamma function."}},log10:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the decimal logarithm of the argument."}},sqrt:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to the square root of the argument."}},erf:{bracket:"(v)",desc:{en:"What to do when the amount of data exceeds one of the limits: 'throw' or 'break'. By default, throw."}},erfc:{bracket:"(x)",desc:{en:"Accepts a numeric argument and returns a Float64 number close to 1 - erf(x), but without loss of precision for large 'x' values."}},lgamma:{bracket:"(x)",desc:{en:"The logarithm of the gamma function."}},sin:{bracket:"(x)",desc:{en:"Accepts Float32 and Float64 and returns UInt8 equal to 1 if the argument is infinite, otherwise 0.
Note that 0 is returned for a NaN."}},cos:{bracket:"(x)",desc:{ru:"Арккосинус.",en:"The arc cosine."}},tan:{bracket:"(x)",desc:{ru:"Арктангенс.",en:"The arc tangent."}},pow:{bracket:"(x, y)",desc:{ru:"xy.",en:"xy."}}}},/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +function(){angular.module(smi2.app.name).run(["$rootScope","$state","$mdTheming","ThemeService","localStorageService",function(e,t,a,n,i){e.breadcrumbs=[],e.currentDatabase=null;var r=e.$on("$stateChangeError",function(e,a,n,i,r,s){"notAuthorized"==s&&t.go("login")});e.$on("$destroy",function(){return r}),window.document.title="Tabix.IO ["+window.TabixBuildDate+"]",e.sqlLog=i.get("sqlLog")||[],e.$watch("sqlLog",function(e){i.set("sqlLog",e)}),e.isInitDatabaseStructure=!1,e.sidebar={letf_resizable_width:200,clickLetfResizable:function(){e.sidebar.letf_resizable_width<10?e.sidebar.letf_resizable_width=200:e.sidebar.letf_resizable_width=0}}}])}(),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +function(e,t){e.module(t.app.name).config(["$stateProvider",function(e){e.state("base",{"abstract":!0,resolve:{session:["$q","API",function(e,t){window.global_tabix_disable_exit=!1,_.isObject(window.global_tabix_default_settings)&&(_.isUndefined(window.global_tabix_default_settings.host)||_.isUndefined(window.global_tabix_default_settings.login)||(window.global_tabix_disable_exit=!0,t.setConnection(window.global_tabix_default_settings)));var a=e.defer();return t.isAuthorized()?a.resolve():a.reject("notAuthorized"),a.promise}]},templateUrl:"app/base/base.html"}).state("layout",{parent:"base","abstract":!0,views:{header:{templateUrl:"app/base/header.html",controller:"HeaderController"},sidebar:{templateUrl:"app/base/sidebar.html",controller:"SidebarController"},main:{template:""}}}).state("layoutDash",{parent:"base","abstract":!0,views:{header:{templateUrl:"app/base/header.html",controller:"HeaderController"},sidebar:{templateUrl:"app/dash/dashsidebar.html",controller:"DashSidebarController"},main:{template:""}}}).state("dashboard",{parent:"layout",url:"",controller:["$state",function(e){e.go("sql")}]}).state("dashId",{parent:"layoutDash",url:"/dash/{dashId}",templateUrl:"app/dash/dash.html",controller:"DashController"}).state("dash",{parent:"layoutDash",url:"/dash",templateUrl:"app/dash/dash.html",controller:"DashController"}).state("devplot",{parent:"layoutDash",url:"/devplot",templateUrl:"app/dev/plot.html",controller:"devplotController"}).state("devedit",{parent:"layoutDash",url:"/devedit",templateUrl:"app/dev/edit.html",controller:"EditController"}).state("preference",{parent:"layout",url:"/Preference",templateUrl:"app/preference/preference.html",controller:"PreferenceController"}).state("login",{url:"/login",templateUrl:"app/login/login.html",controller:"LoginController"}).state("sql",{parent:"layout",url:"/sql",templateUrl:"app/sql/sql.html",controller:"SqlController"}).state("table",{parent:"layout",url:"/database/{dbName}/table/{tableName}",templateUrl:"app/table/table.html",controller:"TableController"}).state("metrics",{parent:"layoutDash",url:"/metrics",templateUrl:"app/metrics/metrics.html",controller:"MetricsController"}).state("404",{parent:"layout",templateUrl:"app/base/404.html"})}])}(angular,smi2),/* + * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors + */ +function(e,t){e.module(t.app.name).config(["$locationProvider","$httpProvider","$sceProvider","$urlRouterProvider","ThemeServiceProvider","$mdThemingProvider",function(e,t,a,n,i,r){t.interceptors.push("HttpInterceptor"),a.enabled(!1);var s=!1;s=_.isFunction(i.$get[0])?i.$get[0]().isDark():i.$get().isDark(),console.log("isDark",s),s&&r.theme("default").dark().primaryPalette("blue").accentPalette("blue",{"default":"500"}),window.disableNgInspectWatchers=!1,n.otherwise(function(e){var t=e.get("$state");t.transitionTo("404")})}])}(angular,smi2); \ No newline at end of file diff --git a/build/scripts/app.js b/build/scripts/app.js index 1614d810..f1d9f9b6 100644 --- a/build/scripts/app.js +++ b/build/scripts/app.js @@ -584,8 +584,8 @@ c(l);else for(r in e)l=e[r],c(l,r);return s.domain=[s.min,s.max],s.limits=functi "use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t

404 not found

Back'),e.put("app/base/addVarsDialog.html",'

Mango (Fruit)

Add var (no space)
TextIntDateCode
CloseAdd
'),e.put("app/base/base.html",'
Open table
'),e.put("app/base/breadcrumbs.html",''),e.put("app/base/header.html",'
Requirements Chrome! Dashboard SQL Metrics & Processes Settings Help Sign out [{{user}}]
'),e.put("app/base/helpDialogLogin.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

* Work only in "Google chrome" version up 55

* Clickhouse server version up v1.1.54164

* Not readonly CH user




https://tabix.ioOk
'),e.put("app/base/helpDialogRu.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

ClickHouse Manual


Tabix.IO Manual

Hot keys

⌘ + Enter

Exec current query

⌘ + Shift + Enter

Exec all query

⌘ + Y

Drop current line

⌘ + ⇧ + F

Reformat

⌘ + ⇧ + Plus|Minus

свернуть все/развернуть

⌘ + Right|Left

переключает вкладки

⌘ + ⌥ + Up|Down

Copy lines Up/Down

⌥ + Up|Down

Move lines Up/Down

Ctrl + K

Remove to line end

⌘ + Backspace

Remove to linestart

Ace Editor Default Keyboard Shortcuts

DrawChart

DrawChart

DrawMap

DrawMap

https://tabix.ioOk
'),e.put("app/base/sidebar.html",''),e.put("app/base/sidebarhelper.html",'

{{ hist }}

'),e.put("app/dash/dash.html",'
favorite

{{vars.dash.title}}

favoritePinSave


Apply
'),e.put("app/dash/dashsidebar.html",'
'),e.put("app/dev/edit.html",'
'),e.put("app/dev/plot.html",'openEditorWidget
code:
{{code}}
'),e.put("app/login/login.html",'
Requirements Chrome or Chromium engine Browser! Requirements & helpUi Theme{{theme.title}}
'),e.put("app/metrics/dialog.kill.html",'

Kill query

{{ q.elapsed }}

{{ q.query }}

{{ q.bytes_read }}

{{ q.hash }}

Cancel
'),e.put("app/metrics/metrics.html",'Processes
Overview
Metrics
'),e.put("app/metrics/metricschart.html",'

Metrics

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+(\'sec\')}}{{interval}}system.eventsRefreshReset
'),e.put("app/metrics/overview.html",'

Overview

'),e.put("app/metrics/processes.html",'

Processes

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+\'sec\'}}Select/Read onlyLog ModeClusterRefreshResetKILL Query
'),e.put("app/panels/sendtodashboard.html",'
Send to dashboard
ApplicationWebsite


AppendBottom





CloseApply
'),e.put("app/panels/share.html",'
Share


Can refresh dataPassword protectSupport variablesBoardJsonTSVCSV
CloseApply
'), -e.put("app/preference/preference.html",'

Preference & settings

{{theme}}{{theme}}Save sessionLive AutocompletionDisable auto-helpDisable hotKey left+rightUse WrapModeShow invisible charsApply
'),e.put("app/render/WidgetsList.html",'
{{::w.title}}
'),e.put("app/sql/PlotlyEditor.tmpl.html",'
PlotLy JavaScript editor ( alpha )

Tab One

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi.

Tab Two

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor, orci enim rutrum enim, vel tempor sapien arcu a tellus. Vivamus convallis sodales ante varius gravida. Curabitur a purus vel augue ultrices ultricies id a nisl. Nullam malesuada consequat diam, a facilisis tortor volutpat et. Sed urna dolor, aliquet vitae posuere vulputate, euismod ac lorem. Sed felis risus, pulvinar at interdum quis, vehicula sed odio. Phasellus in enim venenatis, iaculis tortor eu, bibendum ante. Donec ac tellus dictum neque volutpat blandit. Praesent efficitur faucibus risus, ac auctor purus porttitor vitae. Phasellus ornare dui nec orci posuere, nec luctus mauris semper.

Morbi viverra, ante vel aliquet tincidunt, leo dolor pharetra quam, at semper massa orci nec magna. Donec posuere nec sapien sed laoreet. Etiam cursus nunc in condimentum facilisis. Etiam in tempor tortor. Vivamus faucibus egestas enim, at convallis diam pulvinar vel. Cras ac orci eget nisi maximus cursus. Nunc urna libero, viverra sit amet nisl at, hendrerit tempor turpis. Maecenas facilisis convallis mi vel tempor. Nullam vitae nunc leo. Cras sed nisl consectetur, rhoncus sapien sit amet, tempus sapien.

Integer turpis erat, porttitor vitae mi faucibus, laoreet interdum tellus. Curabitur posuere molestie dictum. Morbi eget congue risus, quis rhoncus quam. Suspendisse vitae hendrerit erat, at posuere mi. Cras eu fermentum nunc. Sed id ante eu orci commodo volutpat non ac est. Praesent ligula diam, congue eu enim scelerisque, finibus commodo lectus.

Close
'),e.put("app/sql/renderResult.html",'
{{resultContainer.cellsCalc}}{{::tableData.data.progressQuery}}CSV with headersCSV without headersTSV with headersTSV without headersPinnedTable
Draw
'),e.put("app/sql/showDialogUpload.html",'

Upload CSV to View

'),e.put("app/sql/sql.html",'
{{tab.name + (tab.changed ? \' *\' : \'\')}}
Make snippetAutoFormatExpandCollapseCollapse All
{{tab.buttonTitle}}Run current ⌘ + ⏎Full screenSave{{item.name}}Query log
USE {{::dbb.name}}{{vars.LastStatistics.elapsed| number:2}} sec.| {{vars.LastStatistics.rows_read| number}} rows.| {{vars.LastStatistics.bytes_read|filesize}}
..... {{tab.progress.query}}
'),e.put("app/table/table-container.html",'

{{vars.currentDatabase}} {{vars.currentTable}}

Structure
NameTypeDefault typeValueSizeCompress
{{$index + 1}}{{field[key]}}
Information
1Size{{vars.statistics.size}}
2Size,bytes{{vars.statistics.sizeBytes}}
3First row{{vars.statistics.minDate}}
4Last row{{vars.statistics.maxDate}}

SHOW CREATE TABLE
{{vars.createtable}}
Data
Data From {{vars.offset}} To {{vars.offset + vars.limit}}
No data
'),e.put("app/table/table.html",'
')}]),function(e,t){function a(e,t){var a=t.dbName,n=t.tableName;e.vars={dbName:a,tableName:n}}e.module(t.app.name).controller("TableController",a),a.$inject=["$scope","$stateParams"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.tablewidget={},t.vars={columns:{},ugrid:{},sortColumn:!1,isDark:i.isDark(),createtable:{},data:null,grid:null,limit:100,offset:0,statistics:{},loading:!0,isRawStatistics:!1,rawstatistics:"",scrollConfig:{autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},t.initContainer=function(){a.$watch("currentTable",function(e){e&&(t.vars.currentTable=a.currentTable,t.vars.currentDatabase=a.currentDatabase,t.init())})},t.onAfterInit=function(){},t.updateHandTable=function(){l.getInstance("hotTableContain").render()},t.initOnGo=function(){t.$parent.vars&&(o.get("tableSiedenav")&&s("tableSiedenav").close(),t.vars.currentTable=t.$parent.vars.tableName,t.vars.currentDatabase=t.$parent.vars.dbName,t.init())},t.load=function(){console.warn("LOAD DATA! IN TABLES"),t.vars.data=-1,n.fetchQuery("\n select * from "+t.vars.currentDatabase+"."+t.vars.currentTable+" limit "+t.vars.offset+", "+t.vars.limit+"\n ").then(function(e){var a="ch";t.tablewidget=new WidgetTable(new DataProvider(e,a)),t.vars.loading=!1},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.calcRawSize=function(){t.vars.isRawStatistics=!0,n.fetchQuery("SELECT any(ignore(*)) FROM "+t.vars.currentDatabase+"."+t.vars.currentTable+" SAMPLE 1 / 10000 ").then(function(e){t.vars.rawstatistics=e.statistics},function(e){t.vars.rawstatistics=e.data})},t.init=function(){t.vars.loading=!0,t.vars.createtable="N/A",n.fetchQuery("SHOW CREATE TABLE "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(e){t.vars.createtable=window.sqlFormatter.format(e.data[0].statement)}),n.fetchQuery("SELECT table, formatReadableSize(sum(bytes)) as size, sum(bytes) as sizeBytes, min(min_date) as minDate, max(max_date) as maxDate FROM system.parts WHERE database = '"+t.vars.currentDatabase+"' AND ( table = '"+t.vars.currentTable+"' OR table = '"+t.vars.currentTable+"_sharded' ) GROUP BY table ").then(function(e){return t.vars.statistics=e&&e.data.length&&e.data[0]||{}}),n.fetchQuery("SELECT * FROM system.columns WHERE database='"+t.vars.currentDatabase+"' AND table='"+t.vars.currentTable+"'").then(function(a){n.fetchQuery("describe table "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(n){_.map(n.data,function(t){var n=_.find(a.data,{name:t.name});return _.merge(t,n),t.size="-",t.ratio="-",!e.isUndefined(t.default_kind)&&e.isUndefined(t.default_type)&&(t.default_type=t.default_kind),t.data_compressed_bytes&&(t.size=numbro(t.data_compressed_bytes).format("0.0 b")+" / "+numbro(t.data_uncompressed_bytes).format("0.0 b"),t.ratio=numbro(parseInt(t.data_uncompressed_bytes)/parseInt(t.data_compressed_bytes)).format("0.0")),t}),t.vars.columns=n,t.vars.sortColumn=!1;var i=0;n.data.forEach(function(e){3>i&&("Date"==e.type&&(t.vars.sortColumn=e.name),"DateTime"==e.type&&(t.vars.sortColumn=e.name)),i+=1}),t.load()})})},t.loadNext=function(){t.vars.loading=!0,t.vars.offset+=t.vars.limit,t.load()},t.loadPrev=function(){t.vars.offset>0&&(t.vars.loading=!0,t.vars.offset-=t.vars.limit,t.load())}}e.module(t.app.name).controller("TableContainerController",a),a.$inject=["$scope","$rootScope","API","ThemeService","$stateParams","$mdSidenav","$mdComponentRegistry","hotRegisterer"]}(angular,smi2),/* +!function(){var e=window.smi2=window.smi2||{};e.app={name:"SMI2",version:window.TabixVersion||"",buildDate:window.TabixBuildDate||""},angular.module(e.app.name,["ui.router","LocalStorageModule","angularScreenfull","ui.ace","ngScrollbars","angularResizable","ngSanitize","ngMaterial","funMetisMenu","ngCsv","cfp.hotkeys","ngHandsontable","ngCsvImport","gridstack-angular"])}(),angular.module("SMI2").run(["$templateCache",function(e){e.put("app/dash/dash.html",'
favorite

{{vars.dash.title}}

favoritePinSave


Apply
'),e.put("app/dash/dashsidebar.html",'
'),e.put("app/base/404.html",'

404 not found

Back
'),e.put("app/base/addVarsDialog.html",'

Mango (Fruit)

Add var (no space)
TextIntDateCode
CloseAdd
'),e.put("app/base/base.html",'
Open table
'),e.put("app/base/breadcrumbs.html",''),e.put("app/base/header.html",'
Requirements Chrome! Dashboard SQL Metrics & Processes Settings Help Sign out [{{user}}]
'),e.put("app/base/helpDialogLogin.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

* Work only in "Google chrome" version up 55

* Clickhouse server version up v1.1.54164

* Not readonly CH user




https://tabix.ioOk
'),e.put("app/base/helpDialogRu.html",'

Tabix.io Build {{::vars.version}} [{{::vars.buildDate}}]

ClickHouse Manual


Tabix.IO Manual

Hot keys

⌘ + Enter

Exec current query

⌘ + Shift + Enter

Exec all query

⌘ + Y

Drop current line

⌘ + ⇧ + F

Reformat

⌘ + ⇧ + Plus|Minus

свернуть все/развернуть

⌘ + Right|Left

переключает вкладки

⌘ + ⌥ + Up|Down

Copy lines Up/Down

⌥ + Up|Down

Move lines Up/Down

Ctrl + K

Remove to line end

⌘ + Backspace

Remove to linestart

Ace Editor Default Keyboard Shortcuts

DrawChart

DrawChart

DrawMap

DrawMap

https://tabix.ioOk
'),e.put("app/base/sidebar.html",''),e.put("app/base/sidebarhelper.html",'

{{ hist }}

'),e.put("app/dev/edit.html",'
'),e.put("app/dev/plot.html",'openEditorWidget
code:
{{code}}
'),e.put("app/login/login.html",'
Requirements Chrome or Chromium engine Browser! Requirements & helpUi Theme{{theme.title}}
'),e.put("app/panels/sendtodashboard.html",'
Send to dashboard
ApplicationWebsite


AppendBottom





CloseApply
'),e.put("app/panels/share.html",'
Share


Can refresh dataPassword protectSupport variablesBoardJsonTSVCSV
CloseApply
'),e.put("app/preference/preference.html",'

Preference & settings

{{theme}}{{theme}}Save sessionLive AutocompletionDisable auto-helpDisable hotKey left+rightUse WrapModeShow invisible charsApply
'),e.put("app/metrics/dialog.kill.html",'

Kill query

{{ q.elapsed }}

{{ q.query }}

{{ q.bytes_read }}

{{ q.hash }}

Cancel
'),e.put("app/metrics/metrics.html",'Processes
Overview
Metrics
'),e.put("app/metrics/metricschart.html",'

Metrics

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+(\'sec\')}}{{interval}}system.eventsRefreshReset
'), +e.put("app/metrics/overview.html",'

Overview

'),e.put("app/metrics/processes.html",'

Processes

{{interval == -1 ? (\'Refresh is disabled\') : interval +\' \'+\'sec\'}}Select/Read onlyLog ModeClusterRefreshResetKILL Query
'),e.put("app/render/WidgetsList.html",'
{{::w.title}}
'),e.put("app/sql/PlotlyEditor.tmpl.html",'
PlotLy JavaScript editor ( alpha )

Tab One

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi.

Tab Two

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue. Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor, orci enim rutrum enim, vel tempor sapien arcu a tellus. Vivamus convallis sodales ante varius gravida. Curabitur a purus vel augue ultrices ultricies id a nisl. Nullam malesuada consequat diam, a facilisis tortor volutpat et. Sed urna dolor, aliquet vitae posuere vulputate, euismod ac lorem. Sed felis risus, pulvinar at interdum quis, vehicula sed odio. Phasellus in enim venenatis, iaculis tortor eu, bibendum ante. Donec ac tellus dictum neque volutpat blandit. Praesent efficitur faucibus risus, ac auctor purus porttitor vitae. Phasellus ornare dui nec orci posuere, nec luctus mauris semper.

Morbi viverra, ante vel aliquet tincidunt, leo dolor pharetra quam, at semper massa orci nec magna. Donec posuere nec sapien sed laoreet. Etiam cursus nunc in condimentum facilisis. Etiam in tempor tortor. Vivamus faucibus egestas enim, at convallis diam pulvinar vel. Cras ac orci eget nisi maximus cursus. Nunc urna libero, viverra sit amet nisl at, hendrerit tempor turpis. Maecenas facilisis convallis mi vel tempor. Nullam vitae nunc leo. Cras sed nisl consectetur, rhoncus sapien sit amet, tempus sapien.

Integer turpis erat, porttitor vitae mi faucibus, laoreet interdum tellus. Curabitur posuere molestie dictum. Morbi eget congue risus, quis rhoncus quam. Suspendisse vitae hendrerit erat, at posuere mi. Cras eu fermentum nunc. Sed id ante eu orci commodo volutpat non ac est. Praesent ligula diam, congue eu enim scelerisque, finibus commodo lectus.

Close
'),e.put("app/sql/renderResult.html",'
{{resultContainer.cellsCalc}}{{::tableData.data.progressQuery}}CSV with headersCSV without headersTSV with headersTSV without headersPinnedTable
Draw
'),e.put("app/sql/showDialogUpload.html",'

Upload CSV to View

'),e.put("app/sql/sql.html",'
{{tab.name + (tab.changed ? \' *\' : \'\')}}
Make snippetAutoFormatExpandCollapseCollapse All
{{tab.buttonTitle}}Run current ⌘ + ⏎Full screenSave{{item.name}}Query log
USE {{::dbb.name}}{{vars.LastStatistics.elapsed| number:2}} sec.| {{vars.LastStatistics.rows_read| number}} rows.| {{vars.LastStatistics.bytes_read|filesize}}
..... {{tab.progress.query}}
'),e.put("app/table/table-container.html",'

{{vars.currentDatabase}} {{vars.currentTable}}

Structure
NameTypeDefault typeValueSizeCompress
{{$index + 1}}{{field[key]}}
Information
1Size{{vars.statistics.size}}
2Size,bytes{{vars.statistics.sizeBytes}}
3First row{{vars.statistics.minDate}}
4Last row{{vars.statistics.maxDate}}

SHOW CREATE TABLE
{{vars.createtable}}
Data
Data From {{vars.offset}} To {{vars.offset + vars.limit}}
No data
'),e.put("app/table/table.html",'
')}]),function(e,t){function a(e,t){var a=t.dbName,n=t.tableName;e.vars={dbName:a,tableName:n}}e.module(t.app.name).controller("TableController",a),a.$inject=["$scope","$stateParams"]}(angular,smi2),function(e,t){function a(t,a,n,i,r,s,o,l){t.tablewidget={},t.vars={columns:{},ugrid:{},sortColumn:!1,isDark:i.isDark(),createtable:{},data:null,grid:null,limit:100,offset:0,statistics:{},loading:!0,isRawStatistics:!1,rawstatistics:"",scrollConfig:{autoHideScrollbar:!1,theme:i.isDark()?"light":"dark",scrollButtons:{enable:!1},scrollInertia:100,advanced:{updateOnContentResize:!0}}},t.initContainer=function(){a.$watch("currentTable",function(e){e&&(t.vars.currentTable=a.currentTable,t.vars.currentDatabase=a.currentDatabase,t.init())})},t.onAfterInit=function(){},t.updateHandTable=function(){l.getInstance("hotTableContain").render()},t.initOnGo=function(){t.$parent.vars&&(o.get("tableSiedenav")&&s("tableSiedenav").close(),t.vars.currentTable=t.$parent.vars.tableName,t.vars.currentDatabase=t.$parent.vars.dbName,t.init())},t.load=function(){console.warn("LOAD DATA! IN TABLES"),t.vars.data=-1,n.fetchQuery("\n select * from "+t.vars.currentDatabase+"."+t.vars.currentTable+" limit "+t.vars.offset+", "+t.vars.limit+"\n ").then(function(e){var a="ch";t.tablewidget=new WidgetTable(new DataProvider(e,a)),t.vars.loading=!1},function(e){t.vars.loading=!1,console.error("Error "+e)})},t.calcRawSize=function(){t.vars.isRawStatistics=!0,n.fetchQuery("SELECT any(ignore(*)) FROM "+t.vars.currentDatabase+"."+t.vars.currentTable+" SAMPLE 1 / 10000 ").then(function(e){t.vars.rawstatistics=e.statistics},function(e){t.vars.rawstatistics=e.data})},t.init=function(){t.vars.loading=!0,t.vars.createtable="N/A",n.fetchQuery("SHOW CREATE TABLE "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(e){t.vars.createtable=window.sqlFormatter.format(e.data[0].statement)}),n.fetchQuery("SELECT table, formatReadableSize(sum(bytes)) as size, sum(bytes) as sizeBytes, min(min_date) as minDate, max(max_date) as maxDate FROM system.parts WHERE database = '"+t.vars.currentDatabase+"' AND ( table = '"+t.vars.currentTable+"' OR table = '"+t.vars.currentTable+"_sharded' ) GROUP BY table ").then(function(e){return t.vars.statistics=e&&e.data.length&&e.data[0]||{}}),n.fetchQuery("SELECT * FROM system.columns WHERE database='"+t.vars.currentDatabase+"' AND table='"+t.vars.currentTable+"'").then(function(a){n.fetchQuery("describe table "+t.vars.currentDatabase+"."+t.vars.currentTable).then(function(n){_.map(n.data,function(t){var n=_.find(a.data,{name:t.name});return _.merge(t,n),t.size="-",t.ratio="-",!e.isUndefined(t.default_kind)&&e.isUndefined(t.default_type)&&(t.default_type=t.default_kind),t.data_compressed_bytes&&(t.size=numbro(t.data_compressed_bytes).format("0.0 b")+" / "+numbro(t.data_uncompressed_bytes).format("0.0 b"),t.ratio=numbro(parseInt(t.data_uncompressed_bytes)/parseInt(t.data_compressed_bytes)).format("0.0")),t}),t.vars.columns=n,t.vars.sortColumn=!1;var i=0;n.data.forEach(function(e){3>i&&("Date"==e.type&&(t.vars.sortColumn=e.name),"DateTime"==e.type&&(t.vars.sortColumn=e.name)),i+=1}),t.load()})})},t.loadNext=function(){t.vars.loading=!0,t.vars.offset+=t.vars.limit,t.load()},t.loadPrev=function(){t.vars.offset>0&&(t.vars.loading=!0,t.vars.offset-=t.vars.limit,t.load())}}e.module(t.app.name).controller("TableContainerController",a),a.$inject=["$scope","$rootScope","API","ThemeService","$stateParams","$mdSidenav","$mdComponentRegistry","hotRegisterer"]}(angular,smi2),/* * Licensed under the Apache License, Version 2.0 Copyright 2017 Tabix LLC,Igor Strykhar and other contributors */ window.global_delimiter=";;",window.aceJSRules={builtinFunctions:[],lang:"en",dictionaries:[],fieldsList:[],tables:[]},function(e,t){function a(t,a,n,i,r,s,o,l,c,d,u,m,h,p,g){var b="sqlHistory2",f="saveTabs",v="sessionData",y=255;t.AceEditorInLoad=!1,t.vars={EditorIsInit:!1,sqlHistory:i.get(b)||[],dictionaries:[],isDictionariesLoad:!1,tabs:[],enableLiveAutocompletion:h.get("liveAutocompletion"),disableAutohelp:h.get("disableAutohelp"),disableHotKeyCmdLeft:h.get("disableHotKeyCmdLeft"),saveTabs:i.get(f)||!0,LastStatistics:!1,delimiters:[{name:";; Double",delimiter:";;"},{name:"; Single",delimiter:";"}],databasesList:[],searchQueryOnServer:"",currentTab:{},selectedTab:0,formats:[{name:"Table",sql:" format JSON",render:"html"},{name:"JSON compact",sql:" format JSONCompact"}],db:null,limitTimes:h.get("limitTimes"),limitRows:h.get("limitRows"),fontSize:h.get("fontSize"),theme:h.get("editorTheme")},t.vars.delimiter=i.get("delimiter")||";;",t.vars.format=t.vars.formats[0],t.vars.themes=["ambiance","eclipse","mono_industrial","tomorrow_night_blue","chaos","github","monokai","tomorrow_night_bright","chrome","idle_fingers","pastel_on_dark","tomorrow_night_eighties","clouds","iplastic","solarized_dark","tomorrow_night","clouds_midnight","katzenmilch","solarized_light","twilight","cobalt","kr_theme","sqlserver","vibrant_ink","crimson_editor","kuroir","terminal","xcode","dawn","merbivore","textmate","dreamweaver","merbivore_soft","tomorrow"],n.onbeforeunload=function(e){if(""!==t.vars.currentTab.sql&&"localhost"!=location.hostname){var a="Do you want to leave this page?";return"undefined"==typeof e&&(e=window.event),e&&(e.returnValue=a),a}};var w=t.$on("$stateChangeStart",function(e){var a="Do you want to leave this page?";e.defaultPrevented||""===t.vars.currentTab||confirm(a)||e.preventDefault()}),k=function(){if(t.vars.saveTabs){var e=t.vars.tabs.map(function(e){return e.editor?e.sql=e.editor.getValue():e.sql="",{name:e.name,sql:e.sql,buttonTitle:e.buttonTitle,format:e.format,delimiter:e.delimiter,results:[],editor:null,selectedResultTab:0}});i.set(v,e),console.info("Save session , localStorageService.set(SQL_SESSION_KEY)")}};t.$watch("$root.isInitDatabaseStructure",function(){t.vars.EditorIsInit=a.isInitDatabaseStructure}),t.InitDatabaseStructure=function(){console.warn(">>>>>>>>>>>>>>>InitDatabaseStructure<<<<<<<",a.isInitDatabaseStructure)},t.executeQuery=function(a,n,i){var s="result_overflow_mode=throw";t.vars.currentTab.loading=!0,t.vars.limitRows&&(s+="&max_result_rows="+t.vars.limitRows),t.vars.limitTimes&&(s+="&timeout_overflow_mode=throw&max_execution_time="+t.vars.limitTimes);var o=a.sql.replace(/(\r\n|\n|\r)$/gm,"").substr(0,130);t.vars.currentTab.progress.query=o;var d="";a.qid&&(d=" /*TABIX_QUERY_ID_"+a.qid+"*/ "),r.fetchQuery(d+a.sql,!0,a.format,s).then(function(r){try{var s=r;e.isObject(r)||(r={data:s,meta:null,rows:null,statistics:null}),r.error=!1,r.query=a,r.countAllQuery=n.length;var l={time:moment().format("HH:mm:ss")};e.isObject(r.statistics)&&Object.assign(l,r.statistics),l.query=o,_.isArray(t.vars.currentTab.statistics)&&t.vars.currentTab.statistics.push(l),t.vars.LastStatistics=l;var c=new DataProvider(r,"ch");c.progressQuery=o,i.widgets.tables.push(new WidgetTable(c)),"drawCommand"in a&&a.drawCommand.length?(c.countAll=a.drawCommand.length>r.countAllQuery?a.drawCommand.length:r.countAllQuery,console.info("query.drawCommand",a.drawCommand),a.drawCommand.forEach(function(e){i.widgets.draw.push(new WidgetDraw(c,e))})):i.widgets.draw.push(new WidgetDraw(c,!1)),i.data.push(a),t.$applyAsync(),a.index+1-1&&r>-1&&t.vars.currentTab.editor.gotoLine(s,r),console.log("move cursor to",s,r)}var d="ch";console.warn("ERROR",n);var u=new DataProvider(n,d);i.data.push(a),i.widgets.tables.push(new WidgetTable(u)),t.finalizeResult(i)})},t.renderResult=function(e){},t.finalizeResult=function(e){if(t.vars.currentTab.loading=!1,t.vars.currentTab.progress=!1,e.data.find(function(e){return e.keyword&&-1!=["DROP","CREATE","ALTER"].indexOf(e.keyword.toUpperCase())})&&l.show(l.simple().content("Press `Reload Structure` for reload").theme(c.theme).position("bottom right")),t.$applyAsync(),t.vars.currentTab.statistics[0]){var a=DataProvider.convertArrayToDataProvider(t.vars.currentTab.statistics,"statistics");a.sort="time",a.sortOrder="desc",e.widgets.stats.push(new WidgetTable(a,!1))}},t.execute=function(n,s){t.$applyAsync(),console.groupCollapsed("Execute query"),t.vars.LastStatistics=!1,s.sql=s.editor.getValue();var o=s.sql,d=0,m=s.editor,h=[],p=m.getSelectedText();e.isUndefined(s.selectedTabResultIndex)&&(s.selectedTabResultIndex=0);var b={data:[],time:u("date")(new Date,"HH:mm:ss"),pinned:!1,widgets:{tables:[],pivot:[],draw:[],stats:[]}};if(""!==p&&null!==p&&(o=p),console.info("[EDITOR TEXT]> ",o),""===o||null===o)return void l.show(l.simple().content("SQL query is empty").theme(c.theme).position("bottom right"));s.results=[b],k();var f=window.global_delimiter;f||(f=";;"),m.session.$mode.splitByTokens(o,"constant.character.escape",f).forEach(function(t){if(!("current"==n&&d>0)){var s=[],o=t.sql;if(!(o.length<5)){if("current"==n&&!p){var l=m.selection.getCursor();if(!l||e.isUndefined(l))return;var c=t.range.compare(l.row,l.column);if(0!==c)return}var u=o.trim();-1==a.sqlLog.indexOf(u)&&(a.sqlLog.unshift(u),a.sqlLog.length>y&&a.sqlLog.splice(0,y),i.set("sqlLog",a.sqlLog));var b=m.session.$mode.replaceVars(o,g.get());o=b.sql;b.vars;if(console.log("replacedVars",b),m.session.$mode.findTokens(o,"invalid.illegal",!0)){var f=m.session.$mode.splitByTokens(o,"invalid.illegal",!0);o=f[0].sql,f.forEach(function(t){if(e.isDefined(t.keyword)&&t.keyword){var a=/DRAW_(\w+)/gim,n=a.exec(t.keyword);n&&n[1]&&s.push({drawtype:n[1].toLowerCase(),code:t.sql})}})}console.info("[SQL]>",o),s&&console.info("[DRAW]>",s);var v=null,w=!1,k=!1,x=null,C=m.session.$mode.findTokens(o,"storage",!0),S=m.session.$mode.findTokens(o,"keyword",!0);C.hasOwnProperty("value")?(v=!1,k=C.value):(v=" FORMAT JSON ",w=!0),S.hasOwnProperty("value")&&(x=S.value),"select"!=x&&"with"!=x&&(v=!1,w=!1),h.push({sql:o,index:d,format:v,setedformat:w,keyword:x,storage:k,drawCommand:s,itemRange:t.range,qid:r.makeQueryId()}),d++}}}),console.groupEnd("Execute query"),h.length&&(t.vars.currentTab.progress={},t.vars.currentTab.statistics||(t.vars.currentTab.statistics=[]),t.executeQuery(h[0],h,b))},t.setTheme=function(e){t.vars.theme=e,t.vars.tabs.forEach(function(t){return t.editor.setTheme("ace/theme/"+e)}),i.set("editorTheme",e)},t.reloadCache=function(){console.log("reloadCache"),r.resetDatabaseStructure(),l.show(l.simple().content("Reload page - for reset cache").theme(c.theme).position("bottom right"))},t.selectDatabase=function(e,a){e&&(r.setDatabase(e),t.vars.db!=e&&(t.vars.db=e,t.AceEditorInLoad||(t.aceLoadDatabaseFields(),t.aceApply(!1))))},t.insertWordInEditor=function(e){var a=t.vars.currentTab.editor,n=a.getCursorPosition();n.column+=e.length,a.clearSelection(),a.insert(e),t.vars.currentTab.sql=a.getValue(),d(function(){a.focus(),a.moveCursorToPosition(n)})},t.aceLoadDatabaseFields=function(){var e=t.vars.db;window.aceJSRules.fieldsList=[],r.databaseStructure(function(t){window.aceJSRules.fieldsList=t.getAllFieldsInDatabase(e)})},t.aceLoadDatabaseStructure=function(){var e=t.vars.db;window.aceJSRules.tables=[],r.databaseStructure(function(a){t.vars.databasesList=a.getDatabases(),Object.keys(a.getUniqueDatabaseTables()).forEach(function(e){window.aceJSRules.tables.push(e)}),window.aceJSRules.fieldsList=a.getAllFieldsInDatabase(e)})},t.loadInAce=function(e){e.session.setMode({path:"ace/mode/clickhouse"});for(var t in window.aceJSRules.builtinFunctions){var a=window.aceJSRules.builtinFunctions[t];e.session.$mode.$highlightRules.addCompletionsFunctions(a)}e.session.$mode.$highlightRules.addArrayCompletions(window.aceJSRules.tables,"[table]","table");for(var n in window.aceJSRules.dictionaries){var i=window.aceJSRules.dictionaries[n];e.session.$mode.$highlightRules.addCompletionsDictionaries(i)}for(var r in window.aceJSRules.fieldsList){var s=window.aceJSRules.fieldsList[r];e.session.$mode.$highlightRules.addCompletionsTableFiled(s)}var o=g.getCompletions(),l=p.getCompletions();e.session.$mode.$highlightRules.addArrayCompletions(o,"[var]","var"),e.session.$mode.$highlightRules.addArrayCompletions(l,"[snippet]","snippet"),e.session.bgTokenizer.start(0)},t.aceApply=function(e){e?(console.log(""),t.loadInAce(e)):t.vars.tabs.forEach(function(e){e.editor&&(console.log(""),t.loadInAce(e.editor))}),a.$watch("currentDatabase",t.selectDatabase)},t.changeRootSelectDatabase=function(e){a.currentDatabase!=e&&(a.currentDatabase=e)},t.aceLoadDictionaries=function(){t.vars.isDictionariesLoad||(window.aceJSRules.dictionaries=[],t.vars.dictionaries=[],window.aceJSRules.builtinFunctions=[],t.vars.isDictionariesLoad=!0,r.databaseStructure(function(e){e.getFunctions().forEach(function(e){if(window.aceJSRules.builtinFunctions.push({name:e.name,isaggr:e.is_aggregate,score:101,comb:!1,origin:e.name}),e.is_aggregate){var t={name:e.name+"If",isaggr:e.is_aggregate,score:3,comb:"If",origin:e.name};window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"Array",isaggr:e.is_aggregate,score:2,comb:"Array",origin:e.name},window.aceJSRules.builtinFunctions.push(t),t={name:e.name+"State",isaggr:e.is_aggregate,score:1,comb:"State",origin:e.name},window.aceJSRules.builtinFunctions.push(t)}}),e.getDictionaries().forEach(function(e){var a=e.name;a=a.replace(/^.*\./gm,""),"news"!=a&&(a=a.replace(/s$/gm,"")),a=a?a.toLowerCase()+"_id":"ID";var n="dictGet"+e["attribute.types"]+"('"+e.name+"','"+e["attribute.names"]+"',to"+e.key+"( "+a+" ) ) AS "+e["attribute.names"]+",";window.aceJSRules.dictionaries.push({dic:n,title:"dic_"+e.name+"."+e["attribute.names"]}),t.vars.dictionaries.push({dic:n,title:e.name+"."+e["attribute.names"]+" as "+e["attribute.types"]})})}))};for(var x=function(e){t.vars.tabs.length>=e&&(t.vars.currentTab=t.vars.tabs[e],t.vars.selectedTab=e,d(function(){t.vars.currentTab.editor.focus()}))},C=function(){t.vars.selectedTab>0&&x(t.vars.selectedTab-1)},S=function(){t.vars.selectedTabD;D++)A(D);m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+right":"ctrl+right",callback:S}),m.add({combo:t.vars.disableHotKeyCmdLeft?"ctrl+shift+alt+left":"ctrl+left",callback:C}),m.add({combo:"ctrl+shift+f",callback:T}),t.aceLoaded=function(e){t.editorVisiable=!1,d(function(){t.editorVisiable=!0,t.AceEditorInLoad=!0,a.currentDatabase&&t.selectDatabase(a.currentDatabase),t.aceLoadDictionaries(),t.aceLoadDatabaseStructure(),t.aceLoadDatabaseFields();var n=t.vars.tabs.find(function(e){return!e.editor})||t.vars.currentTab;n.editor=e,e.$blockScrolling=1/0,e.setOptions({fontSize:t.vars.fontSize+"px",enableBasicAutocompletion:!0,behavioursEnabled:!0,wrapBehavioursEnabled:!0,highlightSelectedWord:!0,showGutter:!0,enableLiveAutocompletion:t.vars.enableLiveAutocompletion,liveAutocompletionDelay:500,liveAutocompletionThreshold:1}),e.setTheme("ace/theme/"+t.vars.theme),e.session.setUseWrapMode(h.get("useWrapMode")),e.commands.addCommand({name:"runCurrentCommand",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:function(){t.execute("current",n)}}),e.commands.addCommand({name:"removeLiness",bindKey:{win:"Ctrl-Y",mac:"Cmd-Y"},exec:function(e){e.removeLines()}}),e.commands.addCommand({name:"collapseAll",bindKey:{win:"Ctrl-Shift--",mac:"Command+Shift+-"},exec:function(e){e.session.$mode.collapseAll(e.session)}}),e.commands.addCommand({name:"unfold",bindKey:{win:"Ctrl-Shift-+",mac:"Command+Shift+="},exec:function(e){e.session.unfold()}}),e.commands.addCommand({name:"runAllCommand",bindKey:{win:"Shift-Ctrl-Enter",mac:"Shift-Command-Enter"},exec:function(){t.execute("all",n)}});for(var i=function(t){e.commands.addCommand({name:"selecttab"+t,bindKey:{win:"Ctrl-Shift-"+(t+1),mac:"Command-Shift-"+(t+1)},exec:function(){return x(t)}})},r=0;9>r;r++)i(r);e.commands.addCommand({name:"selectnexttab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Right":"Ctrl-Right",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Right":"Command-Right"},exec:S}),e.commands.addCommand({name:"selectprevtab",bindKey:{win:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Ctrl-Left":"Ctrl-Left",mac:t.vars.disableHotKeyCmdLeft?"Shift-Alt-Command-Left":"Command-Left"},exec:C}),e.commands.addCommand({name:"formatcode",bindKey:{win:"Ctrl-Shift-F",mac:"Command-Shift-F"},exec:T}),e.setValue(n.sql),e.clearSelection(),e.focus(),e.selection.moveTo(0,0),e.on("changeSelection",function(){d(function(){n.buttonTitle=""!==e.getSelectedText()?"Run selected ⌘ + ⏎":"Run all ⇧ + ⌘ + ⏎",n.originalSql&&(n.changed=n.originalSql!=n.sql)})}),t.AceEditorInLoad=!1,t.aceApply(e)},100)},t.save=function(e,a){return o.show(o.prompt().title("Save SQL as?").placeholder("Title").initialValue(e.name).targetEvent(a).ok("Save").cancel("")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n?(t.vars.sqlHistory[n].sql=e.sql,t.vars.sqlHistory[n].name=a):t.vars.sqlHistory.push({sql:e.sql,name:a}),e.originalSql=e.sql,e.name=a,i.set(b,t.vars.sqlHistory),k()})},t.load=function(e){t.vars.currentTab.sql=e.sql,t.vars.currentTab.originalSql=e.sql,t.vars.currentTab.name=e.name,t.vars.currentTab.editor.setValue(e.sql),t.aceApply(t.vars.currentTab.editor)},t.getExportData=function(t){return t.data.data.map(function(t){return Object.keys(t).map(function(a){return e.isArray(t[a])?t[a].join(", "):t[a]})})},t.getExportHeaders=function(e){return e.data.meta.map(function(e){return e.name})},t.addTab=function(){t.vars.currentTab={name:"new SQL",sql:"",buttonTitle:"Run ⌘ + ⏎",format:{},editor:null,results:[],selectedResultTab:0},t.vars.tabs.push(t.vars.currentTab),k()},t.changeTab=function(e){k(),t.vars.currentTab=e},t.removeTab=function(e,a){a.stopPropagation();var n=function(){t.vars.tabs.splice(t.vars.tabs.indexOf(e),1),t.vars.tabs.length==t.vars.selectedTab&&t.vars.selectedTab--};e.changed?o.show(o.confirm().title("SQL was changed. Save it before exit?").targetEvent(a).ok("Yes").cancel("No")).then(function(){var a=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=a&&(t.vars.sqlHistory[a].sql=e.sql,t.vars.sqlHistory[a].name=e.name),i.set(b,t.vars.sqlHistory),n()},n):n()},t.removeResult=function(e,t,a){},a.$on("handleBroadcastUpdateVarsAndSnippets",function(e,a){t.aceApply()}),a.$on("handleBroadcastCalcSumCells",function(e,a){_.isObject(t.vars.currentTab.results[0])&&(t.vars.currentTab.results[0].cellsCalc=a,t.$applyAsync())}),a.$on("handleBroadcastInsertInActive",function(e,a){a.value&&t.insertWordInEditor(" "+a.value+" ")}),t.toggleSidenav=function(e){s(e).toggle()},t.removeHistory=function(e,a){a.preventDefault();var n=t.vars.sqlHistory.indexOf(e);-1!=n&&o.show(o.confirm().title("Delete "+e.name+"?").targetEvent(a).ok("Yes").cancel("No")).then(function(){t.vars.sqlHistory.splice(n,1),i.set(b,t.vars.sqlHistory)})},t.setSql=function(e){t.vars.currentTab.sql=e,t.toggleSidenav("log"),t.vars.currentTab.editor.setValue(e),d(function(){return t.vars.currentTab.editor.focus()},500)},t.changeTabName=function(e,a){a.stopPropagation(),o.show(o.prompt().title("Title tab").placeholder("title").initialValue(e.name).targetEvent(a).ok("Apply").cancel("Cancel")).then(function(a){var n=t.vars.sqlHistory.findIndex(function(t){return t.name==e.name});-1!=n&&(e.originalSql=e.sql,t.vars.sqlHistory[n].name=a,i.set(b,t.vars.sqlHistory)),e.name=a,k()})},t.vars.saveTabs?(t.vars.tabs=i.get(v),_.isArray(t.vars.tabs)||(t.vars.tabs=[]),t.vars.tabs.length>0?d(function(){return t.vars.currentTab=t.vars.tabs[0]},500):t.addTab()):(i.set(v,[]),t.addTab()),t.$on("$destroy",function(){r.setDatabase(a.currentDatabase),w(),n.onbeforeunload=null}),t.rightAceMenuList=[],t.showDialogUpload=function(t,a){function n(e,t){e.vars={UploadCsv:{content:null,header:!0,headerVisible:!0,separator:",",separatorVisible:!0,result:null,encoding:"ISO-8859-1",encodingVisible:!0,uploadButtonLabel:"Upload",callback:function(e){t.hide()}}},e.$watch("vars.UploadCsv.result",function(e){e&&t.hide(e)}),e.hide=function(){t.hide()},e.cancel=function(){t.cancel()}}n.$inject=["$scope","$mdDialog"],o.show({controller:n,templateUrl:"app/sql/showDialogUpload.html",parent:e.element(document.body),targetEvent:a,clickOutsideToClose:!0}).then(function(e){if(e&&t&&t.tables){var a=DataProvider.convertArrayToDataProvider(e,"csv");t.tables.push(new WidgetTable(a))}},function(){})},t.rightMenuProcess=function(e){t.vars.currentTab.sql=t.vars.currentTab.editor.getValue();var a=t.vars.currentTab.editor.session;if(t.vars.currentTab.editor.resize(),"Snippet"==e){var n=t.vars.currentTab.editor.getSelectedText();n&&(p.add(n),t.aceApply())}else"AutoFormat"==e?T():"Expand"==e?a.unfold():"Collapse All"==e?a.$mode.collapseAll(a):"Collapse"==e&&a.foldAll();t.vars.currentTab.editor.focus()}}e.module(t.app.name).controller("SqlController",a),a.$inject=["$scope","$rootScope","$window","localStorageService","API","$mdSidenav","$mdDialog","$mdToast","ThemeService","$timeout","$filter","hotkeys","Preference","Snippets","Variables"]}(angular,smi2),/* From 779667b9f4dc0a18fea763079b3798f3403072f3 Mon Sep 17 00:00:00 2001 From: Igor Strykhar Date: Thu, 13 Dec 2018 20:15:09 +0300 Subject: [PATCH 08/10] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 9d955b7e..80e27c3a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ Open source simple business intelligence application and sql editor tool for Cli Not need, open in browser http://ui.tabix.io/ +Alpha version : http://alpha.tabix.io + + ### If need install [Install to you host](https://tabix.io/doc/Install/) From 427f51207bfde1909c815c20cd4c3e79fc16aad2 Mon Sep 17 00:00:00 2001 From: Igor Date: Sun, 3 Mar 2019 17:44:01 +0300 Subject: [PATCH 09/10] add some metrics and dash --- src/app/metrics/clusterreplicas.js | 211 ++++++++++++++++++++++++++ src/app/metrics/clustersreplicas.html | 55 +++++++ src/app/metrics/dbsize.html | 29 ++++ src/app/metrics/dbsize.js | 167 ++++++++++++++++++++ src/app/metrics/merges.html | 55 +++++++ src/app/metrics/merges.js | 211 ++++++++++++++++++++++++++ src/app/metrics/metrics.html | 28 ++++ src/app/metrics/metrics.js | 13 +- src/app/metrics/overview.js | 120 ++++++++------- 9 files changed, 829 insertions(+), 60 deletions(-) create mode 100644 src/app/metrics/clusterreplicas.js create mode 100644 src/app/metrics/clustersreplicas.html create mode 100644 src/app/metrics/dbsize.html create mode 100644 src/app/metrics/dbsize.js create mode 100644 src/app/metrics/merges.html create mode 100644 src/app/metrics/merges.js diff --git a/src/app/metrics/clusterreplicas.js b/src/app/metrics/clusterreplicas.js new file mode 100644 index 00000000..82301323 --- /dev/null +++ b/src/app/metrics/clusterreplicas.js @@ -0,0 +1,211 @@ +(function (angular, smi2) { + 'use strict'; + + angular.module(smi2.app.name).controller('ClusterController', ClusterController); + ClusterController.$inject = [ + '$scope', + 'API', + 'ThemeService', + '$interval', + 'localStorageService', + '$mdDialog', + 'hotRegisterer' + ]; + + /** + * @ngdoc controller + */ + function ClusterController($scope, API, ThemeService, $interval, localStorageService,$mdDialog,hotRegisterer) { + + const LS_INTERVAL_KEY = 'proc.interval'; + const LS_SORT_KEY = 'proc.key'; + + + $scope.widgets=[]; + + $scope.staticGrid=true; + $scope.gridStackOptions = { + cellHeight: 200, + verticalMargin: 0, + disableDrag:true, + disableResize:true, + staticGrid:true + }; + $scope.logData={}; + + $scope.vars = { + readOnlyRows : true, + canShowTable : false, + WidgetTable : false, + queryesToKill:{}, + clusterMode: true, + logMode : true, + loading: false, + + isClusterLoad: false, + clusterList: false, + isDark: ThemeService.isDark(), + sort: /^[a-z0-9_]+$/.test(localStorageService.get(LS_SORT_KEY)) ? localStorageService.get(LS_SORT_KEY) : null, + interval: localStorageService.get(LS_INTERVAL_KEY) || -1, + + }; + + + + + + let intervalHandle = null; + + // ------------------------------------------------------------------------------ + $scope.initClusterConfig = () => { + // + + let sql = 'SELECT host_address,port FROM system.clusters GROUP BY host_address,port LIMIT 10'; + $scope.vars.clusterList = []; + API.fetchQuery(sql).then(function (data) { + data.data.forEach((cell) => { + $scope.vars.clusterList.push(cell.host_address + ':' + cell.port); + + }); + $scope.vars.isClusterLoad = true; + console.log("Cluster nodes list", $scope.vars.clusterList.join(",")); + // then cluster load config + $scope.load(); + }, function (response) { + $scope.vars.isClusterLoad = true; + console.error('Error ' + response); + }); + }; + // ------------------------------------------------------------------------------ + $scope.flush = () => { + $scope.logData={}; + }; + + // ------------------------------------------------------------------------------ + $scope.megreProcessData = ($new) => { + + // @todo : logData ???? need merge and update `++count` + $new.forEach((cell) => { + if ($scope.logData[cell.hash]) + { + + let c=$scope.logData[cell.hash].count; + + if ($scope.logData[cell.hash].initial_query_id!=cell.initial_query_id) + { + c=c+1; + } + cell.count=c; + $scope.logData[cell.hash]=cell; + } else + { + cell.count=1; + $scope.logData[cell.hash]=cell; + + } + + + + }); + // let array = $.map($scope.logData, function(value, index) { + // return [value]; + // }); + + return _.values($scope.logData); + + } ; + + // ------------------------------------------------------------------------------ + $scope.load = () => { + console.info("Call load processes"); + let sql = `SELECT *,cityHash64(*) as hash,hostName()`; + + + if ($scope.vars.isClusterLoad && $scope.vars.clusterList ) { + sql = sql + ` FROM remote('` + $scope.vars.clusterList.join(",") + `',system.replication_queue, '` + API.getLogin() + `','` + API.getPassword() + `') `; + } + else { + sql = sql + ` FROM system.replication_queue `; + } + + API.fetchQuery(sql).then(function ( queryResult ) { + + console.log('queryResult',queryResult); + let $_dataProvider=new DataProvider(queryResult); + if (!$scope.widgets[0]) + { + // make new WidgetTable + + $_dataProvider.setColumnsHumanSort(['bytes','memory_usage','bytes_read','bytes_written']); + $_dataProvider.setSort('rows',-1); + + $scope.widgets[0]=new WidgetTable($_dataProvider,false,12,9); + $_dataProvider.data.forEach((cell) => { + $scope.logData[cell.hash]=cell; + }); + } + else { + // on update exists + + + if ($scope.vars.logMode) { + // if need merge data + $scope.widgets[0].updateData($scope.megreProcessData($_dataProvider.data)); + } else { + // force reset data, no merge + $scope.widgets[0].updateData($_dataProvider.data); + } + + + + } + + + $scope.vars.canShowTable=true; + $scope.vars.data = true; + $scope.vars.loading = false; + + $scope.$applyAsync(); + + }, function ( response ) { + $scope.vars.loading = false; + console.error( 'Error ' + response ); + }); + }; + + // ------------------------------------------------------------------------------ + $scope.setInterval = () => { + + localStorageService.set(LS_INTERVAL_KEY, $scope.vars.interval); + + if (intervalHandle) { + $interval.cancel(intervalHandle); + intervalHandle = null; + } + if ($scope.vars.interval > -1) { + intervalHandle = $interval($scope.load, $scope.vars.interval * 1000); + } + }; + + // ------------------------------------------------------------------------------ + $scope.$on('$destroy', function() { + $scope.vars.interval=-1; + $interval.cancel(intervalHandle); + $scope.setInterval(); + }); + + + // ------------------------------------------------------------------------------ + // start + $scope.initClusterConfig(); + + + + if ($scope.vars.interval > -1) { + $scope.setInterval(); + } + + + } + +})(angular, smi2); diff --git a/src/app/metrics/clustersreplicas.html b/src/app/metrics/clustersreplicas.html new file mode 100644 index 00000000..cc79be2e --- /dev/null +++ b/src/app/metrics/clustersreplicas.html @@ -0,0 +1,55 @@ +
+

Cluster & Replicas (system.replication_queue)

+ +
+ + + + + + {{interval == -1 ? ('Refresh is disabled') : interval +' '+'sec'}} + + + + + + Refresh + + + + Reset + + +
+ +
+ + +
+
+
+ +
+
+ + + +
+ +
+ + +
+
+
+ +
+
+
+
+ +
diff --git a/src/app/metrics/dbsize.html b/src/app/metrics/dbsize.html new file mode 100644 index 00000000..d0ccf631 --- /dev/null +++ b/src/app/metrics/dbsize.html @@ -0,0 +1,29 @@ +

DB Size

+ + + +
+ +
+
+ +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
diff --git a/src/app/metrics/dbsize.js b/src/app/metrics/dbsize.js new file mode 100644 index 00000000..c948b743 --- /dev/null +++ b/src/app/metrics/dbsize.js @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2017 IgorStrykhar in Tabix LLC + * All rights reserved. + */ + +((angular, smi2, $) => { + 'use strict'; + angular.module(smi2.app.name).controller('DBSizeController', DBSizeController); + DBSizeController.$inject = [ + '$scope', + 'API', + 'ThemeService' + ]; + + function DBSizeController($scope, + API, + ThemeService) { + + $scope.widgets=[]; + + $scope.staticGrid=true; + $scope.gridStackOptions = { + cellHeight: 200, + verticalMargin: 0, + disableDrag:true, + disableResize:true, + staticGrid:true + }; + $scope.vars = { + uiTheme: ThemeService.themeObject, + isDark:ThemeService.isDark(), + }; + + $scope.dumpStaticGridSizes = () => { + + console.info('dumpStaticGridSizes'); + let x=[]; + $scope.widgets.map(function (t) { + + let oo={ + id:t.id, + x:t.x, + y:t.y, + sizeX:t.sizeX, + sizeY:t.sizeY + }; + x.push(oo); + console.log(oo); + }); + console.log(x); + }; + $scope.initTab = () => { + console.info("initPivotTab"); + }; + $scope.setWidgets = (numberWidget,w) => { + + w.id=numberWidget; + w.x=$scope.widgets[numberWidget].x; + w.y=$scope.widgets[numberWidget].y; + w.sizeX=$scope.widgets[numberWidget].sizeX; + w.sizeY=$scope.widgets[numberWidget].sizeY; + + + + $scope.widgets[numberWidget]=w; + + + + $scope.$applyAsync(); + } + + + $scope.init = () => { + + + $scope.widgets=[ + {id: 0, x: 0, y: 0, sizeX: 8, sizeY: 2}, + {id: 1, x: 0, y: 2, sizeX: 8, sizeY: 2}, + {id: 2, x: 0, y: 4, sizeX: 8, sizeY: 2}, + + // {id: 3, x: 0, y: 4, sizeX: 8, sizeY: 3}, + // {id: 4, x: 8, y: 2, sizeX: 4, sizeY: 4}, + // {id: 5, x: 0, y: 2, sizeX: 8, sizeY: 2} + // {x: 0, y: 0, sizeX: 2, sizeY: 2}, // 0 + // {x: 4, y: 0, sizeX: 2, sizeY: 2}, // 1 + // {x: 4, y: 4, sizeX: 4, sizeY: 4}, // 2 + // {x: 0, y: 4, sizeX: 4, sizeY: 4}, // 3 + // {x: 0, y: 8, sizeX: 4, sizeY: 4}, // 4 + // {x: 0, y: 8, sizeX: 4, sizeY: 4}, // 5 + ]; + + + // graph : https://ecomfe.github.io/echarts-examples/public/editor.html?c=graph-webkit-dep + // https://ecomfe.github.io/echarts-examples/public/data/asset/data/webkit-dep.json + // https://ecomfe.github.io/echarts-examples/public/editor.html?c=graph-npm + // https://ecomfe.github.io/echarts-examples/public/data/asset/data/npmdepgraph.min10.json + + console.info("Init DBSizeController"); + // + + + + + + + API.fetchQuery(`SELECT database,table,name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns`).then(function ( queryResult ) { + + let obj={ + path:'database.table.name.data_compressed_bytes' , + title:'columns data_compressed_bytes', + tooltip:'Size', + valueformat:'0.00 b' + }; + + let drawCommand={drawtype:'TREEMAP',code:obj}; + $scope.setWidgets(0,new WidgetDraw(new DataProvider(queryResult),drawCommand )); + + }); + API.fetchQuery(`SELECT database,table,sum(data_compressed_bytes) as data_compressed_bytes FROM system.columns GROUP BY database,table`).then(function ( queryResult ) { + + let obj={ + path:'database.table.data_compressed_bytes' , + title:'columns data_compressed_bytes', + tooltip:'Size', + valueformat:'0.00 b' + }; + + let drawCommand={drawtype:'TREEMAP',code:obj}; + $scope.setWidgets(1,new WidgetDraw(new DataProvider(queryResult),drawCommand )); + + }); + API.fetchQuery(`select toStartOfDay(modification_time) as dt, + sum(bytes) as bytes FROM system.parts group by dt order by dt LIMIT 30000`).then(function ( queryResult ) { + let obj={ + autoAxis:true, + markLine:true, + // stack:true, + title:'system.parts bytes' + }; + + let drawCommand={drawtype:'CHART',code:obj}; + $scope.setWidgets(2,new WidgetDraw(new DataProvider(queryResult),drawCommand )); + + }); + API.fetchQuery(`select concat(database,'.',table) as table,sum(bytes) as bytes from system.parts + group by table order by bytes desc LIMIT 3000`).then(function ( queryResult ) { + let obj={ + // autoAxis:false,//true, + // markLine:true, + // stack:true, + title:'table bytes' + }; + + let drawCommand={drawtype:'BAR',code:obj}; + $scope.setWidgets(3,new WidgetDraw(new DataProvider(queryResult),drawCommand)); + + }); + + + + + }; + + $scope.init(); + + } +})(angular, smi2, window.$); diff --git a/src/app/metrics/merges.html b/src/app/metrics/merges.html new file mode 100644 index 00000000..cc3bab95 --- /dev/null +++ b/src/app/metrics/merges.html @@ -0,0 +1,55 @@ +
+

Cluster : Merges (system.merges)

+ +
+ + + + + + {{interval == -1 ? ('Refresh is disabled') : interval +' '+'sec'}} + + + + + + Refresh + + + + Reset + + +
+ +
+ + +
+
+
+ +
+
+ + + +
+ +
+ + +
+
+
+ +
+
+
+
+ +
diff --git a/src/app/metrics/merges.js b/src/app/metrics/merges.js new file mode 100644 index 00000000..22d3275b --- /dev/null +++ b/src/app/metrics/merges.js @@ -0,0 +1,211 @@ +(function (angular, smi2) { + 'use strict'; + + angular.module(smi2.app.name).controller('MergesController', MergesController); + MergesController.$inject = [ + '$scope', + 'API', + 'ThemeService', + '$interval', + 'localStorageService', + '$mdDialog', + 'hotRegisterer' + ]; + + /** + * @ngdoc controller + */ + function MergesController($scope, API, ThemeService, $interval, localStorageService,$mdDialog,hotRegisterer) { + + const LS_INTERVAL_KEY = 'proc.interval'; + const LS_SORT_KEY = 'proc.key'; + + + $scope.widgets=[]; + + $scope.staticGrid=true; + $scope.gridStackOptions = { + cellHeight: 200, + verticalMargin: 0, + disableDrag:true, + disableResize:true, + staticGrid:true + }; + $scope.logData={}; + + $scope.vars = { + readOnlyRows : true, + canShowTable : false, + WidgetTable : false, + queryesToKill:{}, + clusterMode: true, + logMode : true, + loading: false, + + isClusterLoad: false, + clusterList: false, + isDark: ThemeService.isDark(), + sort: /^[a-z0-9_]+$/.test(localStorageService.get(LS_SORT_KEY)) ? localStorageService.get(LS_SORT_KEY) : null, + interval: localStorageService.get(LS_INTERVAL_KEY) || -1, + + }; + + + + + + let intervalHandle = null; + + // ------------------------------------------------------------------------------ + $scope.initClusterConfig = () => { + // + + let sql = 'SELECT host_address,port FROM system.clusters GROUP BY host_address,port LIMIT 10'; + $scope.vars.clusterList = []; + API.fetchQuery(sql).then(function (data) { + data.data.forEach((cell) => { + $scope.vars.clusterList.push(cell.host_address + ':' + cell.port); + + }); + $scope.vars.isClusterLoad = true; + console.log("Cluster nodes list", $scope.vars.clusterList.join(",")); + // then cluster load config + $scope.load(); + }, function (response) { + $scope.vars.isClusterLoad = true; + console.error('Error ' + response); + }); + }; + // ------------------------------------------------------------------------------ + $scope.flush = () => { + $scope.logData={}; + }; + + // ------------------------------------------------------------------------------ + $scope.megreProcessData = ($new) => { + + // @todo : logData ???? need merge and update `++count` + $new.forEach((cell) => { + if ($scope.logData[cell.hash]) + { + + let c=$scope.logData[cell.hash].count; + + if ($scope.logData[cell.hash].initial_query_id!=cell.initial_query_id) + { + c=c+1; + } + cell.count=c; + $scope.logData[cell.hash]=cell; + } else + { + cell.count=1; + $scope.logData[cell.hash]=cell; + + } + + + + }); + // let array = $.map($scope.logData, function(value, index) { + // return [value]; + // }); + + return _.values($scope.logData); + + } ; + + // ------------------------------------------------------------------------------ + $scope.load = () => { + console.info("Call load processes"); + let sql = `SELECT *,cityHash64(result_part_name) as hash,hostName()`; + + + if ($scope.vars.isClusterLoad && $scope.vars.clusterList ) { + sql = sql + ` FROM remote('` + $scope.vars.clusterList.join(",") + `',system.merges, '` + API.getLogin() + `','` + API.getPassword() + `') `; + } + else { + sql = sql + ` FROM system.merges `; + } + + API.fetchQuery(sql).then(function ( queryResult ) { + + console.log('queryResult',queryResult); + let $_dataProvider=new DataProvider(queryResult); + if (!$scope.widgets[0]) + { + // make new WidgetTable + + $_dataProvider.setColumnsHumanSort(['bytes','memory_usage','bytes_read','bytes_written']); + $_dataProvider.setSort('rows',-1); + + $scope.widgets[0]=new WidgetTable($_dataProvider,false,12,9); + $_dataProvider.data.forEach((cell) => { + $scope.logData[cell.hash]=cell; + }); + } + else { + // on update exists + + + if ($scope.vars.logMode) { + // if need merge data + $scope.widgets[0].updateData($scope.megreProcessData($_dataProvider.data)); + } else { + // force reset data, no merge + $scope.widgets[0].updateData($_dataProvider.data); + } + + + + } + + + $scope.vars.canShowTable=true; + $scope.vars.data = true; + $scope.vars.loading = false; + + $scope.$applyAsync(); + + }, function ( response ) { + $scope.vars.loading = false; + console.error( 'Error ' + response ); + }); + }; + + // ------------------------------------------------------------------------------ + $scope.setInterval = () => { + + localStorageService.set(LS_INTERVAL_KEY, $scope.vars.interval); + + if (intervalHandle) { + $interval.cancel(intervalHandle); + intervalHandle = null; + } + if ($scope.vars.interval > -1) { + intervalHandle = $interval($scope.load, $scope.vars.interval * 1000); + } + }; + + // ------------------------------------------------------------------------------ + $scope.$on('$destroy', function() { + $scope.vars.interval=-1; + $interval.cancel(intervalHandle); + $scope.setInterval(); + }); + + + // ------------------------------------------------------------------------------ + // start + $scope.initClusterConfig(); + + + + if ($scope.vars.interval > -1) { + $scope.setInterval(); + } + + + } + +})(angular, smi2); diff --git a/src/app/metrics/metrics.html b/src/app/metrics/metrics.html index 63593515..0f672d55 100644 --- a/src/app/metrics/metrics.html +++ b/src/app/metrics/metrics.html @@ -34,5 +34,33 @@ + + + + DB Size + + +
+
+
+ + + + + Cluster&Replica + + +
+
+
+ + + + Merges + + +
+
+
diff --git a/src/app/metrics/metrics.js b/src/app/metrics/metrics.js index d2c39bf7..e49a5cc9 100644 --- a/src/app/metrics/metrics.js +++ b/src/app/metrics/metrics.js @@ -20,11 +20,13 @@ $scope.vars = { uiTheme: ThemeService.themeObject, isDark:ThemeService.isDark(), - selectedTabResultIndex:0,// + selectedTabResultIndex:3,// active:{ Overview:false, Chart:false, - Processes:false + Processes:false, + DBSize:false, + Cluster:false } }; @@ -40,6 +42,13 @@ $scope.vars.active.Overview=true; }; + $scope.initDBSizeTab = (d) => { + $scope.vars.active.DBSize=true; + }; + $scope.initClusterTab = (d) => { + $scope.vars.active.Cluster=true; + }; + } diff --git a/src/app/metrics/overview.js b/src/app/metrics/overview.js index 63303810..1d1dd84f 100644 --- a/src/app/metrics/overview.js +++ b/src/app/metrics/overview.js @@ -74,14 +74,13 @@ $scope.widgets=[ - {id: 0, x: 0, y: 0, sizeX: 4, sizeY: 2}, - {id: 1, x: 8, y: 0, sizeX: 4, sizeY: 2}, + {id: 0, x: 0, y: 0, sizeX: 8, sizeY: 2}, + {id: 1, x: 0, y: 2, sizeX: 8, sizeY: 2}, + {id: 2, x: 0, y: 4, sizeX: 8, sizeY: 2}, - {id: 2, x: 4, y: 0, sizeX: 4, sizeY: 2}, - - {id: 3, x: 0, y: 4, sizeX: 8, sizeY: 3}, - {id: 4, x: 8, y: 2, sizeX: 4, sizeY: 4}, - {id: 5, x: 0, y: 2, sizeX: 8, sizeY: 2} + // {id: 3, x: 0, y: 4, sizeX: 8, sizeY: 3}, + // {id: 4, x: 8, y: 2, sizeX: 4, sizeY: 4}, + // {id: 5, x: 0, y: 2, sizeX: 8, sizeY: 2} // {x: 0, y: 0, sizeX: 2, sizeY: 2}, // 0 // {x: 4, y: 0, sizeX: 2, sizeY: 2}, // 1 // {x: 4, y: 4, sizeX: 4, sizeY: 4}, // 2 @@ -110,62 +109,67 @@ }); - API.fetchQuery(`SELECT database,table,name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns`).then(function ( queryResult ) { - - let obj={ - path:'database.table.name.data_compressed_bytes' , - title:'columns data_compressed_bytes', - tooltip:'Size', - valueformat:'0.00 b' - }; - - let drawCommand={drawtype:'TREEMAP',code:obj}; - $scope.setWidgets(1,new WidgetDraw(new DataProvider(queryResult),drawCommand )); - - }); - API.fetchQuery(`SELECT database,table,sum(data_compressed_bytes) as data_compressed_bytes FROM system.columns GROUP BY database,table`).then(function ( queryResult ) { - - let obj={ - path:'database.table.data_compressed_bytes' , - title:'columns data_compressed_bytes', - tooltip:'Size', - valueformat:'0.00 b' - }; - - let drawCommand={drawtype:'TREEMAP',code:obj}; - $scope.setWidgets(2,new WidgetDraw(new DataProvider(queryResult),drawCommand )); - - }); - API.fetchQuery(`select toStartOfDay(modification_time) as dt, - sum(bytes) as bytes FROM system.parts group by dt order by dt LIMIT 30000`).then(function ( queryResult ) { - let obj={ - autoAxis:true, - markLine:true, - // stack:true, - title:'system.parts bytes' - }; - - let drawCommand={drawtype:'CHART',code:obj}; - $scope.setWidgets(3,new WidgetDraw(new DataProvider(queryResult),drawCommand )); - - }); - API.fetchQuery(`select concat(database,'.',table) as table,sum(bytes) as bytes from system.parts - group by table order by bytes desc LIMIT 3000`).then(function ( queryResult ) { - let obj={ - // autoAxis:false,//true, - // markLine:true, - // stack:true, - title:'table bytes' - }; + // API.fetchQuery(`SELECT database,table,name, data_compressed_bytes, data_uncompressed_bytes FROM system.columns`).then(function ( queryResult ) { + // + // let obj={ + // path:'database.table.name.data_compressed_bytes' , + // title:'columns data_compressed_bytes', + // tooltip:'Size', + // valueformat:'0.00 b' + // }; + // + // let drawCommand={drawtype:'TREEMAP',code:obj}; + // $scope.setWidgets(1,new WidgetDraw(new DataProvider(queryResult),drawCommand )); + // + // }); + // API.fetchQuery(`SELECT database,table,sum(data_compressed_bytes) as data_compressed_bytes FROM system.columns GROUP BY database,table`).then(function ( queryResult ) { + // + // let obj={ + // path:'database.table.data_compressed_bytes' , + // title:'columns data_compressed_bytes', + // tooltip:'Size', + // valueformat:'0.00 b' + // }; + // + // let drawCommand={drawtype:'TREEMAP',code:obj}; + // $scope.setWidgets(2,new WidgetDraw(new DataProvider(queryResult),drawCommand )); + // + // }); + // API.fetchQuery(`select toStartOfDay(modification_time) as dt, + // sum(bytes) as bytes FROM system.parts group by dt order by dt LIMIT 30000`).then(function ( queryResult ) { + // let obj={ + // autoAxis:true, + // markLine:true, + // // stack:true, + // title:'system.parts bytes' + // }; + // + // let drawCommand={drawtype:'CHART',code:obj}; + // $scope.setWidgets(3,new WidgetDraw(new DataProvider(queryResult),drawCommand )); + // + // }); + // API.fetchQuery(`select concat(database,'.',table) as table,sum(bytes) as bytes from system.parts + // group by table order by bytes desc LIMIT 3000`).then(function ( queryResult ) { + // let obj={ + // // autoAxis:false,//true, + // // markLine:true, + // // stack:true, + // title:'table bytes' + // }; + // + // let drawCommand={drawtype:'BAR',code:obj}; + // $scope.setWidgets(4,new WidgetDraw(new DataProvider(queryResult),drawCommand)); + // + // }); - let drawCommand={drawtype:'BAR',code:obj}; - $scope.setWidgets(4,new WidgetDraw(new DataProvider(queryResult),drawCommand)); + API.fetchQuery(`SELECT * FROM system.clusters`).then(function ( queryResult ) { + $scope.setWidgets(1,new WidgetTable(new DataProvider(queryResult))); }); - API.fetchQuery(`SELECT * FROM system.clusters`).then(function ( queryResult ) { - $scope.setWidgets(5,new WidgetTable(new DataProvider(queryResult))); + API.fetchQuery(` SELECT metric,toInt64(value) as value,'metrics' as type FROM system.metrics ORDER BY metric `).then(function ( queryResult ) { + $scope.setWidgets(2,new WidgetTable(new DataProvider(queryResult))); }); From 554b2eea568200b5aed4b16416d43042e51324cf Mon Sep 17 00:00:00 2001 From: "Ilya.Vasin" Date: Wed, 1 Apr 2020 22:13:15 +0300 Subject: [PATCH 10/10] Added env var to configure base href in index.html for docker --- docker/start.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/start.sh b/docker/start.sh index c8c06c87..29d64615 100755 --- a/docker/start.sh +++ b/docker/start.sh @@ -30,4 +30,11 @@ if [ ! -z "$CONN" ]; then echo $INDEX > /var/www/html/index.html fi fi +if [ ! -z "$BASE_URL" ]; then + INDEX=$(cat /var/www/html/index.html) + OLD="" + NEW="" + INDEX=${INDEX/$OLD/$NEW} + echo $INDEX > /var/www/html/index.html +fi nginx -g "daemon off;"