@datagrok/compute 1.45.0 → 1.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/CREDITS.md +41 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +5 -3
- package/scripts/complexInputs.js +13 -0
- package/scripts/globalValidationTest.js +11 -0
- package/scripts/simpleInputs.js +16 -0
- package/scripts/simpleInputsDefaultValues.js +15 -0
- package/scripts/validationTest.js +11 -0
- package/src/package-api.ts +16 -0
- package/src/package-test.ts +3 -0
- package/src/package.g.ts +24 -0
- package/src/package.ts +81 -2
- package/src/tests/rich-function-view-direct-tests.ts +403 -0
- package/src/tests/rich-function-view-tests.ts +512 -0
- package/src/tests/snapshots/fc1.json +1 -0
- package/src/tests/utils.ts +8 -0
- package/tsconfig.json +1 -0
package/dist/package-test.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var compute_test;(()=>{var t={4189(t,e,n){"use strict";n.d(e,{FO:()=>o}),n(9316);const o=DG.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,');o.columns.add(DG.Column.fromList(DG.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))))},1369(t,e,n){"use strict";n(6382)},6382(t,e,n){"use strict";n.d(e,{CN:()=>y,N$:()=>k,Xb:()=>w});var o=n(4189),s=(n(1369),function(t,e,n,o){return new(n||(n=Promise))(function(s,i){function r(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}c((o=o.apply(t,e||[])).next())})});const i=3e4,r=108e5,a=console.log.bind(console),c=console.info.bind(console),l=console.warn.bind(console),u=console.error.bind(console),y={},f="Auto Tests",d="Demo",p="Detectors",h="Core",x={};var g;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(g||(g={}));class m{constructor(t,e,n){this.catchUnhandled=!0,this.report=!1,this.returnOnFail=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e),void 0!==n&&(this.returnOnFail=n)}}class v{constructor(t,e,n,o){var r;this.category=t,this.name=e,null!=o||(o={}),null!==(r=o.timeout)&&void 0!==r||(o.timeout=i),this.options=o,this.test=()=>s(this,void 0,void 0,function*(){return new Promise((t,e)=>s(this,void 0,void 0,function*(){var o;let s="";try{DG.Test.isInDebug;let t=yield n();try{s=null!==(o=null==t?void 0:t.toString())&&void 0!==o?o:""}catch(t){s="Can't convert test's result to string",console.error(`Can't convert test's result to string in the ${this.category}:${this.name} test`)}}catch(t){e(t)}t(s)}))})}}function C(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function b(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function w(t,e){var n,a,c,l,u,g,m,w,k,O;return s(this,void 0,void 0,function*(){const D=t.id;if(x[D])return;const T=e?e.tests:y;if("DevTools"===t.name||e&&"DevTools"===e._package.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g);let o=null!==(n=e.pop())&&void 0!==n?n:t.name,s=e.length?h+": "+e.join(": "):h,r=o.split(" | ");o=r[r.length-1],r.unshift(s),r.pop(),s=r.join(": "),void 0===T[s]&&(T[s]={tests:[],clear:!0}),T[s].tests.push(new v(s,o,t.test,{isAggregated:!1,timeout:null!==(c=null===(a=t.options)||void 0===a?void 0:a.timeout)&&void 0!==c?c:i,skipReason:null===(l=t.options)||void 0===l?void 0:l.skipReason,owner:null===(u=t.options)||void 0===u?void 0:u.owner,benchmark:null!==(m=null===(g=t.options)||void 0===g?void 0:g.benchmark)&&void 0!==m&&m}))}const A=[],S=[],N=[],R=yield grok.dapi.functions.filter(`package.id = "${D}"`).list(),E=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const e of R){const n=e.options.test,a=e.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let t=0;t<n.length;t++){const o=n[t].matchAll(E),a={};Array.from(o).forEach(t=>{t[0].startsWith("skip")?a.skip=t[1]:t[0].startsWith("wait")?a.wait=parseInt(t[2]):t[0].startsWith("cat")?a.cat=t[3]:t[0].startsWith("timeout")&&(a.timeout=parseInt(t[4]))});const c=new v(null!==(w=a.cat)&&void 0!==w?w:f,1===n.length?e.name:`${e.name} ${t+1}`,()=>s(this,void 0,void 0,function*(){const o=yield grok.functions.eval(b(n[t],e));if(a.wait&&(yield L(a.wait)),"boolean"==typeof o&&!o)throw`Failed: ${n[t]}, expected true, got ${o}`}),{skipReason:a.skip,timeout:DG.Test.isInBenchmark?null!==(k=a.benchmarkTimeout)&&void 0!==k?k:r:null!==(O=a.timeout)&&void 0!==O?O:i});if(a.cat){const t=a.cat;void 0===T[t]&&(T[t]={tests:[],clear:!0}),T[t].tests||(T[t].tests=[]),T[t].tests.push(c)}else A.push(c)}if(a){const t=e.options.demoWait?parseInt(e.options.demoWait):void 0,n=new v(d,e.friendlyName,()=>s(this,void 0,void 0,function*(){yield L(300),grok.shell.clearLastError(),yield e.apply(),yield L(t||2e3);const n=yield grok.shell.lastError;if(n)throw new Error(n)}),{skipReason:e.options.demoSkip});S.push(n)}if(e.hasTag("semTypeDetector")){let n=o.FO;e.options.testData&&(n=yield grok.data.files.openTable(`System:AppData/${t.nqName}/${e.options.testData}`));const i=new v(p,e.friendlyName,()=>s(this,void 0,void 0,function*(){const o=[];console.log(`System:AppData/${t.nqName}/${e.options.testData}`);for(const t of n.clone().columns){const n=yield e.apply([t]);o.push(n||t.semType)}const s=o.filter(t=>t);C(s.length,1),e.options.testDataColumnName&&C(s[0],e.options.testDataColumnName)}),{skipReason:e.options.skipTest});N.push(i)}}x[D]=!0,A.length>0&&(T[f]={tests:A,clear:!0}),S.length>0&&(T[d]={tests:S,clear:!0}),N.length>0&&(T[p]={tests:N,clear:!1})})}function k(t){var e,n,o;return s(this,void 0,void 0,function*(){const f=(null==t?void 0:t.nodeOptions)?t.nodeOptions.package:grok.functions.getCurrentCall().func.package;if(!f)throw new Error("Can't run tests outside of the package");const d=null===(e=f.packageOwner)||void 0===e?void 0:e.match(/<([^>]*)>/),p=d?d[1]:"";null!=f&&(yield w(f));const h=[];console.log("Running tests..."),console.log(t),null!=t||(t={}),null!==(n=(o=t).testContext)&&void 0!==n||(o.testContext=new m),grok.shell.clearLastError();const x=function(){const t=[];return console.log=(...e)=>{t.push(...e),a(...e)},console.info=(...e)=>{t.push(...e),c(...e)},console.warn=(...e)=>{t.push(...e),l(...e)},console.error=(...e)=>{t.push(...e),u(...e)},t}();yield function(t,e){var n,o,i,r,y,d;return s(this,void 0,void 0,function*(){try{let c=null!=(null==e?void 0:e.skipToCategory),l=!1;for(const[u,x]of Object.entries(t)){if(null===(n=e.exclude)||void 0===n?void 0:n.some(t=>u.startsWith(t)))continue;if(null!=(null==e?void 0:e.category)&&!u.toLowerCase().startsWith(null==e?void 0:e.category.toLowerCase().trim()))continue;if(c)if(l)c=!1;else{if(null==(null==e?void 0:e.skipToCategory)||u.toLowerCase().trim()!==(null==e?void 0:e.skipToCategory.toLowerCase().trim()))continue;l=!0}const t=null===(o=x.tests)||void 0===o?void 0:o.every(t=>{var n;return(null===(n=t.options)||void 0===n?void 0:n.skipReason)||null!=(null==e?void 0:e.test)&&e.test.toLowerCase()!==t.name.toLowerCase()});if(!t){const t=(null!==(i=x.tests)&&void 0!==i?i:[]).filter(t=>{var n;return(null===(n=t.options)||void 0===n?void 0:n.skipReason)||null!=(null==e?void 0:e.test)&&e.test.toLowerCase()!==t.name.toLowerCase()}).length;a(`Package testing: Started {{${u}}}${t>0?` skipped {{${t}}}`:""}`),x.beforeStatus=yield g(x.before,u)}let m,C=null!==(r=x.tests)&&void 0!==r?r:[];e.stressTest&&(C=C.filter(t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.stressTest}),C=T(C)),(null!==(d=null===(y=e.tags)||void 0===y?void 0:y.length)&&void 0!==d?d:0)>0&&(C=C.filter(t=>{var n,o;return null===(o=null===(n=t.options)||void 0===n?void 0:n.tags)||void 0===o?void 0:o.some(t=>{var n;return(null!==(n=null==e?void 0:e.tags)&&void 0!==n?n:[]).includes(t)})})),x.beforeStatus?(m=Array.from(C.map(t=>({date:(new Date).toISOString(),category:u,name:t.name,success:!1,result:"before() failed",ms:0,skipped:!1,logs:"",owner:p,package:f.name,widgetsDifference:0,flaking:DG.Test.isReproducing}))),m.forEach(t=>s(this,void 0,void 0,function*(){return yield grok.shell.reportTest("package",t)}))):m=yield v(x,e,c);const b=m.filter(t=>"skipped"!=t.result);if(t||(x.afterStatus=yield g(x.after,u)),x.afterStatus&&(a(`Package testing: Category after() {{${u}}} failed`),a(`Package testing: Result for {{${u}}} after: ${x.afterStatus}`),b.push({date:(new Date).toISOString(),category:u,name:"after",success:!1,result:x.afterStatus,ms:0,skipped:!1,logs:"",owner:p,package:f.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),x.beforeStatus&&(a(`Package testing: Category before() {{${u}}} failed`),a(`Package testing: Result for {{${u}}} before: ${x.beforeStatus}`),b.push({date:(new Date).toISOString(),category:u,name:"before",success:!1,result:x.beforeStatus,ms:0,skipped:!1,logs:"",owner:p,package:f.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),h.push(...b),e.returnOnFail&&b.some(t=>!t.success&&!t.skipped&&t.name!==e.skipToTest))break}}finally{console.log=a,console.info=c,console.warn=l,console.error=u}if(e.testContext.catchUnhandled&&!DG.Test.isInBenchmark){yield L(1e3);const t=yield grok.shell.lastError;if(null!=t){const e={logs:"",date:(new Date).toISOString(),category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1,owner:null!=p?p:"",package:f.name,widgetsDifference:0};a(`Package testing: Unhandled Exception: ${t}`),h.push(Object.assign(Object.assign({},e),{flaking:DG.Test.isReproducing&&!t})),e.package=f.name,yield grok.shell.reportTest("package",e)}}})}(y,t);for(let t of h)t.result=t.result.toString().replace(/"/g,"'"),null!=t.logs&&(t.logs=t.logs.toString().replace(/"/g,"'"));return h;function g(t,e){return s(this,void 0,void 0,function*(){let n;try{void 0!==t&&(yield A(()=>s(this,void 0,void 0,function*(){yield t()}),1e5,`before ${e}: timeout error`))}catch(t){n=yield O(t)}return n})}function v(t,e,n){var o,a,c,l,u,y,d,h,g,m,v,b,w,k,O,T,L,A;return s(this,void 0,void 0,function*(){let s=null!==(o=t.tests)&&void 0!==o?o:[];const S=[],N=C();if(t.clear){let o=n&&null!=e.skipToTest;for(let n=0;n<s.length;n++){s[n].options&&void 0===(null===(a=s[n].options)||void 0===a?void 0:a.benchmark)&&(s[n].options||(s[n].options={}),s[n].options.benchmark=null!==(c=t.benchmarks)&&void 0!==c&&c);let b=s[n];if(e.test&&e.test.toLowerCase()!==b.name.toLowerCase())continue;if(o){if(null==(null==e?void 0:e.skipToTest)||b.name.toLowerCase().trim()!==(null==e?void 0:e.skipToTest.toLowerCase().trim()))continue;o=!1}(null==b?void 0:b.options)&&(b.options.owner=null!==(d=null!==(y=null!==(u=null===(l=s[n].options)||void 0===l?void 0:l.owner)&&void 0!==u?u:null==t?void 0:t.owner)&&void 0!==y?y:p)&&void 0!==d?d:"");let w=yield D(b,null==e?void 0:e.test,x,DG.Test.isInBenchmark?null!==(g=null===(h=s[n].options)||void 0===h?void 0:h.benchmarkTimeout)&&void 0!==g?g:r:null!==(v=null===(m=s[n].options)||void 0===m?void 0:m.timeout)&&void 0!==v?v:i,f.name,e.verbose);if(w&&(S.push(Object.assign(Object.assign({},w),{widgetsDifference:C()-N})),e.returnOnFail&&e.skipToTest!==b.name&&!w.success&&!w.skipped))return S;e.nodeOptions||(grok.shell.closeAll(),DG.Balloon.closeAll())}}else{let o=n&&null!=e.skipToTest;for(let n=0;n<s.length;n++){let i=s[n];if(e.test&&e.test.toLowerCase()!==i.name.toLowerCase())continue;if(o){null!=(null==e?void 0:e.skipToTest)&&i.name.toLowerCase().trim()===(null==e?void 0:e.skipToTest.toLowerCase().trim())&&(o=!1);continue}(null==i?void 0:i.options)&&(i.options.owner=null!==(O=null!==(k=null!==(w=null===(b=s[n].options)||void 0===b?void 0:b.owner)&&void 0!==w?w:null==t?void 0:t.owner)&&void 0!==k?k:p)&&void 0!==O?O:"");let a=yield D(i,null==e?void 0:e.test,x,DG.Test.isInBenchmark?null!==(L=null===(T=s[n].options)||void 0===T?void 0:T.benchmarkTimeout)&&void 0!==L?L:r:null===(A=s[n].options)||void 0===A?void 0:A.timeout,f.name,e.verbose);if(a&&(S.push(Object.assign(Object.assign({},a),{widgetsDifference:C()-N})),e.returnOnFail&&e.skipToTest!==i.name&&!a.success&&!a.skipped))return S}}return S})}function C(){var t;if("undefined"!=typeof process)return 0;let e=-1;try{e=DG.Widget.getAll().length}catch(e){console.warn(null!==(t=e.message)&&void 0!==t?t:e)}return e}})}function O(t){return s(this,void 0,void 0,function*(){return`${t.toString()}\n${t.stack?yield DG.Logger.translateStackTrace(t.stack):""}`})}function D(t,e,n,o,r,c){var l,y,f,d,p,h,x,g,m,v,C,b,w,k;return s(this,void 0,void 0,function*(){let s;n.length=0;const D=null!=e&&t.name.toLowerCase()!==e.toLowerCase();let T=(null===(l=t.options)||void 0===l?void 0:l.skipReason)||D,L=D?"skipped":null===(y=t.options)||void 0===y?void 0:y.skipReason;if(DG.Test.isInBenchmark&&!(null===(f=t.options)||void 0===f?void 0:f.benchmark))return void a(`Package testing: Skipped {{${t.category}}} {{${t.name}}} doesnt available in benchmark mode`);T&&!DG.Test.isInBenchmark&&a(`Package testing: Skipped {{${t.category}}} {{${t.name}}}`),T||a(`Package testing: Started {{${t.category}}} {{${t.name}}}`);const S=Date.now(),N=new Date(S).toISOString();try{if(T)s={name:t.name,owner:null!==(p=null===(d=t.options)||void 0===d?void 0:d.owner)&&void 0!==p?p:"",category:t.category,logs:"",date:N,success:!0,result:L,ms:0,skipped:!0,package:null!=r?r:"",flaking:DG.Test.isReproducing};else{let e=null!=o?o:i;DG.Test.isProfiling&&console.profile(`${t.category}: ${t.name}`),s={name:t.name,owner:null!==(x=null===(h=t.options)||void 0===h?void 0:h.owner)&&void 0!==x?x:"",category:t.category,logs:"",date:N,success:!0,result:null!==(g=(yield A(t.test,e)).toString())&&void 0!==g?g:"OK",ms:0,skipped:!1,package:null!=r?r:"",flaking:DG.Test.isReproducing},DG.Test.isProfiling&&(console.profileEnd(`${t.category}: ${t.name}`),grok.shell.info(`Profiling of ${t.category}: ${t.name} finished \n Please ensure that you have opened DevTools (F12) / Performance panel before test starts.`))}}catch(e){u(e),s={name:t.name,owner:null!==(v=null===(m=t.options)||void 0===m?void 0:m.owner)&&void 0!==v?v:"",category:t.category,logs:"",date:N,success:!1,result:yield O(e),ms:0,skipped:!1,package:null!=r?r:"",flaking:!1}}if((null===(C=t.options)||void 0===C?void 0:C.isAggregated)&&s.result.constructor===DG.DataFrame){const t=s.result.col("success");if(t&&(s.success=t.stats.sum===t.length),!c){const t=s.result;t.columns.remove("stack"),t.rows.removeWhere(t=>t.get("success")),s.result=t}s.result=s.result.toCsv()}if(s.logs=n.join("\n"),s.ms=Date.now()-S,T||a(`Package testing: Finished {{${t.category}}} {{${t.name}}} with {{${s.success?"success":"error"}}} for ${s.ms} ms`),s.success||a(`Package testing: Result for {{${t.category}}} {{${t.name}}}: ${s.result}`),s.category=t.category,s.name=t.name,s.owner=null!==(w=null===(b=t.options)||void 0===b?void 0:b.owner)&&void 0!==w?w:"",!D){let e={success:s.success,result:s.result,ms:s.ms,date:s.date,skipped:s.skipped,category:t.category,name:t.name,logs:s.logs,owner:s.owner,flaking:DG.Test.isReproducing&&s.success,package:s.package};if(s.result.constructor==Object){const t=Object.keys(s.result).reduce((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:s.result[e]}),{});e=Object.assign(Object.assign({},e),t)}e.result instanceof DG.DataFrame&&(e.result=JSON.stringify(null===(k=e.result)||void 0===k?void 0:k.toJson())||""),yield grok.shell.reportTest("package",e)}return s})}function T(t){const e=t.slice();return e.sort(()=>Math.random()-.5),e}function L(t){return s(this,void 0,void 0,function*(){yield new Promise(e=>setTimeout(e,t))})}function A(t,e,n="EXECUTION TIMEOUT"){return s(this,void 0,void 0,function*(){let o=null;const s=new Promise((t,s)=>{o=setTimeout(()=>{s(n)},e)});try{return yield Promise.race([t(),s])}finally{o&&clearTimeout(o)}})}DG.DataFrame.fromColumns([DG.Column.fromStrings("col",["val1","val2","val3"])])},9316(t,e,n){var o;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function n(t,n,o,s,i){for(var r,a,c,l,u,y,f,d,p,h,x,g,m;i>=64;){for(r=n[0],a=n[1],c=n[2],l=n[3],u=n[4],y=n[5],f=n[6],d=n[7],h=0;h<16;h++)x=s+4*h,t[h]=(255&o[x])<<24|(255&o[x+1])<<16|(255&o[x+2])<<8|255&o[x+3];for(h=16;h<64;h++)g=((p=t[h-2])>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=t[h-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,t[h]=(g+t[h-7]|0)+(m+t[h-16]|0);for(h=0;h<64;h++)g=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&y^~u&f)|0)+(d+(e[h]+t[h]|0)|0)|0,m=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&a^r&c^a&c)|0,d=f,f=y,y=u,u=l+g|0,l=c,c=a,a=r,r=g+m|0;n[0]+=r,n[1]+=a,n[2]+=c,n[3]+=l,n[4]+=u,n[5]+=y,n[6]+=f,n[7]+=d,s+=64,i-=64}return s}var o=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var o=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[o++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(o=n(this.temp,this.state,t,o,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[o++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,o=this.bufferLength,s=e/536870912|0,i=e<<3,r=e%64<56?64:128;this.buffer[o]=128;for(var a=o+1;a<r-8;a++)this.buffer[a]=0;this.buffer[r-8]=s>>>24&255,this.buffer[r-7]=s>>>16&255,this.buffer[r-6]=s>>>8&255,this.buffer[r-5]=s>>>0&255,this.buffer[r-4]=i>>>24&255,this.buffer[r-3]=i>>>16&255,this.buffer[r-2]=i>>>8&255,this.buffer[r-1]=i>>>0&255,n(this.temp,this.state,this.buffer,0,r),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=o;var s=function(){function t(t){this.inner=new o,this.outer=new o,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new o).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function i(t){var e=(new o).update(t),n=e.digest();return e.clean(),n}function r(t,e){var n=new s(t).update(e),o=n.digest();return n.clean(),o}function a(t,e,n,o){var s=o[0];if(0===s)throw new Error("hkdf: cannot expand more");e.reset(),s>1&&e.update(t),n&&e.update(n),e.update(o),e.finish(t),o[0]++}t.HMAC=s,t.hash=i,t.default=i,t.hmac=r;var c=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,o){void 0===e&&(e=c),void 0===o&&(o=32);for(var i=new Uint8Array([1]),l=r(e,t),u=new s(l),y=new Uint8Array(u.digestLength),f=y.length,d=new Uint8Array(o),p=0;p<o;p++)f===y.length&&(a(y,u,n,i),f=0),d[p]=y[f++];return u.clean(),y.fill(0),i.fill(0),d},t.pbkdf2=function(t,e,n,o){for(var i=new s(t),r=i.digestLength,a=new Uint8Array(4),c=new Uint8Array(r),l=new Uint8Array(r),u=new Uint8Array(o),y=0;y*r<o;y++){var f=y+1;a[0]=f>>>24&255,a[1]=f>>>16&255,a[2]=f>>>8&255,a[3]=f>>>0&255,i.reset(),i.update(e),i.update(a),i.finish(l);for(var d=0;d<r;d++)c[d]=l[d];for(d=2;d<=n;d++){i.reset(),i.update(l).finish(l);for(var p=0;p<r;p++)c[p]^=l[p]}for(d=0;d<r&&y*r+d<o;d++)u[y*r+d]=c[d]}for(y=0;y<r;y++)c[y]=l[y]=0;for(y=0;y<4;y++)a[y]=0;return i.clean(),u}}(e);var s=e.default;for(var i in e)s[i]=e[i];"object"==typeof t.exports?t.exports=s:void 0===(o=function(){return s}.call(e,n,e,t))||(t.exports=o)}()},6082(t){"use strict";t.exports=DG}},e={};function n(o){var s=e[o];if(void 0!==s)return s.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{_package:()=>i,initAutoTests:()=>a,test:()=>r,tests:()=>e.CN});var t=n(6082),e=n(6382),s=function(t,e,n,o){return new(n||(n=Promise))(function(s,i){function r(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}c((o=o.apply(t,e||[])).next())})};const i=new t.Package;function r(n,o,i){return s(this,void 0,void 0,function*(){const s=yield(0,e.N$)({category:n,test:o,testContext:i});return t.DataFrame.fromObjects(s)})}function a(){return s(this,void 0,void 0,function*(){yield(0,e.Xb)(i,i.getModule("package-test.js"))})}})(),compute_test=o})();
|
|
1
|
+
var compute_test;(()=>{var t={3775(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(5516),o=n.n(i),s=n(1364),r=n.n(s)()(o());r.push([t.id,".fi-drop-area {\n position: relative;\n}\n\n.fi-drop-area .default {\n color: var(--grey-2);\n}\n\n.fi-drop-area .drag-n-dropping {\n background-color: var(--steel-1);\n border: 1px dashed var(--blue-1);\n color: var(--grey-3);\n}\n\n.fi-drop-area .error {\n color: var(--red-3);\n}\n\n.fi-drop-area .success {\n color: var(--grey-6);\n}\n","",{version:3,sources:["webpack://./node_modules/@datagrok-libraries/compute-utils/old-components/css/file-input.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,oBAAoB;AACtB;;AAEA;EACE,gCAAgC;EAChC,gCAAgC;EAChC,oBAAoB;AACtB;;AAEA;EACE,mBAAmB;AACrB;;AAEA;EACE,oBAAoB;AACtB",sourcesContent:[".fi-drop-area {\n position: relative;\n}\n\n.fi-drop-area .default {\n color: var(--grey-2);\n}\n\n.fi-drop-area .drag-n-dropping {\n background-color: var(--steel-1);\n border: 1px dashed var(--blue-1);\n color: var(--grey-3);\n}\n\n.fi-drop-area .error {\n color: var(--red-3);\n}\n\n.fi-drop-area .success {\n color: var(--grey-6);\n}\n"],sourceRoot:""}]);const a=r},5167(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(5516),o=n.n(i),s=n(1364),r=n.n(s)()(o());r.push([t.id,"","",{version:3,sources:[],names:[],mappings:"",sourceRoot:""}]);const a=r},1261(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(5516),o=n.n(i),s=n(1364),r=n.n(s)()(o());r.push([t.id,".hp-no-elements-label {\n margin: 12px;\n}\n\n.grok-icon.hp-disabled {\n pointer-events: none;\n opacity: 0.6;\n}\n\n.hp-funccall-card-hover-icon {\n display: none;\n}\n\n.hp-funccall-card:hover .hp-funccall-card-hover-icon {\n display: flex;\n margin: 0px 0px 0px 5px;\n}\n\n.hp-funccall-card {\n margin: 2px 1px;\n padding: 5px;\n justify-content: space-between;\n}\n\n.hp-funccall-card .hp-card-content {\n justify-content: space-around;\n margin-left: 5px;\n}\n\n.hp-funccall-card .hp-card-content * {\n margin-bottom: 3px;\n}\n\n.hp-funccall-card .description {\n margin-bottom: 2px;\n color: var(--grey-3);\n}\n\n.hp-funccall-card .date {\n color: var(--grey-3);\n margin-left: 5px;\n}\n","",{version:3,sources:["webpack://./node_modules/@datagrok-libraries/compute-utils/old-components/css/history-panel.css"],names:[],mappings:"AAAA;IACI,YAAY;AAChB;;AAEA;IACI,oBAAoB;IACpB,YAAY;AAChB;;AAEA;IACI,aAAa;AACjB;;AAEA;IACI,aAAa;IACb,uBAAuB;AAC3B;;AAEA;IACI,eAAe;IACf,YAAY;IACZ,8BAA8B;AAClC;;AAEA;IACI,6BAA6B;IAC7B,gBAAgB;AACpB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,oBAAoB;AACxB;;AAEA;IACI,oBAAoB;IACpB,gBAAgB;AACpB",sourcesContent:[".hp-no-elements-label {\n margin: 12px;\n}\n\n.grok-icon.hp-disabled {\n pointer-events: none;\n opacity: 0.6;\n}\n\n.hp-funccall-card-hover-icon {\n display: none;\n}\n\n.hp-funccall-card:hover .hp-funccall-card-hover-icon {\n display: flex;\n margin: 0px 0px 0px 5px;\n}\n\n.hp-funccall-card {\n margin: 2px 1px;\n padding: 5px;\n justify-content: space-between;\n}\n\n.hp-funccall-card .hp-card-content {\n justify-content: space-around;\n margin-left: 5px;\n}\n\n.hp-funccall-card .hp-card-content * {\n margin-bottom: 3px;\n}\n\n.hp-funccall-card .description {\n margin-bottom: 2px;\n color: var(--grey-3);\n}\n\n.hp-funccall-card .date {\n color: var(--grey-3);\n margin-left: 5px;\n}\n"],sourceRoot:""}]);const a=r},5366(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(5516),o=n.n(i),s=n(1364),r=n.n(s)()(o());r.push([t.id,".pipeline-view .d4-ribbon-name.selected {\n color: var(--grey-6)\n}\n\n.pipeline-view .d4-ribbon-name {\n color: var(--blue-1);\n margin: 12px 6px;\n font-weight: normal;\n place-content: center;\n}\n\n.pipeline-view .d4-ribbon-name + .d4-ribbon-name::before {\n color: var(--grey-3);\n}\n\n.pipeline-view .d4-ribbon-name.d4-disabled {\n cursor: default;\n pointer-events: none;\n color: var(--grey-3);\n}\n\n.ui-input-editor button.ui-btn-nav.ui-btn.d4-disabled {\n color: var(--grey-3)\n}","",{version:3,sources:["webpack://./node_modules/@datagrok-libraries/compute-utils/old-views/css/pipeline-view.css"],names:[],mappings:"AAAA;EACE;AACF;;AAEA;EACE,oBAAoB;EACpB,gBAAgB;EAChB,mBAAmB;EACnB,qBAAqB;AACvB;;AAEA;EACE,oBAAoB;AACtB;;AAEA;EACE,eAAe;EACf,oBAAoB;EACpB,oBAAoB;AACtB;;AAEA;EACE;AACF",sourcesContent:[".pipeline-view .d4-ribbon-name.selected {\n color: var(--grey-6)\n}\n\n.pipeline-view .d4-ribbon-name {\n color: var(--blue-1);\n margin: 12px 6px;\n font-weight: normal;\n place-content: center;\n}\n\n.pipeline-view .d4-ribbon-name + .d4-ribbon-name::before {\n color: var(--grey-3);\n}\n\n.pipeline-view .d4-ribbon-name.d4-disabled {\n cursor: default;\n pointer-events: none;\n color: var(--grey-3);\n}\n\n.ui-input-editor button.ui-btn-nav.ui-btn.d4-disabled {\n color: var(--grey-3)\n}"],sourceRoot:""}]);const a=r},1179(t,e,n){"use strict";n.d(e,{A:()=>a});var i=n(5516),o=n.n(i),s=n(1364),r=n.n(s)()(o());r.push([t.id,".ui-form .ui-input-root.ui-input-buttons.rfv-buttons {\n margin-top: 0px;\n position: sticky;\n align-items: flex-start;\n}\n\n.ui-form .ui-input-buttons.rfv-buttons .ui-input-editor {\n flex-wrap: wrap;\n}\n\n.ui-input-root.rfv-restricted-input.d4-disabled {\n pointer-events: all;\n cursor: pointer!important;\n}\n\n/* Hide all state icons by default */\n.ui-input-root > .ui-input-options .rfv-icon-lock,\n.ui-input-root > .ui-input-options .rfv-icon-unlock,\n.ui-input-root > .ui-input-options .rfv-icon-undo,\n.ui-input-root > .ui-input-options .rfv-icon-warning {\n display: none;\n}\n\n/* Show warning icon if input is on warning state */\n.ui-input-root.rfv-inconsistent-input > .ui-input-options .rfv-icon-warning {\n display: inherit;\n}\n\n/* Show undo icon if input is on inconstent state and hovered */\n.ui-input-root.rfv-restricted-unlocked-input:hover .rfv-icon-undo, .ui-input-root.rfv-inconsistent-input:hover .rfv-icon-undo {\n display: inherit;\n}\n\n/* Show/hide lock-unlock icons on input hover */\n.ui-input-root.rfv-restricted-input:hover .rfv-icon-lock {\n display: none;\n}\n.ui-input-root.rfv-restricted-input .rfv-icon-lock {\n display: inherit;\n}\n.ui-input-root.rfv-restricted-input .rfv-icon-unlock {\n display: none;\n}\n.ui-input-root.rfv-restricted-input:hover .rfv-icon-unlock {\n display: inherit;\n}\n\n.ui-form-condensed .rfv-buttons > .ui-label {\n margin-right: 0px!important;\n}\n\n.rfv-form .ui-form .rfv-buttons > .ui-input-editor {\n gap: 5px;\n justify-content: flex-end;\n}\n\ndiv.ui-box > div.ui-box.rfv-form > div.ui-div {\n overflow: visible!important;\n}\n\n.rfv-scalar-table {\n border-collapse: collapse;\n margin: 10px;\n}\n\n.rfv-scalar-table td {\n width: max-content;\n white-space: nowrap;\n}\n\n.rfv-scalar-table tr{\n min-height: 30px;\n border-bottom: 1pt solid var(--grey-12);\n}\n\n.rfv-scalar-table tr:nth-child(odd) {\n background-color: var(--grey-1);\n}\n\n.rfv-scalar-table td:last-child {\n width: 100%;\n}","",{version:3,sources:["webpack://./node_modules/@datagrok-libraries/compute-utils/old-views/css/rich-function-view.css"],names:[],mappings:"AAAA;IACI,eAAe;IACf,gBAAgB;IAChB,uBAAuB;AAC3B;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,mBAAmB;IACnB,yBAAyB;AAC7B;;AAEA,oCAAoC;AACpC;;;;IAII,aAAa;AACjB;;AAEA,mDAAmD;AACnD;IACI,gBAAgB;AACpB;;AAEA,+DAA+D;AAC/D;IACI,gBAAgB;AACpB;;AAEA,+CAA+C;AAC/C;IACI,aAAa;AACjB;AACA;IACI,gBAAgB;AACpB;AACA;IACI,aAAa;AACjB;AACA;IACI,gBAAgB;AACpB;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,QAAQ;IACR,yBAAyB;AAC7B;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI,yBAAyB;IACzB,YAAY;AAChB;;AAEA;IACI,kBAAkB;IAClB,mBAAmB;AACvB;;AAEA;IACI,gBAAgB;IAChB,uCAAuC;AAC3C;;AAEA;IACI,+BAA+B;AACnC;;AAEA;IACI,WAAW;AACf",sourcesContent:[".ui-form .ui-input-root.ui-input-buttons.rfv-buttons {\n margin-top: 0px;\n position: sticky;\n align-items: flex-start;\n}\n\n.ui-form .ui-input-buttons.rfv-buttons .ui-input-editor {\n flex-wrap: wrap;\n}\n\n.ui-input-root.rfv-restricted-input.d4-disabled {\n pointer-events: all;\n cursor: pointer!important;\n}\n\n/* Hide all state icons by default */\n.ui-input-root > .ui-input-options .rfv-icon-lock,\n.ui-input-root > .ui-input-options .rfv-icon-unlock,\n.ui-input-root > .ui-input-options .rfv-icon-undo,\n.ui-input-root > .ui-input-options .rfv-icon-warning {\n display: none;\n}\n\n/* Show warning icon if input is on warning state */\n.ui-input-root.rfv-inconsistent-input > .ui-input-options .rfv-icon-warning {\n display: inherit;\n}\n\n/* Show undo icon if input is on inconstent state and hovered */\n.ui-input-root.rfv-restricted-unlocked-input:hover .rfv-icon-undo, .ui-input-root.rfv-inconsistent-input:hover .rfv-icon-undo {\n display: inherit;\n}\n\n/* Show/hide lock-unlock icons on input hover */\n.ui-input-root.rfv-restricted-input:hover .rfv-icon-lock {\n display: none;\n}\n.ui-input-root.rfv-restricted-input .rfv-icon-lock {\n display: inherit;\n}\n.ui-input-root.rfv-restricted-input .rfv-icon-unlock {\n display: none;\n}\n.ui-input-root.rfv-restricted-input:hover .rfv-icon-unlock {\n display: inherit;\n}\n\n.ui-form-condensed .rfv-buttons > .ui-label {\n margin-right: 0px!important;\n}\n\n.rfv-form .ui-form .rfv-buttons > .ui-input-editor {\n gap: 5px;\n justify-content: flex-end;\n}\n\ndiv.ui-box > div.ui-box.rfv-form > div.ui-div {\n overflow: visible!important;\n}\n\n.rfv-scalar-table {\n border-collapse: collapse;\n margin: 10px;\n}\n\n.rfv-scalar-table td {\n width: max-content;\n white-space: nowrap;\n}\n\n.rfv-scalar-table tr{\n min-height: 30px;\n border-bottom: 1pt solid var(--grey-12);\n}\n\n.rfv-scalar-table tr:nth-child(odd) {\n background-color: var(--grey-1);\n}\n\n.rfv-scalar-table td:last-child {\n width: 100%;\n}"],sourceRoot:""}]);const a=r},4189(t,e,n){"use strict";n.d(e,{FO:()=>i}),n(9316);const i=DG.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,');i.columns.add(DG.Column.fromList(DG.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))))},1369(t,e,n){"use strict";n(6382)},6382(t,e,n){"use strict";n.d(e,{CN:()=>d,L1:()=>w,N$:()=>E,Xb:()=>T,cb:()=>P,gM:()=>I,t6:()=>A});var i=n(4189),o=(n(1369),function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})});const s=3e4,r=108e5,a=console.log.bind(console),l=console.info.bind(console),u=console.warn.bind(console),c=console.error.bind(console),d={},p="Auto Tests",h="Demo",f="Detectors",v="Core",m={};let y;var g;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(g||(g={}));class b{constructor(t,e,n){this.catchUnhandled=!0,this.report=!1,this.returnOnFail=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e),void 0!==n&&(this.returnOnFail=n)}}class C{constructor(t,e,n,i){var r;this.category=t,this.name=e,null!=i||(i={}),null!==(r=i.timeout)&&void 0!==r||(i.timeout=s),this.options=i,this.test=()=>o(this,void 0,void 0,function*(){return new Promise((t,e)=>o(this,void 0,void 0,function*(){var i;let o="";try{DG.Test.isInDebug;let t=yield n();try{o=null!==(i=null==t?void 0:t.toString())&&void 0!==i?i:""}catch(t){o="Can't convert test's result to string",console.error(`Can't convert test's result to string in the ${this.category}:${this.name} test`)}}catch(t){e(t)}t(o)}))})}}function A(t,e,n){null==d[y]&&(d[y]={}),null==d[y].tests&&(d[y].tests=[]),d[y].tests.push(new C(y,t,e,n))}function x(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function w(t,e,n){var i;y=t,e(),d[y]&&(d[y].clear=null===(i=null==n?void 0:n.clear)||void 0===i||i,d[y].timeout=null==n?void 0:n.timeout,d[y].benchmarks=null==n?void 0:n.benchmarks,d[y].stressTests=null==n?void 0:n.stressTests,d[y].owner=null==n?void 0:n.owner)}function I(t){null==d[y]&&(d[y]={}),d[y].before=t}function R(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function T(t,e){var n,a,l,u,c,y,g,b,A,w;return o(this,void 0,void 0,function*(){const I=t.id;if(m[I])return;const T=e?e.tests:d;if("DevTools"===t.name||e&&"DevTools"===e._package.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g);let i=null!==(n=e.pop())&&void 0!==n?n:t.name,o=e.length?v+": "+e.join(": "):v,r=i.split(" | ");i=r[r.length-1],r.unshift(o),r.pop(),o=r.join(": "),void 0===T[o]&&(T[o]={tests:[],clear:!0}),T[o].tests.push(new C(o,i,t.test,{isAggregated:!1,timeout:null!==(l=null===(a=t.options)||void 0===a?void 0:a.timeout)&&void 0!==l?l:s,skipReason:null===(u=t.options)||void 0===u?void 0:u.skipReason,owner:null===(c=t.options)||void 0===c?void 0:c.owner,benchmark:null!==(g=null===(y=t.options)||void 0===y?void 0:y.benchmark)&&void 0!==g&&g}))}const E=[],S=[],k=[],O=yield grok.dapi.functions.filter(`package.id = "${I}"`).list(),D=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const e of O){const n=e.options.test,a=e.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let t=0;t<n.length;t++){const i=n[t].matchAll(D),a={};Array.from(i).forEach(t=>{t[0].startsWith("skip")?a.skip=t[1]:t[0].startsWith("wait")?a.wait=parseInt(t[2]):t[0].startsWith("cat")?a.cat=t[3]:t[0].startsWith("timeout")&&(a.timeout=parseInt(t[4]))});const l=new C(null!==(b=a.cat)&&void 0!==b?b:p,1===n.length?e.name:`${e.name} ${t+1}`,()=>o(this,void 0,void 0,function*(){const i=yield grok.functions.eval(R(n[t],e));if(a.wait&&(yield P(a.wait)),"boolean"==typeof i&&!i)throw`Failed: ${n[t]}, expected true, got ${i}`}),{skipReason:a.skip,timeout:DG.Test.isInBenchmark?null!==(A=a.benchmarkTimeout)&&void 0!==A?A:r:null!==(w=a.timeout)&&void 0!==w?w:s});if(a.cat){const t=a.cat;void 0===T[t]&&(T[t]={tests:[],clear:!0}),T[t].tests||(T[t].tests=[]),T[t].tests.push(l)}else E.push(l)}if(a){const t=e.options.demoWait?parseInt(e.options.demoWait):void 0,n=new C(h,e.friendlyName,()=>o(this,void 0,void 0,function*(){yield P(300),grok.shell.clearLastError(),yield e.apply(),yield P(t||2e3);const n=yield grok.shell.lastError;if(n)throw new Error(n)}),{skipReason:e.options.demoSkip});S.push(n)}if(e.hasTag("semTypeDetector")){let n=i.FO;e.options.testData&&(n=yield grok.data.files.openTable(`System:AppData/${t.nqName}/${e.options.testData}`));const s=new C(f,e.friendlyName,()=>o(this,void 0,void 0,function*(){const i=[];console.log(`System:AppData/${t.nqName}/${e.options.testData}`);for(const t of n.clone().columns){const n=yield e.apply([t]);i.push(n||t.semType)}const o=i.filter(t=>t);x(o.length,1),e.options.testDataColumnName&&x(o[0],e.options.testDataColumnName)}),{skipReason:e.options.skipTest});k.push(s)}}m[I]=!0,E.length>0&&(T[p]={tests:E,clear:!0}),S.length>0&&(T[h]={tests:S,clear:!0}),k.length>0&&(T[f]={tests:k,clear:!1})})}function E(t){var e,n,i;return o(this,void 0,void 0,function*(){const p=(null==t?void 0:t.nodeOptions)?t.nodeOptions.package:grok.functions.getCurrentCall().func.package;if(!p)throw new Error("Can't run tests outside of the package");const h=null===(e=p.packageOwner)||void 0===e?void 0:e.match(/<([^>]*)>/),f=h?h[1]:"";null!=p&&(yield T(p));const v=[];console.log("Running tests..."),console.log(t),null!=t||(t={}),null!==(n=(i=t).testContext)&&void 0!==n||(i.testContext=new b),grok.shell.clearLastError();const m=function(){const t=[];return console.log=(...e)=>{t.push(...e),a(...e)},console.info=(...e)=>{t.push(...e),l(...e)},console.warn=(...e)=>{t.push(...e),u(...e)},console.error=(...e)=>{t.push(...e),c(...e)},t}();yield function(t,e){var n,i,s,r,d,h;return o(this,void 0,void 0,function*(){try{let l=null!=(null==e?void 0:e.skipToCategory),u=!1;for(const[c,m]of Object.entries(t)){if(null===(n=e.exclude)||void 0===n?void 0:n.some(t=>c.startsWith(t)))continue;if(null!=(null==e?void 0:e.category)&&!c.toLowerCase().startsWith(null==e?void 0:e.category.toLowerCase().trim()))continue;if(l)if(u)l=!1;else{if(null==(null==e?void 0:e.skipToCategory)||c.toLowerCase().trim()!==(null==e?void 0:e.skipToCategory.toLowerCase().trim()))continue;u=!0}const t=null===(i=m.tests)||void 0===i?void 0:i.every(t=>{var n;return(null===(n=t.options)||void 0===n?void 0:n.skipReason)||null!=(null==e?void 0:e.test)&&e.test.toLowerCase()!==t.name.toLowerCase()});if(!t){const t=(null!==(s=m.tests)&&void 0!==s?s:[]).filter(t=>{var n;return(null===(n=t.options)||void 0===n?void 0:n.skipReason)||null!=(null==e?void 0:e.test)&&e.test.toLowerCase()!==t.name.toLowerCase()}).length;a(`Package testing: Started {{${c}}}${t>0?` skipped {{${t}}}`:""}`),m.beforeStatus=yield y(m.before,c)}let b,C=null!==(r=m.tests)&&void 0!==r?r:[];e.stressTest&&(C=C.filter(t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.stressTest}),C=O(C)),(null!==(h=null===(d=e.tags)||void 0===d?void 0:d.length)&&void 0!==h?h:0)>0&&(C=C.filter(t=>{var n,i;return null===(i=null===(n=t.options)||void 0===n?void 0:n.tags)||void 0===i?void 0:i.some(t=>{var n;return(null!==(n=null==e?void 0:e.tags)&&void 0!==n?n:[]).includes(t)})})),m.beforeStatus?(b=Array.from(C.map(t=>({date:(new Date).toISOString(),category:c,name:t.name,success:!1,result:"before() failed",ms:0,skipped:!1,logs:"",owner:f,package:p.name,widgetsDifference:0,flaking:DG.Test.isReproducing}))),b.forEach(t=>o(this,void 0,void 0,function*(){return yield grok.shell.reportTest("package",t)}))):b=yield g(m,e,l);const A=b.filter(t=>"skipped"!=t.result);if(t||(m.afterStatus=yield y(m.after,c)),m.afterStatus&&(a(`Package testing: Category after() {{${c}}} failed`),a(`Package testing: Result for {{${c}}} after: ${m.afterStatus}`),A.push({date:(new Date).toISOString(),category:c,name:"after",success:!1,result:m.afterStatus,ms:0,skipped:!1,logs:"",owner:f,package:p.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),m.beforeStatus&&(a(`Package testing: Category before() {{${c}}} failed`),a(`Package testing: Result for {{${c}}} before: ${m.beforeStatus}`),A.push({date:(new Date).toISOString(),category:c,name:"before",success:!1,result:m.beforeStatus,ms:0,skipped:!1,logs:"",owner:f,package:p.name,widgetsDifference:0,flaking:DG.Test.isReproducing})),v.push(...A),e.returnOnFail&&A.some(t=>!t.success&&!t.skipped&&t.name!==e.skipToTest))break}}finally{console.log=a,console.info=l,console.warn=u,console.error=c}if(e.testContext.catchUnhandled&&!DG.Test.isInBenchmark){yield P(1e3);const t=yield grok.shell.lastError;if(null!=t){const e={logs:"",date:(new Date).toISOString(),category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1,owner:null!=f?f:"",package:p.name,widgetsDifference:0};a(`Package testing: Unhandled Exception: ${t}`),v.push(Object.assign(Object.assign({},e),{flaking:DG.Test.isReproducing&&!t})),e.package=p.name,yield grok.shell.reportTest("package",e)}}})}(d,t);for(let t of v)t.result=t.result.toString().replace(/"/g,"'"),null!=t.logs&&(t.logs=t.logs.toString().replace(/"/g,"'"));return v;function y(t,e){return o(this,void 0,void 0,function*(){let n;try{void 0!==t&&(yield D(()=>o(this,void 0,void 0,function*(){yield t()}),1e5,`before ${e}: timeout error`))}catch(t){n=yield S(t)}return n})}function g(t,e,n){var i,a,l,u,c,d,h,v,y,g,b,A,x,w,I,R,T,E;return o(this,void 0,void 0,function*(){let o=null!==(i=t.tests)&&void 0!==i?i:[];const S=[],O=C();if(t.clear){let i=n&&null!=e.skipToTest;for(let n=0;n<o.length;n++){o[n].options&&void 0===(null===(a=o[n].options)||void 0===a?void 0:a.benchmark)&&(o[n].options||(o[n].options={}),o[n].options.benchmark=null!==(l=t.benchmarks)&&void 0!==l&&l);let A=o[n];if(e.test&&e.test.toLowerCase()!==A.name.toLowerCase())continue;if(i){if(null==(null==e?void 0:e.skipToTest)||A.name.toLowerCase().trim()!==(null==e?void 0:e.skipToTest.toLowerCase().trim()))continue;i=!1}(null==A?void 0:A.options)&&(A.options.owner=null!==(h=null!==(d=null!==(c=null===(u=o[n].options)||void 0===u?void 0:u.owner)&&void 0!==c?c:null==t?void 0:t.owner)&&void 0!==d?d:f)&&void 0!==h?h:"");let x=yield k(A,null==e?void 0:e.test,m,DG.Test.isInBenchmark?null!==(y=null===(v=o[n].options)||void 0===v?void 0:v.benchmarkTimeout)&&void 0!==y?y:r:null!==(b=null===(g=o[n].options)||void 0===g?void 0:g.timeout)&&void 0!==b?b:s,p.name,e.verbose);if(x&&(S.push(Object.assign(Object.assign({},x),{widgetsDifference:C()-O})),e.returnOnFail&&e.skipToTest!==A.name&&!x.success&&!x.skipped))return S;e.nodeOptions||(grok.shell.closeAll(),DG.Balloon.closeAll())}}else{let i=n&&null!=e.skipToTest;for(let n=0;n<o.length;n++){let s=o[n];if(e.test&&e.test.toLowerCase()!==s.name.toLowerCase())continue;if(i){null!=(null==e?void 0:e.skipToTest)&&s.name.toLowerCase().trim()===(null==e?void 0:e.skipToTest.toLowerCase().trim())&&(i=!1);continue}(null==s?void 0:s.options)&&(s.options.owner=null!==(I=null!==(w=null!==(x=null===(A=o[n].options)||void 0===A?void 0:A.owner)&&void 0!==x?x:null==t?void 0:t.owner)&&void 0!==w?w:f)&&void 0!==I?I:"");let a=yield k(s,null==e?void 0:e.test,m,DG.Test.isInBenchmark?null!==(T=null===(R=o[n].options)||void 0===R?void 0:R.benchmarkTimeout)&&void 0!==T?T:r:null===(E=o[n].options)||void 0===E?void 0:E.timeout,p.name,e.verbose);if(a&&(S.push(Object.assign(Object.assign({},a),{widgetsDifference:C()-O})),e.returnOnFail&&e.skipToTest!==s.name&&!a.success&&!a.skipped))return S}}return S})}function C(){var t;if("undefined"!=typeof process)return 0;let e=-1;try{e=DG.Widget.getAll().length}catch(e){console.warn(null!==(t=e.message)&&void 0!==t?t:e)}return e}})}function S(t){return o(this,void 0,void 0,function*(){return`${t.toString()}\n${t.stack?yield DG.Logger.translateStackTrace(t.stack):""}`})}function k(t,e,n,i,r,l){var u,d,p,h,f,v,m,y,g,b,C,A,x,w;return o(this,void 0,void 0,function*(){let o;n.length=0;const I=null!=e&&t.name.toLowerCase()!==e.toLowerCase();let R=(null===(u=t.options)||void 0===u?void 0:u.skipReason)||I,T=I?"skipped":null===(d=t.options)||void 0===d?void 0:d.skipReason;if(DG.Test.isInBenchmark&&!(null===(p=t.options)||void 0===p?void 0:p.benchmark))return void a(`Package testing: Skipped {{${t.category}}} {{${t.name}}} doesnt available in benchmark mode`);R&&!DG.Test.isInBenchmark&&a(`Package testing: Skipped {{${t.category}}} {{${t.name}}}`),R||a(`Package testing: Started {{${t.category}}} {{${t.name}}}`);const E=Date.now(),k=new Date(E).toISOString();try{if(R)o={name:t.name,owner:null!==(f=null===(h=t.options)||void 0===h?void 0:h.owner)&&void 0!==f?f:"",category:t.category,logs:"",date:k,success:!0,result:T,ms:0,skipped:!0,package:null!=r?r:"",flaking:DG.Test.isReproducing};else{let e=null!=i?i:s;DG.Test.isProfiling&&console.profile(`${t.category}: ${t.name}`),o={name:t.name,owner:null!==(m=null===(v=t.options)||void 0===v?void 0:v.owner)&&void 0!==m?m:"",category:t.category,logs:"",date:k,success:!0,result:null!==(y=(yield D(t.test,e)).toString())&&void 0!==y?y:"OK",ms:0,skipped:!1,package:null!=r?r:"",flaking:DG.Test.isReproducing},DG.Test.isProfiling&&(console.profileEnd(`${t.category}: ${t.name}`),grok.shell.info(`Profiling of ${t.category}: ${t.name} finished \n Please ensure that you have opened DevTools (F12) / Performance panel before test starts.`))}}catch(e){c(e),o={name:t.name,owner:null!==(b=null===(g=t.options)||void 0===g?void 0:g.owner)&&void 0!==b?b:"",category:t.category,logs:"",date:k,success:!1,result:yield S(e),ms:0,skipped:!1,package:null!=r?r:"",flaking:!1}}if((null===(C=t.options)||void 0===C?void 0:C.isAggregated)&&o.result.constructor===DG.DataFrame){const t=o.result.col("success");if(t&&(o.success=t.stats.sum===t.length),!l){const t=o.result;t.columns.remove("stack"),t.rows.removeWhere(t=>t.get("success")),o.result=t}o.result=o.result.toCsv()}if(o.logs=n.join("\n"),o.ms=Date.now()-E,R||a(`Package testing: Finished {{${t.category}}} {{${t.name}}} with {{${o.success?"success":"error"}}} for ${o.ms} ms`),o.success||a(`Package testing: Result for {{${t.category}}} {{${t.name}}}: ${o.result}`),o.category=t.category,o.name=t.name,o.owner=null!==(x=null===(A=t.options)||void 0===A?void 0:A.owner)&&void 0!==x?x:"",!I){let e={success:o.success,result:o.result,ms:o.ms,date:o.date,skipped:o.skipped,category:t.category,name:t.name,logs:o.logs,owner:o.owner,flaking:DG.Test.isReproducing&&o.success,package:o.package};if(o.result.constructor==Object){const t=Object.keys(o.result).reduce((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:o.result[e]}),{});e=Object.assign(Object.assign({},e),t)}e.result instanceof DG.DataFrame&&(e.result=JSON.stringify(null===(w=e.result)||void 0===w?void 0:w.toJson())||""),yield grok.shell.reportTest("package",e)}return o})}function O(t){const e=t.slice();return e.sort(()=>Math.random()-.5),e}function P(t){return o(this,void 0,void 0,function*(){yield new Promise(e=>setTimeout(e,t))})}function D(t,e,n="EXECUTION TIMEOUT"){return o(this,void 0,void 0,function*(){let i=null;const o=new Promise((t,o)=>{i=setTimeout(()=>{o(n)},e)});try{return yield Promise.race([t(),o])}finally{i&&clearTimeout(i)}})}DG.DataFrame.fromColumns([DG.Column.fromStrings("col",["val1","val2","val3"])])},4350(t,e,n){"use strict";n.d(e,{SJ:()=>l});var i=n(6082),o=n(3508),s=n.n(o);const r=[{name:"NaN",predicate:function(t,e){return Number.isNaN(t)&&Number.isNaN(e)},checker:u},{name:"Null",predicate:function(t,e){return null==t&&null==e},checker:u},{name:"Boolean",predicate:function(t,e){return"boolean"==typeof t&&"boolean"==typeof e},checker:c},{name:"String",predicate:function(t,e){return"string"==typeof t&&"string"==typeof e},checker:c},{name:"Integer",predicate:function(t,e){return Number.isInteger(t)&&Number.isInteger(e)},checker:c},{name:"BigInt",predicate:function(t,e){return"bigint"==typeof t&&"bigint"==typeof e},checker:c},{name:"Float",predicate:function(t,e){return"number"==typeof t&&"number"==typeof e},checker:function(t,e,n){if(!(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||isNaN(t)&&isNaN(e)))return Math.abs(t-e)<n.options.floatTolerance?void 0:[{msg:`Expected ${e}, got ${t} (tolerance = ${n.options.floatTolerance})`}]}},{name:"Map",predicate:function(t,e){return t instanceof Map&&e instanceof Map},checker:function(t,e,n,i){const o=[];n.options.forbidAdditionalProps&&o.push(...p([...t.keys()],[...e.keys()]));for(const n of e.keys()){const o=t.get(n),s=e.get(n);i([String(n)],o,s)}return o}},{name:"Set",predicate:function(t,e){return t instanceof Set&&e instanceof Set},checker:function(t,e,n,i){const o=[];if(t.size!==e.size){const n={msg:`Sets are of different size: actual set size is ${t.size} and expected set size is ${e.size}`};o.push(n)}for(const n of e.values()){const e=t.has(n);i([String(n)],e,!0)}return o}},{name:"ArrayBuffer",predicate:function(t,e){return t instanceof ArrayBuffer&&e instanceof ArrayBuffer},checker:function(t,e,n,i){return d(Array.from(new Uint8Array(t)),Array.from(new Uint8Array(e)),0,i)}},{name:"Array",predicate:function(t,e){return t instanceof Array&&e instanceof Array},checker:d},{name:"DataFrame",predicate:function(t,e){return t instanceof i.DataFrame&&e instanceof i.DataFrame},checker:function(t,e,n,i){const o=[];if(t.rowCount!==e.rowCount){const n={msg:`Dataframes has different row count: actual row count is ${t.rowCount} and expected row count is ${e.rowCount}`};o.push(n)}n.options.forbidAdditionalProps&&o.push(...p([...t.columns].map(t=>t.name),[...e.columns].map(t=>t.name)));for(const n of e.columns){const s=t.columns.byName(n.name);if(!s){const t={msg:`Column ${n.name} not found`};o.push(t);continue}if(s.type!==n.type){const t={msg:`Column ${n.name} type expected ${n.type} got ${s.type}`};o.push(t);continue}for(let t=0;t<e.rowCount;t++){const e=s.get(t),o=n.get(t);i([n.name,String(t)],e,o)}}return o}},{name:"DayJs",predicate:function(t,e){return s().isDayjs(t)&&s().isDayjs(e)},checker:function(t,e){if(!e.isSame(t))return[{msg:`Different date, expected ${e.toISOString()} actual ${t.toISOString()}`}]}},{name:"Object",predicate:function(t,e){return"object"==typeof t&&"object"==typeof e},checker:function(t,e,n,i){const o=[];n.options.forbidAdditionalProps&&o.push(...p([...Object.keys(t)],[...Object.keys(e)]));for(const[n,o]of Object.entries(e))i([n],t[n],o);return o}}];class a extends Error{}function l(t,e,n){new f(n).run(t,e)}function u(){}function c(t,e){if(t!==e)return[{msg:`Expected ${e}, got ${t}`}]}function d(t,e,n,i){const o=[];if(t.length!==e.length){const n={msg:`Arrays are of different length: actual array length is ${t.length} and expected array length is ${e.length}`};o.push(n)}for(let n=0;n<t.length;n++)i([String(n)],t[n],e[n]);return o}function p(t,e){const n=[],i=new Set(e);for(const e of t)if(!i.has(e)){const t={msg:`Additional key/col item in actual data found: ${e}`};n.push(t)}return n}const h={floatTolerance:.001,maxErrorsReport:5,forbidAdditionalProps:!1,maxDepth:128,checkersSeq:r,prefix:""};class f{constructor(t={}){this.options=Object.assign(Object.assign({},h),t),this.state={errors:[],currentPath:[],options:this.options}}run(t,e){this.matchChecker(t,e),this.checkErrorsLimit(0)}checkDeep(t,e,n){const i=t.length;if(this.state.currentPath.push(...t),this.state.currentPath.length>this.options.maxDepth)throw new a(`Max depth ${this.options.maxDepth} is exceeded, potentially a circular structure`);this.matchChecker(e,n),this.state.currentPath.splice(-i)}matchChecker(t,e){let n=!1;for(const{predicate:i,checker:o}of this.options.checkersSeq)if(i(t,e)){n=!0;const i=o(t,e,this.state,this.checkDeep.bind(this));i&&i.map(t=>this.addError(t));break}if(!n){const n={msg:`Type mismatch or no checker defined: expected ${e}, got ${t}`};this.addError(n)}}addError(t){var e,n;const i={path:[...null!==(e=this.state.currentPath)&&void 0!==e?e:[],...null!==(n=t.path)&&void 0!==n?n:[]],msg:t.msg};this.state.errors.push(i),this.checkErrorsLimit()}checkErrorsLimit(t=this.options.maxErrorsReport){if(this.state.errors.length>t){const t=this.makeReport();throw new a(t)}}makeReport(){return this.state.errors.map(t=>{var e;const n=(null!==(e=t.path)&&void 0!==e?e:[]).map(t=>`['${String(t)}']`).join("."),i=n?`${n}: ${t.msg}`:t.msg;return this.options.prefix?`${this.options.prefix}: ${i}`:i}).slice(0,this.options.maxErrorsReport).join("\n")}}},5520(t,e,n){"use strict";n.d(e,{Jh:()=>c,iu:()=>u,lK:()=>l});var i=n(6082),o=n(1825),s=n(3508),r=n.n(s);const a="_DG_CUSTOM_SERIALIZED_TOKEN_";function l(t,e={}){return JSON.stringify(t,function(t,n){return n===1/0?{[a]:"Infinity",value:!0}:n===-1/0?{[a]:"-Infinity",value:!0}:Number.isNaN(n)?{[a]:"NaN",value:!0}:n instanceof i.DataFrame&&!e.useJsonDF?{[a]:"DataFrame",value:(0,o.SM)(n.toByteArray())}:n instanceof i.DataFrame&&e.useJsonDF?{[a]:"DataFrameJSON",value:n.toJson()}:n instanceof ArrayBuffer?{[a]:"ArrayBuffer",value:(0,o.SM)(new Uint8Array(n))}:n instanceof Map?{[a]:"Map",value:Array.from(n)}:n instanceof Set?{[a]:"Set",value:Array.from(n)}:r().isDayjs(this[t])?{[a]:"DayJs",value:this[t].toISOString()}:n},e.space)}function u(t){return JSON.parse(t,d)}function c(t){return u(JSON.stringify(t))}function d(t,e){if(e&&e[a]&&e.value)switch(e[a]){case"DataFrame":return i.DataFrame.fromByteArray((0,o.Fo)(e.value));case"DataFrameJSON":return i.DataFrame.fromJson(JSON.stringify(e.value));case"ArrayBuffer":return(0,o.Fo)(e.value).buffer;case"Map":return new Map(e.value);case"DayJs":return r()(e.value);case"Set":return new Set(e.value);case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return e}},1364(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,i,o,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(r[l]=!0)}for(var u=0;u<t.length;u++){var c=[].concat(t[u]);i&&r[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},5516(t){"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),s="/*# ".concat(o," */");return[e].concat([s]).join("\n")}return[e].join("\n")}},4112(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,s){var r=o.prototype;s.utc=function(t){return new o({date:t,utc:!0,args:arguments})},r.utc=function(e){var n=s(this.toDate(),{locale:this.$L,utc:!0});return e?n.add(this.utcOffset(),t):n},r.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var a=r.parse;r.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),a.call(this,t)};var l=r.init;r.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else l.call(this)};var u=r.utcOffset;r.utcOffset=function(i,o){var s=this.$utils().u;if(s(i))return this.$u?0:s(this.$offset)?u.call(this):this.$offset;if("string"==typeof i&&(i=function(t){void 0===t&&(t="");var i=t.match(e);if(!i)return null;var o=(""+i[0]).match(n)||["-",0,0],s=o[0],r=60*+o[1]+ +o[2];return 0===r?0:"+"===s?r:-r}(i),null===i))return this;var r=Math.abs(i)<=16?60*i:i;if(0===r)return this.utc(o);var a=this.clone();if(o)return a.$offset=r,a.$u=!1,a;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(a=this.local().add(r+l,t)).$offset=r,a.$x.$localOffset=l,a};var c=r.format;r.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,e)},r.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},r.isUTC=function(){return!!this.$u},r.toISOString=function(){return this.toDate().toISOString()},r.toString=function(){return this.toDate().toUTCString()};var d=r.toDate;r.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=r.diff;r.diff=function(t,e,n){if(t&&this.$u===t.$u)return p.call(this,t,e,n);var i=this.local(),o=s(t).local();return p.call(i,o,e,n)}}}()},9316(t,e,n){var i;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function n(t,n,i,o,s){for(var r,a,l,u,c,d,p,h,f,v,m,y,g;s>=64;){for(r=n[0],a=n[1],l=n[2],u=n[3],c=n[4],d=n[5],p=n[6],h=n[7],v=0;v<16;v++)m=o+4*v,t[v]=(255&i[m])<<24|(255&i[m+1])<<16|(255&i[m+2])<<8|255&i[m+3];for(v=16;v<64;v++)y=((f=t[v-2])>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,g=((f=t[v-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3,t[v]=(y+t[v-7]|0)+(g+t[v-16]|0);for(v=0;v<64;v++)y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&d^~c&p)|0)+(h+(e[v]+t[v]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&a^r&l^a&l)|0,h=p,p=d,d=c,c=u+y|0,u=l,l=a,a=r,r=y+g|0;n[0]+=r,n[1]+=a,n[2]+=l,n[3]+=u,n[4]+=c,n[5]+=d,n[6]+=p,n[7]+=h,o+=64,s-=64}return o}var i=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var i=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[i++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(i=n(this.temp,this.state,t,i,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[i++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,i=this.bufferLength,o=e/536870912|0,s=e<<3,r=e%64<56?64:128;this.buffer[i]=128;for(var a=i+1;a<r-8;a++)this.buffer[a]=0;this.buffer[r-8]=o>>>24&255,this.buffer[r-7]=o>>>16&255,this.buffer[r-6]=o>>>8&255,this.buffer[r-5]=o>>>0&255,this.buffer[r-4]=s>>>24&255,this.buffer[r-3]=s>>>16&255,this.buffer[r-2]=s>>>8&255,this.buffer[r-1]=s>>>0&255,n(this.temp,this.state,this.buffer,0,r),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=i;var o=function(){function t(t){this.inner=new i,this.outer=new i,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new i).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function s(t){var e=(new i).update(t),n=e.digest();return e.clean(),n}function r(t,e){var n=new o(t).update(e),i=n.digest();return n.clean(),i}function a(t,e,n,i){var o=i[0];if(0===o)throw new Error("hkdf: cannot expand more");e.reset(),o>1&&e.update(t),n&&e.update(n),e.update(i),e.finish(t),i[0]++}t.HMAC=o,t.hash=s,t.default=s,t.hmac=r;var l=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,i){void 0===e&&(e=l),void 0===i&&(i=32);for(var s=new Uint8Array([1]),u=r(e,t),c=new o(u),d=new Uint8Array(c.digestLength),p=d.length,h=new Uint8Array(i),f=0;f<i;f++)p===d.length&&(a(d,c,n,s),p=0),h[f]=d[p++];return c.clean(),d.fill(0),s.fill(0),h},t.pbkdf2=function(t,e,n,i){for(var s=new o(t),r=s.digestLength,a=new Uint8Array(4),l=new Uint8Array(r),u=new Uint8Array(r),c=new Uint8Array(i),d=0;d*r<i;d++){var p=d+1;a[0]=p>>>24&255,a[1]=p>>>16&255,a[2]=p>>>8&255,a[3]=p>>>0&255,s.reset(),s.update(e),s.update(a),s.finish(u);for(var h=0;h<r;h++)l[h]=u[h];for(h=2;h<=n;h++){s.reset(),s.update(u).finish(u);for(var f=0;f<r;f++)l[f]^=u[f]}for(h=0;h<r&&d*r+h<i;h++)c[d*r+h]=l[h]}for(d=0;d<r;d++)l[d]=u[d]=0;for(d=0;d<4;d++)a[d]=0;return s.clean(),c}}(e);var o=e.default;for(var s in e)o[s]=e[s];"object"==typeof t.exports?t.exports=o:void 0===(i=function(){return o}.call(e,n,e,t))||(t.exports=i)}()},6267(t,e,n){"use strict";n.d(e,{L:()=>z});var i=Uint8Array,o=Uint16Array,s=Uint32Array,r=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(t,e){for(var n=new o(31),i=0;i<31;++i)n[i]=e+=1<<t[i-1];var r=new s(n[30]);for(i=1;i<30;++i)for(var a=n[i];a<n[i+1];++a)r[a]=a-n[i]<<5|i;return[n,r]},c=u(r,2),d=c[0],p=c[1];d[28]=258,p[258]=28;for(var h=u(a,0),f=(h[0],h[1]),v=new o(32768),m=0;m<32768;++m){var y=(43690&m)>>>1|(21845&m)<<1;y=(61680&(y=(52428&y)>>>2|(13107&y)<<2))>>>4|(3855&y)<<4,v[m]=((65280&y)>>>8|(255&y)<<8)>>>1}var g=function(t,e,n){for(var i=t.length,s=0,r=new o(e);s<i;++s)t[s]&&++r[t[s]-1];var a,l=new o(e);for(s=0;s<e;++s)l[s]=l[s-1]+r[s-1]<<1;if(n){a=new o(1<<e);var u=15-e;for(s=0;s<i;++s)if(t[s])for(var c=s<<4|t[s],d=e-t[s],p=l[t[s]-1]++<<d,h=p|(1<<d)-1;p<=h;++p)a[v[p]>>>u]=c}else for(a=new o(i),s=0;s<i;++s)t[s]&&(a[s]=v[l[t[s]-1]++]>>>15-t[s]);return a},b=new i(288);for(m=0;m<144;++m)b[m]=8;for(m=144;m<256;++m)b[m]=9;for(m=256;m<280;++m)b[m]=7;for(m=280;m<288;++m)b[m]=8;var C=new i(32);for(m=0;m<32;++m)C[m]=5;var A=g(b,9,0),x=g(C,5,0),w=function(t){return(t+7)/8|0},I=function(t,e,n){(null==e||e<0)&&(e=0),(null==n||n>t.length)&&(n=t.length);var r=new(2==t.BYTES_PER_ELEMENT?o:4==t.BYTES_PER_ELEMENT?s:i)(n-e);return r.set(t.subarray(e,n)),r},R=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],T=function(t,e,n){var i=new Error(e||R[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,T),!n)throw i;return i},E=function(t,e,n){n<<=7&e;var i=e/8|0;t[i]|=n,t[i+1]|=n>>>8},S=function(t,e,n){n<<=7&e;var i=e/8|0;t[i]|=n,t[i+1]|=n>>>8,t[i+2]|=n>>>16},k=function(t,e){for(var n=[],s=0;s<t.length;++s)t[s]&&n.push({s,f:t[s]});var r=n.length,a=n.slice();if(!r)return[N,0];if(1==r){var l=new i(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort(function(t,e){return t.f-e.f}),n.push({s:-1,f:25001});var u=n[0],c=n[1],d=0,p=1,h=2;for(n[0]={s:-1,f:u.f+c.f,l:u,r:c};p!=r-1;)u=n[n[d].f<n[h].f?d++:h++],c=n[d!=p&&n[d].f<n[h].f?d++:h++],n[p++]={s:-1,f:u.f+c.f,l:u,r:c};var f=a[0].s;for(s=1;s<r;++s)a[s].s>f&&(f=a[s].s);var v=new o(f+1),m=O(n[p-1],v,0);if(m>e){s=0;var y=0,g=m-e,b=1<<g;for(a.sort(function(t,e){return v[e.s]-v[t.s]||t.f-e.f});s<r;++s){var C=a[s].s;if(!(v[C]>e))break;y+=b-(1<<m-v[C]),v[C]=e}for(y>>>=g;y>0;){var A=a[s].s;v[A]<e?y-=1<<e-v[A]++-1:++s}for(;s>=0&&y;--s){var x=a[s].s;v[x]==e&&(--v[x],++y)}m=e}return[new i(v),m]},O=function(t,e,n){return-1==t.s?Math.max(O(t.l,e,n+1),O(t.r,e,n+1)):e[t.s]=n},P=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new o(++e),i=0,s=t[0],r=1,a=function(t){n[i++]=t},l=1;l<=e;++l)if(t[l]==s&&l!=e)++r;else{if(!s&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(s),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(s);r=1,s=t[l]}return[n.subarray(0,i),e]},D=function(t,e){for(var n=0,i=0;i<e.length;++i)n+=t[i]*e[i];return n},L=function(t,e,n){var i=n.length,o=w(e+2);t[o]=255&i,t[o+1]=i>>>8,t[o+2]=255^t[o],t[o+3]=255^t[o+1];for(var s=0;s<i;++s)t[o+s+4]=n[s];return 8*(o+4+i)},F=function(t,e,n,i,s,u,c,d,p,h,f){E(e,f++,n),++s[256];for(var v=k(s,15),m=v[0],y=v[1],w=k(u,15),I=w[0],R=w[1],T=P(m),O=T[0],F=T[1],V=P(I),N=V[0],M=V[1],B=new o(19),_=0;_<O.length;++_)B[31&O[_]]++;for(_=0;_<N.length;++_)B[31&N[_]]++;for(var j=k(B,7),U=j[0],W=j[1],$=19;$>4&&!U[l[$-1]];--$);var J,H,Y,G,Z=h+5<<3,z=D(s,b)+D(u,C)+c,Q=D(s,m)+D(u,I)+c+14+3*$+D(B,U)+(2*B[16]+3*B[17]+7*B[18]);if(Z<=z&&Z<=Q)return L(e,f,t.subarray(p,p+h));if(E(e,f,1+(Q<z)),f+=2,Q<z){J=g(m,y,0),H=m,Y=g(I,R,0),G=I;var K=g(U,W,0);for(E(e,f,F-257),E(e,f+5,M-1),E(e,f+10,$-4),f+=14,_=0;_<$;++_)E(e,f+3*_,U[l[_]]);f+=3*$;for(var q=[O,N],X=0;X<2;++X){var tt=q[X];for(_=0;_<tt.length;++_){var et=31&tt[_];E(e,f,K[et]),f+=U[et],et>15&&(E(e,f,tt[_]>>>5&127),f+=tt[_]>>>12)}}}else J=A,H=b,Y=x,G=C;for(_=0;_<d;++_)if(i[_]>255){et=i[_]>>>18&31,S(e,f,J[et+257]),f+=H[et+257],et>7&&(E(e,f,i[_]>>>23&31),f+=r[et]);var nt=31&i[_];S(e,f,Y[nt]),f+=G[nt],nt>3&&(S(e,f,i[_]>>>5&8191),f+=a[nt])}else S(e,f,J[i[_]]),f+=H[i[_]];return S(e,f,J[256]),f+H[256]},V=new s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),N=new i(0),M=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,i=9;--i;)n=(1&n&&-306674912)^n>>>1;t[e]=n}return t}(),B=function(){var t=-1;return{p:function(e){for(var n=t,i=0;i<e.length;++i)n=M[255&n^e[i]]^n>>>8;t=n},d:function(){return~t}}},_=function(t,e,n,l,u){return function(t,e,n,l,u,c){var d=t.length,h=new i(l+d+5*(1+Math.ceil(d/7e3))+u),v=h.subarray(l,h.length-u),m=0;if(!e||d<8)for(var y=0;y<=d;y+=65535){var g=y+65535;g>=d&&(v[m>>3]=c),m=L(v,m+1,t.subarray(y,g))}else{for(var b=V[e-1],C=b>>>13,A=8191&b,x=(1<<n)-1,R=new o(32768),T=new o(x+1),E=Math.ceil(n/3),S=2*E,k=function(e){return(t[e]^t[e+1]<<E^t[e+2]<<S)&x},O=new s(25e3),P=new o(288),D=new o(32),M=0,B=0,_=(y=0,0),j=0,U=0;y<d;++y){var W=k(y),$=32767&y,J=T[W];if(R[$]=J,T[W]=$,j<=y){var H=d-y;if((M>7e3||_>24576)&&H>423){m=F(t,v,0,O,P,D,B,_,U,y-U,m),_=M=B=0,U=y;for(var Y=0;Y<286;++Y)P[Y]=0;for(Y=0;Y<30;++Y)D[Y]=0}var G=2,Z=0,z=A,Q=$-J&32767;if(H>2&&W==k(y-Q))for(var K=Math.min(C,H)-1,q=Math.min(32767,y),X=Math.min(258,H);Q<=q&&--z&&$!=J;){if(t[y+G]==t[y+G-Q]){for(var tt=0;tt<X&&t[y+tt]==t[y+tt-Q];++tt);if(tt>G){if(G=tt,Z=Q,tt>K)break;var et=Math.min(Q,tt-2),nt=0;for(Y=0;Y<et;++Y){var it=y-Q+Y+32768&32767,ot=it-R[it]+32768&32767;ot>nt&&(nt=ot,J=it)}}}Q+=($=J)-(J=R[$])+32768&32767}if(Z){O[_++]=268435456|p[G]<<18|f[Z];var st=31&p[G],rt=31&f[Z];B+=r[st]+a[rt],++P[257+st],++D[rt],j=y+G,++M}else O[_++]=t[y],++P[t[y]]}}m=F(t,v,c,O,P,D,B,_,U,y-U,m),!c&&7&m&&(m=L(v,m+1,N))}return I(h,0,l+w(m)+u)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,l,!u)},j=function(t,e){var n={};for(var i in t)n[i]=t[i];for(var i in e)n[i]=e[i];return n},U=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function W(t,e){return _(t,e||{},0,0)}var $=function(t,e,n,o){for(var s in t){var r=t[s],a=e+s,l=o;Array.isArray(r)&&(l=j(o,r[1]),r=r[0]),r instanceof i?n[a]=[r,l]:(n[a+="/"]=[new i(0),l],$(r,a,n,o))}},J="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(N,{stream:!0})}catch(t){}function Y(t,e){if(e){for(var n=new i(t.length),o=0;o<t.length;++o)n[o]=t.charCodeAt(o);return n}if(J)return J.encode(t);var s=t.length,r=new i(t.length+(t.length>>1)),a=0,l=function(t){r[a++]=t};for(o=0;o<s;++o){if(a+5>r.length){var u=new i(a+8+(s-o<<1));u.set(r),r=u}var c=t.charCodeAt(o);c<128||e?l(c):c<2048?(l(192|c>>6),l(128|63&c)):c>55295&&c<57344?(l(240|(c=65536+(1047552&c)|1023&t.charCodeAt(++o))>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|63&c)):(l(224|c>>12),l(128|c>>6&63),l(128|63&c))}return I(r,0,a)}var G=function(t){var e=0;if(t)for(var n in t){var i=t[n].length;i>65535&&T(9),e+=i+4}return e},Z=function(t,e,n,i,o,s,r,a){var l=i.length,u=n.extra,c=a&&a.length,d=G(u);U(t,e,null!=r?33639248:67324752),e+=4,null!=r&&(t[e++]=20,t[e++]=n.os),t[e]=20,e+=2,t[e++]=n.flag<<1|(s<0&&8),t[e++]=o&&8,t[e++]=255&n.compression,t[e++]=n.compression>>8;var p=new Date(null==n.mtime?Date.now():n.mtime),h=p.getFullYear()-1980;if((h<0||h>119)&&T(10),U(t,e,h<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>>1),e+=4,-1!=s&&(U(t,e,n.crc),U(t,e+4,s<0?-s-2:s),U(t,e+8,n.size)),U(t,e+12,l),U(t,e+14,d),e+=16,null!=r&&(U(t,e,c),U(t,e+6,n.attrs),U(t,e+10,r),e+=14),t.set(i,e),e+=l,d)for(var f in u){var v=u[f],m=v.length;U(t,e,+f),U(t,e+2,m),t.set(v,e+4),e+=4+m}return c&&(t.set(a,e),e+=c),e};function z(t,e){e||(e={});var n={},o=[];$(t,"",n,e);var s=0,r=0;for(var a in n){var l=n[a],u=l[0],c=l[1],d=0==c.level?0:8,p=(I=Y(a)).length,h=c.comment,f=h&&Y(h),v=f&&f.length,m=G(c.extra);p>65535&&T(11);var y=d?W(u,c):u,g=y.length,b=B();b.p(u),o.push(j(c,{size:u.length,crc:b.d(),c:y,f:I,m:f,u:p!=a.length||f&&h.length!=v,o:s,compression:d})),s+=30+p+m+g,r+=76+2*(p+m)+(v||0)+g}for(var C=new i(r+22),A=s,x=r-s,w=0;w<o.length;++w){var I=o[w];Z(C,I.o,I,I.f,I.u,I.c.length);var R=30+I.f.length+G(I.extra);C.set(I.c,I.o+R),Z(C,s,I,I.f,I.u,I.c.length,I.o,I.m),s+=16+R+(I.m?I.m.length:0)}return function(t,e,n,i,o){U(t,e,101010256),U(t,e+8,n),U(t,e+10,n),U(t,e+12,i),U(t,e+16,o)}(C,s,o.length,x,A),C}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout},6186(t){"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var s={},r=[],a=0;a<t.length;a++){var l=t[a],u=i.base?l[0]+i.base:l[0],c=s[u]||0,d="".concat(u," ").concat(c);s[u]=c+1;var p=n(d),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)e[p].references++,e[p].updater(h);else{var f=o(h,i);i.byIndex=a,e.splice(a,0,{identifier:d,updater:f,references:1})}r.push(d)}return r}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var s=i(t=t||[],o=o||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var l=i(t,o),u=0;u<s.length;u++){var c=n(s[u]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}s=l}}},7433(t){"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},8990(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},8626(t,e,n){"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},2155(t){"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},9827(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},6998(t,e,n){"use strict";var i=n(6186),o=n.n(i),s=n(2155),r=n.n(s),a=n(7433),l=n.n(a),u=n(8626),c=n.n(u),d=n(8990),p=n.n(d),h=n(9827),f=n.n(h),v=n(3775),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p(),o()(v.A,m),v.A&&v.A.locals&&v.A.locals},9192(t,e,n){"use strict";var i=n(6186),o=n.n(i),s=n(2155),r=n.n(s),a=n(7433),l=n.n(a),u=n(8626),c=n.n(u),d=n(8990),p=n.n(d),h=n(9827),f=n.n(h),v=n(5167),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p(),o()(v.A,m),v.A&&v.A.locals&&v.A.locals},8550(t,e,n){"use strict";var i=n(6186),o=n.n(i),s=n(2155),r=n.n(s),a=n(7433),l=n.n(a),u=n(8626),c=n.n(u),d=n(8990),p=n.n(d),h=n(9827),f=n.n(h),v=n(1261),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p(),o()(v.A,m),v.A&&v.A.locals&&v.A.locals},4315(t,e,n){"use strict";var i=n(6186),o=n.n(i),s=n(2155),r=n.n(s),a=n(7433),l=n.n(a),u=n(8626),c=n.n(u),d=n(8990),p=n.n(d),h=n(9827),f=n.n(h),v=n(5366),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p(),o()(v.A,m),v.A&&v.A.locals&&v.A.locals},5940(t,e,n){"use strict";var i=n(6186),o=n.n(i),s=n(2155),r=n.n(s),a=n(7433),l=n.n(a),u=n(8626),c=n.n(u),d=n(8990),p=n.n(d),h=n(9827),f=n.n(h),v=n(1179),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=l().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=p(),o()(v.A,m),v.A&&v.A.locals&&v.A.locals},4527(t,e,n){"use strict";n.d(e,{ue:()=>o});var i=n(6082);function o(){return t=this,e=void 0,o=function*(){const t=i.Func.find({package:"Compute",name:"init"})[0];t&&(yield t.prepare().call())},new((n=void 0)||(n=Promise))(function(i,s){function r(t){try{l(o.next(t))}catch(t){s(t)}}function a(t){try{l(o.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((o=o.apply(t,e||[])).next())});var t,e,n,o}},6512(t,e,n){"use strict";function i(...t){return new window.compute.RFV(...t)}n.d(e,{Nu:()=>i})},8476(t,e,n){"use strict";n.d(e,{S:()=>d});var i=n(4328),o=n(7389),s=n(6082),r=n(1757),a=n.n(r),l=n(4260),u=n(810),c=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};class d extends s.TableView{static fromComparedRuns(t,e){return c(this,arguments,void 0,function*(t,e,n={parentView:void 0,parentCall:void 0}){const o=(0,u.fo)(t,e,n),s=[...i.shell.views].find(t=>t.type===l.sk||t.type===l.eP||t.type===l.r0);return s&&(i.shell.v=s),new this(o,n)})}constructor(t,e={}){super(window.grok_TableView(t.dart,!1)),e.parentView&&(this.parentView=e.parentView),this.parentCall=e.parentCall||i.functions.getCurrentCall()}showAllColumns(){const t=this.dataFrame.columns.names();this.grid.columns.setVisible(t)}showChangingColumns(){const t=this.dataFrame.columns.names().filter(t=>s.TYPES_SCALAR.has(this.dataFrame.getCol(t).type)&&this.dataFrame.getCol(t).categories.length>1||!s.TYPES_SCALAR.has(this.dataFrame.getCol(t).type));this.grid.columns.setVisible(t)}defaultCustomize(){var t;const e=o.iconFA("compress-alt",()=>{this.showChangingColumns(),a()(n).show(),a()(e).hide()},"Hide constant parameters"),n=o.iconFA("expand-arrows-alt",()=>{this.showAllColumns(),a()(n).hide(),a()(e).show()},"Show all parameters");a()(e).hide(),this.setRibbonPanels([...this.getRibbonPanels(),[e,n]]),this.showChangingColumns(),this.root.style.removeProperty("width"),this.root.firstChild.style.removeProperty("width"),this.root.firstChild.firstChild.style.removeProperty("width"),this.grid.props.rowHeight=180,this.grid.props.showAddNewRowIcon=!1,this.grid.props.allowEdit=!1,this.grid.columns.byName(l._W).width=70;for(let e=0;e<this.grid.columns.length;e++){const n=this.grid.columns.byIndex(e);(null===(t=n.column)||void 0===t?void 0:t.temp[l.NT])&&(n.width=350,n.cellType="html")}const r=new s.LruCache;this.grid.onCellPrepare(t=>c(this,void 0,void 0,function*(){if(!t.isColHeader&&!t.isRowHeader){if(t.tableColumn.name===l._W){t.customText="";const e=String(t.cell.value).split(" - "),n=e.length>1?[e[0],o.element("br"),e[1]]:e;return t.element=o.div(n,{style:{writingMode:"vertical-rl",textOrientation:"mixed",margin:"auto"}}),void(t.element.parentElement.style.display="flex")}if(t.tableColumn&&t.tableColumn.temp[l.NT]){const e=t.cell.value,n=t.tableColumn.temp[l.NT],i=n.type,o=()=>c(this,void 0,void 0,function*(){const o=Object.values(l.CB).includes(i)?s.Viewer.fromType(i,e):yield e.plot.fromType(i);return t.tableColumn.temp[l.NT].look?o.setOptions(t.tableColumn.temp[l.NT].look):(o.setOptions(n),t.tableColumn.temp[l.NT]=o.getOptions()),o.root}),a=`${e.id}_${i}`;if(r.get(a))t.element=r.get(a);else{const e=yield o();r.set(a,e),t.element=e}t.element.style.width="100%",t.element.style.height="100%"}}}));const u=o.box(o.div([],{style:{minHeight:"100px"}})),d=i.events.onCurrentViewChanged.subscribe(()=>{i.shell.v.id===this.id?i.shell.dockManager.dock(u,"down",null,"Comparison chart",.25):i.shell.dockManager.close(u)}),p=this.grid.onCellClick.subscribe(t=>{var e;if(i.shell.v.id===this.id&&t.isColHeader&&(null===(e=t.tableColumn)||void 0===e?void 0:e.type)===s.TYPE.DATA_FRAME&&[s.VIEWER.LINE_CHART,s.VIEWER.SCATTER_PLOT,s.VIEWER.HISTOGRAM,s.VIEWER.BOX_PLOT].includes(t.tableColumn.temp[l.NT].type)){i.shell.dockManager.findNode(u)||i.shell.dockManager.dock(u,"down",null,"Comparison chart",.25);const e=t=>{const e=s.toJs(t.get(0)).clone();e.columns.addNew(l.eX,s.TYPE.STRING).init(t.dataFrame.get(l._W,0));for(let n=1;n<t.length;n++){const i=s.toJs(t.get(n)).clone();i.columns.addNew(l.eX,s.TYPE.STRING).init(t.dataFrame.get(l._W,n));const o=[s.COLUMN_TYPE.INT,s.COLUMN_TYPE.FLOAT];for(let t=0;t<i.columns.length;t++){const n=i.columns.byIndex(t),r=e.columns.byIndex(t);n.type!==r.type&&o.includes(n.type)&&o.includes(r.type)&&(n.type!==s.COLUMN_TYPE.FLOAT&&i.columns.replace(n,n.convertTo(s.COLUMN_TYPE.FLOAT)),r.type!==s.COLUMN_TYPE.FLOAT&&e.columns.replace(r,r.convertTo(s.COLUMN_TYPE.FLOAT)))}e.append(i,!0)}return e},n=(e,n,i)=>{var o;switch(null===(o=t.tableColumn)||void 0===o?void 0:o.temp[l.NT].type){case s.VIEWER.LINE_CHART:return i.plot.line(Object.assign(Object.assign({},n),{split:l.eX})).root;case s.VIEWER.SCATTER_PLOT:return i.plot.scatter(Object.assign(Object.assign({},n),{color:l.eX})).root;case s.VIEWER.HISTOGRAM:return i.plot.histogram(Object.assign(Object.assign({},n),{split:l.eX})).root;case s.VIEWER.BOX_PLOT:return i.plot.box(Object.assign(Object.assign({},n),{category:l.eX})).root}};o.setUpdateIndicator(u,!0),setTimeout(()=>{var i;if(!t.tableColumn.temp.unitedPlot){const s=t.tableColumn.temp[l.NT].look,r=e(t.tableColumn);t.tableColumn.temp.unitedPlot=n(null===(i=t.tableColumn)||void 0===i?void 0:i.temp[l.NT].type,s,r),o.setUpdateIndicator(u,!1)}o.empty(u),u.appendChild(t.tableColumn.temp.unitedPlot)},10)}else i.shell.dockManager.close(u)});this.subs.push(p,d)}}},810(t,e,n){"use strict";n.d(e,{Bu:()=>d,ZD:()=>p,fo:()=>h});var i=n(4328),o=n(7389),s=n(6082),r=n(1757),a=n.n(r),l=n(4260),u=n(1599),c=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const d=t=>{var e,n;if(null===(e=t.options)||void 0===e?void 0:e.default)return JSON.parse(null===(n=t.options)||void 0===n?void 0:n.default);const i=t.defaultValue;return t.propertyType===s.TYPE.STRING&&i?i.substring(1,i.length-1):i};function p(t,e){e?(a()(t).addClass("ui-box").css({width:"auto",height:"auto"}),o.setUpdateIndicator(t,!0)):(o.setUpdateIndicator(t,!1),a()(t).removeClass("ui-box"))}const h=(t,e,n={parentView:void 0,parentCall:void 0})=>{var r,d;const p=e,h=[...p.inputs,...p.outputs].map(t=>(0,u.jJ)(t)).reduce((t,e)=>(t[e.name]?t[e.name].push(...e.config):t[e.name]=e.config,t),{}),f=e=>{var n;if(e.propertyType===s.TYPE.DATA_FRAME){const n=h[e.name].map(n=>{var i;let o=null!==(i=e.caption)&&void 0!==i?i:e.name;const r=s.Column.fromType(s.TYPE.DATA_FRAME,o,t.length);r.init(n=>{var i;return null!==(i=t[n].inputs[e.name])&&void 0!==i?i:t[n].outputs[e.name]});const a=v.columns.getUnusedName(`${r.name} (${n.type})`);return r.name=a,o=a,r.temp[l.NT]=n,v.columns.add(r),r});return n}{let i=null!==(n=e.caption)&&void 0!==n?n:e.name;const o=s.Column.fromType(e.propertyType,i,t.length);o.init(n=>{var i;return null!==(i=t[n].inputs[e.name])&&void 0!==i?i:t[n].outputs[e.name]});const r=v.columns.getUnusedName(o.name);return o.name=r,i=r,v.columns.add(o),[o]}},v=s.DataFrame.create(t.length),m=[];return t.forEach(t=>{var e;let n=null!==(e=t.options.title)&&void 0!==e?e:`${t.func.name} - ${(0,u.eK)(t)}`,i=2;for(;m.includes(n);)n=`${t.func.name} - ${(0,u.eK)(t)} - ${i}`,i++;m.push(n)}),v.columns.add(s.Column.fromStrings(l._W,m)),v.name=(null===(r=n.parentCall)||void 0===r?void 0:r.func.name)?`${null===(d=n.parentCall)||void 0===d?void 0:d.func.name} - comparison`:`${e.name} - comparison`,p.inputs.forEach(t=>f(t)),p.outputs.forEach(t=>f(t)),i.events.onCurrentObjectChanged.subscribe(({sender:t})=>{if(t instanceof s.Column&&t.type===s.TYPE.DATA_FRAME&&i.shell.tv&&i.shell.tv.temp.isComparison&&[s.VIEWER.LINE_CHART,s.VIEWER.SCATTER_PLOT,s.VIEWER.HISTOGRAM,s.VIEWER.BOX_PLOT].includes(t.temp[l.NT].type)){i.shell.windows.showProperties=!0;const e=t=>{const e=t.get(0).clone();e.columns.addNew(l.eX,s.TYPE.STRING).init(t.dataFrame.get(l._W,0));for(let n=1;n<t.length;n++){const i=t.get(n).clone();i.columns.addNew(l.eX,s.TYPE.STRING).init(t.dataFrame.get(l._W,n));const o=[s.COLUMN_TYPE.INT,s.COLUMN_TYPE.FLOAT];for(let t=0;t<i.columns.length;t++){const n=i.columns.byIndex(t),r=e.columns.byIndex(t);n.type!==r.type&&o.includes(n.type)&&o.includes(r.type)&&(n.type!==s.COLUMN_TYPE.FLOAT&&i.columns.replace(n,n.convertTo(s.COLUMN_TYPE.FLOAT)),r.type!==s.COLUMN_TYPE.FLOAT&&e.columns.replace(r,r.convertTo(s.COLUMN_TYPE.FLOAT)))}e.append(i,!0)}return e},n=t.temp[l.NT].look;setTimeout(()=>{switch(t.temp[l.NT].type){case s.VIEWER.LINE_CHART:const r=o.waitBox(()=>c(void 0,void 0,void 0,function*(){var i;const o=null!==(i=t.temp.unitedDf)&&void 0!==i?i:e(t);return t.temp.unitedDf=o,o.plot.line(Object.assign(Object.assign({},n),{split:l.eX})).root}));a()(r).css({width:"100%"}),i.shell.o=r;break;case s.VIEWER.SCATTER_PLOT:const u=o.waitBox(()=>c(void 0,void 0,void 0,function*(){var i;const o=null!==(i=t.temp.unitedDf)&&void 0!==i?i:e(t);return t.temp.unitedDf=o,o.plot.scatter(Object.assign(Object.assign({},n),{color:l.eX})).root}));i.shell.o=u,a()(u).css({width:"100%"});break;case s.VIEWER.HISTOGRAM:const d=o.waitBox(()=>c(void 0,void 0,void 0,function*(){var i;const o=null!==(i=t.temp.unitedDf)&&void 0!==i?i:e(t);return t.temp.unitedDf=o,o.plot.histogram(Object.assign(Object.assign({},n),{split:l.eX})).root}));i.shell.o=d,a()(d).css({width:"100%"});break;case s.VIEWER.BOX_PLOT:const p=o.waitBox(()=>c(void 0,void 0,void 0,function*(){var i;const o=null!==(i=t.temp.unitedDf)&&void 0!==i?i:e(t);return t.temp.unitedDf=o,o.plot.box(Object.assign(Object.assign({},n),{category:l.eX})).root}));i.shell.o=p,a()(p).css({width:"100%"})}})}}),v}},5092(t,e,n){"use strict";n.d(e,{W:()=>p});var i=n(4328),o=n(6082),s=n(1991),r=n.n(s),a=n(1599),l=n(3508),u=n.n(l),c=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const d=t=>{switch(t){case"Today":return"started > -1d";case"Yesterday":return"started > -2d and started < -1d";case"Any time":return"";case"Last year":return"started > -2y and started < -1y";case"This year":return"started > -1y";case"Last month":return"started > -2m and started < -1m";case"This month":return"started > -1m";case"Last week":return"started > -2w and started < -1w";case"This week":return"started > -1w"}};var p;!function(t){const e=new o.LruCache;function n(t){return c(this,void 0,void 0,function*(){const e=yield i.dapi.functions.calls.allPackageVersions().include("session.user,func.package, inputs, outputs").find(t),n=r()(e.inputParams.values()).filter(t=>t.property.propertyType===o.TYPE.FILE&&!!e.inputs[t.name]);yield Promise.all(n.map(t=>c(this,void 0,void 0,function*(){const{id:n,name:s}=JSON.parse(e.inputs[t.name]),r=yield i.dapi.files.readAsBytes(n),a=o.FileInfo.fromBytes(s,r);return a.id=n,e.inputs[t.name]=a,Promise.resolve()})));const s=r()(e.outputParams.values()).filter(t=>t.property.propertyType===o.TYPE.DATA_FRAME&&!!e.outputs[t.name]);yield Promise.all(s.map(t=>c(this,void 0,void 0,function*(){return e.outputs[t.name]=yield i.dapi.tables.getTable(e.outputs[t.name]),Promise.resolve()})));const a=r()(e.inputParams.values()).filter(t=>t.property.propertyType===o.TYPE.DATA_FRAME&&!!e.inputs[t.name]);return yield Promise.all(a.map(t=>c(this,void 0,void 0,function*(){return e.inputs[t.name]=yield i.dapi.tables.getTable(e.inputs[t.name]),Promise.resolve()}))),e})}t.loadChildRuns=function(t){return c(this,void 0,void 0,function*(){return{parentRun:yield n(t),childRuns:yield i.dapi.functions.calls.allPackageVersions().include("func, func.package").filter(`options.parentCallId="${t}"`).list()}})},t.shallowLoadRun=function(t){return c(this,void 0,void 0,function*(){return yield i.dapi.functions.calls.allPackageVersions().include("session.user,func.package, inputs, outputs").find(t)})},t.loadRun=n,t.updateRunMeta=function(t){return c(this,void 0,void 0,function*(){const e=yield i.dapi.functions.calls.allPackageVersions().save(t);i.log.audit("@user edited metadata of @model model run",{user:o.User.current(),model:e.func})})},t.saveRun=function(t){return c(this,void 0,void 0,function*(){let n=e.get("All users");n||(n=yield i.dapi.groups.find(o.Group.defaultGroupsIds["All users"]),e.set("All users",n));const s=(0,a.A4)(t);(0,a.Ne)(s)&&(s.options.createdOn=u()().utc(!0).unix());const l=r()(s.inputParams.values()).filter(t=>t.property.propertyType===o.TYPE.FILE&&!!s.inputs[t.name]);yield Promise.all(l.map(t=>c(this,void 0,void 0,function*(){var e;const n=s.inputs[t.name],r=n instanceof o.FileInfo?yield n.readAsBytes():new Uint8Array(yield n.arrayBuffer()),a=n instanceof o.FileInfo&&null!==(e=n.fileName)&&void 0!==e?e:n.name,l=o.FileInfo.fromBytes(a,r);return yield i.dapi.files.write(l),s.inputs[t.name]={id:l.id,name:l.name},Promise.resolve()})));const d=r()(s.outputParams.values()).filter(t=>t.property.propertyType===o.TYPE.DATA_FRAME&&!!s.outputs[t.name]);yield Promise.all(d.map(t=>c(this,void 0,void 0,function*(){yield i.dapi.tables.uploadDataFrame(s.outputs[t.name]),yield i.dapi.permissions.grant(s.outputs[t.name].getTableInfo(),n,!1)})));const p=r()(s.inputParams.values()).filter(t=>t.property.propertyType===o.TYPE.DATA_FRAME&&!!s.inputs[t.name]);yield Promise.all(p.map(t=>c(this,void 0,void 0,function*(){yield i.dapi.tables.uploadDataFrame(s.inputs[t.name]),yield i.dapi.permissions.grant(s.inputs[t.name].getTableInfo(),n,!1)})));const h=yield i.dapi.functions.calls.allPackageVersions().save(s);return i.log.audit("@user saved run of the @model model",{user:o.User.current(),model:h.func}),h})},t.deleteRun=function(t){return c(this,void 0,void 0,function*(){t.options.isDeleted=!0,yield i.dapi.functions.calls.allPackageVersions().save(t)})},t.pullRuns=function(t){return c(this,arguments,void 0,function*(t,e={},n={}){let o=`func.id="${t}"`;return o+=e.author?` and session.user.id="${e.author.id}"`:"",o+=e.date?d(e.date):"",i.dapi.functions.calls.allPackageVersions().filter(o).include("session.user, options").list(n)})},t.pullRunsByName=function(t){return c(this,arguments,void 0,function*(t,e=[],n={},s=[],a=!1){let l="";for(const t of e){const e=[];t.author&&e.push(`session.user.id="${t.author.id}"`),t.date&&e.push(d(t.date)),t.text&&e.push(`((options.title like "${t.text}") or (options.annotation like "${t.text}"))`),t.includeDeleted||e.push('((options.isDeleted != "true") or (options.isDeleted = null))');const n=e.join(" and ");""!==n&&(l+=""===l?`(${n})`:` or (${n})`)}""!==l&&(l=` and (${l})`);const u=yield i.dapi.functions.calls.allPackageVersions().filter(`func.name="${t}"${l}`).include(`${[...s,"func.package"].join(",")}`).list(n);if((s.includes("inputs")||s.includes("func.params"))&&!a)for(const t of u){const e=r()(t.inputParams.values()).filter(e=>e.property.propertyType===o.TYPE.DATA_FRAME&&!!t.inputs[e.name]);for(const n of e)t.inputs[n.name]=yield i.dapi.tables.getTable(t.inputs[n.name])}if((s.includes("outputs")||s.includes("func.params"))&&!a)for(const t of u){const e=r()(t.outputParams.values()).filter(e=>e.property.propertyType===o.TYPE.DATA_FRAME&&!!t.outputs[e.name]);for(const n of e)t.outputs[n.name]=yield i.dapi.tables.getTable(t.outputs[n.name])}return u})}}(p||(p={}))},3143(t,e,n){"use strict";n.d(e,{A:()=>i});var i,o=n(9879),s=n(8867),r=n(7109);!function(t){t.fileInput=function(t="Drag-n-drop here",e=null,n=null,i=o.R){return new o.z(t,e,n,i)},t.historyInput=function(t,e,n){return new s.PT(t,e,n)},t.historyInputJSON=function(t,e,n){return new s.RP(t,e,n)},t.historyPanel=function(t){return new r.b(t)}}(i||(i={}))},9879(t,e,n){"use strict";n.d(e,{R:()=>a,z:()=>l});var i=n(7389),o=n(6082),s=n(1858),r=(n(6998),function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})});const a="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";class l extends o.InputBase{get value(){return this.fileValue}set value(t){this.stringValue=(null==t?void 0:t.name)||"Drag-n-drop your file",this.fileValue=t,this.notify&&this.fireInput()}constructor(t="Drag-n-drop here",e=null,n=null,o=a){super(i.input.string("Input file",{value:""}).dart),this.initialText=t,this.initialValue=e,this.onValueChanged=n,this.fileType=o,this.uploadedFile$=new s.Subject,this.onFileUploaded=this.uploadedFile$,this.fileValue=null,this.isValid=new s.BehaviorSubject(!0),this.hiddenInput=document.createElement("input"),this.icon=i.iconFA("cloud-upload",()=>this.hiddenInput.click(),"Upload"),this.subscribeOnEvents(),this.root.style.display="flex",this.isValid.subscribe(t=>{if(t){this.input.classList.remove("error"),this.input.classList.add("success");const t=i.iconFA("times",()=>this.reset(),"Reset uploaded file");this.icon.replaceWith(t),this.icon=t}else{this.input.classList.remove("success"),this.input.classList.add("error");const t=i.iconFA("redo",()=>this.hiddenInput.click(),"Re-upload a file");this.icon.replaceWith(t),this.icon=t}}),this.uploadedFile$.subscribe(t=>{if(this.onValueChanged&&this.onValueChanged(t),!t){const t=i.iconFA("cloud-upload",()=>this.hiddenInput.click(),"Choose a file to upload");this.icon.replaceWith(t),this.icon=t}this.value=t}),this.reset()}subscribeOnEvents(){this.input.readOnly=!0,this.input.classList.add("default");const t=t=>r(this,void 0,void 0,function*(){if(t&&t.length&&this.enabled){if(t.length>1)throw this.isValid.next(!1),new Error("Please specify single input file");if(this.fileType&&t[0].type!==this.fileType)throw this.isValid.next(!1),new Error("File type is not supported");this.isValid.value?this.uploadedFile$.next(t[0]):this.uploadedFile$.next(null)}});this.root.classList.add("fi-drop-area"),this.root.style.width="100%",this.hiddenInput.type="file",this.hiddenInput.addEventListener("change",()=>r(this,void 0,void 0,function*(){return yield t(this.hiddenInput.files)}),!1),["dragenter","dragover","dragleave","drop"].forEach(t=>{this.input.addEventListener(t,t=>{t.preventDefault(),t.stopPropagation()},!1)}),["dragenter","dragover"].forEach(t=>{this.input.addEventListener(t,()=>{this.input.classList.add("drag-n-dropping")},!1)}),["dragleave","drop"].forEach(t=>{this.input.addEventListener(t,()=>{this.input.classList.remove("drag-n-dropping")},!1)}),this.input.addEventListener("drop",e=>r(this,void 0,void 0,function*(){const n=e.dataTransfer.files;t(n)}),!1),this.input.addEventListener("click",()=>this.hiddenInput.click(),!1),this.addOptions(this.icon),["drag","dragenter"].forEach(t=>{document.getElementsByClassName("layout-workarea")[0].addEventListener(t,t=>{t.stopPropagation()},!1)})}reset(){this.input.classList.value="ui-input-editor default",this.hiddenInput.value="",this.uploadedFile$.next(null)}}},8867(t,e,n){"use strict";n.d(e,{PT:()=>y,RP:()=>g});var i=n(4328),o=n(7389),s=n(6082),r=n(1858),a=n(9713),l=n(1757),u=n.n(l),c=n(5092),d=(n(9192),n(5355)),p=n(1599),h=n(6910),f=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};class v{static getHistoryRuns(t,e=!0){return(0,r.from)((()=>f(this,void 0,void 0,function*(){return yield c.W.pullRunsByName(t,[{author:i.shell.user}],{order:"started"},["func.params","session.user","options"],e)}))())}}class m extends s.InputBase{constructor(t,e,n){var i,s;const l=o.input.string(t,{value:""});super(l.dart),this.label=t,this._funcName=e,this.options=n,this.onHistoricalRunChosen=new r.BehaviorSubject(null),this.experimentRunsUpdate=new r.Subject,this.store={experimentRuns:new r.Observable,isExperimentRunsLoading:new r.Subject,experimentRunData:new r.BehaviorSubject("")},this._historyList=new d.H([],{fallbackText:"No runs are found in history",showActions:!1,showBatchActions:!1,isHistory:!1,visibleProps:null===(i=this.options)||void 0===i?void 0:i.mainProps,propFuncs:null===(s=this.options)||void 0===s?void 0:s.propFuncs}),this._historyDialog=this.getHistoryDialog(),this._visibleInput=o.input.string(this.label,{value:""}),this._visibleIcon=o.iconFA("search",()=>this.showSelectionDialog(),"Search"),this._chosenRun=null,this._chosenRunId=null,this._visibleInput=l,this._visibleInput.readOnly=!0,this._visibleInput.input.addEventListener("click",()=>this.showSelectionDialog()),this._visibleInput.addOptions(this._visibleIcon),this.store.experimentRuns=this.experimentRunsUpdate.pipe((0,a.tap)(()=>this.toggleLoaderExpRuns(!0)),(0,a.switchMap)(()=>{var t,e;return v.getHistoryRuns(this._funcName,null===(e=null===(t=this.options)||void 0===t?void 0:t.skipDfsOnInit)||void 0===e||e).pipe((0,a.catchError)(t=>(console.error(t),r.EMPTY)),(0,a.finalize)(()=>this.toggleLoaderExpRuns(!1)))}),(0,a.shareReplay)(1)),this.store.experimentRuns.subscribe(t=>{this._historyList.updateRuns(t.filter(t=>!(0,p.Ne)(t)))}),this.store.isExperimentRunsLoading.subscribe(t=>{o.setUpdateIndicator(this._visibleInput.root,t),o.setUpdateIndicator(this._historyList.root,t)}),this.experimentRunsUpdate.next()}setCurrentRow(){this.getValue()?this._historyList.chosen=this.getValue():this.chosenRunId&&(this._historyList.chosenById=this.chosenRunId)}showSelectionDialog(){this.renderGridAndFilters(),this._historyDialog.getButton("OK").disabled=1!==this._historyList.selected.size,this._historyDialog.show({modal:!0,fullScreen:!0,center:!0,width:window.innerWidth-50,height:window.innerHeight-50})}renderGridAndFilters(){var t,e;const n=new d.H([...this._historyList.runs.values()],Object.assign(Object.assign({},this.options),{visibleProps:null===(t=this.options)||void 0===t?void 0:t.mainProps,propFuncs:null===(e=this.options)||void 0===e?void 0:e.propFuncs}));this._historyList.root.replaceWith(n.root),this._historyList=n,this._historyList.onChosen.subscribe(t=>{this._historyDialog.getButton("OK").disabled=!t}),this._historyList.onRunsDfChanged.pipe((0,a.filter)(t=>t.rowCount>0),(0,a.take)(1)).subscribe(()=>{this.setCurrentRow()})}getHistoryDialog(){const t=o.dialog();return u()(t.root.querySelector(".d4-dialog-contents")).removeClass("ui-form"),t.onOK(()=>f(this,void 0,void 0,function*(){var t,e;let n=this._historyList.chosen;n&&((null===(e=null===(t=this.options)||void 0===t?void 0:t.skipDfsOnInit)||void 0===e||e)&&(n=yield c.W.loadRun(n.id)),this.setValue(n)),this.fireInput()})),t.addButton("Refresh",()=>{this.experimentRunsUpdate.next()},2,"Reload list of runs"),t.addButton("Discard",()=>{this.setValue(null),this.fireInput(),t.close()},1,"Discard the previous choice"),u()(t.getButton("CANCEL")).hide(),t.add(this._historyList.root),t}setValue(t){var e,n,i,o,s,r,a;this._chosenRun=t,this._chosenRunId=null!==(n=null===(e=this._chosenRun)||void 0===e?void 0:e.id)&&void 0!==n?n:null,this.onHistoricalRunChosen.next(t),this.stringValue=t?(null===(i=this.options)||void 0===i?void 0:i.stringValueFunc)?null===(o=this.options)||void 0===o?void 0:o.stringValueFunc(t):[`${(0,p.eK)(t)} \\ ${t.author.name}`,(null!==(a=null!==(r=null===(s=this.options)||void 0===s?void 0:s.mainProps)&&void 0!==r?r:(0,h.qg)(t.func))&&void 0!==a?a:[]).map(e=>(0,h.u8)(t,e)).join(" \\ ")].join(" \\ "):"No run chosen",this.notify&&this.fireChanged()}getValue(){return this._chosenRun}get chosenRun(){return this._chosenRun}get chosenRunId(){return this._chosenRunId}set chosenRunId(t){this._chosenRunId=t}get root(){return this._visibleInput.root}set stringValue(t){this._visibleInput.value=t,this._visibleInput.setTooltip(this._visibleInput.value)}get stringValue(){return this._visibleInput.value}get iconRoot(){return this._visibleIcon}toggleLoaderExpRuns(t){this.store.isExperimentRunsLoading.next(t)}}class y extends m{set value(t){this.setValue(t)}get value(){return this.getValue()}}class g extends m{get value(){const t=this.getValue();return t?JSON.stringify({visualValue:this.stringValue,id:t.id.split("-")}):null}set value(t){this.setValue(null),this.stringValue=t?JSON.parse(t).visualValue:"No run is chosen",this.chosenRunId=t?JSON.parse(t).id.join("-"):""}}},5355(t,e,n){"use strict";n.d(e,{H:()=>w});var i=n(4328),o=n(7389),s=n(6082),r=n(1991),a=n.n(r),l=n(1757),u=n.n(l),c=n(1858),d=n(9713),p=n(5092),h=n(4260),f=n(3508),v=n.n(f),m=n(4112),y=n.n(m),g=n(8804),b=n(6910),C=n(4795),A=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};v().extend(y());const x=new s.LruCache;class w extends s.Widget{get type(){return"HistoricalRunsList"}get onRunsDfChanged(){return this._onRunsDfChanged.asObservable()}get onChosen(){return this._onChosen.asObservable()}get chosen(){return this._onChosen.value}set chosen(t){var e;this.chosenById=null!==(e=null==t?void 0:t.id)&&void 0!==e?e:null}set chosenById(t){if(t){for(let e=0;e<this.currentDf.rowCount;e++)if(this.currentDf.getCol(h.vw).get(e)===t){this.currentDf.currentRowIdx=e;break}}else this.currentDf.currentRowIdx=-1}get selected(){return this._onSelectedChanged.value}get runs(){return this.onRunsChanged.value}get onSelectedChanged(){return this._onSelectedChanged.asObservable()}getRunByIdx(t){return this.runs.get(this.currentDf.get(h.vw,t))}showEditDialog(t,e){const n=g.V.forFuncCall(t,e);n.onMetadataEdit.pipe((0,d.take)(1)).subscribe(n=>A(this,void 0,void 0,function*(){var o;if(null===(o=this.options)||void 0===o?void 0:o.isHistory)try{!!n.isFavorite!==e&&(yield(0,b.WM)(t,!!n.isFavorite));const i=yield p.W.shallowLoadRun(t.id);n.title&&(i.options.title=n.title),n.description&&(i.options.description=n.description),n.tags&&(i.options.tags=n.tags),yield p.W.updateRunMeta(i),this.updateRun(i),this.onMetadataEdit.next(i)}catch(t){i.shell.error(t)}else this.updateRun(t)})),n.show({center:!0,width:500})}constructor(t,e){var n,r,l,f,v,m,y;super(o.div([],{style:{height:"100%",width:"100%"}})),this.initialRuns=t,this.options=e,this.onRunsChanged=new c.BehaviorSubject(this.initialRuns.reduce((t,e)=>(t.set(e.id,e),t),new Map)),this._onRunsDfChanged=new c.BehaviorSubject(s.DataFrame.fromColumns([s.Column.bool(h.d1,0),...(null===(n=this.options)||void 0===n?void 0:n.isHistory)?[s.Column.bool(h.iL,0)]:[],...(null===(r=this.options)||void 0===r?void 0:r.showActions)?[s.Column.string(h.zY,0)]:[],s.Column.bool(h.pC,0),s.Column.dateTime(h.bV,0),s.Column.string(h.l8,0),s.Column.string(h.lv,0),s.Column.string(h.qh,0),s.Column.string(h.Ts,0),s.Column.fromStrings(h.vw,[])])),this._historyFilters=s.Viewer.filters(this._onRunsDfChanged.value,{title:"Filters",columnNames:[]}),this._historyGrid=s.Viewer.grid(this._onRunsDfChanged.value,{showRowHeader:!1,showColumnGridlines:!1,allowEdit:!1}),this.onComparisonCalled=new c.Subject,this.onMetadataEdit=new c.Subject,this._onChosen=new c.BehaviorSubject(null),this.onDelete=new c.Subject,this._onSelectedChanged=new c.BehaviorSubject(new Set([])),this.layout=o.splitH([],null,!0),this.defaultGridText=o.divText(null!==(f=null===(l=this.options)||void 0===l?void 0:l.fallbackText)&&void 0!==f?f:"No historical runs found","hp-no-elements-label"),this.defaultFiltersText=o.divText("No filters to show","hp-no-elements-label"),this.filterWithText=o.divH([this.defaultFiltersText,this._historyFilters.root],"ui-box"),this.trashIcon=o.div(o.iconFA("trash-alt",()=>{const t=this.currentDf.selection.getSelectedIndexes(),e=new Set;t.forEach(t=>e.add(this.getRunByIdx(t)));const n=new g.C(e);n.onFuncCallDelete.pipe((0,d.take)(1)).subscribe(t=>A(this,void 0,void 0,function*(){o.setUpdateIndicator(this.root,!0);try{yield Promise.all(a()(t.values()).map(t=>A(this,void 0,void 0,function*(){return yield this.deleteRun(t.id),Promise.resolve()})))}catch(t){i.shell.error(t)}finally{o.setUpdateIndicator(this.root,!1)}})),n.show({center:!0,width:500,modal:!0})},"Delete selected runs"),{style:{paddingTop:"5px"}}),this.compareIcon=o.div(o.iconFA("exchange",()=>A(this,void 0,void 0,function*(){const t=this.currentDf.selection.getSelectedIndexes(),e=[];t.forEach(t=>{e.push(this.currentDf.getCol(h.vw).get(t))}),this.onComparisonCalled.next(e)}),"Compare selected runs"),{style:{paddingTop:"5px"}}),this._isFilterHidden=new c.BehaviorSubject(!1),this.showFiltersIcon=o.div(o.iconFA("filter",()=>{this._isFilterHidden.next(!this._isFilterHidden.value)},"Toggle filters"),{style:{paddingTop:"4px"}}),this._compactMode=new c.BehaviorSubject(null!==(m=null===(v=this.options)||void 0===v?void 0:v.isHistory)&&void 0!==m&&m),this.toggleCompactMode=o.div(o.iconFA("expand-alt",()=>{this.compactMode=!this.compactMode},"Toggle compact mode"),{style:{paddingTop:"4px"}}),this.showMetadataIcon=o.input.toggle("Metadata",{value:!0,onValueChanged:()=>{this.styleHistoryGrid(),this.styleHistoryFilters()}}),this.showInputsIcon=o.input.toggle("Params",{value:!1,onValueChanged:t=>A(this,void 0,void 0,function*(){var e;0!==this.runs.size&&(t&&(null===(e=this.options)||void 0===e?void 0:e.isHistory)?((yield Promise.all([...this.runs.values()].map(t=>A(this,void 0,void 0,function*(){if(x.has(t.id))return x.get(t.id);{const e=yield p.W.shallowLoadRun(t.id);return x.set(e.id,e),e}})))).forEach(t=>{this.runs.set(t.id,t)}),this.onRunsChanged.next(this.runs)):(this.styleHistoryGrid(),this.styleHistoryFilters()))})});const C=o.divH([o.divH([...(null==e?void 0:e.isHistory)?[this.toggleCompactMode]:[],this.showFiltersIcon,this.showMetadataIcon.root,this.showInputsIcon.root],{style:{gap:"5px",padding:"5px"}}),o.divH((null===(y=this.options)||void 0===y?void 0:y.showBatchActions)?[this.trashIcon,this.compareIcon]:[],{style:{gap:"5px",padding:"5px"}})],{style:{justifyContent:"space-between",padding:"0px 5px"}});C.style.setProperty("overflow-y","hidden","important");const w=o.divV([this.defaultGridText,C,this._historyGrid.root],"ui-box");u()(w).removeClass("ui-div"),u()(w).css("width","100%"),this.root.appendChild(this.layout),o.setDisplayAll([this._historyGrid.root,this._historyFilters.root,this.toggleCompactMode,this.trashIcon,this.compareIcon,this.showFiltersIcon],!1);const I=this.onRunsChanged.subscribe(t=>A(this,void 0,void 0,function*(){if(this.setGridCellRendering(),t.size>0){const e=yield(0,b.BV)(t,t.values().next().value.func,this.options),n=t.values().next().value.func;o.setDisplayAll([this.defaultGridText,this.defaultFiltersText],!1),o.setDisplayAll([this._historyGrid.root,this._historyFilters.root,this.toggleCompactMode,this.showMetadataIcon.root,this.trashIcon,this.compareIcon,this.showFiltersIcon],!0),o.setDisplay(this.showInputsIcon.root,(0,b.rs)(n,this.options).length>0),this._onRunsDfChanged.next(e)}else o.setDisplayAll([this.defaultGridText,this.defaultFiltersText],!0),o.setDisplayAll([this._historyGrid.root,this._historyFilters.root,this.showMetadataIcon.root,this.showInputsIcon.root,this.toggleCompactMode,this.trashIcon,this.compareIcon,this.showFiltersIcon],!1)})),R=this._onRunsDfChanged.subscribe(t=>{this._historyFilters.dataFrame=t,this._historyGrid.dataFrame=t,this.currentDf.getCol(h.lv).meta.multiValueSeparator=",",this.styleHistoryGrid(),this.styleHistoryFilters();const e=t.onCurrentRowChanged.subscribe(()=>{var t;this.currentDf.rows.select(()=>!1),this._onChosen.next(null!==(t=this.getRunByIdx(this.currentDf.currentRowIdx))&&void 0!==t?t:null)}),n=t.onSelectionChanged.subscribe(()=>{const e=[...t.selection.getSelectedIndexes()].map(t=>this.getRunByIdx(t));this._onSelectedChanged.next(new Set(e)),this.redrawSelectionState()});this.redrawSelectionState(),this.subs.push(e,n)}),T=this._isFilterHidden.subscribe(t=>{t?(u()(this.showFiltersIcon.firstChild).addClass("fal"),u()(this.showFiltersIcon.firstChild).removeClass("fad"),o.setDisplay(this.filterWithText,!1)):(u()(this.showFiltersIcon.firstChild).addClass("fad"),u()(this.showFiltersIcon.firstChild).removeClass("fal"),u()(this.filterWithText).css(this.compactMode?"height":"width","320px"),u()(this.filterWithText).css(this.compactMode?"width":"height","100%"),o.setDisplay(this.filterWithText,!0))}),E=this._compactMode.subscribe(t=>{const e=[w,this.filterWithText];u()(this.filterWithText).removeClass("ui-div");const n={style:{width:"100%",height:"100%"}};u()(this.toggleCompactMode.firstChild).addClass(t?"fa-expand-alt":"fa-compress-alt"),u()(this.toggleCompactMode.firstChild).removeClass(t?"fa-compress-alt":"fa-expand-alt");const i=t?o.splitV(e,n,!0):o.splitH(e,n,!0);this.layout.replaceWith(i),this.layout=i,o.tools.waitForElementInDom(this.layout).then(t=>{u()(t).css(this.compactMode?"height":"width","100%"),u()(this._historyFilters.root).css(Object.assign({},this.compactMode?{width:"100%"}:{height:"100%"})),u()(this.filterWithText).css(Object.assign({},this.compactMode?{height:"310px",width:"100%"}:{width:"310px",height:"100%"})),u()(w).css(Object.assign({},this.compactMode?{width:"100%"}:{height:"100%"})),setTimeout(()=>{this.styleHistoryGrid(),this.styleHistoryFilters()},100)})});this.subs.push(I,E,R,T)}isFavoriteByIndex(t){return this.currentDf.get(h.iL,t)}setGridCellRendering(){var t,e;(0,b.VI)(this._historyGrid,this.runs,t=>{const e=this.getRunByIdx(t.tableRowIndex);this.showEditDialog(e,this.isFavoriteByIndex(t.tableRowIndex))},t=>{const e=new Set([this.getRunByIdx(t.tableRowIndex)]),n=new g.C(e);n.onFuncCallDelete.pipe((0,d.take)(1)).subscribe(()=>A(this,void 0,void 0,function*(){o.setUpdateIndicator(this.root,!0);try{yield Promise.all(a()(e.values()).map(t=>A(this,void 0,void 0,function*(){return yield this.deleteRun(t.id),Promise.resolve()})))}catch(t){i.shell.error(t)}finally{o.setUpdateIndicator(this.root,!1)}})),n.show({center:!0,width:500})},t=>{const e=this.getRunByIdx(t.tableRowIndex);(0,b.WM)(e,!0).then(()=>this.updateRun(e))},t=>{const e=this.getRunByIdx(t.tableRowIndex);(0,b.WM)(e,!1).then(()=>this.updateRun(e))},null!==(e=null===(t=this.options)||void 0===t?void 0:t.showActions)&&void 0!==e&&e)}deleteRun(t){return A(this,void 0,void 0,function*(){return p.W.shallowLoadRun(t).then(t=>A(this,void 0,void 0,function*(){var e;return[yield(null===(e=this.options)||void 0===e?void 0:e.isHistory)?p.W.deleteRun(t):Promise.resolve(),t]})).then(([,e])=>{var n;return this.runs.delete(t),this.onRunsChanged.next(this.runs),(null===(n=this.options)||void 0===n?void 0:n.isHistory)&&this.onDelete.next(e),e}).then(t=>{(0,b.WM)(t,!1)}).catch(t=>{i.shell.error(t)})})}editRun(t){this.showEditDialog(t,!1)}updateRun(t){this.runs.set(t.id,t),this.onRunsChanged.next(this.onRunsChanged.value)}addRun(t){this.runs.set(t.id,t),this.onRunsChanged.next(this.onRunsChanged.value)}updateRuns(t){this.onRunsChanged.next(t.reduce((t,e)=>(t.set(e.id,e),t),new Map))}get isFilterHidden(){return this._isFilterHidden.value}set isFilterHidden(t){this._isFilterHidden.next(t)}get compactMode(){return this._compactMode.value}set compactMode(t){this._compactMode.next(t)}get onCompactModeChanged(){return this._compactMode.asObservable()}styleHistoryGrid(){var t;(0,C.sy)(this._historyGrid,this._compactMode.value,this.showInputsIcon.value,this.showMetadataIcon.value,null===(t=this.runs.values().next().value)||void 0===t?void 0:t.func)}get currentDf(){return this._onRunsDfChanged.value}styleHistoryFilters(){var t,e,n;const i=null===(t=this.runs.values().next().value)||void 0===t?void 0:t.func;(0,C.LL)(this._historyFilters,this.showMetadataIcon.value,this.showInputsIcon.value,null!==(n=null===(e=this.options)||void 0===e?void 0:e.isHistory)&&void 0!==n&&n,i)?(u()(this.filterWithText).css({paddingTop:"10px"}),o.setDisplay(this.defaultFiltersText,!1)):o.setDisplay(this.defaultFiltersText,!0)}redrawSelectionState(){const t=this.currentDf.selection.trueCount;t<2?this.compareIcon.firstChild.classList.add("hp-disabled"):this.compareIcon.firstChild.classList.remove("hp-disabled"),0===t?this.trashIcon.firstChild.classList.add("hp-disabled"):this.trashIcon.firstChild.classList.remove("hp-disabled")}}},7109(t,e,n){"use strict";n.d(e,{b:()=>c});var i=n(4328),o=n(7389),s=n(6082),r=n(1858),a=n(5092),l=(n(8550),n(5355)),u=n(9713);class c extends s.Widget{get type(){return"HistoryPanel"}updateHistoryPane(t){this.historyList.updateRuns(t)}showEditDialog(t){this.historyList.editRun(t)}addRun(t){this.historyList.addRun(t)}get history(){return this.historyList.runs}get onCompactModeChanged(){return this.historyList.onCompactModeChanged}get compactMode(){return this.historyList.compactMode}constructor(t){super(o.box(o.divText("No historical runs loaded","hp-no-elements-label"),{style:{width:"100%",height:"100%"}})),this.func=t,this.onRunChosen=new r.Subject,this.onComparison=new r.Subject,this.afterRunEdited=new r.Subject,this.afterRunDeleted=new r.Subject,this.allRunsFetch=new r.Subject,this.historyList=new l.H([],{fallbackText:"No runs are found in history",showActions:!0,showBatchActions:!0,isHistory:!0}),this.panel=this.historyList.root;const e=this.historyList.onChosen.pipe((0,u.filter)(t=>!!t)).subscribe(t=>this.onRunChosen.next(t.id)),n=this.historyList.onComparisonCalled.subscribe(t=>this.onComparison.next(t)),s=this.allRunsFetch.subscribe(()=>{return t=this,e=void 0,s=function*(){o.setUpdateIndicator(this.root,!0),a.W.pullRunsByName(this.func.name,[{author:i.shell.user}],{},["session.user","options"]).then(t=>{o.empty(this.root),this.root.appendChild(this.panel),this.updateHistoryPane(t)}).catch(t=>i.shell.error(t)).finally(()=>o.setUpdateIndicator(this.root,!1))},new((n=void 0)||(n=Promise))(function(i,o){function r(t){try{l(s.next(t))}catch(t){o(t)}}function a(t){try{l(s.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((s=s.apply(t,e||[])).next())});var t,e,n,s}),c=this.historyList.onMetadataEdit.subscribe(t=>{this.afterRunEdited.next(t)}),d=this.historyList.onDelete.subscribe(t=>{this.afterRunDeleted.next(t)});this.subs.push(e,s,c,n,d),this.allRunsFetch.next()}}},5727(t,e,n){"use strict";n.d(e,{Ee:()=>i.E}),n(2244),n(8194),n(1059);var i=n(873);n(6318)},1059(t,e,n){"use strict";n(2244)},2244(t,e,n){"use strict";n.d(e,{s:()=>R});var i=n(4328),o=n(7389),s=n(6082),r=n(1858),a=n(1757),l=n.n(a),u=n(3508),c=n.n(u),d=n(5092),p=n(4260),h=n(1599),f=n(5520),v=n(8476),m=n(3143),y=n(810),g=n(9713),b=n(4795),C=n(9879),A=n(6318),x=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const w=new URL(i.shell.startUri),I=()=>x(void 0,void 0,void 0,function*(){const t=yield navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1,selfBrowserSurface:"include"}),e=new MediaRecorder(t),n=[];e.ondataavailable=t=>n.push(t.data),e.onstop=()=>{const e=new Blob(n,{type:n[0].type});t.getVideoTracks()[0].stop(),s.Utils.download(`Recording ${(new Date).toLocaleString("en-us",{month:"short",day:"numeric",hour:"numeric",minute:"numeric"})}.mkv`,e,n[0].type)},e.start()});class R extends s.ViewBase{constructor(t,e={historyEnabled:!0,isTabbed:!1,skipInit:!1}){var n,a,l,u,c;super(),this.initValue=t,this.options=e,this._type="function",this.funcCallReplaced=new r.Subject,this.isReady=new r.BehaviorSubject(!1),this.exportConfig=null,this.getMocks=null,this.getTemplates=null,this.getHelp=null,this.reportBug=null,this.requestFeature=null,this.getAbout=null,this.historyBlock=null,this.isHistorical=new r.BehaviorSubject(!1),this.historyRoot=o.div(),this.consistencyState=new r.BehaviorSubject("consistent"),this.defaultExportFilename=(t,e)=>`${this.name} - ${(new Date).toLocaleString("en-US").replaceAll(/:|\//g,"-")}.${null!=e?e:this.exportConfig.supportedExtensions[t]}`,this.defaultSupportedExportExtensions=()=>({Excel:"xlsx"}),this.defaultSupportedExportFormats=()=>["Excel"],this.box=!0,this.parentCall=i.functions.getCurrentCall(),t instanceof s.FuncCall&&(this.parentCall=t),this.parentView=null===(l=null===(a=null===(n=this.parentCall)||void 0===n?void 0:n.parentCall)||void 0===a?void 0:a.aux)||void 0===l?void 0:l.view,(null===(c=null===(u=this.parentCall)||void 0===u?void 0:u.func)||void 0===c?void 0:c.name)&&(this.basePath=`/${this.parentCall.func.name}`),e.skipInit||this.init()}onFuncCallReady(){return x(this,void 0,void 0,function*(){if(!this.options.isTabbed){this.name&&"New view"!==this.name||(this.name=this.funcCall.func.friendlyName);try{this.func.package&&(yield this.getPackageData())}catch(t){console.log(t)}}this.build();const t=this.getStartId();if(t&&!this.options.isTabbed&&(o.setUpdateIndicator(this.root,!0),this.loadRun(t),o.setUpdateIndicator(this.root,!1),this.setAsLoaded()),this.isHistoryEnabled&&this.func){const t=this.options.isTabbed?this.isHistorical.subscribe(t=>{t||(this.funcCall.id=null)}):this.isHistorical.subscribe(t=>{var e,n;if(t){this.path=`?id=${this.funcCall.id}`;const t=(0,h.eK)(this.funcCall);this.name.indexOf(" — ")<0?this.name=`${this.name} — ${null!==(e=this.funcCall.options.title)&&void 0!==e?e:t}`:this.name=`${this.name.substring(0,this.name.indexOf(" — "))} — ${null!==(n=this.funcCall.options.title)&&void 0!==n?n:t}`}else this.path="",this.funcCall.id=null,this.name=`${this.name.substring(0,this.name.indexOf(" — ")>0?this.name.indexOf(" — "):void 0)}`});this.subs.push(t)}})}getStartId(){return i.shell.getVar("isLoaded")?void 0:w.searchParams.get("id")}setAsLoaded(){return i.shell.setVar("isLoaded",!0)}get funcCall(){return this._funcCall}get func(){var t;return null===(t=this.funcCall)||void 0===t?void 0:t.func}get lastCall(){return this._lastCall}set lastCall(t){this._lastCall=t}get type(){return this._type}getPackageData(){return x(this,void 0,void 0,function*(){var t,e;const n=this.func.package;if(!n)return;const i=null===(t=yield null==n?void 0:n.getProperties())||void 0===t?void 0:t.REPORT_BUG_URL;i&&!this.reportBug&&(this.reportBug=()=>x(this,void 0,void 0,function*(){window.open(i,"_blank")}));const o=null===(e=yield null==n?void 0:n.getProperties())||void 0===e?void 0:e.REQUEST_FEATURE_URL;o&&!this.requestFeature&&(this.requestFeature=()=>x(this,void 0,void 0,function*(){window.open(o,"_blank")}));const s=`${n.friendlyName}.\nLast updated on ${c()(n.updatedOn).format("YYYY MMM D, HH:mm")}`;this.getAbout||(this.getAbout=()=>x(this,void 0,void 0,function*(){return s}))})}linkFunccall(t){this._funcCall=t,this.funcCallReplaced.next(!0)}loadFuncCallById(){return x(this,void 0,void 0,function*(){if(this.initValue instanceof s.FuncCall)return yield new Promise(t=>setTimeout(t,0)),void this.linkFunccall(this.initValue);o.setUpdateIndicator(this.root,!0);const t=this.getStartId();if(t&&!this.options.isTabbed)this.linkFunccall(yield d.W.loadRun(t));else{const t=s.Func.byName(this.initValue);this.linkFunccall(t.prepare({}))}o.setUpdateIndicator(this.root,!1)})}init(){return x(this,void 0,void 0,function*(){yield this.loadFuncCallById(),yield this.onFuncCallReady(),this.isReady.next(!0)})}build(){o.empty(this.root),this.root.appendChild(this.buildIO()),this.options.historyEnabled&&this.isHistoryEnabled&&this.buildHistoryBlock(),this.buildRibbonMenu(),this.buildRibbonPanels()}onComparisonLaunch(t){return x(this,void 0,void 0,function*(){const e=this.comparatorFunc;if(e){const n=s.Func.byName(e),o=(yield n.prepare({params:{comparedRuns:t}}).call()).outputs.comparisonView;return void i.shell.addView(o)}const n=i.shell.v.parentCall,o=[...i.shell.views].find(t=>t.type===p.sk),r=yield v.S.fromComparedRuns(t,this.func,{parentView:o,parentCall:n});i.shell.addView(r),r.defaultCustomize();const a=this.compareCustomizer;if(a){const t=s.Func.byName(a);return void(yield t.prepare({params:{defaultView:r}}).call())}})}onSaveClick(){return x(this,void 0,void 0,function*(){yield this.saveRun(this.funcCall)})}buildHistoryBlock(){const t=m.A.historyPanel(this.func);let e=!1;return this.subs.push(t.onCompactModeChanged.subscribe(t=>{const e=i.shell.dockManager.findNode(this.historyRoot);e&&(i.shell.dockManager.close(e),t?i.shell.dockManager.dock(this.historyRoot,"right",null,"History",.3):i.shell.dockManager.dock(this.historyRoot,"down",null,"History",.3))}),t.onRunChosen.subscribe(t=>x(this,void 0,void 0,function*(){o.setUpdateIndicator(this.root,!0),yield this.loadRun(t),o.setUpdateIndicator(this.root,!1)})),t.onComparison.subscribe(e=>x(this,void 0,void 0,function*(){(0,y.ZD)(t.root,!0);const n=yield Promise.all(e.map(t=>d.W.loadRun(t)));yield this.onComparisonLaunch(n),(0,y.ZD)(t.root,!1)})),t.afterRunEdited.subscribe(t=>{var e,n;if(t.id===this.funcCall.id&&t.options.title){this.path=`?id=${this.funcCall.id}`;const i=(0,h.eK)(t);this.name.indexOf(" — ")<0?this.name=`${this.name} — ${null!==(e=t.options.title)&&void 0!==e?e:i}`:this.name=`${this.name.substring(0,this.name.indexOf(" — "))} — ${null!==(n=t.options.title)&&void 0!==n?n:i}`}}),i.events.onViewRemoving.subscribe(t=>{if(t.args.view==this){const t=i.shell.dockManager.findNode(this.historyRoot);t?(i.shell.dockManager.close(t),e=!0):e=!1}}),i.events.onCurrentViewChanged.subscribe(()=>{var t;if(i.shell.v==this)e&&((null===(t=this.historyBlock)||void 0===t?void 0:t.compactMode)?i.shell.dockManager.dock(this.historyRoot,"right",null,"History",.3):i.shell.dockManager.dock(this.historyRoot,"down",null,"History",.3));else{const t=i.shell.dockManager.findNode(this.historyRoot);t?(i.shell.dockManager.close(t),e=!0):e=!1}})),o.empty(this.historyRoot),this.historyRoot.style.removeProperty("justify-content"),this.historyRoot.append(t.root),this.historyBlock=t,t.root}buildRibbonPanels(){const t=o.iconFA("history",()=>{var t;i.shell.dockManager.findNode(this.historyRoot)||((null===(t=this.historyBlock)||void 0===t?void 0:t.compactMode)?i.shell.dockManager.dock(this.historyRoot,"right",null,"History",.3):i.shell.dockManager.dock(this.historyRoot,"down",null,"History",.3),this.historyRoot.parentElement.classList.add("ui-box"),this.historyRoot.classList.add("ui-box"))},"History"),e=o.iconFA("save",()=>x(this,void 0,void 0,function*(){yield this.onSaveClick()}),"Save current state"),n=o.comboPopup(o.iconFA("arrow-to-bottom"),this.getFormats(),this.exportRun.bind(this)),s=o.iconFA("edit",()=>{this.historyBlock&&this.lastCall&&this.historyBlock.showEditDialog(this.historyBlock.history.get(this.funcCall.id))},"Edit this run metadata"),r=this.isHistorical.subscribe(t=>{t?(o.setDisplay(n,!(0,h.Ne)(this.funcCall)),o.setDisplay(s,!0)):(l()(n).hide(),l()(s).hide())});if(this.subs.push(r),o.tooltip.bind(n,()=>"inconsistent"===this.consistencyState.value&&this.mandatoryConsistent?"Current run is inconsistent. Export feature is disabled.":null),!this.options.isTabbed&&this.mandatoryConsistent){const t=this.consistencyState.pipe((0,g.distinctUntilChanged)()).subscribe(t=>{"inconsistent"===t?(l()(n).addClass("d4-disabled"),l()(n.lastChild).css("color","unset")):(l()(n).removeClass("d4-disabled"),l()(n.lastChild).removeProp("color"))});this.subs.push(t)}const a=[[...!this.options.isTabbed&&this.isHistoryEnabled&&this.options.historyEnabled?[t]:[],...!this.options.isTabbed&&this.isHistoryEnabled?[e]:[],...!this.options.isTabbed&&this.isExportEnabled&&this.exportConfig&&this.exportConfig.supportedFormats.length>0?[n]:[],...this.options.isTabbed?[]:[s]]];return this.setRibbonPanels(a),a}buildRibbonMenu(){if(this.ribbonMenu.clear(),!(this.exportConfig||this.reportBug||this.requestFeature||this.getHelp||this.getMocks||this.getTemplates))return;const t=this.ribbonMenu.group("Model");if(this.getMocks&&this.getMocks.length>0)if(1===this.getMocks.length)t.item("Input data mock",this.getMocks[0].action);else{const e=t.group("Input data mocks");this.getMocks.forEach(t=>{e.item(t.mockName,t.action)}),t.endGroup()}if(this.getTemplates&&this.getTemplates.length>0)if(1===this.getTemplates.length)t.item("Input data template",this.getTemplates[0].action);else{const e=t.group("Input data templates");this.getTemplates.forEach(t=>{e.item(t.name,t.action)}),t.endGroup()}this.isExportEnabled&&this.exportConfig&&this.exportConfig.supportedFormats.length>0&&t.group("Export").items(this.getFormats(),this.exportRun.bind(this),{isValid:()=>this.isHistorical.value?this.mandatoryConsistent&&"inconsistent"===this.consistencyState.value?"Run should be consistent to be exported":null:"Run should be completed to be exported"}).endGroup(),this.reportBug&&t.item("Report a bug",()=>this.reportBug()),this.requestFeature&&t.item("Request a feature",()=>this.requestFeature()),this.getHelp&&t.item("Help",()=>this.getHelp()),setTimeout(()=>x(this,void 0,void 0,function*(){if((yield(0,h.lD)()).find(t=>"Developers"===t.friendlyName)){const e=t.group("Test runner");e.item("Run Data JSON",()=>this.importRunJsonDialog()),e.item("Execute Test JSON",()=>this.importRunJsonDialog()),e.item("Update Test JSON",()=>this.importRunJsonDialog(!0)),t.endGroup()}}),0),t.item("Record the screen",I),this.getAbout&&t.item("About",()=>x(this,void 0,void 0,function*(){const t=yield this.getAbout();if(t){const e=o.dialog("Current version");t.split("\n").forEach(t=>e.add(o.label(t))),e.onOK(()=>{}),e.getButton("CANCEL").style.display="none",e.show({center:!0})}}))}exportRun(t){return x(this,void 0,void 0,function*(){s.Utils.download(this.exportConfig.filename(t),yield this.exportConfig.export(t))})}getFormats(){var t,e;return null!==(e=null===(t=this.exportConfig)||void 0===t?void 0:t.supportedFormats)&&void 0!==e?e:[]}onBeforeSaveRun(t){return x(this,void 0,void 0,function*(){})}onAfterSaveRun(t){return x(this,void 0,void 0,function*(){})}saveRun(t){return x(this,void 0,void 0,function*(){let e=(0,h.A4)(t);yield this.onBeforeSaveRun(e),(0,h.Ne)(e)&&(e=yield(0,b.Hs)(t)),e.id&&e.newId();const n=yield d.W.saveRun(e),i=yield d.W.loadRun(n.id);return this.options.historyEnabled&&this.isHistoryEnabled&&this.historyBlock&&this.historyBlock.addRun(i),this.linkFunccall(i),this.isHistorical.next(!0),yield this.onAfterSaveRun(n),n})}onBeforeDeleteRun(t){return x(this,void 0,void 0,function*(){})}onAfterDeleteRun(t){return x(this,void 0,void 0,function*(){})}deleteRun(t){return x(this,void 0,void 0,function*(){return yield this.onBeforeDeleteRun(t),yield d.W.deleteRun(t),yield this.onAfterDeleteRun(t),t.id})}onBeforeLoadRun(){return x(this,void 0,void 0,function*(){})}onAfterLoadRun(t){return x(this,void 0,void 0,function*(){})}loadRun(t){return x(this,void 0,void 0,function*(){yield this.onBeforeLoadRun();const e=yield d.W.loadRun(t);return this.lastCall=(0,h.A4)(e),this.linkFunccall(e),this.isHistorical.next(!0),yield this.onAfterLoadRun(e),e})}onBeforeRun(t){return x(this,void 0,void 0,function*(){})}onAfterRun(t){return x(this,void 0,void 0,function*(){})}run(){return x(this,void 0,void 0,function*(){if(!this.funcCall)throw new Error("The correspoding function is not specified");yield this.onBeforeRun(this.funcCall);const t=s.TaskBarProgressIndicator.create("Calculating...");try{this.funcCall.newId(),yield this.funcCall.call(),yield this.onAfterRun(this.funcCall),this.lastCall=(0,h.A4)(this.funcCall),this.options.isTabbed||this.runningOnInput||!this.isHistoryEnabled||(yield this.saveRun(this.funcCall))}catch(t){i.shell.error(t.toString())}finally{t.close()}})}exportRunJson(){return x(this,void 0,void 0,function*(){if(this._lastCall){const t=yield(0,b.wB)(this._lastCall,this);return(0,f.lK)(t)}})}getRunJSON(){return x(this,void 0,void 0,function*(){const t=yield this.exportRunJson();t&&s.Utils.download(this.defaultExportFilename("","json"),t)})}importRunJsonDialog(){return x(this,arguments,void 0,function*(t=!1){const e=new C.z("JSON file",null,null,"application/json"),n={modal:!0,fullScreen:!0,width:500,height:200,center:!0};if(!(yield new Promise((t,i)=>{o.dialog({title:"Import Run JSON"}).add(o.div([o.inputs([e])])).onOK(()=>t(!0)).onCancel(()=>t(!1)).show(n)}))||!e.value)return;const i=(0,f.iu)(yield e.value.text());t?(yield this.executeTest(i,!0),yield this.isHistorical.pipe((0,g.filter)(t=>t),(0,g.take)(1),(0,g.delay)(0)).toPromise(),yield this.getRunJSON()):yield this.executeTest(i)})}executeTest(t){return x(this,arguments,void 0,function*(t,e=!1){yield(0,A.c)(t,this,{updateMode:e,interactive:!0})})}get compareCustomizer(){var t;return null!==(t=this.func.options.compareCustomizer)&&void 0!==t?t:null}get comparatorFunc(){var t;return null!==(t=this.func.options.comparatorFunc)&&void 0!==t?t:null}get uploadFunc(){var t;return null!==(t=this.func.options.uploadFunc)&&void 0!==t?t:null}get runningOnInput(){return(0,h.vk)(this.func)}get runningOnStart(){return"true"===this.func.options.runOnOpen}get mainParams(){return this.func.options.mainParams?JSON.parse(this.func.options.mainParams):null}get mandatoryConsistent(){var t;return"true"===(null===(t=this.parentCall)||void 0===t?void 0:t.func.options.mandatoryConsistent)}get hasContextHelp(){return!!(0,h.HP)(this.func)}getContextHelp(){return x(this,void 0,void 0,function*(){return(0,h.zF)(this.func)})}get features(){return(0,h.i)(this.func)}getFeature(t,e){return(0,h.x$)(this.features,t,e)}get isExportEnabled(){return this.getFeature("export",!0)}get isHistoryEnabled(){return this.getFeature("history",!0)}get isSaEnabled(){return this.getFeature("sens-analysis",!1)}get hasUploadMode(){return this.getFeature("upload",!1)}get isFittingEnabled(){return this.getFeature("fitting",!1)}get isOptimizationEnabled(){return this.getFeature("optimization",!1)}}},8194(t,e,n){"use strict";n(4328),n(7389),n(6082),n(6267),n(1858),n(9713),n(1757),n(5092),n(4260);var i=n(2244);n(4315),n(5520),n(1599),n(8920),n(8476),n(4795),n(6318),i.s},873(t,e,n){"use strict";n.d(e,{E:()=>S});var i=n(4328),o=n(7389),s=n(6082),r=n(3508),a=n.n(r),l=n(1991),u=n.n(l),c=n(1757),d=n.n(c),p=n(1858),h=n(9713),f=n(1927),v=n(4260),m=n(7375),y=(n(5940),n(2244)),g=n(5092),b=n(8920),C=n(4795),A=n(5355),x=n(810),w=n(1599),I=n(3143),R=n(4386),T=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const E=()=>o.divText("[No data to display]",{style:{"text-align":"center","align-content":"center",width:"100%",height:"100%"}});class S extends y.s{static fromFuncCall(t,e={historyEnabled:!0,isTabbed:!1}){return new this(t,e)}constructor(t,e={historyEnabled:!0,isTabbed:!1}){super(t,e),this.options=e,this.inputValidationRequests=new p.Subject,this.outputValidationRequests=new p.Subject,this.inputValidationUpdates=new p.Subject,this.outputValidationUpdates=new p.Subject,this.runRequests=new p.Subject,this.isRunning=new p.BehaviorSubject(!1),this.isUploadMode=new p.BehaviorSubject(!1),this.inputsOverride={},this.inputsMap={},this.outputValidationSigns={},this.inputValidators={},this.outputValidators={},this.inputValidationState={},this.outputValidationState={},this.externalValidatorsUpdates=new p.Subject,this.externalValidatorsState={},this.pendingInputValidations=this.inputValidationUpdates.pipe((0,h.startWith)(null),(0,h.map)(()=>this.inputValidationState)),this._isOutputOutdated=new p.BehaviorSubject(!0),this.isOutputOutdated=this._isOutputOutdated.pipe((0,h.distinctUntilChanged)()),this.blockRuns=new p.BehaviorSubject(!1),this.prevOpenedTab=null,this.beforeInputPropertyRender=new p.Subject,this.afterInputPropertyRender=new p.Subject,this.afterOutputPropertyRender=new p.Subject,this.afterOutputSacalarTableRender=new p.Subject,this.formButtons=o.div(),this.additionalBtns=[],this.navBtns=[],this.tabsElem=o.tabControl(),this.dfToViewerMapping={},this.focusedInput=null,this.foldedCategoryInputs={},this.richFunctionExport=t=>T(this,void 0,void 0,function*(){if(!this.lastCall)throw new Error("Function was not called");if(!this.exportConfig.supportedFormats.includes(t))throw new Error(`Format "${t}" is not supported.`);if(!this.func)throw new Error("The correspoding function is not specified");const[e]=yield(0,R.aK)(t,this.func,this.lastCall,this.dfToViewerMapping);return e}),this.exportConfig={supportedExtensions:this.richFunctionViewExportExtensions(),supportedFormats:this.richFunctionViewSupportedFormats(),export:this.richFunctionExport,filename:this.defaultExportFilename}}onFuncCallReady(){const t=Object.create(null,{onFuncCallReady:{get:()=>super.onFuncCallReady}});return T(this,void 0,void 0,function*(){yield this.loadInputsOverrides(),yield this.loadValidators(b.bZ.INPUTS),yield this.loadValidators(b.bZ.OUTPUTS),yield t.onFuncCallReady.call(this);const e=this.funcCallReplaced.subscribe(()=>{this.inputValidationRequests.next({isRevalidation:!1}),this.outputValidationRequests.next({isRevalidation:!1})});this.subs.push(e);const n=t=>(0,h.mergeMap)(e=>e.pipe((0,h.tap)(e=>{t===b.bZ.INPUTS?this.setInputValidationPending(e.field):this.setOutputValidationPending(e.field)}),(0,h.switchMap)(e=>{const n=new AbortController,i=n.signal;let o=!1;return new p.Observable(s=>{const r=(0,p.from)(this.runValidation(Object.assign({},e),i,t)).subscribe(t=>{o=!0,s.next(t)});return()=>{o||n.abort(),r.unsubscribe()}}).pipe((0,h.tap)(n=>{t===b.bZ.INPUTS?this.setInputValidationResults(n):this.setOutputValidationResults(n),this.runRevalidations(e,n,t),t===b.bZ.INPUTS?this.inputValidationUpdates.next(null):this.outputValidationUpdates.next(null)}),(0,h.mapTo)(e))}))),s=this.inputValidationRequests.pipe((0,h.groupBy)(t=>t.field),n(b.bZ.INPUTS)).subscribe(t=>{t.field&&this.runningOnInput&&this.isRunnable()&&this.doRun()});this.subs.push(s);const r=this.outputValidationRequests.pipe((0,h.groupBy)(t=>t.field),n(b.bZ.OUTPUTS)).subscribe();this.subs.push(r);const a=this.externalValidatorsUpdates.subscribe(t=>{this.updateInputValidationResults(t)});this.subs.push(a);const l=(0,p.combineLatest)([this.runRequests.pipe((0,h.switchMap)(()=>(0,p.of)(!1).pipe((0,h.delay)(500),(0,h.startWith)(!0)))),this.inputValidationUpdates.pipe((0,h.debounceTime)(0))]).pipe((0,h.filter)(([t])=>t&&this.isRunnable())).subscribe(()=>this.doRun());this.subs.push(l);const u=this.options.isTabbed?null:yield this.loadLastInputs();if(u)i.shell.info(o.div([o.divText("Do you want to load last inputs?"),o.divH([o.bigButton("Load",()=>{for(const[t,e]of Object.entries(u)){const n=this.getInput(t);n.notify=!1,n.value=e,n.notify=!0,this.funcCall.inputs[t]=e,this.inputValidationRequests.next({field:t,isRevalidation:!1})}i.shell.info(o.divText("Change the loaded inputs to run computations"))})])]));else{const t=new AbortController,e=yield this.runValidation({isRevalidation:!1},t.signal);this.setInputValidationResults(e),this.runRevalidations({isRevalidation:!1},e),this.inputValidationUpdates.next(null),this.runningOnStart&&this.isRunnable()&&(yield this.doRun())}})}onBeforeRun(){return this.tabsElem.currentPane&&(this.prevOpenedTab=this.inputTabsLabels.includes(this.tabsElem.currentPane.name)?null:this.tabsElem.currentPane),Promise.resolve()}onAfterRun(){if(this.showOutput(),this.tabsElem.panes.forEach(t=>{d()(t.header).show()}),this.prevOpenedTab)return this.tabsElem.currentPane=this.prevOpenedTab,Promise.resolve();const t=this.tabsElem.panes.find(t=>this.outputTabsLabels.includes(t.name));return t&&(this.tabsElem.currentPane=t),Promise.resolve()}getRunButton(t="Run"){var e;const n=o.bigButton(null!==(e=(0,C.O0)(this.func))&&void 0!==e?e:t,()=>T(this,void 0,void 0,function*(){return yield this.doRun()})),i=(0,p.merge)(this.inputValidationUpdates,this.externalValidatorsUpdates,this.isRunning,this.blockRuns).subscribe(()=>{const t=this.isRunnable();n.disabled=!t});return this.subs.push(i),n}loadInputsOverrides(){return T(this,void 0,void 0,function*(){const t=[...this.funcCall.inputParams.values()];yield Promise.all(t.map(t=>T(this,void 0,void 0,function*(){if(t.property.options.input){const e=s.Func.byName(t.property.options.input).prepare({params:JSON.parse(t.property.options.inputOptions||"{}")});yield e.call(),this.inputsOverride[t.name]=e.outputs.input}})))})}loadValidators(){return T(this,arguments,void 0,function*(t=b.bZ.INPUTS){const e=yield(0,C.QL)(this.funcCall,t);t===b.bZ.INPUTS?this.inputValidators=e:this.outputValidators=e})}keepOutput(){var t;return"true"===(null===(t=this.func)||void 0===t?void 0:t.options.keepOutput)}getSaveButton(t="Save"){const e=o.bigButton(t,()=>T(this,void 0,void 0,function*(){return yield this.saveExperimentalRun(this.funcCall)}),"Save uploaded data"),n=this.isUploadMode.subscribe(t=>{this.buildRibbonPanels(),t?d()(e).show():d()(e).hide()});return this.subs.push(n),e}getStandardButtons(){const t=this.getRunButton(),e=o.div([t]);o.tooltip.bind(e,()=>t.disabled?this.isRunning.value?"Computations are in progress":this.getValidationMessage():"");const n=this.getSaveButton();return[...this.isHistoryEnabled&&!this.options.isTabbed?[n]:[],...this.runningOnInput?[]:[e]]}buildFormButtons(){var t;const e=this.getStandardButtons(),n=o.buttonsInput();return d()(n.firstChild).css({display:"none"}),null===(t=n.lastChild)||void 0===t||t.replaceWith(o.div([...this.navBtns,...this.additionalBtns,...e],"ui-input-editor")),d()(n).addClass("rfv-buttons"),d()(n).css({"max-width":"100%"}),this.formButtons.replaceWith(n),this.formButtons=n,n}setAdditionalButtons(t){this.additionalBtns=t,this.buildFormButtons()}setNavigationButtons(t){this.navBtns=t,this.buildFormButtons()}buildIO(){const{inputBlock:t,inputForm:e,outputForm:n,controlsWrapper:i}=this.buildInputBlock(),s=[...Array.from(e.childNodes),...this.isUploadMode.value?[Array.from(n.childNodes)]:[]];o.tools.handleResize(t,()=>{d()(t).width()<300?(d()(e).addClass("ui-form-condensed"),d()(n).addClass("ui-form-condensed"),d()(i).addClass("ui-form-condensed"),s.forEach(t=>d()(t).css("min-width","100px"))):(d()(e).removeClass("ui-form-condensed"),d()(n).removeClass("ui-form-condensed"),d()(i).removeClass("ui-form-condensed"),s.forEach(t=>d()(t).css("min-width","100%")))});const r=this.buildOutputBlock();r.style.height="100%",r.style.width="100%",this.hideOutput();const a=o.splitH([t,o.panel([r],{style:{paddingTop:"0px"}})],null,!0);return a.style.padding="0 12px",t.style.maxWidth="360px",a}buildInputBlock(){const t=this.renderInputForm(),e=this.renderOutputForm();this.buildFormButtons();const n=o.div(this.formButtons,"ui-form ui-form-wide");d()(n).css({"padding-left":"0px","padding-bottom":"0px","padding-right":"6px","max-width":"100%","min-height":"50px"});const i=o.input.toggle("",{value:this.isUploadMode.value,onValueChanged:t=>this.isUploadMode.next(t)}),s=this.isUploadMode.subscribe(t=>{i.notify=!1,i.value=t,i.notify=!0,t?d()(e).show():d()(e).hide()});return this.subs.push(s),{inputBlock:o.divV([t,...this.hasUploadMode&&!this.uploadFunc?[o.divH([o.h2("Experimental data"),i.root],{style:{flexGrow:"0"}}),e]:[],n],"ui-box rfv-form"),inputForm:t,outputForm:e,controlsWrapper:n}}processCustomDataUpload(){return T(this,void 0,void 0,function*(){const t=()=>{const t=s.Dialog.create({title:"Select to compare"}),e=new A.H(u.length>0?u:[...this.historyBlock.history.values()],{fallbackText:"No historical runs found",showActions:!(u.length>0),showBatchActions:!(u.length>0)}),n=new A.H(l,{fallbackText:"No runs uploaded",showActions:!1,showBatchActions:!1});t.add(o.divV([o.divV([o.label("Uploaded runs"),o.element("div","splitbar-horizontal"),n.root],{style:{height:"50%",overflowY:"hidden"}}),o.divV([o.label(u.length>0?"Simulated":"History",{style:{padding:"0px 10px 0px 9px"}}),o.element("div","splitbar-horizontal"),e.root],{style:{height:"50%",overflowY:"hidden"}})],{style:{justifyContent:"space-between",gap:"10px",overflowY:"scroll",height:"100%"}})),d()(t.root.querySelector(".d4-dialog-contents")).removeClass("ui-form");const i="Compare selected";return 0===u.length?t.addButton(i,()=>T(this,void 0,void 0,function*(){const i=yield Promise.all([...e.selected].map(t=>g.W.loadRun(t.id)));this.onComparisonLaunch([...i,...n.selected.values()]),t.close()})):t.addButton(i,()=>T(this,void 0,void 0,function*(){this.onComparisonLaunch([...e.selected.values(),...n.selected.values()]),t.close()})),t.getButton(i).disabled=!0,this.subs.push((0,p.merge)(e.onSelectedChanged,n.onSelectedChanged).subscribe(()=>{e.selected.size+n.selected.size>1?t.getButton(i).disabled=!1:t.getButton(i).disabled=!0})),this.isHistorical.value&&t.addButton(y,()=>T(this,void 0,void 0,function*(){this.onComparisonLaunch([this.funcCall,...n.selected.values()]),t.close()})),d()(t.getButton("CANCEL")).hide(),t},e=s.Func.byName(this.uploadFunc),n=yield e.prepare({params:{func:this.func}}).call(),r=n.outputs.uploadWidget,a=n.outputs.uploadFuncCall;let l=[],u=[];const c=s.Dialog.create({title:"Upload"});d()(c.root.querySelector(".d4-dialog-contents")).removeClass("ui-form");const f=s.Dialog.create({title:"Review uploaded runs"});d()(f.root.querySelector(".d4-dialog-contents")).removeClass("ui-form");const m="Save to history",y="Compare w/ current";c.add(r.root),c.addButton(m,()=>T(this,void 0,void 0,function*(){return(0,x.ZD)(c.root,!0),l.forEach(t=>{t.options.immutable_tags?t.options.immutable_tags.push(v.ec):t.options.immutable_tags=[v.ec]}),Promise.all(l.map(t=>T(this,void 0,void 0,function*(){const e=yield this.getValidExpRun(t);return g.W.saveRun(e)}))).then(t=>Promise.all(t.map(t=>g.W.loadRun(t.id)))).then(t=>{t.forEach(t=>this.historyBlock.addRun(t))}).catch(t=>{i.shell.error(t)}).finally(()=>{(0,x.ZD)(c.root,!1),c.close();const t=new A.H(l,{fallbackText:"No runs uploaded",showActions:!0,showBatchActions:!0});f.add(t),f.show({modal:!0,fullScreen:!0})})})),c.addButton("Next",()=>{c.close(),l.forEach(t=>{t.options.immutable_tags?t.options.immutable_tags.push(v.ec):t.options.immutable_tags=[v.ec]});const t=new A.H(l,{fallbackText:"No runs uploaded",showActions:!0,showBatchActions:!0});f.add(t.root),f.show({modal:!0,fullScreen:!0})}),d()(c.getButton("CANCEL")).hide(),c.getButton(m).disabled=!0,c.getButton("Next").disabled=!0,d()(f.getButton("CANCEL")).hide(),f.addButton("Simulate w/ same inputs",()=>{(0,x.ZD)(c.root,!0),Promise.all(l.map(t=>T(this,void 0,void 0,function*(){return(yield(0,C.Hs)(t)).call()}))).then(e=>{u=e,f.close(),t().show({modal:!0,fullScreen:!0})}).catch(t=>{i.shell.error(t)}).finally(()=>{(0,x.ZD)(c.root,!1)})}),f.addButton("Compare w/ history",()=>{f.close(),t().show({modal:!0,fullScreen:!0})});const b=i.functions.onAfterRunAction.pipe((0,h.filter)(t=>t.id===a.id)).subscribe(()=>{l=a.outputs.uploadedCalls,c.getButton(m).disabled=!1,c.getButton("Next").disabled=!1}),w=c.onClose.subscribe(()=>{this.isUploadMode.next(!1)});c.subs.push(w,b),c.show({modal:!0,center:!0,resizable:!0})})}onSaveClick(){return T(this,void 0,void 0,function*(){this.isUploadMode.value?yield this.saveExperimentalRun(this.funcCall):yield this.saveRun(this.funcCall)})}buildRibbonPanels(){super.buildRibbonPanels();const t=o.iconFA("play",()=>T(this,void 0,void 0,function*(){return yield this.doRun()}),"Run computations");t.classList.add("fas");const e=o.iconFA("arrow-to-top",()=>T(this,void 0,void 0,function*(){this.uploadFunc?yield this.processCustomDataUpload():(this.isUploadMode.next(!this.isUploadMode.value),e.classList.toggle("d4-current"))}),"Upload experimental data");e.classList.add("d4-toggle-button",...this.isUploadMode.value?["d4-current"]:[]);const n=o.iconFA("info",()=>T(this,void 0,void 0,function*(){this.hasContextHelp&&(i.shell.windows.help.visible=!0,yield new Promise(t=>setTimeout(t,100)),i.shell.windows.help.showHelp(o.markdown(yield this.getContextHelp())))}),"Info"),s=[[...super.buildRibbonPanels().flat(),...this.runningOnInput||this.options.isTabbed?[]:[t],...this.hasUploadMode?[e]:[],...!this.options.isTabbed&&this.hasContextHelp?[n]:[]]];return this.setRibbonPanels(s),s}showOutput(){o.setDisplay(this.tabsElem.root,!0),this._isOutputOutdated.next(!1)}getViewers(t){return this.dfToViewerMapping[t]}buildOutputBlock(){this.tabsElem.root.style.width="100%",this.tabsLabels.forEach(t=>{const[e,n]=this.categoryToDfParamMap.outputs[t]?[this.categoryToDfParamMap.outputs[t],!1]:[this.categoryToDfParamMap.inputs[t],!0],r=e.filter(t=>t.propertyType===s.TYPE.DATA_FRAME||t.propertyType===s.TYPE.GRAPHICS),a=e.filter(t=>t.propertyType!==s.TYPE.DATA_FRAME&&t.propertyType!==s.TYPE.GRAPHICS),l=r.map(t=>(0,w.jJ)(t).config);let u="";const c=r.reduce((t,e,r)=>{var a,c;this.dfToViewerMapping[e.name]=[];const p=l[r].map((t,n)=>T(this,void 0,void 0,function*(){var n,r,a,l;const u=null!==(l=null!==(r=null===(n=this.funcCall.outputs[e.name])||void 0===n?void 0:n.value)&&void 0!==r?r:null===(a=this.funcCall.inputParams[e.name])||void 0===a?void 0:a.value)&&void 0!==l?l:i.data.demo.demog(0),c=t.type,d=Object.values(v.CB).includes(c)?s.Viewer.fromType(c,u):yield u.plot.fromType(c);d.setOptions(t),this.dfToViewerMapping[e.name].push(d),this.afterOutputPropertyRender.next({prop:e,output:d});const p=E();return 0===u.rowCount&&"demog 0"===u.name&&(o.setDisplay(d.root,!1),o.setDisplay(p,!0)),{viewer:d,stub:p}})),m=p.map((t,n)=>t.then(({viewer:t,stub:i})=>{const s=this.funcCallReplaced.pipe((0,h.startWith)(null),(0,h.switchMap)(()=>{var t;return(null!==(t=this.funcCall.outputParams[e.name])&&void 0!==t?t:this.funcCall.inputParams[e.name]).onChanged.pipe((0,h.startWith)(null))}),(0,h.skip)(1)).subscribe(()=>T(this,void 0,void 0,function*(){var s;const a=null!==(s=this.funcCall.outputParams[e.name])&&void 0!==s?s:this.funcCall.inputParams[e.name];if(a.value){if(o.setDisplay(t.root,!0),o.setDisplay(i,!1),Object.values(v.CB).includes(t.type))t.dataFrame=a.value;else{const e=yield a.value.plot.fromType(t.type);t.root.replaceWith(e.root),t=e}Object.keys(l[r][n]).includes("color")&&t.setOptions({color:l[r][n].color}),this.afterOutputPropertyRender.next({prop:e,output:t})}else o.setDisplay(t.root,!1),o.setDisplay(i,!0)}));return this.subs.push(s),{loadedViewer:t,stub:i}})),y=u!==(null!==(a=e.options.caption)&&void 0!==a?a:e.name)?null!==(c=e.options.caption)&&void 0!==c?c:e.name:" ";if(u=y,n){const t=this.funcCallReplaced.pipe((0,h.switchMap)(()=>{var t;return(null!==(t=this.funcCall.outputParams[e.name])&&void 0!==t?t:this.funcCall.inputParams[e.name]).onChanged})).subscribe(()=>{this.showOutput(),this.inputTabsLabels.forEach(t=>{d()(this.tabsElem.getPane(t).header).show()})});this.subs.push(t)}const g=m.map((t,n)=>{const i=l[r][n].block,s=o.wait(()=>T(this,void 0,void 0,function*(){const e=yield t;return d()(e.loadedViewer.root).css({height:"100%",width:"100%"}),o.divV([e.loadedViewer.root,e.stub],{style:{width:"100%"}})}));d()(s).css({"min-height":"300px","flex-grow":"1"});const a=(0,f.JC)();return this.outputValidationSigns[e.name]=a,o.divV([o.divH([o.h2(0===n?y:" ",{style:{whiteSpace:"pre"}}),...0===n?[o.div([this.outputValidationSigns[e.name][0],this.outputValidationSigns[e.name][1]],{style:{margin:"10.79px"}})]:[]]),s],{style:Object.assign({},i?{width:`${i}%`,"max-width":`${i}%`,"max-height":"100%"}:{"flex-grow":"1"})})});if(e.propertyType===s.TYPE.GRAPHICS){const n=e.options.block,i=E();i.classList.add("grok-scripting-image-container");const s=o.divV([o.h2(y,{style:{whiteSpace:"pre"}}),i],{style:Object.assign({},n?{width:`${n}%`,"max-width":`${n}%`,"max-height":"100%"}:{"flex-grow":"1"})}),r=()=>{var t;const n=null!==(t=this.funcCall.outputParams[e.name])&&void 0!==t?t:this.funcCall.inputParams[e.name];n.value?(i.style.backgroundImage=`url("data:image/png;base64,${n.value}")`,i.textContent=""):(i.style.removeProperty("background-image"),i.textContent="[No data to display]")},a=this.funcCallReplaced.pipe((0,h.startWith)(null),(0,h.switchMap)(()=>{var t;return(null!==(t=this.funcCall.outputParams[e.name])&&void 0!==t?t:this.funcCall.inputParams[e.name]).onChanged.pipe((0,h.startWith)(null))}),(0,h.skip)(1)).subscribe(r);this.subs.push(a),t.append(s)}return t.append(...g),t},o.divH([],{style:{flexWrap:"wrap",flexGrow:"1",maxHeight:"100%"}}));a.forEach(t=>{const e=(0,f.JC)();this.outputValidationSigns[t.name]=e});const m=()=>{const t=s.HtmlTable.create(a,t=>{var e;const n=t.options.precision,i=n&&t.propertyType===s.TYPE.FLOAT&&this.funcCall.outputs[t.name]?this.funcCall.outputs[t.name].toPrecision(n):this.funcCall.outputs[t.name],r=t.options.units?` [${t.options.units}]`:"";return[`${null!==(e=t.caption)&&void 0!==e?e:t.name}${r}`,null!=i?i:"[No value]",o.div([this.outputValidationSigns[t.name][0],this.outputValidationSigns[t.name][1]])]}).root;return d()(t).addClass("rfv-scalar-table"),this.afterOutputSacalarTableRender.next(t),t};let y=m();const g=(0,p.merge)(this.funcCallReplaced,this.isRunning.pipe((0,h.filter)(t=>!1===t),(0,h.skip)(1))).subscribe(()=>{const e=m();y.replaceWith(e),y=e,d()(this.tabsElem.getPane(t).header).show()});this.subs.push(g),this.tabsElem.addPane(t,()=>o.divV([...r.length?[c]:[],...a.length?[y]:[]]))});const t=o.box();return t.append(this.tabsElem.root),t}onAfterLoadRun(t){return T(this,void 0,void 0,function*(){this.showOutput()})}get tabsLabels(){return[...this.inputTabsLabels,...this.outputTabsLabels]}get outputTabsLabels(){return Object.keys(this.categoryToDfParamMap.outputs)}get inputTabsLabels(){return Object.keys(this.categoryToDfParamMap.inputs)}get categoryToDfParamMap(){return(0,C.r6)(this.funcCall.func)}get inputsStorage(){return`RFV_LastInputs_${this.funcCall.func.name}`}saveLastInputs(){return T(this,void 0,void 0,function*(){try{const t=u()(this.funcCall.inputParams.values()).reduce((t,e)=>{const n=e.property.propertyType!==s.TYPE.DATA_FRAME?this.funcCall.inputs[e.name]:Array.from(this.funcCall.inputs[e.name].toByteArray());return Object.assign(Object.assign({},t),{[e.name]:n})},{});return localStorage.setItem(this.inputsStorage,JSON.stringify(t))}catch(t){i.shell.error(t.toString())}})}loadLastInputs(){return T(this,void 0,void 0,function*(){var t;try{const e=JSON.parse(null!==(t=localStorage.getItem(this.inputsStorage))&&void 0!==t?t:"{}");return 0===Object.keys(e).length?null:u()(this.funcCall.inputParams.values()).reduce((t,n)=>{const i=n.property.propertyType!==s.TYPE.DATA_FRAME?e[n.name]:s.DataFrame.fromByteArray(new Uint8Array(e[n.name]));return Object.assign(Object.assign({},t),{[n.name]:i})},{})}catch(t){i.shell.error(t.toString())}})}deleteLastInputs(){return T(this,void 0,void 0,function*(){try{return localStorage.removeItem(this.inputsStorage)}catch(t){i.shell.error(t.toString())}})}doRun(){return T(this,void 0,void 0,function*(){this.isRunning.next(!0);try{this.options.isTabbed||(yield this.saveLastInputs()),yield this.run(),this.options.isTabbed||(yield this.deleteLastInputs())}catch(t){i.shell.error(t.toString()),console.log(t)}finally{this.isRunning.next(!1),this.inputValidationRequests.next({isRevalidation:!1,isNewOutput:!0}),this.outputValidationRequests.next({isRevalidation:!1})}})}setExternalValidationResults(t,e){this.externalValidatorsState[t]=e,this.externalValidatorsUpdates.next(t)}saveInputLockState(t,e,n){"restricted"===n&&(this.funcCall.options[b.AY]=Object.assign(Object.assign({},this.funcCall.options[b.AY]),{[t]:e})),n&&(this.funcCall.options[b.Jl]=Object.assign(Object.assign({},this.funcCall.options[b.Jl]),{[t]:n})),this.updateConsistencyState()}getInputLockState(t){var e;return null===(e=this.funcCall.options[b.Jl])||void 0===e?void 0:e[t]}updateConsistencyState(){const t=Object.values(this.funcCall.options[b.Jl]).some(t=>"inconsistent"===t);this.consistencyState.next(t?"inconsistent":"consistent")}getInput(t){return this.inputsMap[t]}setInput(t,e,n){const i=this.getInput(t);if(!i)throw new Error(`No input named ${t}`);if(this.funcCall.inputParams[t].property.propertyType===s.TYPE.DATA_FRAME&&"restricted"===n)throw new Error(`Param ${t} is dataframe. Restricted state is not supported for them.`);n||(n=this.funcCall.inputParams[t].property.propertyType===s.TYPE.DATA_FRAME?"disabled":"restricted"),this.funcCall.inputs[t]=e,this.setInputLockState(i,t,e,n)}getParamChanges(t){return this.funcCallReplaced.pipe((0,h.startWith)(null),(0,h.filter)(()=>!!this.funcCall),(0,h.map)(()=>this.funcCall.inputParams[t]?"inputParams":"outputParams"),(0,h.switchMap)(e=>this.funcCall[e][t].onChanged.pipe((0,h.startWith)(null),(0,h.map)(()=>this.funcCall[e][t].value))))}getParamValue(t){var e,n;const i=(null===(e=this.funcCall)||void 0===e?void 0:e.inputParams[t])?"inputParams":"outputParams";return null===(n=this.funcCall)||void 0===n?void 0:n[i][t].value}setInputLockState(t,e,n,i){i&&this.saveInputLockState(e,n,i),(0,m.gD)(t)&&("disabled"===i&&t.setDisabled(),"restricted"===i&&t.setRestricted(),"restricted unlocked"===i&&t.setRestrictedUnlocked(),"inconsistent"===i&&t.setInconsistent(),"user input"===i&&t.setUserInput())}getRestrictedValue(t){var e;return null===(e=this.funcCall.options[b.AY])||void 0===e?void 0:e[t]}renderOutputForm(){return this.renderIOForm(b.bZ.OUTPUTS)}renderInputForm(){return this.renderIOForm(b.bZ.INPUTS)}renderIOForm(t){const e=o.divH([],"ui-form ui-form-wide");d()(e).css({"flex-wrap":"wrap","flex-grow":"0","padding-right":"12px","padding-top":"0px","padding-left":"0px","max-width":"100%",gap:"4px"});let n="Misc";const i=this.funcCall[b.wl[t]].values();return u()(i).filter(t=>!!t).forEach(i=>{const o=i.property;this.beforeInputPropertyRender.next(o);const s=this.getInputForVal(i);s?(this.inputsMap[i.property.name]=s,t===b.bZ.INPUTS&&(this.syncInput(i,s,t),this.checkForMapping(i,s),this.runningOnInput||this.disableInputsOnRun(i.property.name,s),this.bindOnHotkey(s)),this.renderCategory(e,i.property.category,n),this.renderInput(e,i,s),this.afterInputPropertyRender.next({prop:o,input:s}),n=o.category):n=o.category}),Object.keys(this.foldedCategoryInputs).forEach(t=>this.foldedCategoryInputs[t].forEach(t=>d()(t.input.root).hide())),e.classList.remove("ui-panel"),e}saveFocusedElement(t){this.focusedInput=t}restoreFocusedElement(){var t;null===(t=this.focusedInput)||void 0===t||t.focus()}disableInputsOnRun(t,e){const n=this.isRunning.subscribe(n=>{"user input"!==this.getInputLockState(t)&&this.getInputLockState(t)||(n?((0,C.KL)(e)&&d()(e.input).is(":focus")&&this.saveFocusedElement(e.input),e.enabled=!1):(e.enabled=!0,(0,C.KL)(e)&&this.restoreFocusedElement()))});this.subs.push(n)}checkForMapping(t,e){if(!e.hasOwnProperty("_chosenRun"))return;const n=t.property.options.funccallMapping;if(!n)return;const i=JSON.parse(n),o=this.funcCallReplaced.pipe((0,h.startWith)(!0),(0,h.switchMap)(()=>this.funcCall.inputParams[t.property.name].onChanged)).subscribe(()=>{Object.entries(i).forEach(([t,n])=>this.setInput(t,e.chosenRun?(t=>{var n,i,o,s,r,a;return null!==(a=null!==(s=null!==(i=null===(n=e.chosenRun)||void 0===n?void 0:n.inputs[t])&&void 0!==i?i:null===(o=e.chosenRun)||void 0===o?void 0:o.outputs[t])&&void 0!==s?s:null===(r=e.chosenRun)||void 0===r?void 0:r.options[t])&&void 0!==a?a:null})(n):(0,x.Bu)(this.funcCall.inputParams[t].property),e.chosenRun?"restricted":"user input"))});this.subs.push(o)}getInputForVal(t){var e,n;const i=t.property;if(this.inputsOverride[t.property.name])return this.inputsOverride[t.property.name];if(i.propertyType===s.TYPE.STRING&&i.options.choices&&!i.options.propagateChoice)return o.input.choice(null!==(e=i.caption)&&void 0!==e?e:i.name,{value:(0,x.Bu)(i),items:JSON.parse(i.options.choices),nullable:i.nullable});switch(i.propertyType){case"file":return I.A.fileInput(null!==(n=i.caption)&&void 0!==n?n:i.name,null,null,null);case s.TYPE.FLOAT:const t=o.input.forProperty(i),e=i.options.format;return e&&(t.format=e),t;default:return o.input.forProperty(i)}}bindOnHotkey(t){(0,C.KL)(t)&&(t.input.onkeydown=t=>T(this,void 0,void 0,function*(){"Enter"==t.key&&this.runRequests.next()}))}get foldedCategories(){var t;return JSON.parse(null!==(t=this.func.options.foldedCategories)&&void 0!==t?t:"[]")}getCategoryWarningIcon(t){const e=o.iconFA("exclamation-circle",null,"This category has inconsistent inputs");d()(e).css({color:"var(--orange-2)","padding-left":"5px"}).hide();const n=this.funcCallReplaced.subscribe(()=>{this.foldedCategoryInputs[t].some(t=>"inconsistent"===this.getInputLockState(t.paramName)&&t.input.value!==this.getRestrictedValue(t.paramName))?d()(e).show():d()(e).hide()});return this.subs.push(n),e}renderCategory(t,e,n){if(e!==n)if(this.foldedCategories.includes(e)){const n=this.getCategoryWarningIcon(e),i=o.iconFA("chevron-right",()=>{var t;d()(s).show(),d()(i).hide(),d()(n).hide(),(null!==(t=this.foldedCategoryInputs[e])&&void 0!==t?t:[]).forEach(t=>d()(t.input.root).css({display:""}))},"Open category");d()(i).css("padding-right","5px");const s=o.iconFA("chevron-down",()=>{var t;d()(s).hide(),d()(i).show(),this.foldedCategoryInputs[e].some(t=>"inconsistent"===this.getInputLockState(t.paramName))?d()(n).show():d()(n).hide(),(null!==(t=this.foldedCategoryInputs[e])&&void 0!==t?t:[]).forEach(t=>d()(t.input.root).hide())},"Close category");d()(s).css("padding-right","5px"),t.append(o.h2([i,s,o.h2(e,{style:{display:"inline"}}),n],{style:{width:"100%"}})),d()(s).hide()}else t.append(o.h2(e,{style:{width:"100%"}}))}renderInput(t,e,n){var i;const o=e.property;this.foldedCategories.includes(o.category)&&(this.foldedCategoryInputs[o.category]=[...null!==(i=this.foldedCategoryInputs[o.category])&&void 0!==i?i:[],{paramName:e.property.name,input:n}]),this.injectLockIcons(e,n),(0,C.JU)(n),(0,C.KL)(n)&&((0,C.hg)(e,n),this.bindTooltips(e,n),(0,C._t)(n)),t.append(n.root)}bindTooltips(t,e){const n=t.property.name,i=()=>{var e,i;const s=`${null!==(i=null!==(e=t.property.description)&&void 0!==e?e:t.property.caption)&&void 0!==i?i:t.property.name}.`,r=(()=>"disabled"===this.getInputLockState(n)?"Input is disabled to prevent inconsistency.":"inconsistent"===this.getInputLockState(n)?"The entered value is inconsistent to the computed value.":"restricted"===this.getInputLockState(n)?"The value is dependent and computed automatically. Click to edit":null)();return s||r?o.divV([...s?[o.divText(s)]:[],...r?[o.divText(r)]:[]],{style:{maxWidth:"300px"}}):null};o.tooltip.bind(e.captionLabel,i),o.tooltip.bind(e.input,i)}injectLockIcons(t,e){const n=t.property.name;e.root.addEventListener("click",()=>{"restricted"===this.getInputLockState(n)&&this.setInputLockState(e,t.name,t.value,"restricted unlocked")});const i=o.iconFA("lock");d()(i).addClass("rfv-icon-lock"),d()(i).css({color:"var(--grey-2)"});const r=o.iconFA("lock-open");d()(r).addClass("rfv-icon-unlock"),d()(r).css({color:"var(--grey-2)"});const a=o.iconFA("undo",e=>{this.setInput(t.name,this.getRestrictedValue(n),"restricted"),e.stopPropagation()},"Reset value to computed value");d()(a).addClass("rfv-icon-undo"),d()(a).css({color:"var(--blue-2)"});const l=o.iconFA("exclamation-circle",null,"Validation");o.tooltip.bind(l,()=>`Current value is incosistent. Computed value was ${s.TYPES_SCALAR.has(t.property.propertyType)?this.getRestrictedValue(n):"different"}`),d()(l).addClass("rfv-icon-warning"),d()(l).css({color:"var(--orange-2)"});const u=e;u.placeLockStateIcons||(u.placeLockStateIcons=function(t,n,i,o){(0,C.KL)(e)&&(e.addOptions(t),e.addOptions(n),e.addOptions(i),e.addOptions(o))}),u.placeLockStateIcons(i,r,a,l)}syncInput(t,e,n){const i=t.name;let o=!1;const r=this.funcCallReplaced.pipe((0,h.startWith)(!0)).subscribe(()=>{var t,o;const s=this.funcCall[b.wl[n]][i],r=null!==(o=null!==(t=this.funcCall[n][i])&&void 0!==t?t:(0,x.Bu)(s.property))&&void 0!==o?o:null;e.notify=!1,e.value=r,e.notify=!0,this.funcCall[n][i]=r,this.setInputLockState(e,i,r,this.getInputLockState(i))});this.subs.push(r);const a=this.funcCallReplaced.pipe((0,h.startWith)(!0),(0,h.switchMap)(()=>{const t=this.funcCall[b.wl[n]][i];return t.onChanged.pipe((0,h.mapTo)(t))})).subscribe(t=>{const i=this.funcCall[n][t.name];if(o||(e.notify=!1,e.value=i,e.notify=!0),n===b.bZ.INPUTS){this.isHistorical.next(!1),this.hideOutput(),this.inputValidationRequests.next({field:t.name,isRevalidation:!1});const n=this.getInputLockState(t.name);"restricted unlocked"!==n&&"inconsistent"!==n||this.setInputLockState(e,t.name,i,i===this.getRestrictedValue(t.name)?"restricted unlocked":"inconsistent")}});this.subs.push(a);const l=this.funcCallReplaced.pipe((0,h.startWith)(!0),(0,h.switchMap)(()=>{const t=this.funcCall[b.wl[n]][i];return t.onChanged.pipe((0,h.mapTo)(t),(0,h.startWith)(t))}),(0,h.filter)(t=>t.property.propertyType===s.TYPE.DATA_FRAME&&t.value),(0,h.switchMap)(t=>t.value.onDataChanged.pipe((0,h.mapTo)(t)))).subscribe(t=>{n===b.bZ.INPUTS?this.inputValidationRequests.next({field:t.name,isRevalidation:!1}):this.outputValidationRequests.next({field:t.name,isRevalidation:!1})});this.subs.push(l);const u=((0,C.KL)(e)?e.onInput:(0,C.Gb)(e.onInput.bind(e))).pipe((0,h.debounceTime)(250)).subscribe(()=>{try{o=!0,this.funcCall[n][t.name]=e.value}finally{o=!1}});this.subs.push(u)}isRunnable(){return!this.isRunning.value&&!this.blockRuns.value&&this.isValid()}isValid(){for(const[t,e]of Object.entries(this.inputValidationState))if(!(0,f.Aw)(e))return!1;for(const[t,e]of Object.entries(this.externalValidatorsState))if(!(0,f.Aw)(e))return!1;return!0}getValidationState(){return this.inputValidationState}getValidationMessage(){const t=[];for(const[e,n]of Object.entries(this.inputValidationState))(0,f.Aw)(n)||t.push(`${e}: ${(0,f.u1)(n)}`);return t.join("\n")}runValidation(t,e){return T(this,arguments,void 0,function*(t,e,n=b.bZ.INPUTS){const i=t.field,o=this.getValidatedNames(i,n);return(0,C.tf)(t,o,e,n,{view:this,funcCall:this.funcCall,lastCall:this.lastCall},n===b.bZ.INPUTS?this.inputValidators:this.outputValidators)})}setInputValidationPending(t){const e=this.getValidatedNames(t);for(const t of e){this.inputValidationState[t]=(0,f.Ur)();const e=this.inputsMap[t];(0,m.LB)(e)&&e.setValidation((0,f.Ur)())}this.inputValidationUpdates.next(null)}setOutputValidationPending(t){const e=this.getValidatedNames(t,b.bZ.OUTPUTS);for(const t of e){this.outputValidationState[t]=(0,f.Ur)();const e=this.outputValidationSigns[t];if(e){const n=(0,f.JC)((0,f.Ur)());e[0].replaceWith(n[0]),e[1].replaceWith(n[1]),this.outputValidationSigns[t]=n}}this.outputValidationUpdates.next(null)}setInputValidationResults(t){for(const[e,n]of Object.entries(t))this.inputValidationState[e]=n,this.updateInputValidationResults(e)}setOutputValidationResults(t){for(const[e,n]of Object.entries(t))this.outputValidationState[e]=n,this.updateOutputValidationResults(e)}updateOutputValidationResults(t){const e=this.outputValidationState[t],n=this.outputValidationSigns[t];n&&(this.outputValidationSigns[t]=(0,C.Fd)(n,e))}updateInputValidationResults(t){const e=(0,f.uD)(this.inputValidationState[t],this.externalValidatorsState[t]),n=this.inputsMap[t];(0,m.LB)(n)&&n.setValidation(e)}runRevalidations(t,e,n=b.bZ.INPUTS){if(!t.isRevalidation)for(const[,t]of Object.entries(e))if(null==t?void 0:t.revalidate)for(const e of t.revalidate)n===b.bZ.INPUTS?this.inputValidationRequests.next({field:e,context:t.context,isRevalidation:!0}):this.outputValidationRequests.next({field:e,context:t.context,isRevalidation:!0})}getValidatedNames(t,e=b.bZ.INPUTS){return t?[t]:[...e===b.bZ.INPUTS?this.funcCall.inputs.keys():this.funcCall.outputs.keys()]}getValidExpRun(t){return T(this,void 0,void 0,function*(){t.started=a()();const e=t.options.immutable_tags||[];return t.options.immutable_tags=e.includes(v.ec)?e:[...e,v.ec],t.newId(),t})}saveExperimentalRun(t){return T(this,void 0,void 0,function*(){const e=yield this.getValidExpRun(t);yield this.saveRun(e)})}hideOutput(){if(this._isOutputOutdated.next(!0),this.keepOutput())return;this.outputTabsLabels.forEach(t=>{var e;return d()(null===(e=this.tabsElem.getPane(t))||void 0===e?void 0:e.header).hide()});const t=this.tabsElem.panes.find(t=>this.inputTabsLabels.includes(t.name));t?this.tabsElem.currentPane=t:d()(this.tabsElem.root).hide()}richFunctionViewSupportedFormats(){return["Excel"]}richFunctionViewExportExtensions(){return{Excel:"xlsx"}}}},8920(t,e,n){"use strict";n.d(e,{AY:()=>i,D:()=>a,Jl:()=>o,L_:()=>r,bZ:()=>l,wl:()=>u});const i="restrictedValues",o="editState";var s,r,a,l;!function(t){t.INPUT="Input",t.OUTPUT="Output"}(s||(s={})),function(t){t.HIDDEN="hidden",t.VISIBLE="visible"}(r||(r={})),function(t){t.ENABLED="enabled",t.DISABLED="disabled"}(a||(a={})),function(t){t.INPUTS="inputs",t.OUTPUTS="outputs"}(l||(l={}));const u={[l.INPUTS]:"inputParams",[l.OUTPUTS]:"outputParams"}},6318(t,e,n){"use strict";n.d(e,{b:()=>d,c:()=>p});var i=n(4328),o=n(5727),s=n(4350),r=n(9713),a=n(1858),l=n(4795),u=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const c=2e4;function d(t,e){return u(this,arguments,void 0,function*(t,e,n={}){var o,s,r;yield h(e,null!==(o=n.initWaitTimeout)&&void 0!==o?o:c),e.disableSetters(!0);try{for(const[i,o]of Object.entries(e.steps)){const a=t[i];if(!a)continue;const l=null!==(r=null===(s=n.stepOptions)||void 0===s?void 0:s[i])&&void 0!==r?r:{},u=l.prefix?`${l.prefix}: ${i}`:i,{updateMode:d}=n,h={validatorsWaitTimeout:5e3,initWaitTimeout:c,parent:e,interactive:n.interactive,updateMode:d};yield p(a,o.view,Object.assign(Object.assign(Object.assign({},h),l),{prefix:u}))}}finally{e.disableSetters(!1)}n.interactive&&i.shell.info(`${e.name} test passed`)})}function p(t,e){return u(this,arguments,void 0,function*(t,e,n={}){var d;yield h(e,null!==(d=n.initWaitTimeout)&&void 0!==d?d:c);const p=()=>u(this,void 0,void 0,function*(){var t;if(n.parent){const e=null!==(t=n.parentWaitTimeout)&&void 0!==t?t:5e3,o=yield n.parent.isUpdating.pipe((0,r.map)(()=>n.parent.getRunningUpdates()),(0,r.debounceTime)(100),(0,r.takeUntil)((0,a.of)(null).pipe((0,r.delay)(e))),(0,r.takeWhile)(t=>0!==t.length,!0),(0,r.last)()).toPromise();if(null==o?void 0:o.length){const t=`{options.prefix}: parent updates failed to complete in ${e}ms, updates: ${o.join(",")}`,s=new Error(t);throw n.interactive&&i.shell.error(String(s)),s}}});yield p();for(const[i,o]of Object.entries(t.inputs)){const t=e.funcCall.inputParams[i].property.propertyType;n.updateMode?null==e.funcCall.inputs[i]&&(e.funcCall.inputs[i]=yield(0,l.$X)(t,o)):e.funcCall.inputs[i]=yield(0,l.$X)(t,o)}if(yield p(),yield(()=>u(this,void 0,void 0,function*(){var t;if(e instanceof o.Ee){const o=null!==(t=n.validatorsWaitTimeout)&&void 0!==t?t:5e3,s=yield e.pendingInputValidations.pipe((0,r.map)(t=>Object.keys(t)),(0,r.debounceTime)(100),(0,r.takeUntil)((0,a.of)(null).pipe((0,r.delay)(o))),(0,r.takeWhile)(()=>!e.isValid(),!0),(0,r.last)()).toPromise();if(null==s?void 0:s.length){const t=`{options.prefix}: validators failed to accept input in ${o}ms, inputs: ${s.join(",")}`,e=new Error(t);throw n.interactive&&i.shell.error(String(e)),e}}}))(),console.log(`running ${e.func.nqName}`),yield e.run(),!n.updateMode){console.log(`checking ${e.func.nqName} results`);try{(0,s.SJ)(e.funcCall.outputs,t.outputs,n),!n.parent&&n.interactive&&i.shell.info(`${e.name} test passed`)}catch(t){throw n.interactive&&i.shell.error(String(t)),t}console.log(`${e.func.nqName} ok`)}})}function h(t,e){return u(this,void 0,void 0,function*(){if(!(yield t.isReady.pipe((0,r.takeUntil)((0,a.of)(null).pipe((0,r.delay)(e))),(0,r.takeWhile)(t=>!t,!0),(0,r.last)()).toPromise()))throw new Error(`Waiting for view ${t.name} timeout`)})}},7375(t,e,n){"use strict";function i(t){return t&&t.root&&t.onInput}function o(t){return(null==t?void 0:t.setValidation)&&i(t)}function s(t){return(null==t?void 0:t.setDisabled)&&(null==t?void 0:t.setRestricted)&&(null==t?void 0:t.setRestrictedUnlocked)&&(null==t?void 0:t.setInconsistent)&&(null==t?void 0:t.setUserInput)&&i(t)}n.d(e,{LB:()=>o,gD:()=>s})},4795(t,e,n){"use strict";n.d(e,{$X:()=>D,Fd:()=>E,Gb:()=>y,Hs:()=>x,JU:()=>I,KL:()=>m,LL:()=>b,O0:()=>w,QL:()=>T,_t:()=>k,aB:()=>C,hg:()=>R,r6:()=>A,sy:()=>g,tf:()=>S,wB:()=>O});var i=n(4328),o=n(7389),s=n(6082),r=n(1757),a=n.n(r),l=n(4260),u=n(7375),c=n(1927),d=n(6910),p=n(1858),h=n(1599),f=n(8920),v=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};function m(t){const e=t;return e.dart&&s.toJs(e.dart)instanceof s.InputBase}function y(t){return new p.Observable(e=>{const n=t(t=>{e.next(t)});return()=>n.unsubscribe()})}const g=(t,e,n,i,o,r)=>{var a;r&&t.setOptions({showCurrentRowIndicator:!0,showCurrentCellOutline:!1,allowEdit:!1,allowBlockSelection:!1,showRowHeader:!1,showColumnLabels:!e,extendLastColumn:e}),t.sort([l.bV],[!1]);for(let e=0;e<t.columns.length;e++){const n=t.columns.byIndex(e);n&&(null===(a=n.column)||void 0===a?void 0:a.type)===s.TYPE.DATE_TIME&&(n.format="MMM d, h:mm tt")}if((0,d.eF)(t),e)t.columns.setVisible([l.vw]),t.props.rowHeight=70,t.invalidate();else{t.props.rowHeight=28;const e=t.dataFrame.getCol(l.lv);t.columns.setVisible([l.d1,l.iL,l.zY,...i?[l.bV]:[],...i?[l.l8]:[],...i&&e.stats.missingValueCount<e.length?[l.lv]:[],...i?[l.qh]:[],...i?[l.Ts]:[],...n&&o?(0,d.rs)(o).map(t=>{var e,n;const i=null!==(e=o.inputs.find(e=>e.name===t))&&void 0!==e?e:o.outputs.find(e=>e.name===t);return i?null!==(n=i.caption)&&void 0!==n?n:(0,d.Uo)(i.name):(0,d.Uo)(t)}):[]])}},b=(t,e,n,i,s)=>{var r,a;const u=t.dataFrame,c=u.getCol(l.lv),p=[...e&&u.getCol(l.d1).categories.length>1?[l.d1]:[],...e&&(null!==(a=null===(r=u.col(l.iL))||void 0===r?void 0:r.categories.length)&&void 0!==a?a:0)>1?[l.iL]:[],...e?[l.bV,l.pC]:[],...e&&u.getCol(l.l8).categories.length>1?[l.l8]:[],...e&&c.stats.missingValueCount<c.length?[l.lv]:[],...e&&u.getCol(l.qh).categories.length>1?[l.qh]:[],...e&&u.getCol(l.Ts).categories.length>1?[l.Ts]:[],...s&&n?(0,d.rs)(s).map(t=>{var e,n;const i=null!==(e=s.inputs.find(e=>e.name===t))&&void 0!==e?e:s.outputs.find(e=>e.name===t);return i?null!==(n=i.caption)&&void 0!==n?n:(0,d.Uo)(i.name):(0,d.Uo)(t)}).filter(t=>!i||u.getCol(t).categories.length>1).map(t=>t):[]];return p.length>0?(o.setDisplay(t.root,!0),t.setOptions({columnNames:p,showHeader:!1,showBoolCombinedFilter:!0})):o.setDisplay(t.root,!1),p.length>0},C=t=>v(void 0,void 0,void 0,function*(){i.shell.windows.help.visible=!0,yield new Promise(t=>setTimeout(t,100)),i.shell.windows.help.showHelp(o.markdown(t))}),A=t=>{const e={inputs:{},outputs:{}};return t.inputs.filter(t=>t.propertyType===s.TYPE.DATA_FRAME&&0!==(0,h.jJ)(t).config.length).forEach(t=>{const n="Misc"===t.category?"Input":t.category;e.inputs[n]?e.inputs[n].push(t):e.inputs[n]=[t]}),t.outputs.forEach(t=>{const n="Misc"===t.category?"Output":t.category;t.propertyType===s.TYPE.DATA_FRAME&&0===(0,h.jJ)(t).config.length||(e.outputs[n]?e.outputs[n].push(t):e.outputs[n]=[t])}),e},x=t=>v(void 0,void 0,void 0,function*(){const e=t.id,n=s.Func.byName(t.func.nqName).prepare([...t.inputs].reduce((t,[e,n])=>(t[e]=n,t),{}));return t.options.forEach(e=>n.options[e]=t.options[e]),e||(n.id=null),n}),w=t=>t.options.runLabel,I=t=>{if((0,u.gD)(t))return;const e=t;e.setDisabled=function(){t.enabled=!1,a()(t.root).removeClass("rfv-restricted-unlocked-input"),a()(t.root).removeClass("rfv-inconsistent-input"),a()(t.root).removeClass("rfv-restricted-input")},e.setRestricted=function(){t.enabled=!1,a()(t.root).addClass("rfv-restricted-input"),a()(t.root).removeClass("rfv-restricted-unlocked-input"),a()(t.root).removeClass("rfv-inconsistent-input")},e.setRestrictedUnlocked=function(){t.enabled=!0,a()(t.root).addClass("rfv-restricted-unlocked-input"),a()(t.root).removeClass("rfv-restricted-input"),a()(t.root).removeClass("rfv-inconsistent-input")},e.setInconsistent=function(){t.enabled=!0,a()(t.root).addClass("rfv-inconsistent-input"),a()(t.root).removeClass("rfv-restricted-input"),a()(t.root).removeClass("rfv-restricted-unlocked-input")},e.setUserInput=function(){t.enabled=!0,a()(t.root).removeClass("rfv-inconsistent-input"),a()(t.root).removeClass("rfv-restricted-input"),a()(t.root).removeClass("rfv-restricted-unlocked-input")}},R=(t,e)=>{var n;const i=t.property;a()(e.root).css({width:`calc(${null!==(n=i.options.block)&&void 0!==n?n:"100"}% - ${i.options.block?"2":"0"}px)`,"box-sizing":"border-box"})},T=(t,...e)=>v(void 0,[t,...e],void 0,function*(t,e=f.bZ.INPUTS){const n=[...t[f.wl[e]].values()];return(yield Promise.all(n.filter(t=>!!t.property.options.validatorFunc).map(t=>v(void 0,void 0,void 0,function*(){const e=s.Func.byName(t.property.options.validatorFunc).prepare({params:JSON.parse(t.property.options.validatorFuncOptions||"{}")});return yield e.call(),[t.name,e.outputs.validator]})))).reduce((t,[e,n])=>(t[e]=n,t),{})}),E=(t,e)=>{const n=(0,c.JC)(e);return t[0].replaceWith(n[0]),t[1].replaceWith(n[1]),n},S=(t,e,n,i,o,s)=>v(void 0,void 0,void 0,function*(){const{view:r,funcCall:a,lastCall:l}=o,u=yield Promise.all(e.map(e=>v(void 0,void 0,void 0,function*(){const o=i===f.bZ.INPUTS?a.inputs[e]:a.outputs[e],u=yield(0,c.Td)(o,{param:e,funcCall:a,lastCall:l,signal:n,isNewOutput:!!t.isNewOutput,isRevalidation:t.isRevalidation,view:r});let d;const p=s[e];p&&(d=yield p(o,{param:e,funcCall:a,lastCall:l,signal:n,isNewOutput:!!t.isNewOutput,isRevalidation:t.isRevalidation,context:t.context,view:r}));const h=i===f.bZ.INPUTS&&a.inputParams[e].property.options.nullable;return[e,(0,c.uD)(...h?[]:[u],d)]})));return Object.fromEntries(u)}),k=t=>{const e=o.element("i");t.addOptions(e),t.setValidation=function(n){for(;e.firstChild&&e.removeChild(e.firstChild););const[i,o]=(0,c.JC)(n);i&&o&&(e.appendChild(i),e.appendChild(o)),t.input.classList.remove("d4-invalid"),t.input.classList.remove("d4-partially-invalid"),(null==n?void 0:n.errors)&&n.errors.length||(null==n?void 0:n.warnings)&&n.warnings.length||(null==n?void 0:n.notifications)&&n.notifications.length||(null==n?void 0:n.pending)?a()(e).css("display","flex"):a()(e).hide(),(null==n?void 0:n.errors)&&n.errors.length?t.input.classList.add("d4-invalid"):(null==n?void 0:n.warnings)&&n.warnings.length&&t.input.classList.add("d4-partially-invalid")}};function O(t,e){return v(this,void 0,void 0,function*(){const n={};for(const[i,o]of Object.entries(t.inputs)){const{property:t}=e.funcCall.inputParams[i];n[i]=yield P(t,o,e)}return{inputs:n,outputs:t.outputs}})}function P(t,e,n){return v(this,void 0,void 0,function*(){if("file"===t.propertyType&&n.getInput){const e=n.getInput(t.name).value;return e instanceof s.FileInfo?(yield e.readAsBytes()).buffer:yield e.arrayBuffer()}return e})}function D(t,e){return v(this,void 0,void 0,function*(){return"file"===t?new File([e],""):e})}},1927(t,e,n){"use strict";n.d(e,{Aw:()=>o,JC:()=>u,Td:()=>l,Ur:()=>a,u1:()=>s,uD:()=>r});var i=n(7389);function o(t){var e;return!(null===(e=null==t?void 0:t.errors)||void 0===e?void 0:e.length)&&!(null==t?void 0:t.pending)}function s(t){if(null==t?void 0:t.errors)return t.errors.map(t=>t.description).join("; ")}function r(...t){var e,n,i,o,s;const r=[],a=[],l=[],u=[];let c={};for(const d of t)d&&(r.push(...null!==(e=d.errors)&&void 0!==e?e:[]),a.push(...null!==(n=d.warnings)&&void 0!==n?n:[]),l.push(...null!==(i=d.notifications)&&void 0!==i?i:[]),u.push(...null!==(o=d.revalidate)&&void 0!==o?o:[]),c=Object.assign(Object.assign({},c),null!==(s=d.context)&&void 0!==s?s:{}));return{errors:r,warnings:a,notifications:l,revalidate:u,context:c}}function a(){return{pending:!0}}const l=t=>{return e=void 0,n=void 0,o=function*(){if(null==t)return function(t){var e,n,i;const o=t=>"string"==typeof t?{description:t,actions:void 0}:t;return{errors:null===(e=null==t?void 0:t.errors)||void 0===e?void 0:e.map(t=>o(t)),warnings:null===(n=null==t?void 0:t.warnings)||void 0===n?void 0:n.map(t=>o(t)),notifications:null===(i=null==t?void 0:t.notifications)||void 0===i?void 0:i.map(t=>o(t))}}({errors:["Missing value"]})},new((i=void 0)||(i=Promise))(function(t,s){function r(t){try{l(o.next(t))}catch(t){s(t)}}function a(t){try{l(o.throw(t))}catch(t){s(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i(function(t){t(n)})).then(r,a)}l((o=o.apply(e,n||[])).next())});var e,n,i,o};function u(t){let e,n;return(null==t?void 0:t.pending)&&(n=i.iconFA("spinner",()=>{c(t,n,e)},"Validating"),n.classList.add("fa-spin")),(null==t?void 0:t.errors)&&t.errors.length?(n=i.iconFA("exclamation-circle",()=>{c(t,n,e)},"Validation"),n.style.color="var(--red-3)"):(null==t?void 0:t.warnings)&&t.warnings.length?(n=i.iconFA("exclamation-circle",()=>{c(t,n,e)},"Validation"),n.style.color="var(--orange-2)"):(null==t?void 0:t.notifications)&&t.notifications.length&&(n=i.iconFA("info-circle",()=>{c(t,n,e)},"Info"),n.style.color="var(--blue-1)"),n&&(n.classList.remove("fal"),n.classList.add("far"),e=function(t){const e=i.div([],"d4-tooltip");return function(t){t.popover="auto",t.style.fontStyle="normal",t.style.pointerEvents="all",t.style.maxWidth="300px",t.style.textWrap="pretty"}(e),t.appendChild(e),e}(n)),[null!=n?n:i.div(),null!=e?e:i.div()]}function c(t,e,n){if(n&&e){for(function(t,e){const n=t.getBoundingClientRect().toJSON();e.style.inset="unset",e.style.top=n.y+"px",e.style.left=n.x+20+"px"}(e,n);n.firstChild&&n.removeChild(n.firstChild););const o=function(t){var e;const n=i.divV([],{style:{gap:"10px"}});for(const o of["errors","warnings","notifications"]){const s=t[o];if(null==s?void 0:s.length)for(const t of s){const s=d(o);s.style.marginRight="4px",n.appendChild(i.divV([i.divH([s,i.span([t.description])]),...(null!==(e=t.actions)&&void 0!==e?e:[]).map(t=>i.link(t.actionName,t.action,void 0,{style:{paddingLeft:"20px"}}))]))}}return n}(t);n.appendChild(o),n.showPopover()}}function d(t){let e;return"errors"===t?(e=i.iconFA("exclamation-circle"),e.style.color="var(--red-3)"):"warnings"===t?(e=i.iconFA("exclamation-circle"),e.style.color="var(--orange-2)"):"notifications"===t&&(e=i.iconFA("info-circle"),e.style.color="var(--blue-1)"),e&&(e.classList.remove("fal"),e.classList.add("far")),e}},4778(t,e,n){"use strict";n.d(e,{fj:()=>i}),n(4328),n(6082),n(5520),n(3508);const i="OUTPUT_OUTDATED"},8804(t,e,n){"use strict";n.d(e,{C:()=>u,V:()=>l});var i=n(4328),o=n(7389),s=n(6082),r=n(1858),a=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};class l extends s.Dialog{static forFuncCall(t,e=!1){var n,i,o;const s=null!==(n=t.options.title)&&void 0!==n?n:"",r=null!==(i=t.options.description)&&void 0!==i?i:"",a=null!==(o=t.options.tags)&&void 0!==o?o:[];return new l({title:s,description:r,tags:a,isFavorite:e})}constructor(t){var e,n,l,u;super(o.dialog({title:"Save model state"}).dart),this._onMetadataEdit=new r.Subject,this.onMetadataEdit=this._onMetadataEdit.asObservable();let c=null!==(e=null==t?void 0:t.title)&&void 0!==e?e:"",d=null!==(n=null==t?void 0:t.description)&&void 0!==n?n:"",p=null!==(l=null==t?void 0:t.isFavorite)&&void 0!==l&&l;const h=o.input.string("Title",{value:c,onValueChanged:t=>c=t}),f=o.input.string(" ",{value:""}),v=s.TagEditor.create();(null!==(u=null==t?void 0:t.tags)&&void 0!==u?u:[]).forEach(t=>{v.addTag(t)}),f.input.replaceWith(v.root);const m=()=>{""===y.value||v.tags.includes(y.value)||(v.addTag(y.value),y.value="")},y=o.input.string("Tag",{value:""}).addOptions(o.iconFA("plus",m,"Add this tag")),g=(0,r.fromEvent)(y.input,"onkeydown").subscribe(t=>{"Enter"==t.key&&(t.stopPropagation(),m())});this.sub(g);const b=o.input.string("Description",{value:d,onValueChanged:t=>d=t}),C=o.input.bool("Is favorite",{value:p,onValueChanged:t=>p=t});this.add(o.form([h,b,C,y,f])),this.addButton("Save",()=>a(this,void 0,void 0,function*(){if(""!==y.value)return void i.shell.info(`Dialog has unsaved tags: ${y.value}`);const t={title:""!==c?c:null,description:""!==d?d:null,isFavorite:p,tags:v.tags.map(t=>t)};this._onMetadataEdit.next(t),this.close()}))}}class u extends s.Dialog{constructor(t){super(o.dialog({title:`Delete ${t.size>1?t.size:""} ${t.size>1?"runs":"run"}`}).dart),this._onFuncCallDelete=new r.Subject,this.onFuncCallDelete=this._onFuncCallDelete.asObservable(),this.add(o.divText(`Deleted ${t.size>1?t.size:""} ${t.size>1?"runs":"run"} ${t.size>1?"are":"is"} impossible to restore. Are you sure?`)),this.onOK(()=>a(this,void 0,void 0,function*(){return this._onFuncCallDelete.next(t)}))}}},4260(t,e,n){"use strict";n.d(e,{CB:()=>s,Jc:()=>h,NT:()=>u,Ts:()=>x,_W:()=>d,aQ:()=>I,bV:()=>C,d1:()=>v,eP:()=>a,eX:()=>p,ec:()=>c,iL:()=>m,l8:()=>b,lv:()=>w,nw:()=>o,pC:()=>y,qh:()=>A,r0:()=>l,sk:()=>r,t6:()=>R,vw:()=>f,zY:()=>g});var i=n(6082);const o="#0.###",s={barchart:i.VIEWER.BAR_CHART,boxplot:i.VIEWER.BOX_PLOT,calendar:i.VIEWER.CALENDAR,corrplot:i.VIEWER.CORR_PLOT,densityplot:i.VIEWER.DENSITY_PLOT,filters:i.VIEWER.FILTERS,form:i.VIEWER.FORM,globe:i.VIEWER.GLOBE,googlemap:i.VIEWER.GOOGLE_MAP,grid:i.VIEWER.GRID,heatmap:i.VIEWER.HEAT_MAP,histogram:i.VIEWER.HISTOGRAM,linechart:i.VIEWER.LINE_CHART,markup:i.VIEWER.MARKUP,matrixplot:i.VIEWER.MATRIX_PLOT,networkdiagram:i.VIEWER.NETWORK_DIAGRAM,pcplot:i.VIEWER.PC_PLOT,piechart:i.VIEWER.PIE_CHART,scatterplot:i.VIEWER.SCATTER_PLOT,"3dscatterplot":i.VIEWER.SCATTER_PLOT_3D,shapemap:i.VIEWER.SHAPE_MAP,statistics:i.VIEWER.STATISTICS,tileviewer:i.VIEWER.TILE_VIEWER,timelines:i.VIEWER.TIMELINES,treemap:i.VIEWER.TREE_MAP,trellisplot:i.VIEWER.TRELLIS_PLOT,wordcloud:i.VIEWER.WORD_CLOUD,diffstudiofacet:"DiffStudio Facet"},r="JsCardView",a="scripts",l="functions",u="viewer",c="experimental",d="Run name",p="RunId",h="ModelStorage",f="ID",v="Source",m="Is favorite",y="Is complete",g="Delete",b="Author",C="Date",A="Title",x="Desc.",w="Tags",I="Version",R=Object.values(i.COLUMN_TYPE).filter(t=>t!==i.TYPE.DATA_FRAME)},4386(t,e,n){"use strict";n.d(e,{aK:()=>d});var i=n(4328),o=n(7389),s=n(6082),r=n(4260),a=n(1599),l=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const u=Math.ceil(36)+1,c=(t,e,n)=>{o.setUpdateIndicator(t,e);const i=t.querySelector(".d4-update-shadow .ui-label");e&&n&&i&&(i.textContent=n)},d=(t,e,n,d,p,f)=>l(void 0,void 0,void 0,function*(){var v,g;const b={},C=(t,e)=>{if(b[t])return b[t];let n=`${t}`;n.length>31&&(n=`${n.slice(0,31)}`);let i=1;for(;e.worksheets.some(t=>t.name.toLowerCase()===n.toLowerCase());){let e=`${t}`;e.length>31-`-${i}`.length&&(e=`${t.slice(0,31-`-${i}`.length)}`),n=`${e}-${i}`,i++}return b[t]=n,n};if("Excel"===t)try{yield s.Utils.loadJsCss(["/js/common/exceljs.min.js","/js/common/html2canvas.min.js"]);const t=window.ExcelJS,b=window.html2canvas,A="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8",x=new t.Workbook;o.setDisplay(i.shell.v.root,!1),c(i.shell.v.root.parentElement,!0,"Generating report. Please do not switch the browser tab...");let w=0;const I=(t,e,n,...r)=>l(void 0,[t,e,n,...r],void 0,function*(t,e,n,r=0){if(!e||!e.dataFrame)return;const l=s.Viewer.fromType(e.type,e.dataFrame.clone());l.copyViewersLook(e);const u=o.div(l.root,{style:{width:"1280px",height:"720px"}});u.classList.add("ui-box"),u.classList.remove("ui-div"),i.shell.v.root.insertAdjacentElement("afterend",u),yield(0,a.cb)(1e3);const c=(yield b(u)).toDataURL();u.remove();const d=x.addImage({base64:c,extension:"png"});t.addImage(d,{tl:{col:n,row:r},ext:{width:1280,height:720}})}),R=t=>s.TYPES_SCALAR.has(t),T=t=>t.propertyType===s.TYPE.DATA_FRAME,E=e.inputs.filter(t=>T(t)),S=e.inputs.filter(t=>R(t.propertyType)),k=e.outputs.filter(t=>T(t)),O=e.outputs.filter(t=>R(t.propertyType));if(E.forEach(t=>{var e;const i=n.inputs[t.name];if(y(i))return;const o=t.options.caption||t.name,s=null!==(e=x.worksheets.find(t=>t.name===C(o,x)))&&void 0!==e?e:x.addWorksheet(C(o,x)),r=null==p?void 0:p[t.name],a=null==f?void 0:f[t.name];m({sheet:s,dfCounter:w,df:i,validation:r,consistency:a}),w++}),S.length){const t=x.addWorksheet("Input scalars");h(t,S.map(t=>{var e,i,o;return{name:t.name,caption:null!==(e=t.options.caption)&&void 0!==e?e:t.name,value:null!==(i=n.inputs[t.name])&&void 0!==i?i:"",units:null!==(o=t.options.units)&&void 0!==o?o:"",format:t.format||r.nw}}),p,f)}if(k.forEach(t=>{var e;const i=n.outputs[t.name];if(y(i))return;const o=t.options.caption||t.name,s=null!==(e=x.worksheets.find(t=>t.name===C(o,x)))&&void 0!==e?e:x.addWorksheet(C(o,x)),r=null==p?void 0:p[t.name],a=null==f?void 0:f[t.name];m({sheet:s,dfCounter:w,df:i,validation:r,consistency:a}),w++}),O.length){const t=x.addWorksheet("Output scalars");h(t,O.map(t=>{var e,i,o;return{name:t.name,caption:null!==(e=t.options.caption)&&void 0!==e?e:t.name,value:null!==(i=n.outputs[t.name])&&void 0!==i?i:"",units:null!==(o=t.options.units)&&void 0!==o?o:"",format:t.format||r.nw}}),p,f)}for(const t of e.inputs.filter(t=>T(t))){const e=n.inputs[t.name];if(y(e))continue;const i=(null!==(v=d[t.name])&&void 0!==v?v:[]).filter(t=>t&&t.type!==s.VIEWER.GRID).filter(t=>Object.values(r.CB).includes(t.type));if(0===i.length)continue;const o=t.options.caption||t.name;for(const[t,n]of i.entries())yield I(x.getWorksheet(C(o,x)),n,e.columns.length+2,t*u)}for(const t of e.outputs.filter(t=>T(t))){const e=n.outputs[t.name];if(y(e))continue;const i=(null!==(g=d[t.name])&&void 0!==g?g:[]).filter(t=>t&&t.type!==s.VIEWER.GRID).filter(t=>Object.values(r.CB).includes(t.type));if(0===i.length)continue;const o=t.options.caption||t.name;for(const[t,n]of i.entries())if(n)if(n.type===s.VIEWER.STATISTICS){const n=e.columns.length,i=s.DataFrame.fromColumns([s.Column.string("Name",n).init(t=>e.columns.byIndex(t).name),s.Column.int("Values",n).init(t=>e.columns.byIndex(t).stats.valueCount),s.Column.int("Nulls",n).init(t=>e.columns.byIndex(t).stats.missingValueCount),s.Column.float("Min",n).init(t=>e.columns.byIndex(t).stats.min),s.Column.float("Max",n).init(t=>e.columns.byIndex(t).stats.max),s.Column.float("Avg",n).init(t=>e.columns.byIndex(t).stats.avg),s.Column.float("Stdev",n).init(t=>e.columns.byIndex(t).stats.stdev)]);m({sheet:x.getWorksheet(C(o,x)),dfCounter:w,df:i,column:e.columns.length+2,row:t*u}),w++}else yield I(x.getWorksheet(C(o,x)),n,e.columns.length+2,t*u)}const P=yield x.xlsx.writeBuffer();return[new Blob([P],{type:A}),x]}catch(t){console.log(t)}finally{o.setDisplay(i.shell.v.root,!0),c(i.shell.v.root.parentElement,!1)}throw new Error("Format is not supported")}),p=(t,e)=>{try{return Number.isFinite(t)&&e?s.format(t,e):t}catch(e){return t}},h=(t,e,n,i)=>{const o=["Parameter","Value","Units"];n&&o.push("Validation"),i&&o.push("Consistency"),t.addRow(o).font={bold:!0},e.forEach(e=>{const o=[e.caption,p(e.value,e.format),e.units];o.push(f(null==n?void 0:n[e.name])),o.push(v(null==i?void 0:i[e.name])),t.addRow(o)}),t.getColumn(1).width=1.2*Math.max(...e.map(t=>t.caption.toString().length),9),t.getColumn(2).width=1.2*Math.max(...e.map(t=>t.value.toString().length),5),t.getColumn(3).width=1.2*Math.max(...e.map(t=>t.units.toString().length),5),t.getColumn(4).width=100,t.getColumn(5).width=100},f=t=>null==t?"":["errors","warnings"].filter(e=>{var n;return!!(null===(n=null==t?void 0:t[e])||void 0===n?void 0:n.length)}).flatMap(e=>t[e].map(t=>({category:e,advice:t}))).map(({category:t,advice:e})=>`${t}: ${"string"==typeof e?e:e.description}`).join("\n"),v=t=>{if(null==t)return"";if(t.inconsistent&&("disabled"===t.restriction||"restricted"===t.restriction)){const e=t.assignedValue;return`Inconsistent: value should be ${"number"==typeof e&&Number.isFinite(e)?s.format(e,r.nw):String(e)}`}},m=({sheet:t,dfCounter:e,df:n,column:i,row:o,validation:s,consistency:a})=>{var l,u;if(!n)return;const c=t.getColumn(null!=i?i:1).letter,d=n.columns.length,h=[];for(let t=0;t<n.rowCount;t++){const e=[];for(let i=0;i<n.columns.length;i++){const o=n.col(i),s=n.get(o.name,t);if("double"===(null==o?void 0:o.type)){const t=null!==(u=null===(l=null==o?void 0:o.tags)||void 0===l?void 0:l.format)&&void 0!==u?u:r.nw,n=p(s,t);e.push(n)}else e.push(s)}h.push(e)}const m={name:`ID_${e.toString()}`,ref:`${c}${null!=o?o:1}`,columns:n.columns.toList().map(t=>({name:t.name,filterButton:!1})),rows:h};t.addTable(m),t.columns.forEach(t=>{t.width=25,t.alignment={wrapText:!0}});const y=d+1;t.getColumn(y).width=100,t.getCell(1,y).value="Validation and Consistency",s&&(t.getCell(2,y).value=f(s)),a&&(t.getCell(3,y).value=v(a))},y=t=>!t||0===t.rowCount},6910(t,e,n){"use strict";n.d(e,{BV:()=>C,Uo:()=>g,VI:()=>m,WM:()=>h,eF:()=>y,qg:()=>f,rs:()=>v,u8:()=>b});var i=n(4328),o=n(7389),s=n(6082),r=n(1757),a=n.n(r),l=n(4260),u=n(3508),c=n.n(u),d=n(1599),p=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const h=(t,e)=>p(void 0,void 0,void 0,function*(){const n=`${l.Jc}_${t.func.name}_Fav`;return e?i.dapi.userDataStorage.postValue(n,t.id,""):i.dapi.userDataStorage.remove(n,t.id)}),f=t=>t.options.mainParams?JSON.parse(t.options.mainParams):null,v=(t,e)=>{var n,i;return null!==(i=null!==(n=null==e?void 0:e.visibleProps)&&void 0!==n?n:f(t))&&void 0!==i?i:t.inputs.filter(t=>l.t6.includes(t.propertyType)).map(t=>t.name)},m=(t,e,n,s,r,u,c)=>{t.onCellPrepare(h=>{var f,v,m,y,g,b,C,A,x,w;if(h.isColHeader&&(null===(f=h.tableColumn)||void 0===f?void 0:f.name)&&[l.zY,l.d1,l.iL].includes(h.tableColumn.name)&&(h.customText=""),!h.isColHeader){if((null===(v=h.tableColumn)||void 0===v?void 0:v.name)===l.zY&&(h.customText="",h.element=o.divH([o.iconFA("trash",()=>s(h),"Remove run from history"),o.iconFA("edit",()=>n(h),"Edit run metadata")],{style:{padding:"6px",gap:"6px",justifyContent:"space-between"}})),(null===(m=h.tableColumn)||void 0===m?void 0:m.name)===l.iL){h.customText="";const t=o.iconFA("star",()=>u(h),"Unfavorite");a()(t).addClass("fas"),h.element=o.div(h.cell.value?t:o.iconFA("star",()=>r(h),"Favorite"),{style:{padding:"6px"}})}if((null===(y=h.tableColumn)||void 0===y?void 0:y.name)===l.d1){h.customText="";const t=o.iconFA("flask",null,"Experimental run");a()(t).addClass("fad fa-sm"),a()(t).removeClass("fal"),h.element=h.cell.value&&"Experimental"===h.cell.value?o.div(t,{style:{padding:"6px"}}):o.div()}if((null===(g=h.tableColumn)||void 0===g?void 0:g.name)===l.lv){h.customText="";const t=h.cell.value.length>0?o.div(null===(b=h.cell.value)||void 0===b?void 0:b.split(",").map(t=>o.span([t],"d4-tag")),"d4-tag-editor"):o.div();a()(t).css({padding:"3px","background-color":"transparent"}),h.element=t}if((null===(C=h.tableColumn)||void 0===C?void 0:C.name)===l.vw){h.customText="";const f=(I=h.tableRowIndex,e.get(t.dataFrame.get(l.vw,I)));if(!f)return;const v=f.author.picture;a()(v).css({width:"25px",height:"25px",fontSize:"20px"}),o.bind(f.author,v);const m=o.iconFA("flask",null,"Experimental run");m.classList.add("fad","fa-sm"),m.classList.remove("fal"),m.style.marginLeft="3px";const y=f.options.immutable_tags,g=o.span([o.label(null!==(w=null!==(A=f.options.title)&&void 0!==A?A:null===(x=f.author)||void 0===x?void 0:x.friendlyName)&&void 0!==w?w:i.shell.user.friendlyName,{style:{color:"var(--blue-1)"}}),...y&&y.includes(l.ec)?[m]:[]]),b=o.iconFA("edit",t=>{t.stopPropagation(),n(h)},"Edit run metadata");b.classList.add("hp-funccall-card-icon","hp-funccall-card-hover-icon");const C=o.iconFA("trash-alt",t=>p(void 0,void 0,void 0,function*(){t.stopPropagation(),s(h)}),"Delete run");C.classList.add("hp-funccall-card-icon","hp-funccall-card-hover-icon");const R=o.iconFA("star",t=>{t.stopPropagation(),u(h)},"Unfavorite");R.classList.add("fas","hp-funccall-card-icon");const T=o.iconFA("star",t=>{t.stopPropagation(),r(h)},"Favorite");T.classList.add("hp-funccall-card-icon","hp-funccall-card-hover-icon"),(e=>t.dataFrame.get(l.iL,e))(h.tableRowIndex)?(o.setDisplay(T,!1),o.setDisplay(R,!0)):(o.setDisplay(R,!1),o.setDisplay(T,!0));const E=(0,d.eK)(f),S=o.divH([o.divH([v,o.divV([g,o.span([E]),...f.options.tags&&f.options.tags.length>0?[o.div(f.options.tags.map(t=>o.span([t],"d4-tag")))]:[]],"hp-card-content")]),o.divH([...c?[R,T,b,C]:[]])],"hp-funccall-card"),k=h.tableRowIndex;S.addEventListener("mouseover",()=>{h.grid.dataFrame.mouseOverRowIdx=k}),S.addEventListener("click",t=>{t.shiftKey?h.grid.dataFrame.selection.set(k,!0):t.ctrlKey?h.grid.dataFrame.selection.set(k,!1):h.grid.dataFrame.currentRowIdx=k}),h.element=S}var I}})},y=t=>{const e=t.columns.byName(l.zY);e&&(e.cellType="html",e.width=45);const n=t.columns.byName(l.iL);n&&(n.cellType="html",n.width=30);const i=t.columns.byName(l.d1);i&&(i.cellType="html",i.width=30);const o=t.columns.byName(l.lv);o&&(o.cellType="html",o.width=90);const s=t.columns.byName(l.bV);s&&(s.width=110);const r=t.columns.byName(l.vw);r&&(r.cellType="html")},g=t=>t.replace(/([A-Z])/g,t=>` ${t.toLowerCase()}`).trim().replace(/^./,t=>t.toUpperCase()),b=(t,e)=>{var n,i,o,s,r,a,u;if(e===l.l8)return null!==(i=null===(n=t.author)||void 0===n?void 0:n.friendlyName)&&void 0!==i?i:" ";const c=null!==(a=null!==(r=null!==(s=null!==(o=t[e])&&void 0!==o?o:t.inputs[e])&&void 0!==s?s:t.outputs[e])&&void 0!==r?r:t.options[e])&&void 0!==a?a:null;return null!==(u=null==c?void 0:c.toString())&&void 0!==u?u:""},C=(t,e,n)=>p(void 0,void 0,void 0,function*(){var o;const r=[...t.values()],a=t=>t===l.bV?s.Column.dateTime(g(t),r.length).init(t=>window.grok_DayJs_To_DateTime((0,d.Yj)(r[t])?r[t].started.utc(!0):c().unix(r[t].options.createdOn))):t===l.pC?s.Column.bool(g(t),r.length).init(t=>!(0,d.Ne)(r[t])):s.Column.fromStrings(g(t),r.map(e=>{var i,o,s;return null!==(s=null===(o=null===(i=null==n?void 0:n.propFuncs)||void 0===i?void 0:i[t])||void 0===o?void 0:o.call(i,e))&&void 0!==s?s:b(e,t)})),u=null!==(o=yield i.dapi.userDataStorage.get((t=>`${l.Jc}_${t.name}_Fav`)(e)))&&void 0!==o?o:{},p=Object.keys(u),h=s.DataFrame.fromColumns([s.Column.string(l.d1,r.length).init(t=>{const e=r[t].options.immutable_tags;return e&&e.includes(l.ec)?"Experimental":"Simulated"}),...(null==n?void 0:n.isHistory)?[s.Column.bool(l.iL,r.length).init(t=>p.includes(r[t].id))]:[],...(null==n?void 0:n.showActions)?[s.Column.string(l.zY,r.length).init("")]:[],a(l.bV),a(l.pC),a(l.l8),s.Column.string(l.lv,r.length).init(t=>r[t].options.tags?r[t].options.tags.join(","):""),s.Column.string(l.qh,r.length).init(t=>r[t].options.title),s.Column.string(l.Ts,r.length).init(t=>r[t].options.description),s.Column.string(l.aQ,r.length).init(t=>r[t].options.version)]);if(v(e).map(t=>(t=>{var i;const o=null!==(i=e.inputs.find(e=>e.name===t))&&void 0!==i?i:e.outputs.find(e=>e.name===t);return o?(t=>{var e,i;return t.propertyType===s.TYPE.DATE_TIME?s.Column.dateTime(null!==(e=t.caption)&&void 0!==e?e:g(t.name),r.length).init(e=>window.grok_DayJs_To_DateTime(r[e].inputs[t.name])):s.Column.fromType(t.propertyType,null!==(i=t.caption)&&void 0!==i?i:g(t.name),r.length).init(e=>{var i,o,s;return null!==(s=null===(o=null===(i=null==n?void 0:n.propFuncs)||void 0===i?void 0:i[t.name])||void 0===o?void 0:o.call(i,r[e]))&&void 0!==s?s:b(r[e],t.name)})})(o):a(t)})(t)).forEach(t=>{t.name=h.columns.getUnusedName(t.name),h.columns.add(t,!1)}),h.columns.add(s.Column.fromStrings(l.vw,r.map(t=>t.id))),!(null==n?void 0:n.allowOtherVersions)&&(null==n?void 0:n.version)){const t=s.BitSet.create(h.rowCount,()=>!1);for(let e=0;e<h.rowCount;e++)(null==n?void 0:n.version)==h.get(l.aQ,e)&&t.set(e,!0);return h.clone(t)}return h})},1599(t,e,n){"use strict";n.d(e,{A4:()=>b,HP:()=>h,Ne:()=>g,Yj:()=>y,cb:()=>x,eK:()=>A,i:()=>v,jJ:()=>C,lD:()=>w,vk:()=>f,x$:()=>m,zF:()=>p});var i=n(4328),o=n(6082),s=n(1991),r=n.n(s),a=n(4260),l=n(5520),u=n(4778),c=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};const d=new o.LruCache,p=t=>c(void 0,void 0,void 0,function*(){var e;const n=null!==(e=t.options.help)&&void 0!==e?e:t.options.readme;if(!n)return;if(d.get(t.id))return d.get(t.id);let o="";try{o=t.package.name}catch(t){}const s=`System:AppData/${o}/${n}`;if(o&&(yield i.dapi.files.exists(s))){const e=yield i.dapi.files.readAsText(s);return d.set(t.id,e),e}const r=`${i.shell.user.name}.home/${n}`;if(yield i.dapi.files.exists(r)){const e=yield i.dapi.files.readAsText(r);return d.set(t.id,e),e}}),h=t=>{var e;return!!(null===(e=null==t?void 0:t.options)||void 0===e?void 0:e.help)},f=t=>"true"===t.options.runOnInput,v=t=>{var e;return JSON.parse(null!==(e=t.options.features)&&void 0!==e?e:"{}")},m=(t,e,n)=>{var i;return t instanceof Array?t.includes(e):t instanceof Object&&null!==(i=t[e])&&void 0!==i?i:n},y=t=>{try{return null==t?void 0:t.started}catch(t){return}},g=t=>{var e;return(0,l.iu)(null!==(e=t.options[u.fj])&&void 0!==e?e:"false")||!y(t)||!t.id},b=t=>{var e,n;const i=(null===(n=null===(e=t.func)||void 0===e?void 0:e.nqName)||void 0===n?void 0:n.includes(":"))?o.Func.byName(t.func.nqName).prepare():t.func.prepare();i.id=t.id,t.options.forEach(e=>i.options[e]=t.options[e]);const s=r()(i.outputParams.values()).filter(e=>null!=t.outputs[e.name]);for(const e of s)e.property.propertyType===o.TYPE.DATA_FRAME?i.outputs[e.name]=t.outputs[e.name].clone():i.outputs[e.name]=t.outputs[e.name];const a=r()(i.inputParams.values()).filter(e=>null!=t.inputs[e.name]);for(const e of a)e.property.propertyType===o.TYPE.DATA_FRAME?i.inputs[e.name]=t.inputs[e.name].clone():i.inputs[e.name]=t.inputs[e.name];return y(t)&&(i.started=t.started),i},C=t=>{const e=t.options[a.NT];return e?{name:t.name,config:JSON.parse(e,(t,e)=>{if("true"===e)return!0;if("false"===e)return!1;if("type"===t)return a.CB[e]||e;if(!t.toLowerCase().includes("color")){const t=Number.parseFloat(e);if(!Number.isNaN(t))return t}return e})}:{name:t.name,config:[]}},A=t=>{try{return t.started.toDate().toLocaleString("en-us",{month:"short",day:"numeric",hour:"numeric",minute:"numeric"})}catch(t){return"Not completed"}},x=t=>new Promise(e=>setTimeout(e,t));function w(){return c(this,void 0,void 0,function*(){const t=i.dapi.groups;return"function"==typeof t.currentUserGroups?yield t.currentUserGroups():yield(yield fetch(`${window.location.origin}/api/groups/all_parents`)).json()})}},2697(t,e,n){"use strict";var i=n(6082),o=n(6382),s=n(5727),r=n(9713),a=n(5520),l=n(7529),u=n(4350),c=n(1345),d=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};(0,o.L1)("Compute: RichFunctionView Inputs",()=>d(void 0,void 0,void 0,function*(){(0,o.gM)(()=>d(void 0,void 0,void 0,function*(){})),(0,o.t6)("Simple inputs setParamValue",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:simpleInputs",{historyEnabled:!1,isTabbed:!1}),e={a:1,b:2.2,c:"test"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),t.funcCall.setParamValue("a",1),t.funcCall.setParamValue("b",2.2),t.funcCall.setParamValue("c","test"),yield t.doRun();const i={inputs:[["a",1],["b",2.2],["c","test"]],outputs:[["aout",1],["bout",2.2],["cout","test"]]};(0,u.SJ)((0,l.n)(t.funcCall),i,{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),i,{prefix:"lastCall"});for(const[t,i]of Object.entries(e))(0,u.SJ)(n[t].value,i,{prefix:`input ${t}`})})),(0,o.t6)("Simple inputs inputs tweak",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:simpleInputs",{historyEnabled:!1,isTabbed:!1}),e={a:1,b:2.2,c:"test"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(100);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(300),yield t.doRun();const i={inputs:[["a",1],["b",2.2],["c","test"]],outputs:[["aout",1],["bout",2.2],["cout","test"]]};(0,u.SJ)((0,l.n)(t.funcCall),i,{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),i,{prefix:"lastCall"})})),(0,o.t6)("Simple inputs setParamValue rerun",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:simpleInputsDefaultValues",{historyEnabled:!1,isTabbed:!1}),e={a:2,b:3.2,c:"test2"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(100),yield t.doRun(),t.funcCall.setParamValue("a",2),t.funcCall.setParamValue("b",3.2),t.funcCall.setParamValue("c","test2"),yield t.doRun();const i={inputs:[["a",2],["b",3.2],["c","test2"]],outputs:[["aout",2],["bout",3.2],["cout","test2"]]};(0,u.SJ)((0,l.n)(t.funcCall),i,{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),i,{prefix:"lastCall"});for(const[t,i]of Object.entries(e))(0,u.SJ)(n[t].value,i,{prefix:`input ${t}`})})),(0,o.t6)("Simple inputs inputs tweak rerun",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:simpleInputsDefaultValues",{historyEnabled:!1,isTabbed:!1}),e={a:2,b:3.2,c:"test2"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(100),yield t.doRun(),yield(0,o.cb)(100);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(300),yield t.doRun();const i={inputs:[["a",2],["b",3.2],["c","test2"]],outputs:[["aout",2],["bout",3.2],["cout","test2"]]};(0,u.SJ)((0,l.n)(t.funcCall),i,{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),i,{prefix:"lastCall"})})),(0,o.t6)("Simple inputs default values",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:simpleInputsDefaultValues",{historyEnabled:!1,isTabbed:!1});yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(100),(0,u.SJ)((0,l.n)(t.funcCall).inputs,[["a",1],["b",2.2],["c","test"]])})),(0,o.t6)("Complex inputs setParamValue",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),t.funcCall.setParamValue("df",e.df),t.funcCall.setParamValue("data",e.data),yield t.doRun(),(0,u.SJ)((0,l.n)(t.funcCall),(0,a.Jh)(c),{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),(0,a.Jh)(c),{prefix:"lastCall"}),(0,u.SJ)(n.data.value,e.data,{prefix:"data"})})),(0,o.t6)("Complex inputs inputs tweak",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(100),n.data.value=e.data,t.funcCall.setParamValue("df",e.df),yield(0,o.cb)(300),yield t.doRun(),(0,u.SJ)((0,l.n)(t.funcCall),(0,a.Jh)(c),{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),(0,a.Jh)(c),{prefix:"lastCall"}),(0,u.SJ)(n.data.value,e.data,{prefix:"data"})})),(0,o.t6)("Complex inputs setParamValue rerun",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[11.1,12.2,13.3])]),data:JSON.stringify({a:2,b:"pretest"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),t.funcCall.setParamValue("df",e.df),t.funcCall.setParamValue("data",e.data),yield t.doRun();const o={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})};t.funcCall.setParamValue("df",o.df),t.funcCall.setParamValue("data",o.data),yield t.doRun(),(0,u.SJ)((0,l.n)(t.funcCall),(0,a.Jh)(c),{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),(0,a.Jh)(c),{prefix:"lastCall"}),(0,u.SJ)(n.data.value,o.data,{prefix:"data"})})),(0,o.t6)("Complex inputs inputs tweak rerun",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[11.1,12.2,13.3])]),data:JSON.stringify({a:2,b:"pretest"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(100),n.data.value=e.data,t.funcCall.setParamValue("df",e.df),yield(0,o.cb)(300),yield t.doRun();const d={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})};n.data.value=d.data,t.funcCall.setParamValue("df",d.df),yield(0,o.cb)(300),yield t.doRun(),(0,u.SJ)((0,l.n)(t.funcCall),(0,a.Jh)(c),{prefix:"funcCall"}),(0,u.SJ)((0,l.n)(t.lastCall),(0,a.Jh)(c),{prefix:"lastCall"}),(0,u.SJ)(n.data.value,d.data,{prefix:"data"})}))})),(0,o.L1)("Compute: RichFunctionView Validation",()=>d(void 0,void 0,void 0,function*(){(0,o.gM)(()=>d(void 0,void 0,void 0,function*(){})),(0,o.t6)("Validate on start",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:validationTest",{historyEnabled:!1,isTabbed:!1});yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(1500);const e=t.getValidationState();(0,u.SJ)(e,{a:{errors:[{description:"Missing value"},{description:"Out of range [1, 10] value: null"}],warnings:[],notifications:[],revalidate:[],context:{}},b:{errors:[{description:"Missing value"},{description:"Out of range [20, 100] value: null"}],warnings:[],notifications:[],revalidate:[],context:{}},x:{errors:[],warnings:[{description:"Try non-null value"}],notifications:[],revalidate:[],context:{}}})})),(0,o.t6)("Validate on input",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:validationTest",{historyEnabled:!1,isTabbed:!1}),e={a:2.3,b:3.2,x:-1},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(1500);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(400);const i=t.getValidationState();(0,u.SJ)(i,{b:{errors:[{description:"Out of range [20, 100] value: 3.2"}]}})})),(0,o.t6)("Revalidation sequence",()=>d(void 0,void 0,void 0,function*(){const t=new s.Ee("Compute:globalValidationTest",{historyEnabled:!1,isTabbed:!1}),e={a:30,b:40,c:50},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,r.filter)(t=>t),(0,r.take)(1)).toPromise(),yield(0,o.cb)(1500);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(1e3);const i=t.getValidationState();(0,u.SJ)(i,{a:{revalidate:["b","c"],context:{isOk:!1},warnings:[{description:"Try lowering a value"}]},b:{warnings:[{description:"Try lowering a value as well"}]},c:{warnings:[{description:"Try lowering a value as well"}]}})}))}))},5263(t,e,n){"use strict";var i=n(6082),o=n(6382),s=n(4527),r=n(6512),a=n(9713),l=n(5520),u=n(7529),c=n(4350),d=n(1345),p=function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})};(0,o.L1)("Compute API: RFV Inputs",()=>p(void 0,void 0,void 0,function*(){(0,o.gM)(()=>p(void 0,void 0,void 0,function*(){yield(0,s.ue)()})),(0,o.t6)("Simple inputs setParamValue",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:simpleInputs",{historyEnabled:!1,isTabbed:!1}),e={a:1,b:2.2,c:"test"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),t.funcCall.setParamValue("a",1),t.funcCall.setParamValue("b",2.2),t.funcCall.setParamValue("c","test"),yield t.doRun();const i={inputs:[["a",1],["b",2.2],["c","test"]],outputs:[["aout",1],["bout",2.2],["cout","test"]]};(0,c.SJ)((0,u.n)(t.funcCall),i,{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),i,{prefix:"lastCall"});for(const[t,i]of Object.entries(e))(0,c.SJ)(n[t].value,i,{prefix:`input ${t}`})})),(0,o.t6)("Simple inputs inputs tweak",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:simpleInputs",{historyEnabled:!1,isTabbed:!1}),e={a:1,b:2.2,c:"test"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(100);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(300),yield t.doRun();const i={inputs:[["a",1],["b",2.2],["c","test"]],outputs:[["aout",1],["bout",2.2],["cout","test"]]};(0,c.SJ)((0,u.n)(t.funcCall),i,{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),i,{prefix:"lastCall"})})),(0,o.t6)("Simple inputs setParamValue rerun",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:simpleInputsDefaultValues",{historyEnabled:!1,isTabbed:!1}),e={a:2,b:3.2,c:"test2"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(100),yield t.doRun(),t.funcCall.setParamValue("a",2),t.funcCall.setParamValue("b",3.2),t.funcCall.setParamValue("c","test2"),yield t.doRun();const i={inputs:[["a",2],["b",3.2],["c","test2"]],outputs:[["aout",2],["bout",3.2],["cout","test2"]]};(0,c.SJ)((0,u.n)(t.funcCall),i,{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),i,{prefix:"lastCall"});for(const[t,i]of Object.entries(e))(0,c.SJ)(n[t].value,i,{prefix:`input ${t}`})})),(0,o.t6)("Simple inputs inputs tweak rerun",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:simpleInputsDefaultValues",{historyEnabled:!1,isTabbed:!1}),e={a:2,b:3.2,c:"test2"},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(100),yield t.doRun(),yield(0,o.cb)(100);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(300),yield t.doRun();const i={inputs:[["a",2],["b",3.2],["c","test2"]],outputs:[["aout",2],["bout",3.2],["cout","test2"]]};(0,c.SJ)((0,u.n)(t.funcCall),i,{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),i,{prefix:"lastCall"})})),(0,o.t6)("Simple inputs default values",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:simpleInputsDefaultValues",{historyEnabled:!1,isTabbed:!1});yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(100),(0,c.SJ)((0,u.n)(t.funcCall).inputs,[["a",1],["b",2.2],["c","test"]])})),(0,o.t6)("Complex inputs setParamValue",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),t.funcCall.setParamValue("df",e.df),t.funcCall.setParamValue("data",e.data),yield t.doRun(),(0,c.SJ)((0,u.n)(t.funcCall),(0,l.Jh)(d),{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),(0,l.Jh)(d),{prefix:"lastCall"}),(0,c.SJ)(n.data.value,e.data,{prefix:"data"})})),(0,o.t6)("Complex inputs inputs tweak",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(100),n.data.value=e.data,t.funcCall.setParamValue("df",e.df),yield(0,o.cb)(300),yield t.doRun(),(0,c.SJ)((0,u.n)(t.funcCall),(0,l.Jh)(d),{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),(0,l.Jh)(d),{prefix:"lastCall"}),(0,c.SJ)(n.data.value,e.data,{prefix:"data"})})),(0,o.t6)("Complex inputs setParamValue rerun",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[11.1,12.2,13.3])]),data:JSON.stringify({a:2,b:"pretest"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),t.funcCall.setParamValue("df",e.df),t.funcCall.setParamValue("data",e.data),yield t.doRun();const o={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})};t.funcCall.setParamValue("df",o.df),t.funcCall.setParamValue("data",o.data),yield t.doRun(),(0,c.SJ)((0,u.n)(t.funcCall),(0,l.Jh)(d),{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),(0,l.Jh)(d),{prefix:"lastCall"}),(0,c.SJ)(n.data.value,o.data,{prefix:"data"})})),(0,o.t6)("Complex inputs inputs tweak rerun",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:complexInputs",{historyEnabled:!1,isTabbed:!1}),e={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[11.1,12.2,13.3])]),data:JSON.stringify({a:2,b:"pretest"})},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(100),n.data.value=e.data,t.funcCall.setParamValue("df",e.df),yield(0,o.cb)(300),yield t.doRun();const s={df:i.DataFrame.fromColumns([i.Column.fromList("double","col",[1.1,2.2,3.3])]),data:JSON.stringify({a:1,b:"test"})};n.data.value=s.data,t.funcCall.setParamValue("df",s.df),yield(0,o.cb)(300),yield t.doRun(),(0,c.SJ)((0,u.n)(t.funcCall),(0,l.Jh)(d),{prefix:"funcCall"}),(0,c.SJ)((0,u.n)(t.lastCall),(0,l.Jh)(d),{prefix:"lastCall"}),(0,c.SJ)(n.data.value,s.data,{prefix:"data"})}))})),(0,o.L1)("Compute API: RFV Validation",()=>p(void 0,void 0,void 0,function*(){(0,o.gM)(()=>p(void 0,void 0,void 0,function*(){yield(0,s.ue)()})),(0,o.t6)("Validate on start",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:validationTest",{historyEnabled:!1,isTabbed:!1});yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(1500);const e=t.getValidationState();(0,c.SJ)(e,{a:{errors:[{description:"Missing value"},{description:"Out of range [1, 10] value: null"}],warnings:[],notifications:[],revalidate:[],context:{}},b:{errors:[{description:"Missing value"},{description:"Out of range [20, 100] value: null"}],warnings:[],notifications:[],revalidate:[],context:{}},x:{errors:[],warnings:[{description:"Try non-null value"}],notifications:[],revalidate:[],context:{}}})})),(0,o.t6)("Validate on input",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:validationTest",{historyEnabled:!1,isTabbed:!1}),e={a:2.3,b:3.2,x:-1},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(1500);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(400);const i=t.getValidationState();(0,c.SJ)(i,{b:{errors:[{description:"Out of range [20, 100] value: 3.2"}]}})})),(0,o.t6)("Revalidation sequence",()=>p(void 0,void 0,void 0,function*(){const t=(0,r.Nu)("Compute:globalValidationTest",{historyEnabled:!1,isTabbed:!1}),e={a:30,b:40,c:50},n={};t.afterInputPropertyRender.subscribe(({prop:t,input:e})=>{n[t.name]=e}),yield t.isReady.pipe((0,a.filter)(t=>t),(0,a.take)(1)).toPromise(),yield(0,o.cb)(1500);for(const[t,i]of Object.entries(n))i.value=e[t],i.input.dispatchEvent(new Event("input",{bubbles:!0}));yield(0,o.cb)(1e3);const i=t.getValidationState();(0,c.SJ)(i,{a:{revalidate:["b","c"],context:{isOk:!1},warnings:[{description:"Try lowering a value"}]},b:{warnings:[{description:"Try lowering a value as well"}]},c:{warnings:[{description:"Try lowering a value as well"}]}})}))}))},7529(t,e,n){"use strict";function i(t){return{inputs:[...t.inputs.entries()],outputs:[...t.outputs.entries()]}}n.d(e,{n:()=>i})},1757(t){"use strict";t.exports=$},6082(t){"use strict";t.exports=DG},3508(t){"use strict";t.exports=dayjs},4328(t){"use strict";t.exports=grok},1858(t){"use strict";t.exports=rxjs},9713(t){"use strict";t.exports=rxjs.operators},7389(t){"use strict";t.exports=ui},1991(t){"use strict";t.exports=wu},1825(t,e,n){"use strict";n.d(e,{Fo:()=>v,SM:()=>p});const i="function"==typeof Buffer,o=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder,Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")),s=(t=>{let e={};return t.forEach((t,n)=>e[t]=n),e})(o),r=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,a=String.fromCharCode.bind(String),l="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),u=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),c="function"==typeof btoa?t=>btoa(t):i?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,n,i,s,r="";const a=t.length%3;for(let a=0;a<t.length;){if((n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=n<<16|i<<8|s,r+=o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}return a?r.slice(0,a-3)+"===".substring(a):r},d=i?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let n=0,i=t.length;n<i;n+=4096)e.push(a.apply(null,t.subarray(n,n+4096)));return c(e.join(""))},p=(t,e=!1)=>e?d(t).replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_"):d(t),h="function"==typeof atob?t=>atob(u(t)):i?t=>Buffer.from(t,"base64").toString("binary"):t=>{if(t=t.replace(/\s+/g,""),!r.test(t))throw new TypeError("malformed base64.");let e,n,i;t+="==".slice(2-(3&t.length));let o=[];for(let r=0;r<t.length;)e=s[t.charAt(r++)]<<18|s[t.charAt(r++)]<<12|(n=s[t.charAt(r++)])<<6|(i=s[t.charAt(r++)]),64===n?o.push(a(e>>16&255)):64===i?o.push(a(e>>16&255,e>>8&255)):o.push(a(e>>16&255,e>>8&255,255&e));return o.join("")},f=i?t=>l(Buffer.from(t,"base64")):t=>l(h(t).split("").map(t=>t.charCodeAt(0))),v=t=>f(m(t)),m=t=>u(t.replace(/[-_]/g,t=>"-"==t?"+":"/"))},1345(t){"use strict";t.exports=JSON.parse('{"inputs":[["df",{"_DG_CUSTOM_SERIALIZED_TOKEN_":"DataFrame","value":"KaAAAAAAAAAIQAAAAAAAAPA/A6EAAAAAAAAUQGRmb3V0KqABAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDk0MWE2MC05YjAwLTExZWYtY2JjMC1jOTUzNzQ3OGNkZTcooAOhAAAAAAAACEBjb2wDoQAAAAAAABhAZG91YmxlKqACAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IDoQAAAAAAADxALnNlbWFudGljLWRldGVjdGlvbi1kdXJhdGlvbgOhAAAAAAAA8D8zBQAAAAEAAAACoQAAAAAAAAhAzcyMP83MDEAzM1NAA6EAAAAAAFCDQHsiI3R5cGUiOiJUYWJsZXNCbG9iIiwidmVyc2lvbiI6IjAuNi4wLTMwYTc1NjlkIiwidGFibGVzIjpbeyJjb2x1bW5zIjpbeyJuYW1lIjoiY29sIiwidHlwZSI6ImRvdWJsZSIsImlkIjoiZTQ0YThlNDAtOWIwMC0xMWVmLWQwOGQtMjNkMTcwZmRiYmNiIiwiZnJpZW5kbHlOYW1lIjoiQ29sIiwiZW50aXR5VGFncyI6W3sidGFnIjoiLmlkIiwiaWQiOiJlNGVlZTQ5MC05YjAwLTExZWYtZGNhZi1iM2JlNTZkYWFiMjEifSx7InRhZyI6Ii5zZW1hbnRpYy1kZXRlY3Rpb24tZHVyYXRpb24iLCJpZCI6ImU0ZWVlNDkwLTliMDAtMTFlZi1kZmM2LWM5ODIzZjZmZWMyYSJ9XSwibWV0YVBhcmFtcyI6eyIuaWQiOiJlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IiLCIuc2VtYW50aWMtZGV0ZWN0aW9uLWR1cmF0aW9uIjoiMyJ9fV0sInJvd0NvdW50IjozLCJjb2xDb3VudCI6MSwiaWQiOiJlNDk0MWE2MC05YjAwLTExZWYtY2JjMC1jOTUzNzQ3OGNkZTciLCJuYW1lIjoiRGZvdXQiLCJmcmllbmRseU5hbWUiOiJkZm91dCIsImVudGl0eVRhZ3MiOlt7InRhZyI6Ii5pZCIsImlkIjoiZTRlZWU0OTAtOWIwMC0xMWVmLWY1YzMtYjVlNTEyZTlkMDQ1In1dLCJtZXRhUGFyYW1zIjp7fX1dfQihAAAAAAAA8D8AAAAACKEAAAAAAADwP2IAAAADoQAAAAAAACxAMC42LjAtMzBhNzU2OWSoAgAA"}],["data","{\\"a\\":1,\\"b\\":\\"test\\"}"]],"outputs":[["dfout",{"_DG_CUSTOM_SERIALIZED_TOKEN_":"DataFrame","value":"KaAAAAAAAAAIQAAAAAAAAPA/A6EAAAAAAAAUQGRmb3V0KqABAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDU5MGQzMC05YjAwLTExZWYtYmM0Mi1iYmZhMDBhYzUxM2IooAOhAAAAAAAACEBjb2wDoQAAAAAAABhAZG91YmxlKqACAAAAA6EAAAAAAAAIQC5pZAOhAAAAAAAAQkBlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IDoQAAAAAAADxALnNlbWFudGljLWRldGVjdGlvbi1kdXJhdGlvbgOhAAAAAAAA8D8zBQAAAAEAAAACoQAAAAAAAAhAzcyMP83MDEAzM1NAA6EAAAAAAFCDQHsiI3R5cGUiOiJUYWJsZXNCbG9iIiwidmVyc2lvbiI6IjAuNi4wLTMwYTc1NjlkIiwidGFibGVzIjpbeyJjb2x1bW5zIjpbeyJuYW1lIjoiY29sIiwidHlwZSI6ImRvdWJsZSIsImlkIjoiZTQ0YThlNDAtOWIwMC0xMWVmLWQwOGQtMjNkMTcwZmRiYmNiIiwiZnJpZW5kbHlOYW1lIjoiQ29sIiwiZW50aXR5VGFncyI6W3sidGFnIjoiLmlkIiwiaWQiOiJlNGVmMGJhMC05YjAwLTExZWYtOTEwZC02OTA2ZDYxM2FjMDEifSx7InRhZyI6Ii5zZW1hbnRpYy1kZXRlY3Rpb24tZHVyYXRpb24iLCJpZCI6ImU0ZWYzMmIwLTliMDAtMTFlZi1iZmUxLTBkYmZmMzQxYTRmZiJ9XSwibWV0YVBhcmFtcyI6eyIuaWQiOiJlNDRhOGU0MC05YjAwLTExZWYtZDA4ZC0yM2QxNzBmZGJiY2IiLCIuc2VtYW50aWMtZGV0ZWN0aW9uLWR1cmF0aW9uIjoiMyJ9fV0sInJvd0NvdW50IjozLCJjb2xDb3VudCI6MSwiaWQiOiJlNDU5MGQzMC05YjAwLTExZWYtYmM0Mi1iYmZhMDBhYzUxM2IiLCJuYW1lIjoiRGZvdXQiLCJmcmllbmRseU5hbWUiOiJkZm91dCIsImVudGl0eVRhZ3MiOlt7InRhZyI6Ii5pZCIsImlkIjoiZTRlZjMyYjAtOWIwMC0xMWVmLTkzZDAtNmI4MjEwMDE4OTFhIn1dLCJtZXRhUGFyYW1zIjp7fX1dfQihAAAAAAAA8D8AAAAACKEAAAAAAADwP2IAAAADoQAAAAAAACxAMC42LjAtMzBhNzU2OWSoAgAA"}],["dataout","{\\"a\\":1,\\"b\\":\\"test\\"}"]]}')}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var s=e[i]={id:i,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var i={};(()=>{"use strict";n.r(i),n.d(i,{_package:()=>s,initAutoTests:()=>a,test:()=>r,tests:()=>e.CN});var t=n(6082),e=n(6382),o=(n(5263),n(2697),function(t,e,n,i){return new(n||(n=Promise))(function(o,s){function r(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,a)}l((i=i.apply(t,e||[])).next())})});const s=new t.Package;function r(n,i,s){return o(this,void 0,void 0,function*(){const o=yield(0,e.N$)({category:n,test:i,testContext:s});return t.DataFrame.fromObjects(o)})}function a(){return o(this,void 0,void 0,function*(){yield(0,e.Xb)(s,s.getModule("package-test.js"))})}})(),compute_test=i})();
|
|
2
2
|
//# sourceMappingURL=package-test.js.map
|