/*! For license information please see index.js.LICENSE.txt */
!function(l,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("blockly/core"),require("blockly/dart"),require("blockly/javascript"),require("blockly/lua"),require("blockly/php"),require("blockly/python"));else if("function"==typeof define&&define.amd)define(["blockly/core","blockly/dart","blockly/javascript","blockly/lua","blockly/php","blockly/python"],n);else{var e="object"==typeof exports?n(require("blockly/core"),require("blockly/dart"),require("blockly/javascript"),require("blockly/lua"),require("blockly/php"),require("blockly/python")):n(l.Blockly,l["Blockly.Dart"],l["Blockly.JavaScript"],l["Blockly.Lua"],l["Blockly.PHP"],l["Blockly.Python"]);for(var t in e)("object"==typeof exports?exports:l)[t]=e[t]}}(this,((__WEBPACK_EXTERNAL_MODULE__6370__,__WEBPACK_EXTERNAL_MODULE__3379__,__WEBPACK_EXTERNAL_MODULE__9127__,__WEBPACK_EXTERNAL_MODULE__5157__,__WEBPACK_EXTERNAL_MODULE__6537__,__WEBPACK_EXTERNAL_MODULE__8557__)=>(()=>{var __webpack_modules__={7450:(l,n,e)=>{"use strict";e.d(n,{m:()=>w,M:()=>k});var t=e(6370);t.defineBlocksWithJsonArray([{type:"test_align_dummy_right",message0:"text right %1 long text right %2",args0:[{type:"input_dummy",align:"RIGHT"},{type:"input_dummy",align:"RIGHT"}],style:"math_blocks"},{type:"test_align_all",message0:"text %1 long text left %2 text centre %3 much longer text right %4",args0:[{type:"input_dummy"},{type:"input_dummy",align:"LEFT"},{type:"input_dummy",align:"CENTRE"},{type:"input_dummy",align:"RIGHT"}],style:"math_blocks"},{type:"test_align_with_external_input",message0:"text right %1 long text centre %2 text left %3 much longer text %4",args0:[{type:"input_dummy",align:"RIGHT"},{type:"input_dummy",align:"CENTRE"},{type:"input_dummy",align:"LEFT"},{type:"input_value",name:"VALUE"}],inputsInline:!1,style:"math_blocks"}]),t.defineBlocksWithJsonArray([{type:"test_basic_empty",message0:"",args0:[]},{type:"test_basic_stack",message0:"stack block",previousStatement:null,nextStatement:null,colour:"120"},{type:"test_basic_dummy",message0:"dummy input %1",args0:[{type:"input_dummy"}],style:"math_blocks"},{type:"test_basic_multiple_dummy",message0:"first dummy %1 second dummy %2",args0:[{type:"input_dummy"},{type:"input_dummy"}],style:"math_blocks"},{type:"test_basic_row",message0:"row block %1",args0:[{type:"input_value",name:"INPUT"}],output:null,style:"math_blocks"},{type:"test_basic_value_to_stack",message0:"value to stack",nextStatement:null,output:null,style:"math_blocks"},{type:"test_basic_value_to_statement",message0:"value to statement %1",args0:[{type:"input_statement",name:"STATEMENT"}],output:null,style:"math_blocks"},{type:"test_basic_limit_instances",message0:"limit 3 instances %1 %2",args0:[{type:"input_dummy"},{type:"input_statement",name:"STATEMENT"}],previousStatement:null,nextStatement:null,style:"math_blocks"},{type:"test_basic_tooltips",message0:"%1 %2 %3",args0:[{type:"field_label",name:"NAME",text:"field tooltip",tooltip:"This is a JSON tooltip for the *field*."},{type:"input_dummy"},{type:"field_label",name:"NAME",text:"block tooltip"}],tooltip:"This is a JSON tooltip for the *block*.",style:"math_blocks"},{type:"test_basic_javascript",message0:"function %1(%2) { %3 %4 return %5 }",args0:["foo","args",{type:"input_dummy"},{type:"input_statement",name:"STACK"},{type:"input_value",check:"number",align:"right",name:"RETURN"}],inputsInline:!0,colour:200,tooltip:"Hello world."}]),t.Blocks.test_basic_empty_with_mutator={init:function(){this.setMutator(new t.icons.MutatorIcon(["math_number"],this))},decompose:function(l){const n=l.newBlock("math_number");return n.initSvg(),n},compose:function(){}},t.Blocks.test_chameleon={hasOutput:!0,hasPrevious:!0,init:function(){this.appendDummyInput().appendField("chameleon"),this.setColour(120),this.updateShape()},onchange:function(l){l.type===t.Events.BLOCK_DRAG&&(console.log("got drag event"),this.hasPrevious=!this.outputConnection||!this.outputConnection.targetBlock(),this.hasOutput=!this.getPreviousBlock(),this.updateShape())},updateShape:function(){this.setPreviousStatement(this.hasPrevious),this.setOutput(this.hasOutput)}},t.defineBlocksWithJsonArray([{type:"test_connections_row_input",message0:"%1",args0:[{type:"input_value",name:"NAME"}],colour:"#aaaaaa",tooltip:"No Checks\nCan connect to any output connection."},{type:"test_connections_row_blue",message0:"%1",args0:[{type:"input_value",name:"NAME",check:"greenRel"}],output:"noneOut",colour:230,tooltip:"Output: noneOut\nInput: greenRel\nInput connection can accept yellow blocks but not red blocks."},{type:"test_connections_row_yellow",message0:"%1",args0:[{type:"input_value",name:"NAME",check:["orangeRel","yellowRel"]}],output:["yellowRel","greenRel"],colour:60,tooltip:"Output: yellowRel, greenRel\nInput: yellowRel, orangeRel\nOutput can connect to yellow blocks and blue blocks, but not red blocks.\nInput can connect to yellow blocks and red blocks, but not blue blocks."},{type:"test_connections_row_red",message0:"%1",args0:[{type:"input_value",name:"NAME",check:"noneIn"}],output:"orangeRel",colour:0,tooltip:"Output: orangeRel\nInput: noneIn\nOutput can connect to yellow blocks, but not blue blocks."},{type:"test_connections_row_output",message0:"",output:null,colour:"#aaaaaa",tooltip:"No Checks\nCan connect to any input connection."},{type:"test_connections_multivalue_1valid",message0:"none %1 both %2",args0:[{type:"input_value",name:"NAME1",align:"RIGHT",check:"noneIn"},{type:"input_value",name:"NAME2",align:"RIGHT",check:["yellowRel","orangeRel"]}],output:["yellowRel","greenRel"],colour:60,tooltip:"Output: yellowRel, greenRel\nInput Top: noneIn\nInput Bottom: yellowRel, orangeRel\nOutput can connect to yellow blocks and blue blocks, but not red blocks.\nTop Input can connect to nothing, except grey blocks.\nBottom Input can connect to yellow blocks and red blocks, but not blue blocks."},{type:"test_connections_multivalue_2valid",message0:"both %1 both %2",args0:[{type:"input_value",name:"NAME1",align:"RIGHT",check:["yellowRel","orangeRel"]},{type:"input_value",name:"NAME2",align:"RIGHT",check:["yellowRel","orangeRel"]}],output:["yellowRel","greenRel"],colour:60,tooltip:"Output: yellowRel, greenRel\nInput Top: yellowRel, orangeRel\nInput Bottom: yellowRel, orangeRel\nOutput can connect to yellow blocks and blue blocks, but not red blocks.\nTop Input can connect to yellow blocks and red blocks, but not blue blocks.\nBottom Input can connect to yellow blocks and red blocks, but not blue blocks."}]);const u=function(l){const n=l.getTargetWorkspace();t.Xml.domToWorkspace(t.utils.xml.textToDom('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),n)};t.defineBlocksWithJsonArray([{type:"test_connections_stack_next",message0:"",nextStatement:null,colour:"#aaaaaa",tooltip:"No Checks\nCan connect to any previous connection."},{type:"test_connections_stack_blue",message0:"",previousStatement:"nonePrev",nextStatement:"greenRel",colour:230,tooltip:"Prev: nonePrev\nNext: greenRel\nNext connection can accept yellow blocks but not red blocks."},{type:"test_connections_stack_yellow",message0:"",previousStatement:["greenRel","yellowRel"],nextStatement:["yellowRel","orangeRel"],colour:60,tooltip:"Prev: yellowRel, greenRel\nNext: yellowRel, orangeRel\nPrev can connect to yellow blocks and blue blocks, but not red blocks.\nNext can connect to yellow blocks and red blocks, but not blue blocks."},{type:"test_connections_stack_red",message0:"",previousStatement:"orangeRel",nextStatement:"noneNext",colour:0,tooltip:"Prev: orangeRel\nNext: noneNext\nPrev can connect to yellow blocks, but not blue blocks."},{type:"test_connections_stack_prev",message0:"",previousStatement:null,colour:"#aaaaaa",tooltip:"No Checks\nCan connect to any input connection."}]);const o=function(l){const n=l.getTargetWorkspace();t.Xml.domToWorkspace(t.utils.xml.textToDom('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),n)};t.defineBlocksWithJsonArray([{type:"test_connections_statement_blue",message0:"%1",args0:[{type:"input_statement",name:"NAME",check:"greenRel"}],previousStatement:"nonePrev",nextStatement:"greenRel",colour:230,tooltip:"Prev: nonePrev\nNext: greenRel\nStatement: greenRel\nNext connection can accept yellow blocks but not red blocks.\nStatement connection can accept yellow blocks but not red blocks."},{type:"test_connections_statement_yellow",message0:"%1",args0:[{type:"input_statement",name:"NAME",check:["yellowRel","orangeRel"]}],previousStatement:["greenRel","yellowRel"],nextStatement:["yellowRel","orangeRel"],colour:60,tooltip:"Prev: yellowRel, greenRel\nNext: yellowRel, orangeRel\nStatement: orangeRel\nPrev can connect to yellow blocks and blue blocks, but not red blocks.\nNext can connect to yellow blocks and red blocks, but not blue blocks.\nStatement connection can accept yellow blocks and red blocks but not blue blocks.\n"},{type:"test_connections_statement_red",message0:"%1",args0:[{type:"input_statement",name:"NAME",check:"noneNext"}],previousStatement:"orangeRel",nextStatement:"noneNext",colour:0,tooltip:"Prev: orangeRel\nNext: noneNext\nStatement: noneNext\nPrev connection can accept yellow blocks but not blue blocks.\nStatement connection accepts none."},{type:"test_connections_statement_nonext",message0:"%1",args0:[{type:"input_statement",name:"NAME",check:["yellowRel","orangeRel"]}],previousStatement:["greenRel","yellowRel"],colour:60,tooltip:"Prev: yellowRel, greenRel\nNext: yellowRel, orangeRel\nStatement: orangeRel\nPrev can connect to yellow blocks and blue blocks, but not red blocks.\nStatement connection can accept yellow blocks and red blocks but not blue blocks.\n"},{type:"test_connections_multistatement_1valid",message0:"none %1 both %2",args0:[{type:"input_statement",name:"NAME",check:"noneNext"},{type:"input_statement",name:"NAME",check:["yellowRel","orangeRel"]}],previousStatement:["greenRel","yellowRel"],colour:60,tooltip:"Prev: yellowRel, greenRel\nNext: yellowRel, orangeRel\nStatement: orangeRel\nPrev can connect to yellow blocks and blue blocks, but not red blocks.\nTop Statement cannot connect to anything, except grey blocks.\nBottom Statement connection can accept yellow blocks and red blocks but not blue blocks.\n"},{type:"test_connections_multistatement_2valid",message0:"both %1 both %2",args0:[{type:"input_statement",name:"NAME",check:["yellowRel","orangeRel"]},{type:"input_statement",name:"NAME",check:["yellowRel","orangeRel"]}],previousStatement:["greenRel","yellowRel"],colour:60,tooltip:"Prev: yellowRel, greenRel\nNext: yellowRel, orangeRel\nStatement: orangeRel\nPrev can connect to yellow blocks and blue blocks, but not red blocks.\nTop Statement connection can accept yellow blocks and red blocks but not blue blocks.\nBottom Statement connection can accept yellow blocks and red blocks but not blue blocks.\n"}]);const r=function(l){const n=l.getTargetWorkspace();t.Xml.domToWorkspace(t.utils.xml.textToDom('\n \n \n \n \n \n \n \n \n \n \n \n \n \n'),n)},i={kind:"CATEGORY",name:"Connections",expanded:"true",contents:[{kind:"CATEGORY",name:"Row",contents:[{kind:"LABEL",text:"blocks have"},{kind:"SEP",gap:"-1"},{kind:"LABEL",text:"tooltips"},{kind:"BUTTON",text:"insert",callbackkey:"insertConnectionRows"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_row_input"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_row_blue"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_row_yellow"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_row_red"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_row_output"},{kind:"BLOCK",blockxml:'\n\n \n \n \n \n'},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_multivalue_1valid"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_multivalue_2valid"}]},{kind:"CATEGORY",name:"Stack",contents:[{kind:"LABEL",text:"blocks have"},{kind:"SEP",gap:"-1"},{kind:"LABEL",text:"tooltips"},{kind:"BUTTON",text:"insert",callbackkey:"insertConnectionStacks"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_stack_next"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_stack_blue"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_stack_yellow"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_stack_red"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_stack_prev"},{kind:"BLOCK",blockxml:'\n\n \n \n \n'}]},{kind:"CATEGORY",name:"Statement",contents:[{kind:"LABEL",text:"blocks have"},{kind:"SEP",gap:"-1"},{kind:"LABEL",text:"tooltips"},{kind:"BUTTON",text:"insert",callbackkey:"insertConnectionStatements"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_statement_blue"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_statement_yellow"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_statement_red"},{kind:"BLOCK",type:"test_connections_statement_nonext"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_multistatement_1valid"},{kind:"SEP",gap:"7"},{kind:"BLOCK",type:"test_connections_multistatement_2valid"}]}]};t.Blocks.drag_to_dupe={init:function(){this.setOutput(!0,null),this.appendDummyInput().appendField("drag to dupe"),this.setDragStrategy(new a(this))}};class a{constructor(l){this.block=l}isMovable(){return!0}startDrag(l){const n=this.block.toCopyData();this.copy=t.clipboard.paste(n,this.block.workspace),this.baseStrat=new t.dragging.BlockDragStrategy(this.copy),this.baseStrat.startDrag(l)}drag(l){this.baseStrat.drag(l)}endDrag(l){this.baseStrat.endDrag(l)}revertDrag(l){this.copy.dispose()}}t.defineBlocksWithJsonArray([{type:"test_fields_text_input",message0:"text input %1",args0:[{type:"field_input",name:"TEXT_INPUT",text:"default"}],style:"math_blocks",tooltip:"",helpUrl:""},{type:"test_fields_only_text_input",message0:"%1",args0:[{type:"field_input",name:"TEXT_INPUT",text:"default"}],style:"textInput",tooltip:"",helpUrl:"",output:"String"},{type:"test_fields_checkbox",message0:"checkbox %1",args0:[{type:"field_checkbox",name:"CHECKBOX",checked:!0}],style:"math_blocks",tooltip:"",helpUrl:""},{type:"test_fields_variable",message0:"variable %1",args0:[{type:"field_variable",name:"VARIABLE",variable:"item"}],style:"math_blocks",tooltip:"",helpUrl:""},{type:"test_fields_label_serializable",message0:"label serializable %1",args0:[{type:"field_label_serializable",name:"LABEL",text:"default"}],style:"math_blocks",tooltip:"",helpUrl:""},{type:"test_fields_image",message0:"image %1",args0:[{type:"field_image",name:"IMAGE",src:"https://blockly-demo.appspot.com/static/tests/media/a.png",width:32,height:32,alt:"A"}],colour:230}]),t.defineBlocksWithJsonArray([{type:"test_numbers_float",message0:"float %1",args0:[{type:"field_number",name:"NUM",text:"0"}],style:"math_blocks",output:"Number",tooltip:"A number."},{type:"test_numbers_whole",message0:"precision 1 %1",args0:[{type:"field_number",name:"NUM",precision:1,text:"0"}],style:"math_blocks",output:"Number",tooltip:"The number should be rounded to multiples of 1"},{type:"test_numbers_hundredths",message0:"precision 0.01 %1",args0:[{type:"field_number",name:"NUM",precision:.01,text:"0"}],style:"math_blocks",output:"Number",tooltip:"The number should be rounded to multiples of 0.01"},{type:"test_numbers_halves",message0:"precision 0.5 %1",args0:[{type:"field_number",name:"NUM",precision:.5,text:"0"}],style:"math_blocks",output:"Number",tooltip:"The number should be rounded to multiples of 0.5"},{type:"test_numbers_three_halves",message0:"precision 1.5 %1",args0:[{type:"field_number",name:"NUM",precision:1.5,text:"0"}],style:"math_blocks",output:"Number",tooltip:"The number should be rounded to multiples of 1.5"},{type:"test_numbers_whole_bounded",message0:"midi note %1",args0:[{type:"field_number",name:"NOTE",precision:1,min:1,max:127,text:"0"}],style:"math_blocks",output:"Note",tooltip:"A midi note."}]);t.defineBlocksWithJsonArray([{type:"test_dropdowns_long",message0:"long: %1",args0:[{type:"field_dropdown",name:"FIELDNAME",options:[["first item","ITEM1"],["second item","ITEM2"],["third item","ITEM3"],["fourth item","ITEM4"],["fifth item","ITEM5"],["sixth item","ITEM6"],["seventh item","ITEM7"],["eighth item","ITEM8"],["ninth item","ITEM9"],["tenth item","ITEM10"],["eleventh item","ITEM11"],["twelfth item","ITEM12"],["thirteenth item","ITEM13"],["fourteenth item","ITEM14"],["fifteenth item","ITEM15"],["sixteenth item","ITEM16"],["seventeenth item","ITEM17"],["eighteenth item","ITEM18"],["nineteenth item","ITEM19"],["twentieth item","ITEM20"],["twenty-first item","ITEM21"],["twenty-second item","ITEM22"],["twenty-third item","ITEM23"],["twenty-fourth item","ITEM24"],["twenty-fifth item","ITEM25"],["twenty-sixth item","ITEM26"],["twenty-seventh item","ITEM27"],["twenty-eighth item","ITEM28"],["twenty-ninth item","ITEM29"],["thirtieth item","ITEM30"],["thirty-first item","ITEM31"],["thirty-second item","ITEM32"]]}]},{type:"test_dropdowns_images",message0:"%1",args0:[{NOTE:"The following paths are relative to playground.html",type:"field_dropdown",name:"FIELDNAME",options:[[{src:"https://blockly-demo.appspot.com/static/tests/media/a.png",width:32,height:32,alt:"A"},"A"],[{src:"https://blockly-demo.appspot.com/static/tests/media/b.png",width:32,height:32,alt:"B"},"B"],[{src:"https://blockly-demo.appspot.com/static/tests/media/c.png",width:32,height:32,alt:"C"},"C"],[{src:"https://blockly-demo.appspot.com/static/tests/media/d.png",width:32,height:32,alt:"D"},"D"],[{src:"https://blockly-demo.appspot.com/static/tests/media/e.png",width:32,height:32,alt:"E"},"E"],[{src:"https://blockly-demo.appspot.com/static/tests/media/f.png",width:32,height:32,alt:"F"},"F"],[{src:"https://blockly-demo.appspot.com/static/tests/media/g.png",width:32,height:32,alt:"G"},"G"],[{src:"https://blockly-demo.appspot.com/static/tests/media/h.png",width:32,height:32,alt:"H"},"H"],[{src:"https://blockly-demo.appspot.com/static/tests/media/i.png",width:32,height:32,alt:"I"},"I"],[{src:"https://blockly-demo.appspot.com/static/tests/media/j.png",width:32,height:32,alt:"J"},"J"],[{src:"https://blockly-demo.appspot.com/static/tests/media/k.png",width:32,height:32,alt:"K"},"K"],[{src:"https://blockly-demo.appspot.com/static/tests/media/l.png",width:32,height:32,alt:"L"},"L"],[{src:"https://blockly-demo.appspot.com/static/tests/media/m.png",width:32,height:32,alt:"M"},"M"]]}]},{type:"test_dropdowns_images_and_text",message0:"%1",args0:[{type:"field_dropdown",name:"FIELDNAME",options:[["images and text","IMAGES AND TEXT"],[{src:"https://blockly-demo.appspot.com/static/tests/media/a.png",width:32,height:32,alt:"A"},"A"],[{src:"https://blockly-demo.appspot.com/static/tests/media/b.png",width:32,height:32,alt:"B"},"B"],[{src:"https://blockly-demo.appspot.com/static/tests/media/c.png",width:32,height:32,alt:"C"},"C"],[{src:"https://blockly-demo.appspot.com/static/tests/media/d.png",width:32,height:32,alt:"D"},"D"],[{src:"https://blockly-demo.appspot.com/static/tests/media/e.png",width:32,height:32,alt:"E"},"E"],[{src:"https://blockly-demo.appspot.com/static/tests/media/f.png",width:32,height:32,alt:"F"},"F"],[{src:"https://blockly-demo.appspot.com/static/tests/media/g.png",width:32,height:32,alt:"G"},"G"],[{src:"https://blockly-demo.appspot.com/static/tests/media/h.png",width:32,height:32,alt:"H"},"H"],["xyz","LMNOP"],[{src:"https://blockly-demo.appspot.com/static/tests/media/i.png",width:32,height:32,alt:"I"},"I"],[{src:"https://blockly-demo.appspot.com/static/tests/media/j.png",width:32,height:32,alt:"J"},"J"],[{src:"https://blockly-demo.appspot.com/static/tests/media/k.png",width:32,height:32,alt:"K"},"K"],[{src:"https://blockly-demo.appspot.com/static/tests/media/l.png",width:32,height:32,alt:"L"},"L"],[{src:"https://blockly-demo.appspot.com/static/tests/media/m.png",width:32,height:32,alt:"M"},"M"]]}]},{type:"test_dropdowns_in_mutator",message0:"dropdown mutator",mutator:"test_dropdown_mutator"},{type:"test_dropdowns_in_mutator_block",message0:"dropdown %1",args0:[{type:"field_dropdown",name:"DROPDOWN",options:[["option","ONE"],["option","TWO"]]}]}]);const s=[],c=function(){t.dialog.prompt("Add an option?","option "+s.length,(function(l){l&&(console.log("Adding option: "+l),s.push([l,"OPTION"+s.length]))}))},d=function(){const l=s[0]?s[0][0]:"";t.dialog.prompt("Remove an option?",l,(function(l){for(let n,e=0;n=s[e];e++)n[0]==l&&(console.log("Removing option: "+l),s.splice(e,1))}))};t.Blocks.test_dropdowns_dynamic_random={init:function(){const l=new t.FieldDropdown(this.dynamicOptions);this.appendDummyInput().appendField("dynamic random").appendField(l,"OPTIONS")},dynamicOptions:function(){const l=Math.floor(10*Math.random())+1,n=[];for(let e=0;e null").appendField(new t.FieldTextInput("default",this.validate),"INPUT"),this.setColour(230),this.setCommentText("Upon detecting a 'b' character the input will validated to null (invalid). Upon removal it should revert to being valid. The display text will remain the input text, but if the input text is invalid the value should be the default text.")},validate:function(l){return-1!==l.indexOf("b")?null:l}},t.Blocks.test_validators_checkbox_null={init:function(){this.appendDummyInput().appendField("always null").appendField(new t.FieldCheckbox(!0,this.validate),"INPUT"),this.setColour(230),this.setCommentText("The new input always validates to null (invalid). This means that the field value should not change.")},validate:function(l){return null}},t.Blocks.test_validators_checkbox_match={init:function(){this.appendDummyInput().appendField("force match").appendField(new t.FieldCheckbox(!0),"MATCH").appendField(new t.FieldCheckbox(!0,this.validate),"INPUT"),this.setColour(230),this.setCommentText("The validator for this block only works on the end-most checkbox. The validator will always return the value of the start-most checkbox. Therefore they should always match.")},validate:function(l){return this.sourceBlock_.getFieldValue("MATCH")}},t.Blocks.test_validators_checkbox_not_match_null={init:function(){this.appendDummyInput().appendField("not match -> null").appendField(new t.FieldCheckbox(!0),"MATCH").appendField(new t.FieldCheckbox(!0,this.validate),"INPUT"),this.setColour(230),this.setCommentText("The validator for this block only works on the end-most checkbox. If the new value does not match the value of the start-most checkbox, it will return null (invalid), which means the field value should not change. Therefore they should always match.")},validate:function(l){return this.sourceBlock_.getFieldValue("MATCH")!=l?null:l}},t.Blocks.test_validators_dropdown_null={init:function(){this.appendDummyInput().appendField("always null").appendField(new t.FieldDropdown([["1a","1A"],["1b","1B"],["1c","1C"],["2a","2A"],["2b","2B"],["2c","2C"]],this.validate),"INPUT"),this.setColour(230),this.setCommentText("All input validates to null (invalid). This means the field value should not change.")},validate:function(l){return null}},t.Blocks.test_validators_dropdown_force_1s={init:function(){this.appendDummyInput().appendField("force 1s").appendField(new t.FieldDropdown([["1a","1A"],["1b","1B"],["1c","1C"],["2a","2A"],["2b","2B"],["2c","2C"]],this.validate),"INPUT"),this.setColour(230),this.setCommentText("The input's value will always change to start with 1.")},validate:function(l){return"1"+l.charAt(1)}},t.Blocks.test_validators_dropdown_1s_null={init:function(){this.appendDummyInput().appendField("not 1s -> null").appendField(new t.FieldDropdown([["1a","1A"],["1b","1B"],["1c","1C"],["2a","2A"],["2b","2B"],["2c","2C"]],this.validate),"INPUT"),this.setColour(230),this.setCommentText("If the input does not start with 1, the input will validate to null (invalid). Otherwise it will return the input value.")},validate:function(l){return"1"!=l.charAt(0)?null:l}},t.Blocks.test_validators_number_null={init:function(){this.appendDummyInput().appendField("always null").appendField(new t.FieldNumber(123,null,null,null,this.validate),"INPUT"),this.setColour(230),this.setCommentText("All input validates to null (invalid). The field will display the input while the field is being edited, but the value should be the default value. The input should be red after the first keystroke.")},validate:function(l){return null}},t.Blocks.test_validators_number_mult10_force={init:function(){this.appendDummyInput().appendField("force mult of 10").appendField(new t.FieldNumber(123,null,null,null,this.validate),"INPUT"),this.setColour(230),this.setCommentText("The input value will be rounded to the nearest multiple of 10. The field will display the input while the field is being edited, but the value should be the validated (rounded) value. Note: If you want to do rounding this is not the proper way, use the precision option of the number field constructor instead.")},validate:function(l){return 10*Math.round(l/10)}},t.Blocks.test_validators_number_mult10_null={init:function(){this.appendDummyInput().appendField("not mult of 10 -> null").appendField(new t.FieldNumber(123,null,null,null,this.validate),"INPUT"),this.setColour(230),this.setCommentText("If the input value is not a multiple of 10, the input will validate to null (invalid). The field will display the input while the field is being edited, but if the input value is invalid the value should be the default value.")},validate:function(l){return l%10!=0?null:l}},t.Blocks.test_validators_variable_null={init:function(){this.appendDummyInput().appendField("always null").appendField(new t.FieldVariable("1a",this.validate),"INPUT"),this.setColour(230),this.setCommentText("All ids validate to null (invalid). This means the variable should not change.")},validate:function(l){return null}},t.Blocks.test_validators_variable_force_1s={init:function(){this.appendDummyInput().appendField("force 1s").appendField(new t.FieldVariable("1a",this.validate),"INPUT"),this.setColour(230),this.setCommentText("The id will always change to start with 1.")},validate:function(l){return"1"+l.charAt(1)}},t.Blocks.test_validators_variable_1s_null={init:function(){this.appendDummyInput().appendField("not 1s -> null").appendField(new t.FieldVariable("1a",this.validate),"INPUT"),this.setColour(230),this.setCommentText("If the id does not start with 1, the id will validate to null (invalid). Otherwise it will return the id.")},validate:function(l){return"1"!=l.charAt(0)?null:l}};const f={kind:"CATEGORY",name:"Fields",expanded:"true",contents:[{kind:"CATEGORY",name:"Defaults",contents:[{kind:"BUTTON",text:"add blocks to workspace",callbackkey:"addAllBlocksToWorkspace"},{kind:"SEP",gap:"8"},{kind:"BUTTON",text:"set random style",callbackkey:"setRandomStyle"},{kind:"SEP",gap:"8"},{kind:"BUTTON",text:"toggle enabled",callbackkey:"toggleEnabled"},{kind:"SEP",gap:"8"},{kind:"BUTTON",text:"toggle shadow",callbackkey:"toggleShadow"},{kind:"SEP",gap:"8"},{kind:"BUTTON",text:"toggle collapsed",callbackkey:"toggleCollapsed"},{kind:"BLOCK",type:"test_fields_checkbox"},{kind:"BLOCK",type:"test_fields_text_input"},{kind:"BLOCK",type:"test_fields_only_text_input"},{kind:"BLOCK",type:"test_fields_variable"},{kind:"BUTTON",text:"randomize label text",callbackkey:"randomizeLabelText"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_fields_label_serializable"},{kind:"BUTTON",text:"change image",callbackkey:"changeImage"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_fields_image"}]},{kind:"CATEGORY",name:"Numbers",contents:[{kind:"BLOCK",blockxml:'\n\n 123.456\n'},{kind:"BLOCK",blockxml:'\n\n 123.456\n'},{kind:"BLOCK",blockxml:'\n\n 123.456\n'},{kind:"BLOCK",blockxml:'\n\n 123.456\n'},{kind:"BLOCK",blockxml:'\n\n 123.456\n'},{kind:"BLOCK",blockxml:'\n\n 60\n'}]},{kind:"CATEGORY",name:"Drop-downs",contents:[{kind:"LABEL",text:"Dynamic"},{kind:"BLOCK",type:"test_dropdowns_dynamic"},{kind:"BUTTON",text:"Add option",callbackkey:"addDynamicOption"},{kind:"BUTTON",text:"Remove option",callbackkey:"removeDynamicOption"},{kind:"BLOCK",type:"test_dropdowns_dynamic_random"},{kind:"BLOCK",type:"test_dropdowns_dynamic_connect_dependant"},{kind:"LABEL",text:"Other"},{kind:"BLOCK",type:"test_dropdowns_long"},{kind:"BLOCK",type:"test_dropdowns_images"},{kind:"BLOCK",type:"test_dropdowns_images_and_text"}]},{kind:"CATEGORY",name:"Images",contents:[{kind:"BLOCK",type:"test_images_datauri"},{kind:"BLOCK",type:"test_images_small"},{kind:"BLOCK",type:"test_images_large"},{kind:"BLOCK",type:"test_images_fliprtl"},{kind:"BLOCK",type:"test_images_missing"},{kind:"BLOCK",type:"test_images_many_icons"},{kind:"BLOCK",type:"test_images_clickhandler"}]},{kind:"CATEGORY",name:"Emoji! o((*^ᴗ^*))o",contents:[{kind:"LABEL",text:"Unicode & Emojis"},{kind:"BLOCK",type:"test_style_emoji"},{kind:"BLOCK",blockxml:'\n\n Robot face in text field:🤖\n'},{kind:"BLOCK",blockxml:'\n\n Zalgo in text field:B̛̻̦̬̘̰͎̥̈̔͊͞ͅl̡͖̫̺̬̖̣̳̃̀́͑͑̕͟͠͝o̢̹͙̮̫͔͋̉̊̑̿̽̚c̸̹̹̜͙̹̠͋̒͑̊̇͝k̡͉̫͇̖̳͖̊͒́̆̄̎̂̔̕͜͞l̰̙̞̳̩̠͖̯̀̆̈́̿̈̓͗y̨̡̟͇̮͈̬̙̲̏̅̀͘͠\n'}]},{kind:"CATEGORY",name:"Validators",contents:[{kind:"BUTTON",text:"add blocks to workspace",callbackkey:"addAllBlocksToWorkspace"},{kind:"SEP",gap:"8"},{kind:"BUTTON",text:"set input",callbackkey:"setInput"},{kind:"LABEL",text:"Dispose block"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_dispose_block"},{kind:"LABEL",text:"Checkboxes"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_checkbox_null"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_checkbox_match"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_checkbox_not_match_null"},{kind:"LABEL",text:"Dropdowns"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_dropdown_null"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_dropdown_force_1s"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_dropdown_1s_null"},{kind:"LABEL",text:"Numbers"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_number_null"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_number_mult10_force"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_number_mult10_null"},{kind:"LABEL",text:"Text"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_text_null"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_text_A"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_text_B"},{kind:"LABEL",text:"Variables"},{kind:"SEP",gap:"8"},{kind:"BUTTON",text:"add test variables",callbackkey:"addVariables","web-class":"modifiesWorkspace"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_variable_null"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_variable_force_1s"},{kind:"SEP",gap:"12"},{kind:"BLOCK",type:"test_validators_variable_1s_null"}]}]};t.defineBlocksWithJsonArray([{type:"test_mutator_textChange",message0:"mutator text: %1",args0:[{type:"field_input",name:"MUTATOR_TEXT",text:"a label"}],style:"colour_blocks"}]);const h={mutationToDom:function(){const l=t.utils.xml.createElement("mutation");return l.setAttribute("arbitrary",this.getFieldValue("LABEL")),l},domToMutation:function(l){this.setFieldValue(l.getAttribute("arbitrary"),"LABEL")},saveExtraState:function(){return{arbitrary:this.getFieldValue("LABEL")}},loadExtraState:function(l){this.setFieldValue(l.arbitrary,"LABEL")},decompose:function(l){const n=t.serialization.blocks.append({type:"test_mutator_textChange"},l);return n.getField("MUTATOR_TEXT").setValue(this.getFieldValue("LABEL")),n},compose:function(l){this.setFieldValue(l.getFieldValue("MUTATOR_TEXT"),"LABEL")}},m=[];for(let l=0;l<20;l++)m.push(`test_mutator_category_${l}`);const y=m.map((l=>({type:l,message0:"mutator text: %1",args0:[{type:"field_input",name:"MUTATOR_TEXT",text:"a label"}],style:"colour_blocks"})));t.defineBlocksWithJsonArray([{type:"test_mutators_many",message0:"test many blocks mutator %1",args0:[{type:"field_label",name:"LABEL",text:"changeable label"}],mutator:"test_many_blocks_mutator",colour:"#000000"},...y]),t.Extensions.registerMutator("test_many_blocks_mutator",h,null,[...m]),t.defineBlocksWithJsonArray([{type:"test_mutators_noflyout",message0:"noflyout mutator %1",args0:[{type:"field_label",name:"LABEL",text:"changeable label"}],mutator:"test_noflyout_mutator",colour:"#000000"}]),t.Extensions.registerMutator("test_noflyout_mutator",h,null,[]),t.defineBlocksWithJsonArray([{type:"test_mutators_changeableFlyout",message0:"changeable flyout mutator %1",args0:[{type:"field_label",name:"LABEL",text:"changeable label"}],mutator:"test_changeableFlyout_mutator",colour:"#000000"}]),t.Extensions.registerMutator("test_changeableFlyout_mutator",h,null,["text"]),t.defineBlocksWithJsonArray([{type:"test_style_hat",message0:"Hat block (event)",nextStatement:null,style:"hat_blocks"},{type:"test_style_hex1",message0:"Block color: Bright purple %1 %2 %3 %4",args0:[{type:"field_input",name:"TEXT",text:"#992aff"},{type:"field_dropdown",name:"DROPDOWN",options:[["option","ONE"],["option","TWO"]]},{type:"field_checkbox",name:"NAME",checked:!0},{type:"input_value",name:"NAME"}],previousStatement:null,nextStatement:null,colour:"#992aff"},{type:"test_style_hex2",message0:"Block color: White %1 %2 %3 %4",args0:[{type:"field_input",name:"TEXT",text:"#fefefe"},{type:"field_dropdown",name:"DROPDOWN",options:[["option","ONE"],["option","TWO"]]},{type:"field_checkbox",name:"NAME",checked:!0},{type:"input_value",name:"NAME"}],previousStatement:null,nextStatement:null,colour:"#fefefe"},{type:"test_style_hex3",message0:"Block color: Black %1 %2 %3 %4",args0:[{type:"field_input",name:"TEXT",text:"#010101"},{type:"field_dropdown",name:"DROPDOWN",options:[["option","ONE"],["option","TWO"]]},{type:"field_checkbox",name:"NAME",checked:!0},{type:"input_value",name:"NAME"}],previousStatement:null,nextStatement:null,colour:"#010101"},{type:"test_style_no_colour",message0:"Block color: unset"},{type:"test_style_hex4",message0:"Block color: #RRGGBBAA (invalid)",colour:"#992aff99"},{type:"test_style_hex5",message0:"Block color: #RRGGBB (invalid)",colour:"#NotHex"},{type:"test_style_emoji",message0:"Robot Face: 🤖",colour:"#AAAAAA"}]);class g extends t.FieldLabel{constructor(l,n,e){super(l,n,e),this.EDITABLE=!1,this.SERIALIZABLE=!0}}g.fromJson=function(l){return new this(t.utils.parsing.replaceMessageReferences(l.text),void 0,l)},t.fieldRegistry.register("field_no_overrides",g);class b extends t.FieldLabel{constructor(l,n,e){super(l,n,e),this.EDITABLE=!1,this.SERIALIZABLE=!0}toXml(l){return l.setAttribute("value",this.getValue()),l}fromXml(l){this.setValue(l.getAttribute("value"))}}b.fromJson=function(l){return new this(t.utils.parsing.replaceMessageReferences(l.text),void 0,l)},t.fieldRegistry.register("field_xml",b);class v extends t.FieldLabel{constructor(l,n,e){super(l,n,e),this.EDITABLE=!1,this.SERIALIZABLE=!0}saveState(){return{value:this.getValue()}}loadState(l){this.setValue(l.value)}}v.fromJson=function(l){return new this(t.utils.parsing.replaceMessageReferences(l.text),void 0,l)},t.fieldRegistry.register("field_jso",v);class _ extends t.FieldLabel{constructor(l,n,e){super(l,n,e),this.EDITABLE=!1,this.SERIALIZABLE=!0}toXml(l){return l.setAttribute("value",this.getValue()),l}fromXml(l){this.setValue(l.getAttribute("value"))}saveState(){return{value:this.getValue()}}loadState(l){this.setValue(l.value)}}_.fromJson=function(l){return new this(t.utils.parsing.replaceMessageReferences(l.text),void 0,l)},t.fieldRegistry.register("field_both",_),t.defineBlocksWithJsonArray([{type:"test_field_serialization_no_overrides",message0:"no overrides: %1",args0:[{type:"field_no_overrides",name:"LABEL",text:"test"}],colour:0,output:null},{type:"test_field_serialization_xml",message0:"xml: %1",args0:[{type:"field_xml",name:"LABEL",text:"test"}],colour:30,output:null},{type:"test_field_serialization_jso",message0:"jso: %1",args0:[{type:"field_jso",name:"LABEL",text:"test"}],colour:90,output:null},{type:"test_field_serialization_both",message0:"both: %1",args0:[{type:"field_both",name:"LABEL",text:"test"}],colour:150,output:null}]),t.Blocks.test_extra_state_xml=Object.assign({},t.Blocks.lists_create_with),delete t.Blocks.test_extra_state_xml.saveExtraState,delete t.Blocks.test_extra_state_xml.loadExtraState,t.Blocks.test_extra_state_xml.init=function(){this.setColour(30),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Array"),this.setMutator(new t.icons.MutatorIcon(["lists_create_with_item"],this))},t.Blocks.test_extra_state_jso=Object.assign({},t.Blocks.lists_create_with),delete t.Blocks.test_extra_state_jso.mutationToDom,delete t.Blocks.test_extra_state_jso.domToMutation,t.Blocks.test_extra_state_jso.init=function(){this.setColour(90),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Array"),this.setMutator(new t.icons.MutatorIcon(["lists_create_with_item"],this))},t.Blocks.test_extra_state_both=Object.assign({},t.Blocks.lists_create_with),t.Blocks.test_extra_state_both.init=function(){this.setColour(150),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Array"),this.setMutator(new t.icons.MutatorIcon(["lists_create_with_item"],this))};const w={contents:[{kind:"CATEGORY",name:"Align",contents:[{kind:"BLOCK",type:"test_align_dummy_right"},{kind:"BLOCK",type:"test_align_all"},{kind:"BLOCK",type:"test_align_with_external_input"}]},{kind:"CATEGORY",name:"Basic",contents:[{kind:"BLOCK",type:"test_basic_empty"},{kind:"BLOCK",type:"test_basic_empty_with_mutator"},{kind:"BLOCK",type:"test_basic_dummy"},{kind:"BLOCK",type:"test_basic_multiple_dummy"},{kind:"BLOCK",type:"test_basic_stack"},{kind:"BLOCK",type:"test_basic_row"},{kind:"BLOCK",type:"test_basic_value_to_stack"},{kind:"BLOCK",type:"test_basic_value_to_statement"},{kind:"BLOCK",type:"test_basic_limit_instances"},{kind:"BLOCK",type:"test_basic_tooltips"},{kind:"BLOCK",type:"test_basic_javascript"}]},{kind:"CATEGORY",name:"Chameleon",contents:[{kind:"BLOCK",type:"test_chameleon"}]},i,{kind:"CATEGORY",name:"Drag",contents:[{kind:"LABEL",text:"Drag each to the workspace"},{kind:"BLOCK",blockxml:'\n\n \n \n Drag me by this child\n \n \n'},{kind:"BLOCK",blockxml:'\n\n \n \n Drag me by this shadow\n \n \n'},{kind:"BLOCK",blockxml:'\n\n \n \n Shadow value\n \n \n \n \n \n \n Shadow statement\n \n \n \n \n'},{kind:"LABEL",text:"Multiple Variable Refs"},{kind:"BLOCK",blockxml:'\n\n \n \n item\n \n \n \n \n \n \n item\n \n \n \n \n'},{kind:"LABEL",text:"Procedure Definitions"},{kind:"BLOCK",blockxml:'\n\n without arguments\n \n \n \n \n No argument reference.\n \n \n \n \n'},{kind:"BLOCK",blockxml:'\n\n \n with one argument\n \n \n \n \n Expected an argument reference here.\n \n \n fnArgument\n \n \n \n \n'},{kind:"BLOCK",type:"drag_to_dupe"},{kind:"BLOCK",type:"text_print",inputs:{TEXT:{shadow:{type:"drag_to_dupe"}}}}]},f,{kind:"CATEGORY",name:"Mutators",contents:[{kind:"LABEL",text:"logic_compare"},{kind:"BLOCK",type:"logic_compare",inputs:{A:{shadow:{type:"math_number",fields:{NUM:10}}},B:{shadow:{type:"math_number",fields:{NUM:10}}}}},{kind:"BLOCK",type:"logic_compare",inputs:{A:{block:{type:"math_number",fields:{NUM:10}}},B:{block:{type:"math_number",fields:{NUM:10}}}}},{kind:"BLOCK",type:"test_mutators_noflyout"},{kind:"BLOCK",type:"test_mutators_many"},{kind:"BLOCK",type:"test_mutators_changeableFlyout"}]},{kind:"CATEGORY",name:"Style",contents:[{kind:"LABEL",text:"Hats"},{kind:"BLOCK",type:"test_style_hat"},{kind:"LABEL",text:"Colour"},{kind:"BLOCK",type:"test_style_hex1"},{kind:"BLOCK",type:"test_style_hex2"},{kind:"BLOCK",type:"test_style_hex3"},{kind:"BLOCK",type:"test_style_no_colour"},{kind:"BLOCK",type:"test_style_hex4"},{kind:"BLOCK",type:"test_style_hex5",gap:"40"},{kind:"BLOCK",type:"test_style_hex5",disabled:"true"}]},{kind:"CATEGORY",name:"Serialization",contents:[{kind:"BUTTON",text:"add blocks to workspace",callbackkey:"addAllBlocksToWorkspace"},{kind:"SEP",gap:"8"},{kind:"BUTTON",text:"randomize text",callbackkey:"randomizeText"},{kind:"BLOCK",type:"test_field_serialization_no_overrides"},{kind:"BLOCK",type:"test_field_serialization_xml"},{kind:"BLOCK",type:"test_field_serialization_jso"},{kind:"BLOCK",type:"test_field_serialization_both"},{kind:"SEP",gap:30},{kind:"BLOCK",blockxml:''},{kind:"BLOCK",type:"test_extra_state_jso",extraState:{itemCount:2}},{kind:"BLOCK",type:"test_extra_state_both",extraState:{itemCount:2}},{kind:"SEP",gap:30},{kind:"BLOCK",type:"text_print",inputs:{TEXT:{shadow:{type:"test_field_serialization_no_overrides"}}}},{kind:"BLOCK",type:"text_print",inputs:{TEXT:{shadow:{type:"test_field_serialization_xml"}}}},{kind:"BLOCK",type:"text_print",inputs:{TEXT:{shadow:{type:"test_field_serialization_jso"}}}},{kind:"BLOCK",type:"text_print",inputs:{TEXT:{shadow:{type:"test_field_serialization_both"}}}},{kind:"SEP",gap:30},{kind:"BLOCK",blockxml:''},{kind:"BLOCK",type:"text_print",inputs:{TEXT:{shadow:{type:"test_extra_state_jso",extraState:{itemCount:2}}}}},{kind:"BLOCK",type:"text_print",inputs:{TEXT:{shadow:{type:"test_extra_state_both",extraState:{itemCount:2}}}}}]}]};function k(l){(function(l){!function(l){l.registerButtonCallback("insertConnectionRows",u)}(l),function(l){l.registerButtonCallback("insertConnectionStacks",o)}(l),function(l){l.registerButtonCallback("insertConnectionStatements",r)}(l)})(l),function(l){!function(l){l.registerButtonCallback("randomizeLabelText",(function(l){const n=l.getTargetWorkspace().getBlocksByType("test_fields_label_serializable");for(let l,e=0;l=n[e];e++){let n="";for(let l=0;l<4;l++)n+="AB".charAt(Math.floor(2*Math.random()));l.setFieldValue(n,"LABEL")}})),l.registerButtonCallback("setRandomStyle",(function(n){const e=n.getTargetWorkspace().getFlyout().getWorkspace().getAllBlocks(!1),t=Object.keys(l.getRenderer().getConstants().blockStyles);t.splice(t.indexOf(e[0].getStyleName()),1);const u=t[Math.floor(Math.random()*t.length)];for(let l,n=0;l=e[n];n++)l.setStyle(u)})),l.registerButtonCallback("toggleEnabled",(function(l){const n=l.getTargetWorkspace().getFlyout().getWorkspace().getAllBlocks(!1);for(let l,e=0;l=n[e];e++)l.setEnabled(!l.isEnabled())})),l.registerButtonCallback("toggleShadow",(function(l){const n=l.getTargetWorkspace().getFlyout().getWorkspace().getAllBlocks(!1);for(let l,e=0;l=n[e];e++)l.setShadow(!l.isShadow())})),l.registerButtonCallback("toggleCollapsed",(function(l){const n=l.getTargetWorkspace().getFlyout().getWorkspace().getAllBlocks(!1);for(let l,e=0;l=n[e];e++)l.setCollapsed(!l.isCollapsed())})),l.registerButtonCallback("changeImage",(function(l){const n=l.getTargetWorkspace().getFlyout().getWorkspace().getBlocksByType("test_fields_image"),e="https://blockly-demo.appspot.com/static/tests/media/"+"abcdefghijklm".charAt(Math.floor(13*Math.random()))+".png";for(let l,t=0;l=n[t];t++)l.getField("IMAGE").setValue(e)}))}(l),function(l){l.registerButtonCallback("addDynamicOption",c),l.registerButtonCallback("removeDynamicOption",d)}(l),function(l){l.registerButtonCallback("addVariables",(function(n){l.createVariable("1b","","1B"),l.createVariable("1c","","1C"),l.createVariable("2a","","2A"),l.createVariable("2b","","2B"),l.createVariable("2c","","2C")})),l.registerButtonCallback("setInput",(function(l){t.dialog.prompt("Input text to set.","ab",(function(n){const e=l.getTargetWorkspace().getAllBlocks(!1);for(let l,t=0;l=e[t];t++)l.getField("INPUT")&&l.setFieldValue(n,"INPUT")}))}))}(l)}(l),function(l){l.registerButtonCallback("randomizeText",(function(l){const n=l.getTargetWorkspace(),e=[...n.getBlocksByType("test_field_serialization_no_overrides"),...n.getBlocksByType("test_field_serialization_xml"),...n.getBlocksByType("test_field_serialization_jso"),...n.getBlocksByType("test_field_serialization_both")];for(let l,n=0;l=e[n];n++){let n="";for(let l=0;l<4;l++)n+="ABCDEF".charAt(Math.floor(6*Math.random()));l.setFieldValue(n,"LABEL")}}))}(l),l.registerButtonCallback("addAllBlocksToWorkspace",(function(l){const n=l.getTargetWorkspace(),e=n.getFlyout().getWorkspace().getTopBlocks();for(let l,u=0;l=e[u];u++){const e=t.serialization.blocks.save(l,{addCoordinates:!0});t.serialization.blocks.append(e,n)}}))}},1742:(l,n,e)=>{"use strict";var t=e(6935).every;function u(l,n,e,t){var u=!0;return e!==t.length-1&&(u=n.calledBefore(t[e+1])),!(!function(l,n){return void 0===l[n.id]&&(l[n.id]=0),l[n.id]1?arguments:l,u.bind(null,{}))}},7854:(l,n,e)=>{"use strict";var t=e(7532);l.exports=function(l){return l.constructor&&l.constructor.name||"function"==typeof l.constructor&&t(l.constructor)||null}},1979:(l,n)=>{"use strict";n.wrap=function(l,e){var t=function(){return n.printWarning(e),l.apply(this,arguments)};return l.prototype&&(t.prototype=l.prototype),t},n.defaultMsg=function(l,n){return l+"."+n+" is deprecated and will be removed from the public API in a future version of "+l+"."},n.printWarning=function(l){"object"==typeof process&&process.emitWarning?process.emitWarning(l):console.info?console.info(l):console.log(l)}},8955:l=>{"use strict";l.exports=function(l,n){var e=!0;try{l.forEach((function(){if(!n.apply(this,arguments))throw new Error}))}catch(l){e=!1}return e}},7532:l=>{"use strict";l.exports=function(l){if(!l)return"";try{return l.displayName||l.name||(String(l).match(/function ([^\s(]+)/)||[])[1]}catch(l){return""}}},7529:(l,n,e)=>{"use strict";var t;t=void 0!==e.g?e.g:"undefined"!=typeof window?window:self,l.exports=t},8432:(l,n,e)=>{"use strict";l.exports={global:e(7529),calledInOrder:e(1742),className:e(7854),deprecated:e(1979),every:e(8955),functionName:e(7532),orderByFirstCall:e(1216),prototypes:e(8074),typeOf:e(90),valueToString:e(6713)}},1216:(l,n,e)=>{"use strict";var t=e(6935).sort,u=e(6935).slice;function o(l,n){var e=l.getCall(0),t=n.getCall(0);return(e&&e.callId||-1)<(t&&t.callId||-1)?-1:1}l.exports=function(l){return t(u(l),o)}},6935:(l,n,e)=>{"use strict";var t=e(2101);l.exports=t(Array.prototype)},2101:(l,n,e)=>{"use strict";var t=Function.call,u=e(3472),o=["size","caller","callee","arguments"];u&&o.push("__proto__"),l.exports=function(l){return Object.getOwnPropertyNames(l).reduce((function(n,e){return o.indexOf(e)>-1||"function"!=typeof l[e]||(n[e]=t.bind(l[e])),n}),Object.create(null))}},2960:(l,n,e)=>{"use strict";var t=e(2101);l.exports=t(Function.prototype)},8074:(l,n,e)=>{"use strict";l.exports={array:e(6935),function:e(2960),map:e(5504),object:e(1431),set:e(2170),string:e(1041)}},5504:(l,n,e)=>{"use strict";var t=e(2101);l.exports=t(Map.prototype)},1431:(l,n,e)=>{"use strict";var t=e(2101);l.exports=t(Object.prototype)},2170:(l,n,e)=>{"use strict";var t=e(2101);l.exports=t(Set.prototype)},1041:(l,n,e)=>{"use strict";var t=e(2101);l.exports=t(String.prototype)},3472:l=>{"use strict";let n;try{n=!1}catch(l){n=!0}l.exports=n},90:(l,n,e)=>{"use strict";var t=e(5855);l.exports=function(l){return t(l).toLowerCase()}},6713:l=>{"use strict";l.exports=function(l){return l&&l.toString?l.toString():String(l)}},4182:(module,__unused_webpack_exports,__webpack_require__)=>{var f;f=function(){var define,module,exports;return function l(n,e,t){function u(r,i){if(!e[r]){if(!n[r]){if(o)return o(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var s=e[r]={exports:{}};n[r][0].call(s.exports,(function(l){return u(n[r][1][l]||l)}),s,s.exports,l,n,e,t)}return e[r].exports}for(var o=void 0,r=0;r1?arguments:l,u.bind(null,{}))}},{"./prototypes/array":9}],2:[function(l,n,e){"use strict";var t=l("./function-name");n.exports=function(l){return l.constructor&&l.constructor.name||"function"==typeof l.constructor&&t(l.constructor)||null}},{"./function-name":5}],3:[function(l,n,e){"use strict";e.wrap=function(l,n){var t=function(){return e.printWarning(n),l.apply(this,arguments)};return l.prototype&&(t.prototype=l.prototype),t},e.defaultMsg=function(l,n){return l+"."+n+" is deprecated and will be removed from the public API in a future version of "+l+"."},e.printWarning=function(l){"undefined"!=typeof console&&(console.info?console.info(l):console.log(l))}},{}],4:[function(l,n,e){"use strict";n.exports=function(l,n){var e=!0;try{l.forEach((function(){if(!n.apply(this,arguments))throw new Error}))}catch(l){e=!1}return e}},{}],5:[function(l,n,e){"use strict";n.exports=function(l){return l?l.displayName||l.name||(String(l).match(/function ([^\s(]+)/)||[])[1]:""}},{}],6:[function(l,n,e){"use strict";var t;t=void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof window?window:self,n.exports=t},{}],7:[function(l,n,e){"use strict";n.exports={global:l("./global"),calledInOrder:l("./called-in-order"),className:l("./class-name"),deprecated:l("./deprecated"),every:l("./every"),functionName:l("./function-name"),orderByFirstCall:l("./order-by-first-call"),prototypes:l("./prototypes"),typeOf:l("./type-of"),valueToString:l("./value-to-string")}},{"./called-in-order":1,"./class-name":2,"./deprecated":3,"./every":4,"./function-name":5,"./global":6,"./order-by-first-call":8,"./prototypes":12,"./type-of":17,"./value-to-string":18}],8:[function(l,n,e){"use strict";var t=l("./prototypes/array").sort,u=l("./prototypes/array").slice;function o(l,n){var e=l.getCall(0),t=n.getCall(0);return(e&&e.callId||-1)<(t&&t.callId||-1)?-1:1}n.exports=function(l){return t(u(l),o)}},{"./prototypes/array":9}],9:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Array.prototype)},{"./copy-prototype":10}],10:[function(l,n,e){"use strict";var t=Function.call;n.exports=function(l){return Object.getOwnPropertyNames(l).reduce((function(n,e){return"size"!==e&&"caller"!==e&&"callee"!==e&&"arguments"!==e&&"function"==typeof l[e]&&(n[e]=t.bind(l[e])),n}),Object.create(null))}},{}],11:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Function.prototype)},{"./copy-prototype":10}],12:[function(l,n,e){"use strict";n.exports={array:l("./array"),function:l("./function"),map:l("./map"),object:l("./object"),set:l("./set"),string:l("./string")}},{"./array":9,"./function":11,"./map":13,"./object":14,"./set":15,"./string":16}],13:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Map.prototype)},{"./copy-prototype":10}],14:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Object.prototype)},{"./copy-prototype":10}],15:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Set.prototype)},{"./copy-prototype":10}],16:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(String.prototype)},{"./copy-prototype":10}],17:[function(l,n,e){"use strict";var t=l("type-detect");n.exports=function(l){return t(l).toLowerCase()}},{"type-detect":19}],18:[function(l,n,e){"use strict";n.exports=function(l){return l&&l.toString?l.toString():String(l)}},{}],19:[function(l,n,e){var t;t=function(){"use strict";var l="function"==typeof Promise,n="object"==typeof self?self:__webpack_require__.g,e="undefined"!=typeof Symbol,t="undefined"!=typeof Map,u="undefined"!=typeof Set,o="undefined"!=typeof WeakMap,r="undefined"!=typeof WeakSet,i="undefined"!=typeof DataView,a=e&&void 0!==Symbol.iterator,s=e&&void 0!==Symbol.toStringTag,c=u&&"function"==typeof Set.prototype.entries,d=t&&"function"==typeof Map.prototype.entries,p=c&&Object.getPrototypeOf((new Set).entries()),f=d&&Object.getPrototypeOf((new Map).entries()),h=a&&"function"==typeof Array.prototype[Symbol.iterator],m=h&&Object.getPrototypeOf([][Symbol.iterator]()),y=a&&"function"==typeof String.prototype[Symbol.iterator],g=y&&Object.getPrototypeOf(""[Symbol.iterator]());return function(e){var a=typeof e;if("object"!==a)return a;if(null===e)return"null";if(e===n)return"global";if(Array.isArray(e)&&(!1===s||!(Symbol.toStringTag in e)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&e===window.location)return"Location";if("object"==typeof window.document&&e===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&e===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&e===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&e instanceof window.HTMLElement){if("BLOCKQUOTE"===e.tagName)return"HTMLQuoteElement";if("TD"===e.tagName)return"HTMLTableDataCellElement";if("TH"===e.tagName)return"HTMLTableHeaderCellElement"}}var c=s&&e[Symbol.toStringTag];if("string"==typeof c)return c;var d=Object.getPrototypeOf(e);return d===RegExp.prototype?"RegExp":d===Date.prototype?"Date":l&&d===Promise.prototype?"Promise":u&&d===Set.prototype?"Set":t&&d===Map.prototype?"Map":r&&d===WeakSet.prototype?"WeakSet":o&&d===WeakMap.prototype?"WeakMap":i&&d===DataView.prototype?"DataView":t&&d===f?"Map Iterator":u&&d===p?"Set Iterator":h&&d===m?"Array Iterator":y&&d===g?"String Iterator":null===d?"Object":Object.prototype.toString.call(e).slice(8,-1)}},"object"==typeof e&&void 0!==n?n.exports=t():"function"==typeof define&&define.amd?define(t):this.typeDetect=t()},{}],20:[function(l,n,e){"function"==typeof Object.create?n.exports=function(l,n){l.super_=n,l.prototype=Object.create(n.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}})}:n.exports=function(l,n){l.super_=n;var e=function(){};e.prototype=n.prototype,l.prototype=new e,l.prototype.constructor=l}},{}],21:[function(l,n,e){n.exports=function(l){return l&&"object"==typeof l&&"function"==typeof l.copy&&"function"==typeof l.fill&&"function"==typeof l.readUInt8}},{}],22:[function(l,n,e){var t=/%[sdj%]/g;e.format=function(l){if(!y(l)){for(var n=[],e=0;e=o)return l;switch(l){case"%s":return String(u[e++]);case"%d":return Number(u[e++]);case"%j":try{return JSON.stringify(u[e++])}catch(l){return"[Circular]"}default:return l}})),a=u[e];e=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),f(n)?t.showHidden=n:n&&e._extend(t,n),g(t.showHidden)&&(t.showHidden=!1),g(t.depth)&&(t.depth=2),g(t.colors)&&(t.colors=!1),g(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=i),s(t,l,t.depth)}function i(l,n){var e=r.styles[n];return e?"["+r.colors[e][0]+"m"+l+"["+r.colors[e][1]+"m":l}function a(l,n){return l}function s(l,n,t){if(l.customInspect&&n&&k(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var u=n.inspect(t,l);return y(u)||(u=s(l,u,t)),u}var o=function(l,n){if(g(n))return l.stylize("undefined","undefined");if(y(n)){var e="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return l.stylize(e,"string")}return m(n)?l.stylize(""+n,"number"):f(n)?l.stylize(""+n,"boolean"):h(n)?l.stylize("null","null"):void 0}(l,n);if(o)return o;var r=Object.keys(n),i=function(l){var n={};return l.forEach((function(l,e){n[l]=!0})),n}(r);if(l.showHidden&&(r=Object.getOwnPropertyNames(n)),w(n)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return c(n);if(0===r.length){if(k(n)){var a=n.name?": "+n.name:"";return l.stylize("[Function"+a+"]","special")}if(b(n))return l.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return l.stylize(Date.prototype.toString.call(n),"date");if(w(n))return c(n)}var v,x="",E=!1,T=["{","}"];return p(n)&&(E=!0,T=["[","]"]),k(n)&&(x=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(x=" "+RegExp.prototype.toString.call(n)),_(n)&&(x=" "+Date.prototype.toUTCString.call(n)),w(n)&&(x=" "+c(n)),0!==r.length||E&&0!=n.length?t<0?b(n)?l.stylize(RegExp.prototype.toString.call(n),"regexp"):l.stylize("[Object]","special"):(l.seen.push(n),v=E?function(l,n,e,t,u){for(var o=[],r=0,i=n.length;r60?e[0]+(""===n?"":n+"\n ")+" "+l.join(",\n ")+" "+e[1]:e[0]+n+" "+l.join(", ")+" "+e[1]}(v,x,T)):T[0]+x+T[1]}function c(l){return"["+Error.prototype.toString.call(l)+"]"}function d(l,n,e,t,u,o){var r,i,a;if((a=Object.getOwnPropertyDescriptor(n,u)||{value:n[u]}).get?i=a.set?l.stylize("[Getter/Setter]","special"):l.stylize("[Getter]","special"):a.set&&(i=l.stylize("[Setter]","special")),O(t,u)||(r="["+u+"]"),i||(l.seen.indexOf(a.value)<0?(i=h(e)?s(l,a.value,null):s(l,a.value,e-1)).indexOf("\n")>-1&&(i=o?i.split("\n").map((function(l){return" "+l})).join("\n").substr(2):"\n"+i.split("\n").map((function(l){return" "+l})).join("\n")):i=l.stylize("[Circular]","special")),g(r)){if(o&&u.match(/^\d+$/))return i;(r=JSON.stringify(""+u)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=l.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=l.stylize(r,"string"))}return r+": "+i}function p(l){return Array.isArray(l)}function f(l){return"boolean"==typeof l}function h(l){return null===l}function m(l){return"number"==typeof l}function y(l){return"string"==typeof l}function g(l){return void 0===l}function b(l){return v(l)&&"[object RegExp]"===x(l)}function v(l){return"object"==typeof l&&null!==l}function _(l){return v(l)&&"[object Date]"===x(l)}function w(l){return v(l)&&("[object Error]"===x(l)||l instanceof Error)}function k(l){return"function"==typeof l}function x(l){return Object.prototype.toString.call(l)}function E(l){return l<10?"0"+l.toString(10):l.toString(10)}e.debuglog=function(l){if(g(u)&&(u=process.env.NODE_DEBUG||""),l=l.toUpperCase(),!o[l])if(new RegExp("\\b"+l+"\\b","i").test(u)){var n=process.pid;o[l]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",l,n,t)}}else o[l]=function(){};return o[l]},e.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=f,e.isNull=h,e.isNullOrUndefined=function(l){return null==l},e.isNumber=m,e.isString=y,e.isSymbol=function(l){return"symbol"==typeof l},e.isUndefined=g,e.isRegExp=b,e.isObject=v,e.isDate=_,e.isError=w,e.isFunction=k,e.isPrimitive=function(l){return null===l||"boolean"==typeof l||"number"==typeof l||"string"==typeof l||"symbol"==typeof l||void 0===l},e.isBuffer=l("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(l,n){return Object.prototype.hasOwnProperty.call(l,n)}e.log=function(){var l,n;console.log("%s - %s",(n=[E((l=new Date).getHours()),E(l.getMinutes()),E(l.getSeconds())].join(":"),[l.getDate(),T[l.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=l("inherits"),e._extend=function(l,n){if(!n||!v(n))return l;for(var e=Object.keys(n),t=e.length;t--;)l[e[t]]=n[e[t]];return l}},{"./support/isBuffer":21,inherits:20}],23:[function(require,module,exports){"use strict";var globalObject=require("@sinonjs/commons").global;function withGlobal(_global){var userAgent=_global.navigator&&_global.navigator.userAgent,isRunningInIE=userAgent&&userAgent.indexOf("MSIE ")>-1,maxTimeout=Math.pow(2,31)-1,NOOP=function(){},NOOP_ARRAY=function(){return[]},timeoutResult=_global.setTimeout(NOOP,0),addTimerReturnsObject="object"==typeof timeoutResult,hrtimePresent=_global.process&&"function"==typeof _global.process.hrtime,hrtimeBigintPresent=hrtimePresent&&"function"==typeof _global.process.hrtime.bigint,nextTickPresent=_global.process&&"function"==typeof _global.process.nextTick,utilPromisify=_global.process&&require("util").promisify,performancePresent=_global.performance&&"function"==typeof _global.performance.now,hasPerformancePrototype=_global.Performance&&(typeof _global.Performance).match(/^(function|object)$/),queueMicrotaskPresent=_global.hasOwnProperty("queueMicrotask"),requestAnimationFramePresent=_global.requestAnimationFrame&&"function"==typeof _global.requestAnimationFrame,cancelAnimationFramePresent=_global.cancelAnimationFrame&&"function"==typeof _global.cancelAnimationFrame,requestIdleCallbackPresent=_global.requestIdleCallback&&"function"==typeof _global.requestIdleCallback,cancelIdleCallbackPresent=_global.cancelIdleCallback&&"function"==typeof _global.cancelIdleCallback,setImmediatePresent=_global.setImmediate&&"function"==typeof _global.setImmediate;isRunningInIE&&(_global.setTimeout=_global.setTimeout,_global.clearTimeout=_global.clearTimeout,_global.setInterval=_global.setInterval,_global.clearInterval=_global.clearInterval,_global.Date=_global.Date),setImmediatePresent&&(_global.setImmediate=_global.setImmediate,_global.clearImmediate=_global.clearImmediate),_global.clearTimeout(timeoutResult);var NativeDate=_global.Date,uniqueTimerId=1;function isNumberFinite(l){return Number.isFinite?Number.isFinite(l):"number"==typeof l&&isFinite(l)}function parseTime(l){if(!l)return 0;var n,e=l.split(":"),t=e.length,u=t,o=0;if(t>3||!/^(\d\d:){0,2}\d\d?$/.test(l))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;u--;){if((n=parseInt(e[u],10))>=60)throw new Error("Invalid time "+l);o+=n*Math.pow(60,t-u-1)}return 1e3*o}function nanoRemainder(l){var n=1e6,e=1e6*l%n,t=e<0?e+n:e;return Math.floor(t)}function getEpoch(l){if(!l)return 0;if("function"==typeof l.getTime)return l.getTime();if("number"==typeof l)return l;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(l,n,e){return e&&e.callAt>=l&&e.callAt<=n}function mirrorDateProperties(l,n){var e;for(e in n)n.hasOwnProperty(e)&&(l[e]=n[e]);return n.now?l.now=function(){return l.clock.now}:delete l.now,n.toSource?l.toSource=function(){return n.toSource()}:delete l.toSource,l.toString=function(){return n.toString()},l.prototype=n.prototype,l.parse=n.parse,l.UTC=n.UTC,l.prototype.toUTCString=n.prototype.toUTCString,l}function createDate(){return mirrorDateProperties((function l(n,e,t,u,o,r,i){if(!(this instanceof l))return new NativeDate(l.clock.now).toString();switch(arguments.length){case 0:return new NativeDate(l.clock.now);case 1:return new NativeDate(n);case 2:return new NativeDate(n,e);case 3:return new NativeDate(n,e,t);case 4:return new NativeDate(n,e,t,u);case 5:return new NativeDate(n,e,t,u,o);case 6:return new NativeDate(n,e,t,u,o,r);default:return new NativeDate(n,e,t,u,o,r,i)}}),NativeDate)}function enqueueJob(l,n){l.jobs||(l.jobs=[]),l.jobs.push(n)}function runJobs(l){if(l.jobs){for(var n=0;nl.loopLimit)throw new Error("Aborting after running "+l.loopLimit+" timers, assuming an infinite loop!")}l.jobs=[]}}function addTimer(l,n){if(void 0===n.func)throw new Error("Callback must be provided to timer calls");if(n.type=n.immediate?"Immediate":"Timeout",n.hasOwnProperty("delay")&&(isNumberFinite(n.delay)||(n.delay=0),n.delay=n.delay>maxTimeout?1:n.delay,n.delay=Math.max(0,n.delay)),n.hasOwnProperty("interval")&&(n.type="Interval",n.interval=n.interval>maxTimeout?1:n.interval),n.hasOwnProperty("animation")&&(n.type="AnimationFrame",n.animation=!0),l.timers||(l.timers={}),n.id=uniqueTimerId++,n.createdAt=l.now,n.callAt=l.now+(parseInt(n.delay)||(l.duringTick?1:0)),l.timers[n.id]=n,addTimerReturnsObject){var e={id:n.id,ref:function(){return e},unref:function(){return e},refresh:function(){return e}};return e}return n.id}function compareTimers(l,n){return l.callAtn.callAt?1:l.immediate&&!n.immediate?-1:!l.immediate&&n.immediate?1:l.createdAtn.createdAt?1:l.idn.id?1:void 0}function firstTimerInRange(l,n,e){var t,u=l.timers,o=null;for(t in u)u.hasOwnProperty(t)&&(!inRange(n,e,u[t])||o&&1!==compareTimers(o,u[t])||(o=u[t]));return o}function firstTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&1!==compareTimers(t,e[n])||(t=e[n]));return t}function lastTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&-1!==compareTimers(t,e[n])||(t=e[n]));return t}function callTimer(clock,timer){"number"==typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id],"function"==typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}function clearTimer(l,n,e){if(n){l.timers||(l.timers={});var t="object"==typeof n?n.id:n;if(l.timers.hasOwnProperty(t)){var u=l.timers[t];if(u.type!==e){var o="AnimationFrame"===e?"cancelAnimationFrame":"clear"+e,r="AnimationFrame"===u.type?"requestAnimationFrame":"set"+u.type;throw new Error("Cannot clear timer: timer created with "+r+"() but cleared with "+o+"()")}delete l.timers[t]}}}function uninstall(l,n,e){var t,u,o;for(u=0,o=l.methods.length;u1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");var a=n[0],s=i-n[1],c=r-a;return s<0&&(s+=1e9,c-=1),[c,s]}return[r,i]}function i(l,n,t,o){var r="number"==typeof l?l:parseTime(l),i=Math.floor(r),a=nanoRemainder(r),s=e+a,c=u.now+i;if(r<0)throw new TypeError("Negative ticks are not supported");s>=1e6&&(c+=1,s-=1e6),e=s;var d,p,f,h,m,y,g=u.now,b=u.now;function v(){for(d=firstTimerInRange(u,g,c);d&&g<=c;){if(u.timers[d.id]){g=d.callAt,u.now=d.callAt,f=u.now;try{runJobs(u),callTimer(u,d)}catch(l){p=p||l}if(n)return void originalSetTimeout(h);m()}y()}if(f=u.now,runJobs(u),f!==u.now&&(g+=u.now-f,c+=u.now-f),u.duringTick=!1,d=firstTimerInRange(u,g,c))try{u.tick(c-u.now)}catch(l){p=p||l}else u.now=c,e=s;if(p)throw p;if(!n)return u.now;t(u.now)}return u.duringTick=!0,f=u.now,runJobs(u),f!==u.now&&(g+=u.now-f,c+=u.now-f),h=n&&function(){try{m(),y(),v()}catch(l){o(l)}},m=function(){f!==u.now&&(g+=u.now-f,c+=u.now-f,b+=u.now-f)},y=function(){d=firstTimerInRange(u,b,c),b=g},v()}if(u.Date.clock=u,hrtimeBigintPresent&&(r.bigint=function(){var l=r();return BigInt(l[0])*BigInt(1e9)+BigInt(l[1])}),u.requestIdleCallback=function(l,n){var e=0;u.countTimers()>0&&(e=50);var t=addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:void 0===n?e:Math.min(n,e)});return t.id||t},u.cancelIdleCallback=function(l){return clearTimer(u,l,"Timeout")},u.setTimeout=function(l,n){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n})},void 0!==_global.Promise&&utilPromisify&&(u.setTimeout[utilPromisify.custom]=function(l,n){return new _global.Promise((function(e){addTimer(u,{func:e,args:[n],delay:l})}))}),u.clearTimeout=function(l){return clearTimer(u,l,"Timeout")},u.nextTick=function(l){return enqueueJob(u,{func:l,args:Array.prototype.slice.call(arguments,1)})},u.queueMicrotask=function(l){return u.nextTick(l)},u.setInterval=function(l,n){return n=parseInt(n,10),addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n,interval:n})},u.clearInterval=function(l){return clearTimer(u,l,"Interval")},setImmediatePresent&&(u.setImmediate=function(l){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,1),immediate:!0})},void 0!==_global.Promise&&utilPromisify&&(u.setImmediate[utilPromisify.custom]=function(l){return new _global.Promise((function(n){addTimer(u,{func:n,args:[l],immediate:!0})}))}),u.clearImmediate=function(l){return clearTimer(u,l,"Immediate")}),u.countTimers=function(){return Object.keys(u.timers||{}).length+(u.jobs||[]).length},u.requestAnimationFrame=function(l){var n=addTimer(u,{func:l,delay:o(),args:[u.now+o()],animation:!0});return n.id||n},u.cancelAnimationFrame=function(l){return clearTimer(u,l,"AnimationFrame")},u.runMicrotasks=function(){runJobs(u)},u.tick=function(l){return i(l,!1)},void 0!==_global.Promise&&(u.tickAsync=function(l){return new _global.Promise((function(n,e){originalSetTimeout((function(){try{i(l,!0,n,e)}catch(l){e(l)}}))}))}),u.next=function(){runJobs(u);var l=firstTimer(u);if(!l)return u.now;u.duringTick=!0;try{return u.now=l.callAt,callTimer(u,l),runJobs(u),u.now}finally{u.duringTick=!1}},void 0!==_global.Promise&&(u.nextAsync=function(){return new _global.Promise((function(l,n){originalSetTimeout((function(){try{var e,t=firstTimer(u);if(!t)return void l(u.now);u.duringTick=!0,u.now=t.callAt;try{callTimer(u,t)}catch(l){e=l}u.duringTick=!1,originalSetTimeout((function(){e?n(e):l(u.now)}))}catch(l){n(l)}}))}))}),u.runAll=function(){var l;for(runJobs(u),l=0;l1||l instanceof Date||Array.isArray(l)||"number"==typeof l)throw new TypeError("FakeTimers.install called with "+String(l)+" install requires an object parameter");var n,e;(l=void 0!==l?l:{}).shouldAdvanceTime=l.shouldAdvanceTime||!1,l.advanceTimeDelta=l.advanceTimeDelta||20;var t=l.target||_global,u=createClock(l.now,l.loopLimit);for(u.uninstall=function(){return uninstall(u,t,l)},u.methods=l.toFake||[],0===u.methods.length&&(u.methods=keys(timers).filter((function(l){return"nextTick"!==l&&"queueMicrotask"!==l}))),n=0,e=u.methods.length;n{"use strict";var n=[Array,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];l.exports=n},6869:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(4629).use(x),o=e(8432).every,r=e(8432).functionName,i=e(6762),a=e(9996),s=e(8432).prototypes.object,c=e(8432).typeOf,d=e(8432).valueToString,p=e(8977),f=e(6815),h=e(5739),m=e(9171),y=e(3439),g=e(995),b=t.indexOf,v=t.some,_=s.hasOwnProperty,w=s.toString,k=e(1631)(x);function x(l,n){var e=Object.create(g),t=c(l);if(void 0!==n&&"string"!=typeof n)throw new TypeError("Message should be a string");if(arguments.length>2)throw new TypeError("Expected 1 or 2 arguments, received "+arguments.length);return t in k?k[t](e,l,n):e.test=function(n){return u(n,l)},e.message||(e.message="match("+d(l)+")"),e}function E(l,n){return function(e,t){h(e,"string","property");var o=1===arguments.length,r=n+'("'+e+'"';return o||(r+=", "+d(t)),x((function(n){return!(null==n||!l(n,e))&&(o||u(n[e],t))}),r+=")")}}x.isMatcher=y,x.any=x((function(){return!0}),"any"),x.defined=x((function(l){return null!=l}),"defined"),x.truthy=x((function(l){return Boolean(l)}),"truthy"),x.falsy=x((function(l){return!l}),"falsy"),x.same=function(l){return x((function(n){return l===n}),"same("+d(l)+")")},x.in=function(l){if("array"!==c(l))throw new TypeError("array expected");return x((function(n){return v(l,(function(l){return l===n}))}),"in("+d(l)+")")},x.typeOf=function(l){return h(l,"string","type"),x((function(n){return c(n)===l}),'typeOf("'+l+'")')},x.instanceOf=function(l){return"undefined"==typeof Symbol||void 0===Symbol.hasInstance?h(l,"function","type"):f(l,Symbol.hasInstance,"type","[Symbol.hasInstance]"),x((function(n){return n instanceof l}),"instanceOf("+(r(l)||w(l))+")")},x.has=E((function(l,n){return"object"==typeof l?n in l:void 0!==l[n]}),"has"),x.hasOwn=E((function(l,n){return _(l,n)}),"hasOwn"),x.hasNested=function(l,n){h(l,"string","property");var e=1===arguments.length,t='hasNested("'+l+'"';return e||(t+=", "+d(n)),x((function(t){return null!=t&&void 0!==i(t,l)&&(e||u(i(t,l),n))}),t+=")")};var T={null:!0,boolean:!0,number:!0,string:!0,object:!0,array:!0};x.json=function(l){if(!T[c(l)])throw new TypeError("Value cannot be the result of JSON.parse");return x((function(n){var e;try{e=JSON.parse(n)}catch(l){return!1}return u(e,l)}),"json("+JSON.stringify(l,null," ")+")")},x.every=function(l){return p(l),x((function(n){return"object"===c(n)?o(Object.keys(n),(function(e){return l.test(n[e])})):m(n)&&o(n,(function(n){return l.test(n)}))}),"every("+l.message+")")},x.some=function(l){return p(l),x((function(n){return"object"===c(n)?!o(Object.keys(n),(function(e){return!l.test(n[e])})):m(n)&&!o(n,(function(n){return!l.test(n)}))}),"some("+l.message+")")},x.array=x.typeOf("array"),x.array.deepEquals=function(l){return x((function(n){var e=n.length===l.length;return"array"===c(n)&&e&&o(n,(function(n,e){var t=l[e];return"array"===c(t)&&"array"===c(n)?x.array.deepEquals(t).test(n):u(t,n)}))}),"deepEquals(["+a(l)+"])")},x.array.startsWith=function(l){return x((function(n){return"array"===c(n)&&o(l,(function(l,e){return n[e]===l}))}),"startsWith(["+a(l)+"])")},x.array.endsWith=function(l){return x((function(n){var e=n.length-l.length;return"array"===c(n)&&o(l,(function(l,t){return n[e+t]===l}))}),"endsWith(["+a(l)+"])")},x.array.contains=function(l){return x((function(n){return"array"===c(n)&&o(l,(function(l){return-1!==b(n,l)}))}),"contains(["+a(l)+"])")},x.map=x.typeOf("map"),x.map.deepEquals=function(l){return x((function(n){var e=n.size===l.size;return"map"===c(n)&&e&&o(n,(function(n,e){return l.has(e)&&l.get(e)===n}))}),"deepEquals(Map["+a(l)+"])")},x.map.contains=function(l){return x((function(n){return"map"===c(n)&&o(l,(function(l,e){return n.has(e)&&n.get(e)===l}))}),"contains(Map["+a(l)+"])")},x.set=x.typeOf("set"),x.set.deepEquals=function(l){return x((function(n){var e=n.size===l.size;return"set"===c(n)&&e&&o(n,(function(n){return l.has(n)}))}),"deepEquals(Set["+a(l)+"])")},x.set.contains=function(l){return x((function(n){return"set"===c(n)&&o(l,(function(l){return n.has(l)}))}),"contains(Set["+a(l)+"])")},x.bool=x.typeOf("boolean"),x.number=x.typeOf("number"),x.string=x.typeOf("string"),x.object=x.typeOf("object"),x.func=x.typeOf("function"),x.regexp=x.typeOf("regexp"),x.date=x.typeOf("date"),x.symbol=x.typeOf("symbol"),l.exports=x},8977:(l,n,e)=>{"use strict";var t=e(3439);l.exports=function(l){if(!t(l))throw new TypeError("Matcher expected")}},6815:l=>{"use strict";l.exports=function(l,n,e,t){if(null===l[n]||void 0===l[n])throw new TypeError("Expected "+e+" to have method "+t)}},5739:(l,n,e)=>{"use strict";var t=e(8432).typeOf;l.exports=function(l,n,e){var u=t(l);if(u!==n)throw new TypeError("Expected type of "+e+" to be "+n+", but was "+u)}},9171:(l,n,e)=>{"use strict";var t=e(8432).typeOf;l.exports=function(l){return Boolean(l)&&"function"===t(l.forEach)}},3439:(l,n,e)=>{"use strict";var t=e(8432).prototypes.object.isPrototypeOf,u=e(995);l.exports=function(l){return t(u,l)}},6091:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array.every,u=e(8432).prototypes.array.concat,o=e(8432).typeOf,r=e(4629).use,i=e(3439),a=Object.keys,s=Object.getOwnPropertySymbols;l.exports=function l(n,e,c){var d=r(c);if(null==n)return!1;var p=a(e);return"function"===o(s)&&(p=u(p,s(e))),t(p,(function(t){var u=e[t],r=n[t];if(i(u)){if(!u.test(r))return!1}else if("object"===o(u)){if(!l(r,u,c))return!1}else if(!d(r,u))return!1;return!0}))}},995:(l,n,e)=>{"use strict";var t={toString:function(){return this.message},or:function(l){var n=e(6869),u=n.isMatcher;if(!arguments.length)throw new TypeError("Matcher expected");var o=u(l)?l:n(l),r=this,i=Object.create(t);return i.test=function(l){return r.test(l)||o.test(l)},i.message=r.message+".or("+o.message+")",i},and:function(l){var n=e(6869),u=n.isMatcher;if(!arguments.length)throw new TypeError("Matcher expected");var o=u(l)?l:n(l),r=this,i=Object.create(t);return i.test=function(l){return r.test(l)&&o.test(l)},i.message=r.message+".and("+o.message+")",i}};l.exports=t},1631:(l,n,e)=>{"use strict";var t=e(8432).functionName,u=e(8432).prototypes.array.join,o=e(8432).prototypes.array.map,r=e(8432).prototypes.string.indexOf,i=e(8432).valueToString,a=e(6091);l.exports=function(l){return{function:function(l,n,e){l.test=n,l.message=e||"match("+t(n)+")"},number:function(l,n){l.test=function(l){return n==l}},object:function(n,e){var r;return"function"==typeof e.test?(n.test=function(l){return!0===e.test(l)},n.message="match("+t(e.test)+")",n):(r=o(Object.keys(e),(function(l){return l+": "+i(e[l])})),n.test=function(n){return a(n,e,l)},n.message="match("+u(r,", ")+")",n)},regexp:function(l,n){l.test=function(l){return"string"==typeof l&&n.test(l)}},string:function(l,n){l.test=function(l){return"string"==typeof l&&-1!==r(l,n)},l.message='match("'+n+'")'}}}},4629:(l,n,e)=>{"use strict";var t=e(8432).valueToString,u=e(8432).className,o=e(8432).typeOf,r=e(8432).prototypes.array,i=e(8432).prototypes.object,a=e(8432).prototypes.map.forEach,s=e(505),c=e(6783),d=e(4107),p=e(251),f=e(4511),h=e(8281),m=e(2494),y=e(5460),g=e(1055),b=e(1557),v=r.concat,_=r.every,w=r.push,k=Date.prototype.getTime,x=i.hasOwnProperty,E=r.indexOf,T=Object.keys,O=Object.getOwnPropertySymbols;function A(l,n,e){var r=[],i=[],S=[],C=[],j={};return function l(n,P,N,M){if(e&&e.isMatcher(P))return e.isMatcher(n)?n===P:P.test(n);var I=typeof n,B=typeof P;if(n===P||m(n)||m(P)||null===n||null===P||void 0===n||void 0===P||"object"!==I||"object"!==B)return c(n,P);if(f(n)||f(P))return!1;var L=p(n),R=p(P);if((L||R)&&(!L||!R||k.call(n)!==k.call(P)))return!1;if(n instanceof RegExp&&P instanceof RegExp&&t(n)!==t(P))return!1;if(n instanceof Error&&P instanceof Error)return n===P;var D=s(n),F=s(P),q=T(n),z=T(P),U=u(n),H=u(P),W="function"===o(O)?O(P):[],V=v(z,W);if(d(n)||d(P)){if(n.length!==P.length)return!1}else if(I!==B||D!==F||q.length!==z.length||U&&H&&U!==H)return!1;if(g(n)||g(P))return!(!g(n)||!g(P)||n.size!==P.size)&&b(n,P,l);if(h(n)||h(P)){if(!h(n)||!h(P)||n.size!==P.size)return!1;var K=!0;return a(n,(function(l,n){K=K&&A(l,P.get(n))})),K}return _(V,(function(e){if(!x(n,e))return!1;var t=n[e],u=P[e],o=y(t),a=y(u),s=o?E(r,t):-1,c=a?E(i,u):-1,d=-1!==s?S[s]:N+"["+JSON.stringify(e)+"]",p=-1!==c?C[c]:M+"["+JSON.stringify(e)+"]",f=d+p;return!!j[f]||(-1===s&&o&&(w(r,t),w(S,d)),-1===c&&a&&(w(i,u),w(C,p)),o&&a&&(j[f]=!0),l(t,u,d,p))}))}(l,n,"$1","$2")}A.use=function(l){return function(n,e){return A(n,e,l)}},l.exports=A},505:(l,n,e)=>{"use strict";var t=e(8432).prototypes.object.toString;l.exports=function(l){return t(l).split(/[ \]]/)[1]}},6783:(l,n,e)=>{"use strict";var t=e(2494),u=e(6348);l.exports=function(l,n){return!!(l===n||t(l)&&t(n))&&(0!==l||u(l)===u(n))}},4107:(l,n,e)=>{"use strict";var t=e(505);l.exports=function(l){return"Arguments"===t(l)}},6359:(l,n,e)=>{"use strict";var t=e(8432).functionName,u=e(8432).prototypes.array.indexOf,o=e(8432).prototypes.array.map,r=e(3209),i=e(5855);l.exports=function(l){return-1!==u(o(r,t),i(l))}},251:l=>{"use strict";l.exports=function(l){return l instanceof Date}},4511:l=>{"use strict";var n="undefined"!=typeof document&&document.createElement("div");l.exports=function(l){if(!l||1!==l.nodeType||!n)return!1;try{l.appendChild(n),l.removeChild(n)}catch(l){return!1}return!0}},8281:l=>{"use strict";l.exports=function(l){return"undefined"!=typeof Map&&l instanceof Map}},2494:l=>{"use strict";l.exports=function(l){return"number"==typeof l&&l!=l}},6348:l=>{"use strict";l.exports=function(l){return 0===l&&1/l==-1/0}},5460:l=>{"use strict";l.exports=function(l){return!("object"!=typeof l||null===l||l instanceof Boolean||l instanceof Date||l instanceof Error||l instanceof Number||l instanceof RegExp||l instanceof String)}},1055:l=>{"use strict";l.exports=function(l){return"undefined"!=typeof Set&&l instanceof Set||!1}},1557:(l,n,e)=>{"use strict";var t=e(8432).prototypes.set.forEach;l.exports=function(l,n,e){var u=!0;return t(l,(function(l){var o=!1;t(n,(function(n){e(n,l)&&(o=!0)})),u=u&&o})),u}},9996:(l,n,e)=>{"use strict";var t=e(8432).prototypes.string.slice,u=e(8432).typeOf,o=e(8432).valueToString;function r(l){return"string"==typeof l?"'"+l+"'":o(l)}l.exports=function(l){return"map"===u(l)?(n="",l.forEach((function(l,e){n+="["+r(e)+","+r(l)+"],"})),n=t(n,0,-1)):function(l){var n="";return l.forEach((function(l){n+=r(l)+","})),n=t(n,0,-1)}(l);var n}},2681:(l,n,e)=>{"use strict";var t=e(8432).valueToString,u=e(8432).prototypes.string.indexOf,o=e(8432).prototypes.array.forEach,r=e(5855),i="function"==typeof Array.from,a=e(4629).use(f),s=e(6359),c=e(1557),d=e(6869);function p(l,n,e){if(0===n.length)return!0;var t,u,o,r;for(t=0,u=l.length;t=u)return!1;if(!e(l[t+o],n[o]))return!1}return!0}return!1}function f(l,n){if(n&&"function"==typeof n.test)return n.test(l);switch(r(n)){case"bigint":case"boolean":case"number":case"symbol":return n===l;case"function":return!0===n(l);case"string":return("string"==typeof l||Boolean(l))&&u(t(l).toLowerCase(),n.toLowerCase())>=0;case"null":return null===l;case"undefined":return void 0===l;case"Date":if("Date"===r(l))return l.getTime()===n.getTime();break;case"Array":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":return s(n)&&p(l,n,f);case"Map":if(!i)throw new Error("The JavaScript engine does not support Array.from and cannot reliably do value comparison of Map instances");return"Map"===r(l)&&p(Array.from(l),Array.from(n),f)}switch(r(l)){case"null":return!1;case"Set":return c(n,l,f)}if(n&&"object"==typeof n){if(n===l)return!0;if("object"!=typeof l)return!1;var e;for(e in n){var o=l[e];if(void 0===o&&"function"==typeof l.getAttribute&&(o=l.getAttribute(e)),null===n[e]||void 0===n[e]){if(o!==n[e])return!1}else if(void 0===o||!a(o,n[e]))return!1}return!0}throw new Error("Matcher was an unknown or unsupported type")}o(Object.keys(d),(function(l){f[l]=d[l]})),l.exports=f},3584:(l,n,e)=>{"use strict";var t=e(6783),u=e(4107),o=e(4511),r=e(6348),i=e(1055),a=e(8281),s=e(2681),c=e(4629).use(s),d=e(6869);l.exports={createMatcher:d,deepEqual:c,identical:t,isArguments:u,isElement:o,isMap:a,isNegZero:r,isSet:i,match:s}},9296:l=>{function n(){var l=[].slice.call(arguments);function n(n,e){Object.keys(e).forEach((function(t){~l.indexOf(t)||(n[t]=e[t])}))}return function(){for(var l=[].slice.call(arguments),e=0,t={};e{l.exports=e(9731)},9731:(l,n,e)=>{var t=[];n.version="4.3.8",n.AssertionError=e(9296);var u=e(1118);n.use=function(l){return~t.indexOf(l)||(l(n,u),t.push(l)),n},n.util=u;var o=e(752);n.config=o;var r=e(3896);n.use(r);var i=e(9289);n.use(i);var a=e(6667);n.use(a);var s=e(705);n.use(s);var c=e(4740);n.use(c)},3896:(l,n,e)=>{var t=e(752);l.exports=function(l,n){var e=l.AssertionError,u=n.flag;function o(l,e,r,i){return u(this,"ssfi",r||o),u(this,"lockSsfi",i),u(this,"object",l),u(this,"message",e),u(this,"eql",t.deepEqual||n.eql),n.proxify(this)}l.Assertion=o,Object.defineProperty(o,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),t.includeStack},set:function(l){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),t.includeStack=l}}),Object.defineProperty(o,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),t.showDiff},set:function(l){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),t.showDiff=l}}),o.addProperty=function(l,e){n.addProperty(this.prototype,l,e)},o.addMethod=function(l,e){n.addMethod(this.prototype,l,e)},o.addChainableMethod=function(l,e,t){n.addChainableMethod(this.prototype,l,e,t)},o.overwriteProperty=function(l,e){n.overwriteProperty(this.prototype,l,e)},o.overwriteMethod=function(l,e){n.overwriteMethod(this.prototype,l,e)},o.overwriteChainableMethod=function(l,e,t){n.overwriteChainableMethod(this.prototype,l,e,t)},o.prototype.assert=function(l,o,r,i,a,s){var c=n.test(this,arguments);if(!1!==s&&(s=!0),void 0===i&&void 0===a&&(s=!1),!0!==t.showDiff&&(s=!1),!c){o=n.getMessage(this,arguments);var d={actual:n.getActual(this,arguments),expected:i,showDiff:s},p=n.getOperator(this,arguments);throw p&&(d.operator=p),new e(o,d,t.includeStack?this.assert:u(this,"ssfi"))}},Object.defineProperty(o.prototype,"_obj",{get:function(){return u(this,"object")},set:function(l){u(this,"object",l)}})}},752:l=>{l.exports={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null}},9289:l=>{l.exports=function(l,n){var e=l.Assertion,t=l.AssertionError,u=n.flag;function o(l,e){e&&u(this,"message",e),l=l.toLowerCase();var t=u(this,"object"),o=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an ":"a ";this.assert(l===n.type(t).toLowerCase(),"expected #{this} to be "+o+l,"expected #{this} not to be "+o+l)}function r(l,e){return n.isNaN(l)&&n.isNaN(e)||l===e}function i(){u(this,"contains",!0)}function a(l,o){o&&u(this,"message",o);var i=u(this,"object"),a=n.type(i).toLowerCase(),s=u(this,"message"),c=u(this,"negate"),d=u(this,"ssfi"),p=u(this,"deep"),f=p?"deep ":"",h=p?u(this,"eql"):r;s=s?s+": ":"";var m=!1;switch(a){case"string":m=-1!==i.indexOf(l);break;case"weakset":if(p)throw new t(s+"unable to use .deep.include with WeakSet",void 0,d);m=i.has(l);break;case"map":i.forEach((function(n){m=m||h(n,l)}));break;case"set":p?i.forEach((function(n){m=m||h(n,l)})):m=i.has(l);break;case"array":m=p?i.some((function(n){return h(n,l)})):-1!==i.indexOf(l);break;default:if(l!==Object(l))throw new t(s+"the given combination of arguments ("+a+" and "+n.type(l).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+n.type(l).toLowerCase(),void 0,d);var y=Object.keys(l),g=null,b=0;if(y.forEach((function(o){var r=new e(i);if(n.transferFlags(this,r,!0),u(r,"lockSsfi",!0),c&&1!==y.length)try{r.property(o,l[o])}catch(l){if(!n.checkError.compatibleConstructor(l,t))throw l;null===g&&(g=l),b++}else r.property(o,l[o])}),this),c&&y.length>1&&b===y.length)throw g;return}this.assert(m,"expected #{this} to "+f+"include "+n.inspect(l),"expected #{this} to not "+f+"include "+n.inspect(l))}function s(){var l=u(this,"object");this.assert(null!=l,"expected #{this} to exist","expected #{this} to not exist")}function c(){var l=u(this,"object"),e=n.type(l);this.assert("Arguments"===e,"expected #{this} to be arguments but got "+e,"expected #{this} to not be arguments")}function d(l,n){n&&u(this,"message",n);var e=u(this,"object");if(u(this,"deep")){var t=u(this,"lockSsfi");u(this,"lockSsfi",!0),this.eql(l),u(this,"lockSsfi",t)}else this.assert(l===e,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",l,this._obj,!0)}function p(l,n){n&&u(this,"message",n);var e=u(this,"eql");this.assert(e(l,u(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",l,this._obj,!0)}function f(l,o){o&&u(this,"message",o);var r,i=u(this,"object"),a=u(this,"doLength"),s=u(this,"message"),c=s?s+": ":"",d=u(this,"ssfi"),p=n.type(i).toLowerCase(),f=n.type(l).toLowerCase(),h=!0;if(a&&"map"!==p&&"set"!==p&&new e(i,s,d,!0).to.have.property("length"),a||"date"!==p||"date"===f?"number"===f||!a&&"number"!==p?a||"date"===p||"number"===p?h=!1:r=c+"expected "+("string"===p?"'"+i+"'":i)+" to be a number or a date":r=c+"the argument to above must be a number":r=c+"the argument to above must be a date",h)throw new t(r,void 0,d);if(a){var m,y="length";"map"===p||"set"===p?(y="size",m=i.size):m=i.length,this.assert(m>l,"expected #{this} to have a "+y+" above #{exp} but got #{act}","expected #{this} to not have a "+y+" above #{exp}",l,m)}else this.assert(i>l,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",l)}function h(l,o){o&&u(this,"message",o);var r,i=u(this,"object"),a=u(this,"doLength"),s=u(this,"message"),c=s?s+": ":"",d=u(this,"ssfi"),p=n.type(i).toLowerCase(),f=n.type(l).toLowerCase(),h=!0;if(a&&"map"!==p&&"set"!==p&&new e(i,s,d,!0).to.have.property("length"),a||"date"!==p||"date"===f?"number"===f||!a&&"number"!==p?a||"date"===p||"number"===p?h=!1:r=c+"expected "+("string"===p?"'"+i+"'":i)+" to be a number or a date":r=c+"the argument to least must be a number":r=c+"the argument to least must be a date",h)throw new t(r,void 0,d);if(a){var m,y="length";"map"===p||"set"===p?(y="size",m=i.size):m=i.length,this.assert(m>=l,"expected #{this} to have a "+y+" at least #{exp} but got #{act}","expected #{this} to have a "+y+" below #{exp}",l,m)}else this.assert(i>=l,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",l)}function m(l,o){o&&u(this,"message",o);var r,i=u(this,"object"),a=u(this,"doLength"),s=u(this,"message"),c=s?s+": ":"",d=u(this,"ssfi"),p=n.type(i).toLowerCase(),f=n.type(l).toLowerCase(),h=!0;if(a&&"map"!==p&&"set"!==p&&new e(i,s,d,!0).to.have.property("length"),a||"date"!==p||"date"===f?"number"===f||!a&&"number"!==p?a||"date"===p||"number"===p?h=!1:r=c+"expected "+("string"===p?"'"+i+"'":i)+" to be a number or a date":r=c+"the argument to below must be a number":r=c+"the argument to below must be a date",h)throw new t(r,void 0,d);if(a){var m,y="length";"map"===p||"set"===p?(y="size",m=i.size):m=i.length,this.assert(ml===n,b="";f&&(b+="deep "),i&&(b+="own "),r&&(b+="nested "),b+="property ",p=i?Object.prototype.hasOwnProperty.call(s,l):r?m.exists:n.hasProperty(s,l),h&&1!==arguments.length||this.assert(p,"expected #{this} to have "+b+n.inspect(l),"expected #{this} to not have "+b+n.inspect(l)),arguments.length>1&&this.assert(p&&g(e,y),"expected #{this} to have "+b+n.inspect(l)+" of #{exp}, but got #{act}","expected #{this} to not have "+b+n.inspect(l)+" of #{act}",e,y),u(this,"object",y)}function v(l,n,e){u(this,"own",!0),b.apply(this,arguments)}function _(l,e,t){"string"==typeof e&&(t=e,e=null),t&&u(this,"message",t);var o=u(this,"object"),r=Object.getOwnPropertyDescriptor(Object(o),l),i=u(this,"eql");r&&e?this.assert(i(e,r),"expected the own property descriptor for "+n.inspect(l)+" on #{this} to match "+n.inspect(e)+", got "+n.inspect(r),"expected the own property descriptor for "+n.inspect(l)+" on #{this} to not match "+n.inspect(e),e,r,!0):this.assert(r,"expected #{this} to have an own property descriptor for "+n.inspect(l),"expected #{this} to not have an own property descriptor for "+n.inspect(l)),u(this,"object",r)}function w(){u(this,"doLength",!0)}function k(l,t){t&&u(this,"message",t);var o,r=u(this,"object"),i=n.type(r).toLowerCase(),a=u(this,"message"),s=u(this,"ssfi"),c="length";switch(i){case"map":case"set":c="size",o=r.size;break;default:new e(r,a,s,!0).to.have.property("length"),o=r.length}this.assert(o==l,"expected #{this} to have a "+c+" of #{exp} but got #{act}","expected #{this} to not have a "+c+" of #{act}",l,o)}function x(l,n){n&&u(this,"message",n);var e=u(this,"object");this.assert(l.exec(e),"expected #{this} to match "+l,"expected #{this} not to match "+l)}function E(l){var e,o,r=u(this,"object"),i=n.type(r),a=n.type(l),s=u(this,"ssfi"),c=u(this,"deep"),d="",p=!0,f=u(this,"message"),h=(f=f?f+": ":"")+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if("Map"===i||"Set"===i)d=c?"deeply ":"",o=[],r.forEach((function(l,n){o.push(n)})),"Array"!==a&&(l=Array.prototype.slice.call(arguments));else{switch(o=n.getOwnEnumerableProperties(r),a){case"Array":if(arguments.length>1)throw new t(h,void 0,s);break;case"Object":if(arguments.length>1)throw new t(h,void 0,s);l=Object.keys(l);break;default:l=Array.prototype.slice.call(arguments)}l=l.map((function(l){return"symbol"==typeof l?l:String(l)}))}if(!l.length)throw new t(f+"keys required",void 0,s);var m=l.length,y=u(this,"any"),g=u(this,"all"),b=l,v=c?u(this,"eql"):(l,n)=>l===n;if(y||g||(g=!0),y&&(p=b.some((function(l){return o.some((function(n){return v(l,n)}))}))),g&&(p=b.every((function(l){return o.some((function(n){return v(l,n)}))})),u(this,"contains")||(p=p&&l.length==o.length)),m>1){var _=(l=l.map((function(l){return n.inspect(l)}))).pop();g&&(e=l.join(", ")+", and "+_),y&&(e=l.join(", ")+", or "+_)}else e=n.inspect(l[0]);e=(m>1?"keys ":"key ")+e,e=(u(this,"contains")?"contain ":"have ")+e,this.assert(p,"expected #{this} to "+d+e,"expected #{this} to not "+d+e,b.slice(0).sort(n.compareByInspect),o.sort(n.compareByInspect),!0)}function T(l,t,o){o&&u(this,"message",o);var r,i=u(this,"object"),a=u(this,"ssfi"),s=u(this,"message"),c=u(this,"negate")||!1;new e(i,s,a,!0).is.a("function"),(l instanceof RegExp||"string"==typeof l)&&(t=l,l=null);try{i()}catch(l){r=l}var d=void 0===l&&void 0===t,p=Boolean(l&&t),f=!1,h=!1;if(d||!d&&!c){var m="an error";l instanceof Error?m="#{exp}":l&&(m=n.checkError.getConstructorName(l)),this.assert(r,"expected #{this} to throw "+m,"expected #{this} to not throw an error but #{act} was thrown",l&&l.toString(),r instanceof Error?r.toString():"string"==typeof r?r:r&&n.checkError.getConstructorName(r))}if(l&&r&&(l instanceof Error&&n.checkError.compatibleInstance(r,l)===c&&(p&&c?f=!0:this.assert(c,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(r&&!c?" but #{act} was thrown":""),l.toString(),r.toString())),n.checkError.compatibleConstructor(r,l)===c&&(p&&c?f=!0:this.assert(c,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(r?" but #{act} was thrown":""),l instanceof Error?l.toString():l&&n.checkError.getConstructorName(l),r instanceof Error?r.toString():r&&n.checkError.getConstructorName(r)))),r&&null!=t){var y="including";t instanceof RegExp&&(y="matching"),n.checkError.compatibleMessage(r,t)===c&&(p&&c?h=!0:this.assert(c,"expected #{this} to throw error "+y+" #{exp} but got #{act}","expected #{this} to throw error not "+y+" #{exp}",t,n.checkError.getMessage(r)))}f&&h&&this.assert(c,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(r?" but #{act} was thrown":""),l instanceof Error?l.toString():l&&n.checkError.getConstructorName(l),r instanceof Error?r.toString():r&&n.checkError.getConstructorName(r)),u(this,"object",r)}function O(l,e){e&&u(this,"message",e);var t=u(this,"object"),o=u(this,"itself"),r="function"!=typeof t||o?t[l]:t.prototype[l];this.assert("function"==typeof r,"expected #{this} to respond to "+n.inspect(l),"expected #{this} to not respond to "+n.inspect(l))}function A(l,e){e&&u(this,"message",e);var t=l(u(this,"object"));this.assert(t,"expected #{this} to satisfy "+n.objDisplay(l),"expected #{this} to not satisfy"+n.objDisplay(l),!u(this,"negate"),t)}function S(l,n,o){o&&u(this,"message",o);var r=u(this,"object"),i=u(this,"message"),a=u(this,"ssfi");if(new e(r,i,a,!0).is.a("number"),"number"!=typeof l||"number"!=typeof n)throw new t((i=i?i+": ":"")+"the arguments to closeTo or approximately must be numbers"+(void 0===n?", and a delta is required":""),void 0,a);this.assert(Math.abs(r-l)<=n,"expected #{this} to be close to "+l+" +/- "+n,"expected #{this} not to be close to "+l+" +/- "+n)}function C(l,n,t){t&&u(this,"message",t);var o,r=u(this,"object"),i=u(this,"message"),a=u(this,"ssfi");new e(r,i,a,!0).is.a("function"),n?(new e(l,i,a,!0).to.have.property(n),o=l[n]):(new e(l,i,a,!0).is.a("function"),o=l()),r();var s=null==n?l():l[n],c=null==n?o:"."+n;u(this,"deltaMsgObj",c),u(this,"initialDeltaValue",o),u(this,"finalDeltaValue",s),u(this,"deltaBehavior","change"),u(this,"realDelta",s!==o),this.assert(o!==s,"expected "+c+" to change","expected "+c+" to not change")}function j(l,n,t){t&&u(this,"message",t);var o,r=u(this,"object"),i=u(this,"message"),a=u(this,"ssfi");new e(r,i,a,!0).is.a("function"),n?(new e(l,i,a,!0).to.have.property(n),o=l[n]):(new e(l,i,a,!0).is.a("function"),o=l()),new e(o,i,a,!0).is.a("number"),r();var s=null==n?l():l[n],c=null==n?o:"."+n;u(this,"deltaMsgObj",c),u(this,"initialDeltaValue",o),u(this,"finalDeltaValue",s),u(this,"deltaBehavior","increase"),u(this,"realDelta",s-o),this.assert(s-o>0,"expected "+c+" to increase","expected "+c+" to not increase")}function P(l,n,t){t&&u(this,"message",t);var o,r=u(this,"object"),i=u(this,"message"),a=u(this,"ssfi");new e(r,i,a,!0).is.a("function"),n?(new e(l,i,a,!0).to.have.property(n),o=l[n]):(new e(l,i,a,!0).is.a("function"),o=l()),new e(o,i,a,!0).is.a("number"),r();var s=null==n?l():l[n],c=null==n?o:"."+n;u(this,"deltaMsgObj",c),u(this,"initialDeltaValue",o),u(this,"finalDeltaValue",s),u(this,"deltaBehavior","decrease"),u(this,"realDelta",o-s),this.assert(s-o<0,"expected "+c+" to decrease","expected "+c+" to not decrease")}["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach((function(l){e.addProperty(l)})),e.addProperty("not",(function(){u(this,"negate",!0)})),e.addProperty("deep",(function(){u(this,"deep",!0)})),e.addProperty("nested",(function(){u(this,"nested",!0)})),e.addProperty("own",(function(){u(this,"own",!0)})),e.addProperty("ordered",(function(){u(this,"ordered",!0)})),e.addProperty("any",(function(){u(this,"any",!0),u(this,"all",!1)})),e.addProperty("all",(function(){u(this,"all",!0),u(this,"any",!1)})),e.addChainableMethod("an",o),e.addChainableMethod("a",o),e.addChainableMethod("include",a,i),e.addChainableMethod("contain",a,i),e.addChainableMethod("contains",a,i),e.addChainableMethod("includes",a,i),e.addProperty("ok",(function(){this.assert(u(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")})),e.addProperty("true",(function(){this.assert(!0===u(this,"object"),"expected #{this} to be true","expected #{this} to be false",!u(this,"negate"))})),e.addProperty("false",(function(){this.assert(!1===u(this,"object"),"expected #{this} to be false","expected #{this} to be true",!!u(this,"negate"))})),e.addProperty("null",(function(){this.assert(null===u(this,"object"),"expected #{this} to be null","expected #{this} not to be null")})),e.addProperty("undefined",(function(){this.assert(void 0===u(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")})),e.addProperty("NaN",(function(){this.assert(n.isNaN(u(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")})),e.addProperty("exist",s),e.addProperty("exists",s),e.addProperty("empty",(function(){var l,e=u(this,"object"),o=u(this,"ssfi"),r=u(this,"message");switch(r=r?r+": ":"",n.type(e).toLowerCase()){case"array":case"string":l=e.length;break;case"map":case"set":l=e.size;break;case"weakmap":case"weakset":throw new t(r+".empty was passed a weak collection",void 0,o);case"function":var i=r+".empty was passed a function "+n.getName(e);throw new t(i.trim(),void 0,o);default:if(e!==Object(e))throw new t(r+".empty was passed non-string primitive "+n.inspect(e),void 0,o);l=Object.keys(e).length}this.assert(0===l,"expected #{this} to be empty","expected #{this} not to be empty")})),e.addProperty("arguments",c),e.addProperty("Arguments",c),e.addMethod("equal",d),e.addMethod("equals",d),e.addMethod("eq",d),e.addMethod("eql",p),e.addMethod("eqls",p),e.addMethod("above",f),e.addMethod("gt",f),e.addMethod("greaterThan",f),e.addMethod("least",h),e.addMethod("gte",h),e.addMethod("greaterThanOrEqual",h),e.addMethod("below",m),e.addMethod("lt",m),e.addMethod("lessThan",m),e.addMethod("most",y),e.addMethod("lte",y),e.addMethod("lessThanOrEqual",y),e.addMethod("within",(function(l,o,r){r&&u(this,"message",r);var i,a=u(this,"object"),s=u(this,"doLength"),c=u(this,"message"),d=c?c+": ":"",p=u(this,"ssfi"),f=n.type(a).toLowerCase(),h=n.type(l).toLowerCase(),m=n.type(o).toLowerCase(),y=!0,g="date"===h&&"date"===m?l.toISOString()+".."+o.toISOString():l+".."+o;if(s&&"map"!==f&&"set"!==f&&new e(a,c,p,!0).to.have.property("length"),s||"date"!==f||"date"===h&&"date"===m?"number"===h&&"number"===m||!s&&"number"!==f?s||"date"===f||"number"===f?y=!1:i=d+"expected "+("string"===f?"'"+a+"'":a)+" to be a number or a date":i=d+"the arguments to within must be numbers":i=d+"the arguments to within must be dates",y)throw new t(i,void 0,p);if(s){var b,v="length";"map"===f||"set"===f?(v="size",b=a.size):b=a.length,this.assert(b>=l&&b<=o,"expected #{this} to have a "+v+" within "+g,"expected #{this} to not have a "+v+" within "+g)}else this.assert(a>=l&&a<=o,"expected #{this} to be within "+g,"expected #{this} to not be within "+g)})),e.addMethod("instanceof",g),e.addMethod("instanceOf",g),e.addMethod("property",b),e.addMethod("ownProperty",v),e.addMethod("haveOwnProperty",v),e.addMethod("ownPropertyDescriptor",_),e.addMethod("haveOwnPropertyDescriptor",_),e.addChainableMethod("length",k,w),e.addChainableMethod("lengthOf",k,w),e.addMethod("match",x),e.addMethod("matches",x),e.addMethod("string",(function(l,t){t&&u(this,"message",t);var o=u(this,"object"),r=u(this,"message"),i=u(this,"ssfi");new e(o,r,i,!0).is.a("string"),this.assert(~o.indexOf(l),"expected #{this} to contain "+n.inspect(l),"expected #{this} to not contain "+n.inspect(l))})),e.addMethod("keys",E),e.addMethod("key",E),e.addMethod("throw",T),e.addMethod("throws",T),e.addMethod("Throw",T),e.addMethod("respondTo",O),e.addMethod("respondsTo",O),e.addProperty("itself",(function(){u(this,"itself",!0)})),e.addMethod("satisfy",A),e.addMethod("satisfies",A),e.addMethod("closeTo",S),e.addMethod("approximately",S),e.addMethod("members",(function(l,n){n&&u(this,"message",n);var t=u(this,"object"),o=u(this,"message"),r=u(this,"ssfi");new e(t,o,r,!0).to.be.an("array"),new e(l,o,r,!0).to.be.an("array");var i,a,s,c=u(this,"contains"),d=u(this,"ordered");c?(a="expected #{this} to be "+(i=d?"an ordered superset":"a superset")+" of #{exp}",s="expected #{this} to not be "+i+" of #{exp}"):(a="expected #{this} to have the same "+(i=d?"ordered members":"members")+" as #{exp}",s="expected #{this} to not have the same "+i+" as #{exp}");var p=u(this,"deep")?u(this,"eql"):void 0;this.assert(function(l,n,e,t,u){if(!t){if(l.length!==n.length)return!1;n=n.slice()}return l.every((function(l,o){if(u)return e?e(l,n[o]):l===n[o];if(!e){var r=n.indexOf(l);return-1!==r&&(t||n.splice(r,1),!0)}return n.some((function(u,o){return!!e(l,u)&&(t||n.splice(o,1),!0)}))}))}(l,t,p,c,d),a,s,l,t,!0)})),e.addMethod("oneOf",(function(l,n){n&&u(this,"message",n);var t=u(this,"object"),o=u(this,"message"),r=u(this,"ssfi"),i=u(this,"contains"),a=u(this,"deep"),s=u(this,"eql");new e(l,o,r,!0).to.be.an("array"),i?this.assert(l.some((function(l){return t.indexOf(l)>-1})),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",l,t):a?this.assert(l.some((function(l){return s(t,l)})),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",l,t):this.assert(l.indexOf(t)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",l,t)})),e.addMethod("change",C),e.addMethod("changes",C),e.addMethod("increase",j),e.addMethod("increases",j),e.addMethod("decrease",P),e.addMethod("decreases",P),e.addMethod("by",(function(l,n){n&&u(this,"message",n);var e,t=u(this,"deltaMsgObj"),o=u(this,"initialDeltaValue"),r=u(this,"finalDeltaValue"),i=u(this,"deltaBehavior"),a=u(this,"realDelta");e="change"===i?Math.abs(r-o)===Math.abs(l):a===Math.abs(l),this.assert(e,"expected "+t+" to "+i+" by "+l,"expected "+t+" to not "+i+" by "+l)})),e.addProperty("extensible",(function(){var l=u(this,"object"),n=l===Object(l)&&Object.isExtensible(l);this.assert(n,"expected #{this} to be extensible","expected #{this} to not be extensible")})),e.addProperty("sealed",(function(){var l=u(this,"object"),n=l!==Object(l)||Object.isSealed(l);this.assert(n,"expected #{this} to be sealed","expected #{this} to not be sealed")})),e.addProperty("frozen",(function(){var l=u(this,"object"),n=l!==Object(l)||Object.isFrozen(l);this.assert(n,"expected #{this} to be frozen","expected #{this} to not be frozen")})),e.addProperty("finite",(function(l){var n=u(this,"object");this.assert("number"==typeof n&&isFinite(n),"expected #{this} to be a finite number","expected #{this} to not be a finite number")}))}},4740:l=>{l.exports=function(l,n){var e=l.Assertion,t=n.flag,u=l.assert=function(n,t){new e(null,null,l.assert,!0).assert(n,t,"[ negation message unavailable ]")};u.fail=function(n,e,t,o){throw arguments.length<2&&(t=n,n=void 0),t=t||"assert.fail()",new l.AssertionError(t,{actual:n,expected:e,operator:o},u.fail)},u.isOk=function(l,n){new e(l,n,u.isOk,!0).is.ok},u.isNotOk=function(l,n){new e(l,n,u.isNotOk,!0).is.not.ok},u.equal=function(l,n,o){var r=new e(l,o,u.equal,!0);r.assert(n==t(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",n,l,!0)},u.notEqual=function(l,n,o){var r=new e(l,o,u.notEqual,!0);r.assert(n!=t(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",n,l,!0)},u.strictEqual=function(l,n,t){new e(l,t,u.strictEqual,!0).to.equal(n)},u.notStrictEqual=function(l,n,t){new e(l,t,u.notStrictEqual,!0).to.not.equal(n)},u.deepEqual=u.deepStrictEqual=function(l,n,t){new e(l,t,u.deepEqual,!0).to.eql(n)},u.notDeepEqual=function(l,n,t){new e(l,t,u.notDeepEqual,!0).to.not.eql(n)},u.isAbove=function(l,n,t){new e(l,t,u.isAbove,!0).to.be.above(n)},u.isAtLeast=function(l,n,t){new e(l,t,u.isAtLeast,!0).to.be.least(n)},u.isBelow=function(l,n,t){new e(l,t,u.isBelow,!0).to.be.below(n)},u.isAtMost=function(l,n,t){new e(l,t,u.isAtMost,!0).to.be.most(n)},u.isTrue=function(l,n){new e(l,n,u.isTrue,!0).is.true},u.isNotTrue=function(l,n){new e(l,n,u.isNotTrue,!0).to.not.equal(!0)},u.isFalse=function(l,n){new e(l,n,u.isFalse,!0).is.false},u.isNotFalse=function(l,n){new e(l,n,u.isNotFalse,!0).to.not.equal(!1)},u.isNull=function(l,n){new e(l,n,u.isNull,!0).to.equal(null)},u.isNotNull=function(l,n){new e(l,n,u.isNotNull,!0).to.not.equal(null)},u.isNaN=function(l,n){new e(l,n,u.isNaN,!0).to.be.NaN},u.isNotNaN=function(l,n){new e(l,n,u.isNotNaN,!0).not.to.be.NaN},u.exists=function(l,n){new e(l,n,u.exists,!0).to.exist},u.notExists=function(l,n){new e(l,n,u.notExists,!0).to.not.exist},u.isUndefined=function(l,n){new e(l,n,u.isUndefined,!0).to.equal(void 0)},u.isDefined=function(l,n){new e(l,n,u.isDefined,!0).to.not.equal(void 0)},u.isFunction=function(l,n){new e(l,n,u.isFunction,!0).to.be.a("function")},u.isNotFunction=function(l,n){new e(l,n,u.isNotFunction,!0).to.not.be.a("function")},u.isObject=function(l,n){new e(l,n,u.isObject,!0).to.be.a("object")},u.isNotObject=function(l,n){new e(l,n,u.isNotObject,!0).to.not.be.a("object")},u.isArray=function(l,n){new e(l,n,u.isArray,!0).to.be.an("array")},u.isNotArray=function(l,n){new e(l,n,u.isNotArray,!0).to.not.be.an("array")},u.isString=function(l,n){new e(l,n,u.isString,!0).to.be.a("string")},u.isNotString=function(l,n){new e(l,n,u.isNotString,!0).to.not.be.a("string")},u.isNumber=function(l,n){new e(l,n,u.isNumber,!0).to.be.a("number")},u.isNotNumber=function(l,n){new e(l,n,u.isNotNumber,!0).to.not.be.a("number")},u.isFinite=function(l,n){new e(l,n,u.isFinite,!0).to.be.finite},u.isBoolean=function(l,n){new e(l,n,u.isBoolean,!0).to.be.a("boolean")},u.isNotBoolean=function(l,n){new e(l,n,u.isNotBoolean,!0).to.not.be.a("boolean")},u.typeOf=function(l,n,t){new e(l,t,u.typeOf,!0).to.be.a(n)},u.notTypeOf=function(l,n,t){new e(l,t,u.notTypeOf,!0).to.not.be.a(n)},u.instanceOf=function(l,n,t){new e(l,t,u.instanceOf,!0).to.be.instanceOf(n)},u.notInstanceOf=function(l,n,t){new e(l,t,u.notInstanceOf,!0).to.not.be.instanceOf(n)},u.include=function(l,n,t){new e(l,t,u.include,!0).include(n)},u.notInclude=function(l,n,t){new e(l,t,u.notInclude,!0).not.include(n)},u.deepInclude=function(l,n,t){new e(l,t,u.deepInclude,!0).deep.include(n)},u.notDeepInclude=function(l,n,t){new e(l,t,u.notDeepInclude,!0).not.deep.include(n)},u.nestedInclude=function(l,n,t){new e(l,t,u.nestedInclude,!0).nested.include(n)},u.notNestedInclude=function(l,n,t){new e(l,t,u.notNestedInclude,!0).not.nested.include(n)},u.deepNestedInclude=function(l,n,t){new e(l,t,u.deepNestedInclude,!0).deep.nested.include(n)},u.notDeepNestedInclude=function(l,n,t){new e(l,t,u.notDeepNestedInclude,!0).not.deep.nested.include(n)},u.ownInclude=function(l,n,t){new e(l,t,u.ownInclude,!0).own.include(n)},u.notOwnInclude=function(l,n,t){new e(l,t,u.notOwnInclude,!0).not.own.include(n)},u.deepOwnInclude=function(l,n,t){new e(l,t,u.deepOwnInclude,!0).deep.own.include(n)},u.notDeepOwnInclude=function(l,n,t){new e(l,t,u.notDeepOwnInclude,!0).not.deep.own.include(n)},u.match=function(l,n,t){new e(l,t,u.match,!0).to.match(n)},u.notMatch=function(l,n,t){new e(l,t,u.notMatch,!0).to.not.match(n)},u.property=function(l,n,t){new e(l,t,u.property,!0).to.have.property(n)},u.notProperty=function(l,n,t){new e(l,t,u.notProperty,!0).to.not.have.property(n)},u.propertyVal=function(l,n,t,o){new e(l,o,u.propertyVal,!0).to.have.property(n,t)},u.notPropertyVal=function(l,n,t,o){new e(l,o,u.notPropertyVal,!0).to.not.have.property(n,t)},u.deepPropertyVal=function(l,n,t,o){new e(l,o,u.deepPropertyVal,!0).to.have.deep.property(n,t)},u.notDeepPropertyVal=function(l,n,t,o){new e(l,o,u.notDeepPropertyVal,!0).to.not.have.deep.property(n,t)},u.ownProperty=function(l,n,t){new e(l,t,u.ownProperty,!0).to.have.own.property(n)},u.notOwnProperty=function(l,n,t){new e(l,t,u.notOwnProperty,!0).to.not.have.own.property(n)},u.ownPropertyVal=function(l,n,t,o){new e(l,o,u.ownPropertyVal,!0).to.have.own.property(n,t)},u.notOwnPropertyVal=function(l,n,t,o){new e(l,o,u.notOwnPropertyVal,!0).to.not.have.own.property(n,t)},u.deepOwnPropertyVal=function(l,n,t,o){new e(l,o,u.deepOwnPropertyVal,!0).to.have.deep.own.property(n,t)},u.notDeepOwnPropertyVal=function(l,n,t,o){new e(l,o,u.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(n,t)},u.nestedProperty=function(l,n,t){new e(l,t,u.nestedProperty,!0).to.have.nested.property(n)},u.notNestedProperty=function(l,n,t){new e(l,t,u.notNestedProperty,!0).to.not.have.nested.property(n)},u.nestedPropertyVal=function(l,n,t,o){new e(l,o,u.nestedPropertyVal,!0).to.have.nested.property(n,t)},u.notNestedPropertyVal=function(l,n,t,o){new e(l,o,u.notNestedPropertyVal,!0).to.not.have.nested.property(n,t)},u.deepNestedPropertyVal=function(l,n,t,o){new e(l,o,u.deepNestedPropertyVal,!0).to.have.deep.nested.property(n,t)},u.notDeepNestedPropertyVal=function(l,n,t,o){new e(l,o,u.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(n,t)},u.lengthOf=function(l,n,t){new e(l,t,u.lengthOf,!0).to.have.lengthOf(n)},u.hasAnyKeys=function(l,n,t){new e(l,t,u.hasAnyKeys,!0).to.have.any.keys(n)},u.hasAllKeys=function(l,n,t){new e(l,t,u.hasAllKeys,!0).to.have.all.keys(n)},u.containsAllKeys=function(l,n,t){new e(l,t,u.containsAllKeys,!0).to.contain.all.keys(n)},u.doesNotHaveAnyKeys=function(l,n,t){new e(l,t,u.doesNotHaveAnyKeys,!0).to.not.have.any.keys(n)},u.doesNotHaveAllKeys=function(l,n,t){new e(l,t,u.doesNotHaveAllKeys,!0).to.not.have.all.keys(n)},u.hasAnyDeepKeys=function(l,n,t){new e(l,t,u.hasAnyDeepKeys,!0).to.have.any.deep.keys(n)},u.hasAllDeepKeys=function(l,n,t){new e(l,t,u.hasAllDeepKeys,!0).to.have.all.deep.keys(n)},u.containsAllDeepKeys=function(l,n,t){new e(l,t,u.containsAllDeepKeys,!0).to.contain.all.deep.keys(n)},u.doesNotHaveAnyDeepKeys=function(l,n,t){new e(l,t,u.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(n)},u.doesNotHaveAllDeepKeys=function(l,n,t){new e(l,t,u.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(n)},u.throws=function(l,n,o,r){("string"==typeof n||n instanceof RegExp)&&(o=n,n=null);var i=new e(l,r,u.throws,!0).to.throw(n,o);return t(i,"object")},u.doesNotThrow=function(l,n,t,o){("string"==typeof n||n instanceof RegExp)&&(t=n,n=null),new e(l,o,u.doesNotThrow,!0).to.not.throw(n,t)},u.operator=function(o,r,i,a){var s;switch(r){case"==":s=o==i;break;case"===":s=o===i;break;case">":s=o>i;break;case">=":s=o>=i;break;case"<":s=o{l.exports=function(l,n){l.expect=function(n,e){return new l.Assertion(n,e)},l.expect.fail=function(n,e,t,u){throw arguments.length<2&&(t=n,n=void 0),t=t||"expect.fail()",new l.AssertionError(t,{actual:n,expected:e,operator:u},l.expect.fail)}}},705:l=>{l.exports=function(l,n){var e=l.Assertion;function t(){Object.defineProperty(Object.prototype,"should",{set:function(l){Object.defineProperty(this,"should",{value:l,enumerable:!0,configurable:!0,writable:!0})},get:function l(){return this instanceof String||this instanceof Number||this instanceof Boolean||"function"==typeof Symbol&&this instanceof Symbol||"function"==typeof BigInt&&this instanceof BigInt?new e(this.valueOf(),null,l):new e(this,null,l)},configurable:!0});var n={fail:function(e,t,u,o){throw arguments.length<2&&(u=e,e=void 0),u=u||"should.fail()",new l.AssertionError(u,{actual:e,expected:t,operator:o},n.fail)},equal:function(l,n,t){new e(l,t).to.equal(n)},Throw:function(l,n,t,u){new e(l,u).to.Throw(n,t)},exist:function(l,n){new e(l,n).to.exist},not:{}};return n.not.equal=function(l,n,t){new e(l,t).to.not.equal(n)},n.not.Throw=function(l,n,t,u){new e(l,u).to.not.Throw(n,t)},n.not.exist=function(l,n){new e(l,n).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}l.should=t,l.Should=t}},1949:(l,n,e)=>{var t=e(5100),u=e(9731),o=e(3226),r=e(8515),i=e(8316),a="function"==typeof Object.setPrototypeOf,s=function(){},c=Object.getOwnPropertyNames(s).filter((function(l){var n=Object.getOwnPropertyDescriptor(s,l);return"object"!=typeof n||!n.configurable})),d=Function.prototype.call,p=Function.prototype.apply;l.exports=function(l,n,e,s){"function"!=typeof s&&(s=function(){});var f={method:e,chainingBehavior:s};l.__methods||(l.__methods={}),l.__methods[n]=f,Object.defineProperty(l,n,{get:function(){f.chainingBehavior.call(this);var e=function(){o(this,"lockSsfi")||o(this,"ssfi",e);var l=f.method.apply(this,arguments);if(void 0!==l)return l;var n=new u.Assertion;return i(this,n),n};if(t(e,n,!0),a){var s=Object.create(this);s.call=d,s.apply=p,Object.setPrototypeOf(e,s)}else Object.getOwnPropertyNames(l).forEach((function(n){if(-1===c.indexOf(n)){var t=Object.getOwnPropertyDescriptor(l,n);Object.defineProperty(e,n,t)}}));return i(this,e),r(e)},configurable:!0})}},5100:l=>{var n=Object.getOwnPropertyDescriptor((function(){}),"length");l.exports=function(l,e,t){return n.configurable?(Object.defineProperty(l,"length",{get:function(){if(t)throw Error("Invalid Chai property: "+e+'.length. Due to a compatibility issue, "length" cannot directly follow "'+e+'". Use "'+e+'.lengthOf" instead.');throw Error("Invalid Chai property: "+e+'.length. See docs for proper usage of "'+e+'".')}}),l):l}},7180:(l,n,e)=>{var t=e(5100),u=e(9731),o=e(3226),r=e(8515),i=e(8316);l.exports=function(l,n,e){var a=function(){o(this,"lockSsfi")||o(this,"ssfi",a);var l=e.apply(this,arguments);if(void 0!==l)return l;var n=new u.Assertion;return i(this,n),n};t(a,n,!1),l[n]=r(a,n)}},7444:(l,n,e)=>{var t=e(9731),u=e(3226),o=e(3993),r=e(8316);l.exports=function(l,n,e){e=void 0===e?function(){}:e,Object.defineProperty(l,n,{get:function l(){o()||u(this,"lockSsfi")||u(this,"ssfi",l);var n=e.call(this);if(void 0!==n)return n;var i=new t.Assertion;return r(this,i),i},configurable:!0})}},5682:(l,n,e)=>{var t=e(154);l.exports=function(l,n){return t(l){var t=e(9296),u=e(3226),o=e(5855);l.exports=function(l,n){var e=u(l,"message"),r=u(l,"ssfi");e=e?e+": ":"",l=u(l,"object"),(n=n.map((function(l){return l.toLowerCase()}))).sort();var i=n.map((function(l,e){var t=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an":"a";return(n.length>1&&e===n.length-1?"or ":"")+t+" "+l})).join(", "),a=o(l).toLowerCase();if(!n.some((function(l){return a===l})))throw new t(e+"object tested must be "+i+", but "+a+" given",void 0,r)}},3226:l=>{l.exports=function(l,n,e){var t=l.__flags||(l.__flags=Object.create(null));if(3!==arguments.length)return t[n];t[n]=e}},8808:l=>{l.exports=function(l,n){return n.length>4?n[4]:l._obj}},7807:(l,n,e)=>{var t=e(3226),u=e(8808),o=e(3917);l.exports=function(l,n){var e=t(l,"negate"),r=t(l,"object"),i=n[3],a=u(l,n),s=e?n[2]:n[1],c=t(l,"message");return"function"==typeof s&&(s=s()),s=(s=s||"").replace(/#\{this\}/g,(function(){return o(r)})).replace(/#\{act\}/g,(function(){return o(a)})).replace(/#\{exp\}/g,(function(){return o(i)})),c?c+": "+s:s}},7602:(l,n,e)=>{var t=e(5855),u=e(3226);l.exports=function(l,n){var e=u(l,"operator"),o=u(l,"negate"),r=n[3],i=o?n[2]:n[1];if(e)return e;if("function"==typeof i&&(i=i()),(i=i||"")&&!/\shave\s/.test(i)){var a=function(l){var n=t(l);return-1!==["Array","Object","function"].indexOf(n)}(r);return/\snot\s/.test(i)?a?"notDeepStrictEqual":"notStrictEqual":a?"deepStrictEqual":"strictEqual"}}},6491:(l,n,e)=>{var t=e(7806);l.exports=function(l){return Object.keys(l).concat(t(l))}},7806:l=>{l.exports=function(l){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(l).filter((function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable}))}},6807:l=>{l.exports=function(l){var n=Object.getOwnPropertyNames(l);function e(l){-1===n.indexOf(l)&&n.push(l)}for(var t=Object.getPrototypeOf(l);null!==t;)Object.getOwnPropertyNames(t).forEach(e),t=Object.getPrototypeOf(t);return n}},1118:(l,n,e)=>{var t=e(7893);n.test=e(4608),n.type=e(5855),n.expectTypes=e(5964),n.getMessage=e(7807),n.getActual=e(8808),n.inspect=e(154),n.objDisplay=e(3917),n.flag=e(3226),n.transferFlags=e(8316),n.eql=e(4964),n.getPathInfo=t.getPathInfo,n.hasProperty=t.hasProperty,n.getName=e(6708),n.addProperty=e(7444),n.addMethod=e(7180),n.overwriteProperty=e(374),n.overwriteMethod=e(6078),n.addChainableMethod=e(1949),n.overwriteChainableMethod=e(3863),n.compareByInspect=e(5682),n.getOwnEnumerablePropertySymbols=e(7806),n.getOwnEnumerableProperties=e(6491),n.checkError=e(1360),n.proxify=e(8515),n.addLengthGuard=e(5100),n.isProxyEnabled=e(3993),n.isNaN=e(1915),n.getOperator=e(7602)},154:(l,n,e)=>{e(6708);var t=e(2255),u=e(752);l.exports=function(l,n,e,o){var r={colors:o,depth:void 0===e?2:e,showHidden:n,truncate:u.truncateThreshold?u.truncateThreshold:1/0};return t.inspect(l,r)}},1915:l=>{l.exports=Number.isNaN||function(l){return l!=l}},3993:(l,n,e)=>{var t=e(752);l.exports=function(){return t.useProxy&&"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect}},3917:(l,n,e)=>{var t=e(154),u=e(752);l.exports=function(l){var n=t(l),e=Object.prototype.toString.call(l);if(u.truncateThreshold&&n.length>=u.truncateThreshold){if("[object Function]"===e)return l.name&&""!==l.name?"[Function: "+l.name+"]":"[Function]";if("[object Array]"===e)return"[ Array("+l.length+") ]";if("[object Object]"===e){var o=Object.keys(l);return"{ Object ("+(o.length>2?o.splice(0,2).join(", ")+", ...":o.join(", "))+") }"}return n}return n}},3863:(l,n,e)=>{var t=e(9731),u=e(8316);l.exports=function(l,n,e,o){var r=l.__methods[n],i=r.chainingBehavior;r.chainingBehavior=function(){var l=o(i).call(this);if(void 0!==l)return l;var n=new t.Assertion;return u(this,n),n};var a=r.method;r.method=function(){var l=e(a).apply(this,arguments);if(void 0!==l)return l;var n=new t.Assertion;return u(this,n),n}}},6078:(l,n,e)=>{var t=e(5100),u=e(9731),o=e(3226),r=e(8515),i=e(8316);l.exports=function(l,n,e){var a=l[n],s=function(){throw new Error(n+" is not a function")};a&&"function"==typeof a&&(s=a);var c=function(){o(this,"lockSsfi")||o(this,"ssfi",c);var l=o(this,"lockSsfi");o(this,"lockSsfi",!0);var n=e(s).apply(this,arguments);if(o(this,"lockSsfi",l),void 0!==n)return n;var t=new u.Assertion;return i(this,t),t};t(c,n,!1),l[n]=r(c,n)}},374:(l,n,e)=>{var t=e(9731),u=e(3226),o=e(3993),r=e(8316);l.exports=function(l,n,e){var i=Object.getOwnPropertyDescriptor(l,n),a=function(){};i&&"function"==typeof i.get&&(a=i.get),Object.defineProperty(l,n,{get:function l(){o()||u(this,"lockSsfi")||u(this,"ssfi",l);var n=u(this,"lockSsfi");u(this,"lockSsfi",!0);var i=e(a).call(this);if(u(this,"lockSsfi",n),void 0!==i)return i;var s=new t.Assertion;return r(this,s),s},configurable:!0})}},8515:(l,n,e)=>{var t=e(752),u=e(3226),o=e(6807),r=e(3993),i=["__flags","__methods","_obj","assert"];l.exports=function(l,n){return r()?new Proxy(l,{get:function l(e,r){if("string"==typeof r&&-1===t.proxyExcludedKeys.indexOf(r)&&!Reflect.has(e,r)){if(n)throw Error("Invalid Chai property: "+n+"."+r+'. See docs for proper usage of "'+n+'".');var a=null,s=4;throw o(e).forEach((function(l){if(!Object.prototype.hasOwnProperty(l)&&-1===i.indexOf(l)){var n=function(l,n,e){if(Math.abs(l.length-n.length)>=e)return e;for(var t=[],u=0;u<=l.length;u++)t[u]=Array(n.length+1).fill(0),t[u][0]=u;for(var o=0;o=e?t[u][o]=e:t[u][o]=Math.min(t[u-1][o]+1,t[u][o-1]+1,t[u-1][o-1]+(r===n.charCodeAt(o-1)?0:1))}return t[l.length][n.length]}(r,l,s);n{var t=e(3226);l.exports=function(l,n){var e=t(l,"negate"),u=n[0];return e?!u:u}},8316:l=>{l.exports=function(l,n,e){var t=l.__flags||(l.__flags=Object.create(null));for(var u in n.__flags||(n.__flags=Object.create(null)),e=3!==arguments.length||e,t)(e||"object"!==u&&"ssfi"!==u&&"lockSsfi"!==u&&"message"!=u)&&(n.__flags[u]=t[u])}},1360:(l,n,e)=>{"use strict";var t=e(6708);l.exports={compatibleInstance:function(l,n){return n instanceof Error&&l===n},compatibleConstructor:function(l,n){return n instanceof Error?l.constructor===n.constructor||l instanceof n.constructor:(n.prototype instanceof Error||n===Error)&&(l.constructor===n||l instanceof n)},compatibleMessage:function(l,n){var e="string"==typeof l?l:l.message;return n instanceof RegExp?n.test(e):"string"==typeof n&&-1!==e.indexOf(n)},getMessage:function(l){var n="";return l&&l.message?n=l.message:"string"==typeof l&&(n=l),n},getConstructorName:function(l){var n=l;return l instanceof Error?n=t(l.constructor):"function"==typeof l&&""===(n=t(l))&&(n=t(new l)||n),n}}},4964:(l,n,e)=>{"use strict";var t=e(5855);function u(){this._key="chai/deep-eql__"+Math.random()+Date.now()}u.prototype={get:function(l){return l[this._key]},set:function(l,n){Object.isExtensible(l)&&Object.defineProperty(l,this._key,{value:n,configurable:!0})}};var o="function"==typeof WeakMap?WeakMap:u;function r(l,n,e){if(!e||g(l)||g(n))return null;var t=e.get(l);if(t){var u=t.get(n);if("boolean"==typeof u)return u}return null}function i(l,n,e,t){if(e&&!g(l)&&!g(n)){var u=e.get(l);u?u.set(n,t):((u=new o).set(n,t),e.set(l,u))}}function a(l,n,e){if(e&&e.comparator)return c(l,n,e);var t=s(l,n);return null!==t?t:c(l,n,e)}function s(l,n){return l===n?0!==l||1/l==1/n:l!=l&&n!=n||!g(l)&&!g(n)&&null}function c(l,n,e){(e=e||{}).memoize=!1!==e.memoize&&(e.memoize||new o);var u=e&&e.comparator,c=r(l,n,e.memoize);if(null!==c)return c;var g=r(n,l,e.memoize);if(null!==g)return g;if(u){var v=u(l,n);if(!1===v||!0===v)return i(l,n,e.memoize,v),v;var _=s(l,n);if(null!==_)return _}var w=t(l);if(w!==t(n))return i(l,n,e.memoize,!1),!1;i(l,n,e.memoize,!0);var k=function(l,n,e,t){switch(e){case"String":case"Number":case"Boolean":case"Date":return a(l.valueOf(),n.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return l===n;case"Error":return y(l,n,["name","message","code"],t);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return d(l,n,t);case"RegExp":return function(l,n){return l.toString()===n.toString()}(l,n);case"Generator":return function(l,n,e){return d(f(l),f(n),e)}(l,n,t);case"DataView":return d(new Uint8Array(l.buffer),new Uint8Array(n.buffer),t);case"ArrayBuffer":return d(new Uint8Array(l),new Uint8Array(n),t);case"Set":case"Map":return function(l,n,e){if(l.size!==n.size)return!1;if(0===l.size)return!0;var t=[],u=[];return l.forEach((function(l,n){t.push([l,n])})),n.forEach((function(l,n){u.push([l,n])})),d(t.sort(),u.sort(),e)}(l,n,t);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return l.equals(n);case"Temporal.Duration":return l.total("nanoseconds")===n.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return l.toString()===n.toString();default:return function(l,n,e){var t=h(l),u=h(n),o=m(l),r=m(n);if(t=t.concat(o),u=u.concat(r),t.length&&t.length===u.length)return!1!==d(b(t).sort(),b(u).sort())&&y(l,n,t,e);var i=p(l),a=p(n);return i.length&&i.length===a.length?(i.sort(),a.sort(),d(i,a,e)):0===t.length&&0===i.length&&0===u.length&&0===a.length}(l,n,t)}}(l,n,w,e);return i(l,n,e.memoize,k),k}function d(l,n,e){var t=l.length;if(t!==n.length)return!1;if(0===t)return!0;for(var u=-1;++ul.length?e:l})),s.value=l.join(d)}else s.value=l.join(e.slice(i,i+s.count));i+=s.count,s.added||(a+=s.count)}}var p=n[r-1];return r>1&&"string"==typeof p.value&&(p.added||p.removed)&&l.equals("",p.value)&&(n[r-2].value+=p.value,n.pop()),n}n.prototype={diff:function(l,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=t.callback;"function"==typeof t&&(u=t,t={}),this.options=t;var o=this;function r(l){return u?(setTimeout((function(){u(void 0,l)}),0),!0):l}l=this.castInput(l),n=this.castInput(n),l=this.removeEmpty(this.tokenize(l));var i=(n=this.removeEmpty(this.tokenize(n))).length,a=l.length,s=1,c=i+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],n,l,0);if(d[0].newPos+1>=i&&p+1>=a)return r([{value:this.join(n),count:n.length}]);function f(){for(var t=-1*s;t<=s;t+=2){var u=void 0,c=d[t-1],p=d[t+1],f=(p?p.newPos:0)-t;c&&(d[t-1]=void 0);var h=c&&c.newPos+1=i&&f+1>=a)return r(e(o,u.components,n,l,o.useLongestToken));d[t]=u}else d[t]=void 0}var y;s++}if(u)!function l(){setTimeout((function(){if(s>c)return u();f()||l()}),0)}();else for(;s<=c;){var h=f();if(h)return h}},pushComponent:function(l,n,e){var t=l[l.length-1];t&&t.added===n&&t.removed===e?l[l.length-1]={count:t.count+1,added:n,removed:e}:l.push({count:1,added:n,removed:e})},extractCommon:function(l,n,e,t){for(var u=n.length,o=e.length,r=l.newPos,i=r-t,a=0;r+11&&void 0!==arguments[1]?arguments[1]:{},e=l.split(/\r\n|[\n\v\f\r\x85]/),t=l.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=[],o=0;function r(){var l={};for(u.push(l);o2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n&&(n=b(n)),Array.isArray(n)){if(n.length>1)throw new Error("applyPatch only works with a single input.");n=n[0]}var t,u,o=l.split(/\r\n|[\n\v\f\r\x85]/),r=l.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=n.hunks,a=e.compareLine||function(l,n,e,t){return n===t},s=0,c=e.fuzzFactor||0,d=0,p=0;function f(l,n){for(var e=0;e0?t[0]:" ",r=t.length>0?t.substr(1):t;if(" "===u||"-"===u){if(!a(n+1,o[n],u,r)&&++s>c)return!1;n++}}return!0}for(var h=0;h0?A[0]:" ",C=A.length>0?A.substr(1):A,j=E.linedelimiters[O];if(" "===S)T++;else if("-"===S)o.splice(T,1),r.splice(T,1);else if("+"===S)o.splice(T,0,C),r.splice(T,0,j),T++;else if("\\"===S){var P=E.lines[O-1]?E.lines[O-1][0]:null;"+"===P?t=!0:"-"===P&&(u=!0)}}}if(t)for(;!o[o.length-1];)o.pop(),r.pop();else u&&(o.push(""),r.push("\n"));for(var N=0;N0?a(s.lines.slice(-r.context)):[],d-=h.length,p-=h.length)}(o=h).push.apply(o,f(u.map((function(l){return(n.added?"+":"-")+l})))),n.added?y+=u.length:m+=u.length}else{if(d)if(u.length<=2*r.context&&l=i.length-2&&u.length<=r.context){var w=/\n$/.test(e),k=/\n$/.test(t),x=0==u.length&&h.length>_.oldLines;!w&&x&&h.splice(_.oldLines,0,"\\ No newline at end of file"),(w||x)&&k||h.push("\\ No newline at end of file")}c.push(_),d=0,p=0,h=[]}m+=u.length,y+=u.length}},b=0;bl.length)return!1;for(var e=0;e"):t.removed&&n.push(""),n.push((u=t.value,void 0,u.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),t.added?n.push(""):t.removed&&n.push("")}var u;return n.join("")},l.canonicalize=y,Object.defineProperty(l,"__esModule",{value:!0})}(n)},6708:l=>{"use strict";var n=Function.prototype.toString,e=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;l.exports=function(l){if("function"!=typeof l)return null;var t="";if(void 0===Function.prototype.name&&void 0===l.name){var u=n.call(l);if(u.indexOf("(")>512)return t;var o=u.match(e);o&&(t=o[1])}else t=l.name;return t}},9023:l=>{var n,e,t=9007199254740991,u="[object Function]",o="[object GeneratorFunction]",r=/^(?:0|[1-9]\d*)$/,i=Object.prototype,a=i.hasOwnProperty,s=i.toString,c=i.propertyIsEnumerable,d=(n=Object.keys,e=Object,function(l){return n(e(l))}),p=Math.max,f=!c.call({valueOf:1},"valueOf");function h(l,n,e){var t=l[n];a.call(l,n)&&g(t,e)&&(void 0!==e||n in l)||(l[n]=e)}function m(l,n){return!!(n=null==n?t:n)&&("number"==typeof l||r.test(l))&&l>-1&&l%1==0&&l-1&&l%1==0&&l<=t}(l.length)&&!function(l){var n=_(l)?s.call(l):"";return n==u||n==o}(l)}function _(l){var n=typeof l;return!!l&&("object"==n||"function"==n)}var w,k=(w=function(l,n){if(f||y(n)||v(n))!function(l,n,e,t){e||(e={});for(var u=-1,o=n.length;++u1?n[t-1]:void 0,o=t>2?n[2]:void 0;for(u=w.length>3&&"function"==typeof u?(t--,u):void 0,o&&function(l,n,e){if(!_(e))return!1;var t=typeof n;return!!("number"==t?v(e)&&m(n,e.length):"string"==t&&n in e)&&g(e[n],l)}(n[0],n[1],o)&&(u=t<3?void 0:u,t=1),l=Object(l);++e{var t,u="__lodash_hash_undefined__",o=1/0,r="[object Function]",i="[object GeneratorFunction]",a="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,m="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g,y="object"==typeof self&&self&&self.Object===Object&&self,g=m||y||Function("return this")(),b=Array.prototype,v=Function.prototype,_=Object.prototype,w=g["__core-js_shared__"],k=(t=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",x=v.toString,E=_.hasOwnProperty,T=_.toString,O=RegExp("^"+x.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=g.Symbol,S=b.splice,C=D(g,"Map"),j=D(Object,"create"),P=A?A.prototype:void 0,N=P?P.toString:void 0;function M(l){var n=-1,e=l?l.length:0;for(this.clear();++n-1},I.prototype.set=function(l,n){var e=this.__data__,t=L(e,l);return t<0?e.push([l,n]):e[t][1]=n,this},B.prototype.clear=function(){this.__data__={hash:new M,map:new(C||I),string:new M}},B.prototype.delete=function(l){return R(this,l).delete(l)},B.prototype.get=function(l){return R(this,l).get(l)},B.prototype.has=function(l){return R(this,l).has(l)},B.prototype.set=function(l,n){return R(this,l).set(l,n),this};var F=z((function(l){var n;l=null==(n=l)?"":function(l){if("string"==typeof l)return l;if(W(l))return N?N.call(l):"";var n=l+"";return"0"==n&&1/l==-o?"-0":n}(n);var e=[];return d.test(l)&&e.push(""),l.replace(p,(function(l,n,t,u){e.push(t?u.replace(f,"$1"):n||l)})),e}));function q(l){if("string"==typeof l||W(l))return l;var n=l+"";return"0"==n&&1/l==-o?"-0":n}function z(l,n){if("function"!=typeof l||n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var t=arguments,u=n?n.apply(this,t):t[0],o=e.cache;if(o.has(u))return o.get(u);var r=l.apply(this,t);return e.cache=o.set(u,r),r};return e.cache=new(z.Cache||B),e}z.Cache=B;var U=Array.isArray;function H(l){var n=typeof l;return!!l&&("object"==n||"function"==n)}function W(l){return"symbol"==typeof l||function(l){return!!l&&"object"==typeof l}(l)&&T.call(l)==a}l.exports=function(l,n,e){var t=null==l?void 0:function(l,n){var e;n=function(l,n){if(U(l))return!1;var e=typeof l;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=l&&!W(l))||c.test(l)||!s.test(l)||null!=n&&l in Object(n)}(n,l)?[n]:U(e=n)?e:F(e);for(var t=0,u=n.length;null!=l&&t{l=e.nmd(l);var t="__lodash_hash_undefined__",u=9007199254740991,o="[object Arguments]",r="[object AsyncFunction]",i="[object Function]",a="[object GeneratorFunction]",s="[object Null]",c="[object Object]",d="[object Proxy]",p="[object Undefined]",f=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,m={};m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m[o]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object Boolean]"]=m["[object DataView]"]=m["[object Date]"]=m["[object Error]"]=m[i]=m["[object Map]"]=m["[object Number]"]=m[c]=m["[object RegExp]"]=m["[object Set]"]=m["[object String]"]=m["[object WeakMap]"]=!1;var y,g,b,v="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g,_="object"==typeof self&&self&&self.Object===Object&&self,w=v||_||Function("return this")(),k=n&&!n.nodeType&&n,x=k&&l&&!l.nodeType&&l,E=x&&x.exports===k,T=E&&v.process,O=function(){try{return x&&x.require&&x.require("util").types||T&&T.binding&&T.binding("util")}catch(l){}}(),A=O&&O.isTypedArray,S=Array.prototype,C=Function.prototype,j=Object.prototype,P=w["__core-js_shared__"],N=C.toString,M=j.hasOwnProperty,I=(y=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",B=j.toString,L=N.call(Object),R=RegExp("^"+N.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=E?w.Buffer:void 0,F=w.Symbol,q=w.Uint8Array,z=(D&&D.allocUnsafe,g=Object.getPrototypeOf,b=Object,function(l){return g(b(l))}),U=Object.create,H=j.propertyIsEnumerable,W=S.splice,V=F?F.toStringTag:void 0,K=function(){try{var l=pl(Object,"defineProperty");return l({},"",{}),l}catch(l){}}(),X=D?D.isBuffer:void 0,G=Math.max,J=Date.now,$=pl(w,"Map"),Y=pl(Object,"create"),Z=function(){function l(){}return function(n){if(!El(n))return{};if(U)return U(n);l.prototype=n;var e=new l;return l.prototype=void 0,e}}();function Q(l){var n=-1,e=null==l?0:l.length;for(this.clear();++n-1},ll.prototype.set=function(l,n){var e=this.__data__,t=ol(e,l);return t<0?(++this.size,e.push([l,n])):e[t][1]=n,this},nl.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new($||ll),string:new Q}},nl.prototype.delete=function(l){var n=dl(this,l).delete(l);return this.size-=n?1:0,n},nl.prototype.get=function(l){return dl(this,l).get(l)},nl.prototype.has=function(l){return dl(this,l).has(l)},nl.prototype.set=function(l,n){var e=dl(this,l),t=e.size;return e.set(l,n),this.size+=e.size==t?0:1,this},el.prototype.clear=function(){this.__data__=new ll,this.size=0},el.prototype.delete=function(l){var n=this.__data__,e=n.delete(l);return this.size=n.size,e},el.prototype.get=function(l){return this.__data__.get(l)},el.prototype.has=function(l){return this.__data__.has(l)},el.prototype.set=function(l,n){var e=this.__data__;if(e instanceof ll){var t=e.__data__;if(!$||t.length<199)return t.push([l,n]),this.size=++e.size,this;e=this.__data__=new nl(t)}return e.set(l,n),this.size=e.size,this};function il(l){return null==l?void 0===l?p:s:V&&V in Object(l)?function(l){var n=M.call(l,V),e=l[V];try{l[V]=void 0;var t=!0}catch(l){}var u=B.call(l);return t&&(n?l[V]=e:delete l[V]),u}(l):function(l){return B.call(l)}(l)}function al(l){return Tl(l)&&il(l)==o}function sl(l,n,e,t,u){l!==n&&function(l,n,e){for(var t=-1,u=Object(l),o=e(l),r=o.length;r--;){var i=o[++t];if(!1===n(u[i],i,u))break}}(n,(function(o,r){if(u||(u=new el),El(o))!function(l,n,e,t,u,o,r){var i=ml(l,e),a=ml(n,e),s=r.get(a);if(s)tl(l,e,s);else{var d,p,f,h,m,y=o?o(i,a,e+"",l,n,r):void 0,g=void 0===y;if(g){var b=vl(a),v=!b&&wl(a),_=!b&&!v&&Ol(a);y=a,b||v||_?vl(i)?y=i:Tl(m=i)&&_l(m)?y=function(l,n){var e=-1,t=l.length;for(n||(n=Array(t));++e-1&&l%1==0&&l0){if(++n>=800)return arguments[0]}else n=0;return l.apply(void 0,arguments)}}(cl);function gl(l,n){return l===n||l!=l&&n!=n}var bl=al(function(){return arguments}())?al:function(l){return Tl(l)&&M.call(l,"callee")&&!H.call(l,"callee")},vl=Array.isArray;function _l(l){return null!=l&&xl(l.length)&&!kl(l)}var wl=X||function(){return!1};function kl(l){if(!El(l))return!1;var n=il(l);return n==i||n==a||n==r||n==d}function xl(l){return"number"==typeof l&&l>-1&&l%1==0&&l<=u}function El(l){var n=typeof l;return null!=l&&("object"==n||"function"==n)}function Tl(l){return null!=l&&"object"==typeof l}var Ol=A?function(l){return function(n){return l(n)}}(A):function(l){return Tl(l)&&xl(l.length)&&!!m[il(l)]};function Al(l){return _l(l)?function(l,n){var e=vl(l),t=!e&&bl(l),u=!e&&!t&&wl(l),o=!e&&!t&&!u&&Ol(l),r=e||t||u||o,i=r?function(l,n){for(var e=-1,t=Array(l);++e1?n[t-1]:void 0,o=t>2?n[2]:void 0;for(u=Sl.length>3&&"function"==typeof u?(t--,u):void 0,o&&function(l,n,e){if(!El(e))return!1;var t=typeof n;return!!("number"==t?_l(e)&&fl(n,e.length):"string"==t&&n in e)&&gl(e[n],l)}(n[0],n[1],o)&&(u=t<3?void 0:u,t=1),l=Object(l);++el.length)&&(n=l.length);for(var e=0,t=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:i;l=String(l);var t=e.length,u=l.length;return t>n&&u>t?e:u>n&&u>t?"".concat(l.slice(0,n-t)).concat(e):l}function c(l,n,e){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:", ";e=e||n.inspect;var u=l.length;if(0===u)return"";for(var o=n.truncate,r="",a="",s="",c=0;co&&r.length+s.length<=o)break;if(!d&&!p&&y>o)break;if(a=d?"":e(l[c+1],n)+(p?"":t),!d&&p&&y>o&&m+a.length>o)break;if(r+=h,!d&&!p&&m+a.length>=o){s="".concat(i,"(").concat(l.length-c-1,")");break}s=""}return"".concat(r).concat(s)}function d(l,n){var e=t(l,2),u=e[0],o=e[1];return n.truncate-=2,"string"==typeof u?u=function(l){return l.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?l:JSON.stringify(l).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}(u):"number"!=typeof u&&(u="[".concat(n.inspect(u,n),"]")),n.truncate-=u.length,o=n.inspect(o,n),"".concat(u,": ").concat(o)}var p=Function.prototype.toString,f=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;var h=function(l){if("function"!=typeof l)return null;var n="";if(void 0===Function.prototype.name&&void 0===l.name){var e=p.call(l);if(e.indexOf("(")>512)return n;var t=e.match(f);t&&(n=t[1])}else n=l.name;return n};function m(l,n){var e=function(l){return"function"==typeof Buffer&&l instanceof Buffer?"Buffer":l[Symbol.toStringTag]?l[Symbol.toStringTag]:h(l.constructor)}(l);n.truncate-=e.length+4;var t=Object.keys(l).slice(l.length);if(!l.length&&!t.length)return"".concat(e,"[]");for(var u="",o=0;o ").concat(o)}var b=Number.isNaN||function(l){return l!=l};function v(l,n){return b(l)?n.stylize("NaN","number"):l===1/0?n.stylize("Infinity","number"):l===-1/0?n.stylize("-Infinity","number"):0===l?n.stylize(1/l==1/0?"+0":"-0","number"):n.stylize(s(l,n.truncate),"number")}function _(l,n){var e=s(l.toString(),n.truncate-1);return e!==i&&(e+="n"),n.stylize(e,"bigint")}var w=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),k={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},x=16,E=4;function T(l){return k[l]||"\\u".concat("0000".concat(l.charCodeAt(0).toString(x)).slice(-E))}function O(l,n){return w.test(l)&&(l=l.replace(w,T)),n.stylize("'".concat(s(l,n.truncate-2),"'"),"string")}function A(l){return"description"in Symbol.prototype?l.description?"Symbol(".concat(l.description,")"):"Symbol()":l.toString()}var S=function(){return"Promise{…}"};try{var C=process.binding("util"),j=C.getPromiseDetails,P=C.kPending,N=C.kRejected;Array.isArray(j(Promise.resolve()))&&(S=function(l,n){var e=t(j(l),2),u=e[0],o=e[1];return u===P?"Promise{}":"Promise".concat(u===N?"!":"","{").concat(n.inspect(o,n),"}")})}catch(l){}var M=S;function I(l,n){var e=Object.getOwnPropertyNames(l),t=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(l):[];if(0===e.length&&0===t.length)return"{}";if(n.truncate-=4,n.seen=n.seen||[],n.seen.indexOf(l)>=0)return"[Circular]";n.seen.push(l);var u=c(e.map((function(n){return[n,l[n]]})),n,d),o=c(t.map((function(n){return[n,l[n]]})),n,d);n.seen.pop();var r="";return u&&o&&(r=", "),"{ ".concat(u).concat(r).concat(o," }")}var B=!("undefined"==typeof Symbol||!Symbol.toStringTag)&&Symbol.toStringTag;var L=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description"];function R(l,n){var e=t(l,2),u=e[0],o=e[1];return n.truncate-=3,o?"".concat(n.stylize(u,"yellow"),"=").concat(n.stylize('"'.concat(o,'"'),"string")):"".concat(n.stylize(u,"yellow"))}function D(l,n){return c(l,n,F,"\n")}function F(l,n){var e=l.getAttributeNames(),t=l.tagName.toLowerCase(),u=n.stylize("<".concat(t),"special"),o=n.stylize(">","special"),r=n.stylize("".concat(t,">"),"special");n.truncate-=2*t.length+5;var a="";e.length>0&&(a+=" ",a+=c(e.map((function(n){return[n,l.getAttribute(n)]})),n,R," ")),n.truncate-=a.length;var s=n.truncate,d=D(l.children,n);return d&&d.length>s&&(d="".concat(i,"(").concat(l.children.length,")")),"".concat(u).concat(a).concat(o).concat(d).concat(r)}var q="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("chai/inspect"):"@@chai/inspect",z=!1;try{var U=e(1786);z=!!U.inspect&&U.inspect.custom}catch(l){z=!1}function H(){this.key="chai/loupe__"+Math.random()+Date.now()}H.prototype={get:function(l){return l[this.key]},has:function(l){return this.key in l},set:function(l,n){Object.isExtensible(l)&&Object.defineProperty(l,this.key,{value:n,configurable:!0})}};var W=new("function"==typeof WeakMap?WeakMap:H),V={},K={undefined:function(l,n){return n.stylize("undefined","undefined")},null:function(l,n){return n.stylize(null,"null")},boolean:function(l,n){return n.stylize(l,"boolean")},Boolean:function(l,n){return n.stylize(l,"boolean")},number:v,Number:v,bigint:_,BigInt:_,string:O,String:O,function:y,Function:y,symbol:A,Symbol:A,Array:function(l,n){var e=Object.keys(l).slice(l.length);if(!l.length&&!e.length)return"[]";n.truncate-=4;var t=c(l,n);n.truncate-=t.length;var u="";return e.length&&(u=c(e.map((function(n){return[n,l[n]]})),n,d)),"[ ".concat(t).concat(u?", ".concat(u):""," ]")},Date:function(l,n){var e=l.toJSON();if(null===e)return"Invalid Date";var t=e.split("T"),u=t[0];return n.stylize("".concat(u,"T").concat(s(t[1],n.truncate-u.length-1)),"date")},Map:function(l,n){return l.size-1<=0?"Map{}":(n.truncate-=7,"Map{ ".concat(c(function(l){var n=[];return l.forEach((function(l,e){n.push([e,l])})),n}(l),n,g)," }"))},Set:function(l,n){return 0===l.size?"Set{}":(n.truncate-=7,"Set{ ".concat(c(function(l){var n=[];return l.forEach((function(l){n.push(l)})),n}(l),n)," }"))},RegExp:function(l,n){var e=l.toString().split("/")[2],t=n.truncate-(2+e.length),u=l.source;return n.stylize("/".concat(s(u,t),"/").concat(e),"regexp")},Promise:M,WeakSet:function(l,n){return n.stylize("WeakSet{…}","special")},WeakMap:function(l,n){return n.stylize("WeakMap{…}","special")},Arguments:function(l,n){return 0===l.length?"Arguments[]":(n.truncate-=13,"Arguments[ ".concat(c(l,n)," ]"))},Int8Array:m,Uint8Array:m,Uint8ClampedArray:m,Int16Array:m,Uint16Array:m,Int32Array:m,Uint32Array:m,Float32Array:m,Float64Array:m,Generator:function(){return""},DataView:function(){return""},ArrayBuffer:function(){return""},Error:function(l,n){var e=Object.getOwnPropertyNames(l).filter((function(l){return-1===L.indexOf(l)})),t=l.name;n.truncate-=t.length;var u="";"string"==typeof l.message?u=s(l.message,n.truncate):e.unshift("message"),u=u?": ".concat(u):"",n.truncate-=u.length+5;var o=c(e.map((function(n){return[n,l[n]]})),n,d);return"".concat(t).concat(u).concat(o?" { ".concat(o," }"):"")},HTMLCollection:D,NodeList:D},X=Object.prototype.toString;function G(l,e){(e=function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l.showHidden,e=void 0!==n&&n,t=l.depth,u=void 0===t?2:t,o=l.colors,r=void 0!==o&&o,i=l.customInspect,s=void 0===i||i,c=l.showProxy,d=void 0!==c&&c,p=l.maxArrayLength,f=void 0===p?1/0:p,h=l.breakLength,m=void 0===h?1/0:h,y=l.seen,g=void 0===y?[]:y,b=l.truncate,v=void 0===b?1/0:b,_=l.stylize,w=void 0===_?String:_,k={showHidden:Boolean(e),depth:Number(u),colors:Boolean(r),customInspect:Boolean(s),showProxy:Boolean(d),maxArrayLength:Number(f),breakLength:Number(m),truncate:Number(v),seen:g,stylize:w};return k.colors&&(k.stylize=a),k}(e)).inspect=G;var t=e.customInspect,u=null===l?"null":n(l);if("object"===u&&(u=X.call(l).slice(8,-1)),K[u])return K[u](l,e);if(t&&l){var o=function(l,n,e){return q in l&&"function"==typeof l[q]?l[q](n):z&&z in l&&"function"==typeof l[z]?l[z](n.depth,n):"inspect"in l&&"function"==typeof l.inspect?l.inspect(n.depth,n):"constructor"in l&&W.has(l.constructor)?W.get(l.constructor)(l,n):V[e]?V[e](l,n):""}(l,e,u);if(o)return"string"==typeof o?o:G(o,e)}var r=!!l&&Object.getPrototypeOf(l);return r===Object.prototype||null===r?I(l,e):l&&"function"==typeof HTMLElement&&l instanceof HTMLElement?F(l,e):"constructor"in l?l.constructor!==Object?function(l,n){var e="";return B&&B in l&&(e=l[B]),(e=e||h(l.constructor))&&"_class"!==e||(e=""),n.truncate-=e.length,"".concat(e).concat(I(l,n))}(l,e):I(l,e):l===Object(l)?I(l,e):e.stylize(String(l),u)}var J=q;l.custom=J,l.default=G,l.inspect=G,l.registerConstructor=function(l,n){return!W.has(l)&&(W.set(l,n),!0)},l.registerStringTag=function(l,n){return!(l in V)&&(V[l]=n,!0)},Object.defineProperty(l,"__esModule",{value:!0})}(n)},9191:(module,__unused_webpack_exports,__webpack_require__)=>{var f;f=function(){var define,module,exports;return function l(n,e,t){function u(r,i){if(!e[r]){if(!n[r]){if(o)return o(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var s=e[r]={exports:{}};n[r][0].call(s.exports,(function(l){return u(n[r][1][l]||l)}),s,s.exports,l,n,e,t)}return e[r].exports}for(var o=void 0,r=0;r0&&this.respondWith.apply(this,arguments);var l=this.queue||[],n=l.splice(0,l.length),e=this;n.forEach((function(l){e.processRequest(l)}))},respondAll:function(){var l;if(!this.respondImmediately)for(this.queue=this.requests.slice(0);l=this.queue.shift();)this.processRequest(l)},processRequest:function(l){try{if(l.aborted)return;var n=this.response||[404,{},""];if(this.responses)for(var e=this.responses.length-1;e>=0;e--)if(d.call(this,this.responses[e],l)){n=this.responses[e].response;break}4!==l.readyState&&(this.log(n,l),l.respond(n[0],n[1],n[2]))}catch(l){this.logError("Fake server request processing",l)}},restore:function(){return this.xhr.restore&&this.xhr.restore.apply(this.xhr,arguments)},getRequest:function(l){return this.requests[l]||null},reset:function(){this.resetBehavior(),this.resetHistory()},resetBehavior:function(){this.responses.length=this.queue.length=0},resetHistory:function(){this.requests.length=this.requestCount=0,this.requestedOnce=this.requestedTwice=this.requestedThrice=this.requested=!1,this.firstRequest=this.secondRequest=this.thirdRequest=this.lastRequest=null}};n.exports=f},{"../configure-logger":1,"../fake-xhr":11,"./log":9,"path-to-regexp":38}],9:[function(l,n,e){"use strict";var t=l("util").inspect;n.exports=function(l,n){var e;e="Request:\n"+t(n)+"\n\n",e+="Response:\n"+t(l)+"\n\n","function"==typeof this.logger&&this.logger(e)}},{util:41}],10:[function(l,n,e){"use strict";e.isSupported=function(){try{return Boolean(new Blob)}catch(l){return!1}}()},{}],11:[function(l,n,e){"use strict";var t="undefined"!=typeof TextEncoder?TextEncoder:l("@sinonjs/text-encoding").TextEncoder,u=l("@sinonjs/commons").global,o=l("../configure-logger"),r=l("../event"),i=l("just-extend"),a="undefined"!=typeof ProgressEvent,s="undefined"!=typeof CustomEvent,c="undefined"!=typeof FormData,d="undefined"!=typeof ArrayBuffer,p=l("./blob").isSupported,f={"Accept-Charset":!0,"Access-Control-Request-Headers":!0,"Access-Control-Request-Method":!0,"Accept-Encoding":!0,Connection:!0,"Content-Length":!0,Cookie:!0,Cookie2:!0,"Content-Transfer-Encoding":!0,Date:!0,DNT:!0,Expect:!0,Host:!0,"Keep-Alive":!0,Origin:!0,Referer:!0,TE:!0,Trailer:!0,"Transfer-Encoding":!0,Upgrade:!0,"User-Agent":!0,Via:!0};function h(){var l=this;["loadstart","progress","abort","error","load","timeout","loadend"].forEach((function(n){l.addEventListener(n,(function(e){var t=l["on"+n];t&&"function"==typeof t&&t.call(this,e)}))}))}function m(l,n){return Object.keys(l).filter((function(l){return l.toLowerCase()===n.toLowerCase()}))[0]||null}function y(l){return!/^Set-Cookie2?$/i.test(l)}function g(l,n){return l instanceof ArrayBuffer?l:new t(n||"utf-8").encode(l).buffer}function b(l){return!l||/(text\/xml)|(application\/xml)|(\+xml)/.test(l)}function v(l){""===l.responseType||"text"===l.responseType?l.response=l.responseText="":l.response=l.responseText=null,l.responseXML=null}function _(l){var n=l.navigator&&"ReactNative"===l.navigator.product,e={XMLHttpRequest:l.XMLHttpRequest};function t(l){h.call(this),this.readyState=t.UNSENT,this.requestHeaders={},this.requestBody=null,this.status=0,this.statusText="",this.upload=new h,this.responseType="",this.response="",this.logError=o(l),e.supportsTimeout&&(this.timeout=0),e.supportsCORS&&(this.withCredentials=!1),"function"==typeof t.onCreate&&t.onCreate(this)}function u(l){if(l.readyState!==t.OPENED)throw new Error("INVALID_STATE_ERR");if(l.sendFlag)throw new Error("INVALID_STATE_ERR")}e.GlobalXMLHttpRequest=l.XMLHttpRequest,e.GlobalActiveXObject=l.ActiveXObject,e.supportsActiveX=void 0!==e.GlobalActiveXObject,e.supportsXHR=void 0!==e.GlobalXMLHttpRequest,e.workingXHR=function(l){return void 0!==l.XMLHttpRequest?l.XMLHttpRequest:!(void 0===l.ActiveXObject)&&function(){return new l.ActiveXObject("MSXML2.XMLHTTP.3.0")}}(l),e.supportsTimeout=e.supportsXHR&&"timeout"in new e.GlobalXMLHttpRequest,e.supportsCORS=n||e.supportsXHR&&"withCredentials"in new e.GlobalXMLHttpRequest;var _=function(l,n,e){switch(e.length){case 0:return l[n]();case 1:return l[n](e[0]);case 2:return l[n](e[0],e[1]);case 3:return l[n](e[0],e[1],e[2]);case 4:return l[n](e[0],e[1],e[2],e[3]);case 5:return l[n](e[0],e[1],e[2],e[3],e[4]);default:throw new Error("Unhandled case")}};function w(l){if(l.readyState!==t.OPENED)throw new Error("INVALID_STATE_ERR - "+l.readyState)}function k(l){v(l),l.errorFlag=!0,l.requestHeaders={},l.responseHeaders={},l.readyState!==t.UNSENT&&l.sendFlag&&l.readyState!==t.DONE&&(l.readyStateChange(t.DONE),l.sendFlag=!1)}t.filters=[],t.addFilter=function(l){this.filters.push(l)},t.defake=function(l,n){var u=new e.workingXHR;["open","setRequestHeader","abort","getResponseHeader","getAllResponseHeaders","addEventListener","overrideMimeType","removeEventListener"].forEach((function(n){l[n]=function(){return _(u,n,arguments)}})),l.send=function(){return u.responseType!==l.responseType&&(u.responseType=l.responseType),_(u,"send",arguments)};var o=function(n){n.forEach((function(n){l[n]=u[n]}))},r=function(){l.readyState=u.readyState,u.readyState>=t.HEADERS_RECEIVED&&o(["status","statusText"]),u.readyState>=t.LOADING&&(o(["response"]),""!==u.responseType&&"text"!==u.responseType||o(["responseText"])),u.readyState!==t.DONE||""!==u.responseType&&"document"!==u.responseType||o(["responseXML"])},i=function(){l.onreadystatechange&&l.onreadystatechange.call(l,{target:l,currentTarget:l})};u.addEventListener?(u.addEventListener("readystatechange",r),Object.keys(l.eventListeners).forEach((function(n){l.eventListeners[n].forEach((function(l){u.addEventListener(n,l.listener,{capture:l.capture,once:l.once})}))})),u.addEventListener("readystatechange",i)):u.onreadystatechange=function(){r(),i()},_(u,"open",n)},t.useFilters=!1,t.parseXML=function(l){if(""!==l)try{if("undefined"!=typeof DOMParser){var n,e=new DOMParser,t="";try{var u=e.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror");u.length&&(t=u[0].namespaceURI)}catch(l){}try{n=e.parseFromString(l,"text/xml")}catch(l){return null}return n.getElementsByTagNameNS(t,"parsererror").length?null:n}var o=new window.ActiveXObject("Microsoft.XMLDOM");return o.async="false",o.loadXML(l),0!==o.parseError.errorCode?null:o}catch(l){}return null},t.statusCodes={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choice",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},i(t.prototype,r.EventTarget,{async:!0,open:function(l,n,e,u,o){if(this.method=l,this.url=n,this.async="boolean"!=typeof e||e,this.username=u,this.password=o,v(this),this.requestHeaders={},this.sendFlag=!1,!0===t.useFilters){var r=arguments;if(t.filters.some((function(l){return l.apply(this,r)})))return void t.defake(this,arguments)}this.readyStateChange(t.OPENED)},readyStateChange:function(l){this.readyState=l;var n,e,u=new r.Event("readystatechange",!1,!1,this);if("function"==typeof this.onreadystatechange)try{this.onreadystatechange(u)}catch(l){this.logError("Fake XHR onreadystatechange handler",l)}this.readyState===t.DONE&&(this.timedOut||this.aborted||0===this.status?(e={loaded:0,total:0},n=(this.timedOut?"timeout":this.aborted&&"abort")||"error"):(e={loaded:100,total:100},n="load"),a&&(this.upload.dispatchEvent(new r.ProgressEvent("progress",e,this)),this.upload.dispatchEvent(new r.ProgressEvent(n,e,this)),this.upload.dispatchEvent(new r.ProgressEvent("loadend",e,this))),this.dispatchEvent(new r.ProgressEvent("progress",e,this)),this.dispatchEvent(new r.ProgressEvent(n,e,this)),this.dispatchEvent(new r.ProgressEvent("loadend",e,this))),this.dispatchEvent(u)},setRequestHeader:function(l,n){if("string"!=typeof n)throw new TypeError("By RFC7230, section 3.2.4, header values should be strings. Got "+typeof n);u(this);var e=!0;if("function"==typeof this.unsafeHeadersEnabled&&(e=this.unsafeHeadersEnabled()),e&&(null!==m(f,l)||/^(Sec-|Proxy-)/i.test(l)))throw new Error('Refused to set unsafe header "'+l+'"');n=function(l){return l.replace(/^[\x09\x0A\x0D\x20]+|[\x09\x0A\x0D\x20]+$/g,"")}(n);var t=m(this.requestHeaders,l);t?this.requestHeaders[t]+=", "+n:this.requestHeaders[l]=n},setStatus:function(l){var n="number"==typeof l?l:200;w(this),this.status=n,this.statusText=t.statusCodes[n]},setResponseHeaders:function(l){w(this);var n=this.responseHeaders={};Object.keys(l).forEach((function(e){n[e]=l[e]})),this.async?this.readyStateChange(t.HEADERS_RECEIVED):this.readyState=t.HEADERS_RECEIVED},send:function(l){if(u(this),!/^(head)$/i.test(this.method)){var n=m(this.requestHeaders,"Content-Type");if(this.requestHeaders[n]){var o=this.requestHeaders[n].split(";");this.requestHeaders[n]=o[0]+";charset=utf-8"}else!c||l instanceof FormData||(this.requestHeaders["Content-Type"]="text/plain;charset=utf-8");this.requestBody=l}if(this.errorFlag=!1,this.sendFlag=this.async,v(this),"function"==typeof this.onSend&&this.onSend(this),e.supportsTimeout&&"object"==typeof setInterval.clock&&"object"==typeof Date.clock)var i=Date.now(),a=this,s=setInterval((function(){a.readyState===t.UNSENT||a.readyState===t.DONE?clearInterval(s):"number"==typeof a.timeout&&a.timeout>0&&Date.now()>=i+a.timeout&&(a.triggerTimeout(),clearInterval(s))}),1);this.dispatchEvent(new r.Event("loadstart",!1,!1,this))},abort:function(){this.aborted=!0,k(this),this.readyState=t.UNSENT},error:function(){v(this),this.errorFlag=!0,this.requestHeaders={},this.responseHeaders={},this.readyStateChange(t.DONE)},triggerTimeout:function(){e.supportsTimeout&&(this.timedOut=!0,k(this))},getResponseHeader:function(l){return this.readyState=t.LOADING)throw new Error("INVALID_STATE_ERR");this.overriddenMimeType=l}});var x={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};return i(t,x),i(t.prototype,x),{xhr:e,FakeXMLHttpRequest:t,useFakeXMLHttpRequest:function(){return t.restore=function(n){e.supportsXHR&&(l.XMLHttpRequest=e.GlobalXMLHttpRequest),e.supportsActiveX&&(l.ActiveXObject=e.GlobalActiveXObject),delete t.restore,!0!==n&&delete t.onCreate},e.supportsXHR&&(l.XMLHttpRequest=t),e.supportsActiveX&&(l.ActiveXObject=function(l){return"Microsoft.XMLHTTP"===l||/^Msxml2\.XMLHTTP/i.test(l)?new t:new e.GlobalActiveXObject(l)}),t}}}h.prototype=r.EventTarget,n.exports=i(_(u),{fakeXMLHttpRequestFor:_})},{"../configure-logger":1,"../event":5,"./blob":10,"@sinonjs/commons":19,"@sinonjs/text-encoding":32,"just-extend":37}],12:[function(l,n,e){"use strict";n.exports={fakeServer:l("./fake-server"),fakeServerWithClock:l("./fake-server/fake-server-with-clock"),fakeXhr:l("./fake-xhr")}},{"./fake-server":8,"./fake-server/fake-server-with-clock":7,"./fake-xhr":11}],13:[function(l,n,e){"use strict";var t=l("./prototypes/array").every;function u(l,n,e,t){var u=!0;return e!==t.length-1&&(u=n.calledBefore(t[e+1])),!(!function(l,n){return void 0===l[n.id]&&(l[n.id]=0),l[n.id]1?arguments:l,u.bind(null,{}))}},{"./prototypes/array":21}],14:[function(l,n,e){"use strict";var t=l("./function-name");n.exports=function(l){return l.constructor&&l.constructor.name||"function"==typeof l.constructor&&t(l.constructor)||null}},{"./function-name":17}],15:[function(l,n,e){"use strict";e.wrap=function(l,n){var t=function(){return e.printWarning(n),l.apply(this,arguments)};return l.prototype&&(t.prototype=l.prototype),t},e.defaultMsg=function(l,n){return l+"."+n+" is deprecated and will be removed from the public API in a future version of "+l+"."},e.printWarning=function(l){"undefined"!=typeof console&&(console.info?console.info(l):console.log(l))}},{}],16:[function(l,n,e){"use strict";n.exports=function(l,n){var e=!0;try{l.forEach((function(){if(!n.apply(this,arguments))throw new Error}))}catch(l){e=!1}return e}},{}],17:[function(l,n,e){"use strict";n.exports=function(l){return l?l.displayName||l.name||(String(l).match(/function ([^\s(]+)/)||[])[1]:""}},{}],18:[function(l,n,e){"use strict";var t;t=void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof window?window:self,n.exports=t},{}],19:[function(l,n,e){"use strict";n.exports={global:l("./global"),calledInOrder:l("./called-in-order"),className:l("./class-name"),deprecated:l("./deprecated"),every:l("./every"),functionName:l("./function-name"),orderByFirstCall:l("./order-by-first-call"),prototypes:l("./prototypes"),typeOf:l("./type-of"),valueToString:l("./value-to-string")}},{"./called-in-order":13,"./class-name":14,"./deprecated":15,"./every":16,"./function-name":17,"./global":18,"./order-by-first-call":20,"./prototypes":24,"./type-of":29,"./value-to-string":30}],20:[function(l,n,e){"use strict";var t=l("./prototypes/array").sort,u=l("./prototypes/array").slice;function o(l,n){var e=l.getCall(0),t=n.getCall(0);return(e&&e.callId||-1)<(t&&t.callId||-1)?-1:1}n.exports=function(l){return t(u(l),o)}},{"./prototypes/array":21}],21:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Array.prototype)},{"./copy-prototype":22}],22:[function(l,n,e){"use strict";var t=Function.call;n.exports=function(l){return Object.getOwnPropertyNames(l).reduce((function(n,e){return"size"!==e&&"caller"!==e&&"callee"!==e&&"arguments"!==e&&"function"==typeof l[e]&&(n[e]=t.bind(l[e])),n}),Object.create(null))}},{}],23:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Function.prototype)},{"./copy-prototype":22}],24:[function(l,n,e){"use strict";n.exports={array:l("./array"),function:l("./function"),map:l("./map"),object:l("./object"),set:l("./set"),string:l("./string")}},{"./array":21,"./function":23,"./map":25,"./object":26,"./set":27,"./string":28}],25:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Map.prototype)},{"./copy-prototype":22}],26:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Object.prototype)},{"./copy-prototype":22}],27:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(Set.prototype)},{"./copy-prototype":22}],28:[function(l,n,e){"use strict";var t=l("./copy-prototype");n.exports=t(String.prototype)},{"./copy-prototype":22}],29:[function(l,n,e){"use strict";var t=l("type-detect");n.exports=function(l){return t(l).toLowerCase()}},{"type-detect":39}],30:[function(l,n,e){"use strict";n.exports=function(l){return l&&l.toString?l.toString():String(l)}},{}],31:[function(require,module,exports){"use strict";var globalObject=require("@sinonjs/commons").global;function withGlobal(_global){var userAgent=_global.navigator&&_global.navigator.userAgent,isRunningInIE=userAgent&&userAgent.indexOf("MSIE ")>-1,maxTimeout=Math.pow(2,31)-1,NOOP=function(){},NOOP_ARRAY=function(){return[]},timeoutResult=_global.setTimeout(NOOP,0),addTimerReturnsObject="object"==typeof timeoutResult,hrtimePresent=_global.process&&"function"==typeof _global.process.hrtime,hrtimeBigintPresent=hrtimePresent&&"function"==typeof _global.process.hrtime.bigint,nextTickPresent=_global.process&&"function"==typeof _global.process.nextTick,utilPromisify=_global.process&&require("util").promisify,performancePresent=_global.performance&&"function"==typeof _global.performance.now,hasPerformancePrototype=_global.Performance&&(typeof _global.Performance).match(/^(function|object)$/),queueMicrotaskPresent=_global.hasOwnProperty("queueMicrotask"),requestAnimationFramePresent=_global.requestAnimationFrame&&"function"==typeof _global.requestAnimationFrame,cancelAnimationFramePresent=_global.cancelAnimationFrame&&"function"==typeof _global.cancelAnimationFrame,requestIdleCallbackPresent=_global.requestIdleCallback&&"function"==typeof _global.requestIdleCallback,cancelIdleCallbackPresent=_global.cancelIdleCallback&&"function"==typeof _global.cancelIdleCallback,setImmediatePresent=_global.setImmediate&&"function"==typeof _global.setImmediate;isRunningInIE&&(_global.setTimeout=_global.setTimeout,_global.clearTimeout=_global.clearTimeout,_global.setInterval=_global.setInterval,_global.clearInterval=_global.clearInterval,_global.Date=_global.Date),setImmediatePresent&&(_global.setImmediate=_global.setImmediate,_global.clearImmediate=_global.clearImmediate),_global.clearTimeout(timeoutResult);var NativeDate=_global.Date,uniqueTimerId=1;function isNumberFinite(l){return Number.isFinite?Number.isFinite(l):"number"==typeof l&&isFinite(l)}function parseTime(l){if(!l)return 0;var n,e=l.split(":"),t=e.length,u=t,o=0;if(t>3||!/^(\d\d:){0,2}\d\d?$/.test(l))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;u--;){if((n=parseInt(e[u],10))>=60)throw new Error("Invalid time "+l);o+=n*Math.pow(60,t-u-1)}return 1e3*o}function nanoRemainder(l){var n=1e6,e=1e6*l%n,t=e<0?e+n:e;return Math.floor(t)}function getEpoch(l){if(!l)return 0;if("function"==typeof l.getTime)return l.getTime();if("number"==typeof l)return l;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(l,n,e){return e&&e.callAt>=l&&e.callAt<=n}function mirrorDateProperties(l,n){var e;for(e in n)n.hasOwnProperty(e)&&(l[e]=n[e]);return n.now?l.now=function(){return l.clock.now}:delete l.now,n.toSource?l.toSource=function(){return n.toSource()}:delete l.toSource,l.toString=function(){return n.toString()},l.prototype=n.prototype,l.parse=n.parse,l.UTC=n.UTC,l.prototype.toUTCString=n.prototype.toUTCString,l}function createDate(){return mirrorDateProperties((function l(n,e,t,u,o,r,i){if(!(this instanceof l))return new NativeDate(l.clock.now).toString();switch(arguments.length){case 0:return new NativeDate(l.clock.now);case 1:return new NativeDate(n);case 2:return new NativeDate(n,e);case 3:return new NativeDate(n,e,t);case 4:return new NativeDate(n,e,t,u);case 5:return new NativeDate(n,e,t,u,o);case 6:return new NativeDate(n,e,t,u,o,r);default:return new NativeDate(n,e,t,u,o,r,i)}}),NativeDate)}function enqueueJob(l,n){l.jobs||(l.jobs=[]),l.jobs.push(n)}function runJobs(l){if(l.jobs){for(var n=0;nl.loopLimit)throw new Error("Aborting after running "+l.loopLimit+" timers, assuming an infinite loop!")}l.jobs=[]}}function addTimer(l,n){if(void 0===n.func)throw new Error("Callback must be provided to timer calls");if(n.type=n.immediate?"Immediate":"Timeout",n.hasOwnProperty("delay")&&(isNumberFinite(n.delay)||(n.delay=0),n.delay=n.delay>maxTimeout?1:n.delay,n.delay=Math.max(0,n.delay)),n.hasOwnProperty("interval")&&(n.type="Interval",n.interval=n.interval>maxTimeout?1:n.interval),n.hasOwnProperty("animation")&&(n.type="AnimationFrame",n.animation=!0),l.timers||(l.timers={}),n.id=uniqueTimerId++,n.createdAt=l.now,n.callAt=l.now+(parseInt(n.delay)||(l.duringTick?1:0)),l.timers[n.id]=n,addTimerReturnsObject){var e={id:n.id,ref:function(){return e},unref:function(){return e},refresh:function(){return e}};return e}return n.id}function compareTimers(l,n){return l.callAtn.callAt?1:l.immediate&&!n.immediate?-1:!l.immediate&&n.immediate?1:l.createdAtn.createdAt?1:l.idn.id?1:void 0}function firstTimerInRange(l,n,e){var t,u=l.timers,o=null;for(t in u)u.hasOwnProperty(t)&&(!inRange(n,e,u[t])||o&&1!==compareTimers(o,u[t])||(o=u[t]));return o}function firstTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&1!==compareTimers(t,e[n])||(t=e[n]));return t}function lastTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&-1!==compareTimers(t,e[n])||(t=e[n]));return t}function callTimer(clock,timer){"number"==typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id],"function"==typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}function clearTimer(l,n,e){if(n){l.timers||(l.timers={});var t="object"==typeof n?n.id:n;if(l.timers.hasOwnProperty(t)){var u=l.timers[t];if(u.type!==e){var o="AnimationFrame"===e?"cancelAnimationFrame":"clear"+e,r="AnimationFrame"===u.type?"requestAnimationFrame":"set"+u.type;throw new Error("Cannot clear timer: timer created with "+r+"() but cleared with "+o+"()")}delete l.timers[t]}}}function uninstall(l,n,e){var t,u,o;for(u=0,o=l.methods.length;u1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");var a=n[0],s=i-n[1],c=r-a;return s<0&&(s+=1e9,c-=1),[c,s]}return[r,i]}function i(l,n,t,o){var r="number"==typeof l?l:parseTime(l),i=Math.floor(r),a=nanoRemainder(r),s=e+a,c=u.now+i;if(r<0)throw new TypeError("Negative ticks are not supported");s>=1e6&&(c+=1,s-=1e6),e=s;var d,p,f,h,m,y,g=u.now,b=u.now;function v(){for(d=firstTimerInRange(u,g,c);d&&g<=c;){if(u.timers[d.id]){g=d.callAt,u.now=d.callAt,f=u.now;try{runJobs(u),callTimer(u,d)}catch(l){p=p||l}if(n)return void originalSetTimeout(h);m()}y()}if(f=u.now,runJobs(u),f!==u.now&&(g+=u.now-f,c+=u.now-f),u.duringTick=!1,d=firstTimerInRange(u,g,c))try{u.tick(c-u.now)}catch(l){p=p||l}else u.now=c,e=s;if(p)throw p;if(!n)return u.now;t(u.now)}return u.duringTick=!0,f=u.now,runJobs(u),f!==u.now&&(g+=u.now-f,c+=u.now-f),h=n&&function(){try{m(),y(),v()}catch(l){o(l)}},m=function(){f!==u.now&&(g+=u.now-f,c+=u.now-f,b+=u.now-f)},y=function(){d=firstTimerInRange(u,b,c),b=g},v()}if(u.Date.clock=u,hrtimeBigintPresent&&(r.bigint=function(){var l=r();return BigInt(l[0])*BigInt(1e9)+BigInt(l[1])}),u.requestIdleCallback=function(l,n){var e=0;u.countTimers()>0&&(e=50);var t=addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:void 0===n?e:Math.min(n,e)});return t.id||t},u.cancelIdleCallback=function(l){return clearTimer(u,l,"Timeout")},u.setTimeout=function(l,n){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n})},void 0!==_global.Promise&&utilPromisify&&(u.setTimeout[utilPromisify.custom]=function(l,n){return new _global.Promise((function(e){addTimer(u,{func:e,args:[n],delay:l})}))}),u.clearTimeout=function(l){return clearTimer(u,l,"Timeout")},u.nextTick=function(l){return enqueueJob(u,{func:l,args:Array.prototype.slice.call(arguments,1)})},u.queueMicrotask=function(l){return u.nextTick(l)},u.setInterval=function(l,n){return n=parseInt(n,10),addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n,interval:n})},u.clearInterval=function(l){return clearTimer(u,l,"Interval")},setImmediatePresent&&(u.setImmediate=function(l){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,1),immediate:!0})},void 0!==_global.Promise&&utilPromisify&&(u.setImmediate[utilPromisify.custom]=function(l){return new _global.Promise((function(n){addTimer(u,{func:n,args:[l],immediate:!0})}))}),u.clearImmediate=function(l){return clearTimer(u,l,"Immediate")}),u.countTimers=function(){return Object.keys(u.timers||{}).length+(u.jobs||[]).length},u.requestAnimationFrame=function(l){var n=addTimer(u,{func:l,delay:o(),args:[u.now+o()],animation:!0});return n.id||n},u.cancelAnimationFrame=function(l){return clearTimer(u,l,"AnimationFrame")},u.runMicrotasks=function(){runJobs(u)},u.tick=function(l){return i(l,!1)},void 0!==_global.Promise&&(u.tickAsync=function(l){return new _global.Promise((function(n,e){originalSetTimeout((function(){try{i(l,!0,n,e)}catch(l){e(l)}}))}))}),u.next=function(){runJobs(u);var l=firstTimer(u);if(!l)return u.now;u.duringTick=!0;try{return u.now=l.callAt,callTimer(u,l),runJobs(u),u.now}finally{u.duringTick=!1}},void 0!==_global.Promise&&(u.nextAsync=function(){return new _global.Promise((function(l,n){originalSetTimeout((function(){try{var e,t=firstTimer(u);if(!t)return void l(u.now);u.duringTick=!0,u.now=t.callAt;try{callTimer(u,t)}catch(l){e=l}u.duringTick=!1,originalSetTimeout((function(){e?n(e):l(u.now)}))}catch(l){n(l)}}))}))}),u.runAll=function(){var l;for(runJobs(u),l=0;l1||l instanceof Date||Array.isArray(l)||"number"==typeof l)throw new TypeError("FakeTimers.install called with "+String(l)+" install requires an object parameter");var n,e;(l=void 0!==l?l:{}).shouldAdvanceTime=l.shouldAdvanceTime||!1,l.advanceTimeDelta=l.advanceTimeDelta||20;var t=l.target||_global,u=createClock(l.now,l.loopLimit);for(u.uninstall=function(){return uninstall(u,t,l)},u.methods=l.toFake||[],0===u.methods.length&&(u.methods=keys(timers).filter((function(l){return"nextTick"!==l&&"queueMicrotask"!==l}))),n=0,e=u.methods.length;n>6*e)+u];e>0;){var r=n>>6*(e-1);o.push(128|63&r),e-=1}return o}}function S(l,n){var e=n.fatal;this.handler=function(n,t){if(t===a)return c;if(r(t))return t;var u=l[t-128];return null===u?d(e):u}}function C(l,n){n.fatal,this.handler=function(n,e){if(e===a)return c;if(i(e))return e;var t=w(e,l);return null===t&&p(e),t+128}}function j(l){var n=l.fatal,e=0,u=0,o=0;this.handler=function(l,i){if(i===a&&0===e&&0===u&&0===o)return c;var s;if(i!==a||0===e&&0===u&&0===o||(e=0,u=0,o=0,d(n)),0!==o){s=null,t(i,48,57)&&(s=function(l){if(l>39419&&l<189e3||l>1237575)return null;if(7457===l)return 59335;var n,e=0,t=0,u=k("gb18030-ranges");for(n=0;n>8,t=255&l;return n?[e,t]:[t,e]}function H(l,n){var e=n.fatal,u=null,o=null;this.handler=function(n,r){if(r===a&&(null!==u||null!==o))return d(e);if(r===a&&null===u&&null===o)return c;if(null===u)return u=r,null;var i;if(i=l?(u<<8)+r:(r<<8)+u,u=null,null!==o){var s=o;return o=null,t(i,56320,57343)?65536+1024*(s-55296)+(i-56320):(n.prepend(U(i,l)),d(e))}return t(i,55296,56319)?(o=i,null):t(i,56320,57343)?d(e):i}}function W(l,n){n.fatal,this.handler=function(n,e){if(e===a)return c;if(t(e,0,65535))return U(e,l);var u=U(55296+(e-65536>>10),l),o=U(56320+(e-65536&1023),l);return u.concat(o)}}function V(l){l.fatal,this.handler=function(l,n){return n===a?c:r(n)?n:63360+n-128}}function K(l){l.fatal,this.handler=function(l,n){return n===a?c:i(n)?n:t(n,63360,63487)?n-63360+128:p(n)}}Object.defineProperty&&(Object.defineProperty(E.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(E.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(E.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),E.prototype.decode=function(l,n){var e;e="object"==typeof l&&l instanceof ArrayBuffer?new Uint8Array(l):"object"==typeof l&&"buffer"in l&&l.buffer instanceof ArrayBuffer?new Uint8Array(l.buffer,l.byteOffset,l.byteLength):new Uint8Array(0),n=o(n),this._do_not_flush||(this._decoder=v[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(n.stream);for(var t,u=new s(e),r=[];;){var i=u.read();if(i===a)break;if((t=this._decoder.handler(u,i))===c)break;null!==t&&(Array.isArray(t)?r.push.apply(r,t):r.push(t))}if(!this._do_not_flush){do{if((t=this._decoder.handler(u,u.read()))===c)break;null!==t&&(Array.isArray(t)?r.push.apply(r,t):r.push(t))}while(!u.endOfStream());this._decoder=null}return function(l){var n,e;return n=["UTF-8","UTF-16LE","UTF-16BE"],e=this._encoding.name,-1===n.indexOf(e)||this._ignoreBOM||this._BOMseen||(l.length>0&&65279===l[0]?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),function(l){for(var n="",e=0;e>10),56320+(1023&t)))}return n}(l)}.call(this,r)},Object.defineProperty&&Object.defineProperty(T.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),T.prototype.encode=function(l,n){l=void 0===l?"":String(l),n=o(n),this._do_not_flush||(this._encoder=b[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(n.stream);for(var e,t=new s(function(l){for(var n=String(l),e=n.length,t=0,u=[];t57343)u.push(o);else if(56320<=o&&o<=57343)u.push(65533);else if(55296<=o&&o<=56319)if(t===e-1)u.push(65533);else{var r=n.charCodeAt(t+1);if(56320<=r&&r<=57343){var i=1023&o,a=1023&r;u.push(65536+(i<<10)+a),t+=1}else u.push(65533)}t+=1}return u}(l)),u=[];;){var r=t.read();if(r===a)break;if((e=this._encoder.handler(t,r))===c)break;Array.isArray(e)?u.push.apply(u,e):u.push(e)}if(!this._do_not_flush){for(;(e=this._encoder.handler(t,t.read()))!==c;)Array.isArray(e)?u.push.apply(u,e):u.push(e);this._encoder=null}return new Uint8Array(u)},b["UTF-8"]=function(l){return new A(l)},v["UTF-8"]=function(l){return new O(l)},"encoding-indexes"in e&&h.forEach((function(l){"Legacy single-byte encodings"===l.heading&&l.encodings.forEach((function(l){var n=l.name,e=k(n.toLowerCase());v[n]=function(l){return new S(e,l)},b[n]=function(l){return new C(e,l)}}))})),v.GBK=function(l){return new j(l)},b.GBK=function(l){return new P(l,!0)},b.gb18030=function(l){return new P(l)},v.gb18030=function(l){return new j(l)},b.Big5=function(l){return new M(l)},v.Big5=function(l){return new N(l)},b["EUC-JP"]=function(l){return new B(l)},v["EUC-JP"]=function(l){return new I(l)},b["ISO-2022-JP"]=function(l){return new R(l)},v["ISO-2022-JP"]=function(l){return new L(l)},b.Shift_JIS=function(l){return new F(l)},v.Shift_JIS=function(l){return new D(l)},b["EUC-KR"]=function(l){return new z(l)},v["EUC-KR"]=function(l){return new q(l)},b["UTF-16BE"]=function(l){return new W(!0,l)},v["UTF-16BE"]=function(l){return new H(!0,l)},b["UTF-16LE"]=function(l){return new W(!1,l)},v["UTF-16LE"]=function(l){return new H(!1,l)},b["x-user-defined"]=function(l){return new K(l)},v["x-user-defined"]=function(l){return new V(l)},e.TextEncoder||(e.TextEncoder=T),e.TextDecoder||(e.TextDecoder=E),void 0!==n&&n.exports&&(n.exports={TextEncoder:e.TextEncoder,TextDecoder:e.TextDecoder,EncodingIndexes:e["encoding-indexes"]})}(this||{})},{"./encoding-indexes.js":33}],35:[function(l,n,e){"function"==typeof Object.create?n.exports=function(l,n){l.super_=n,l.prototype=Object.create(n.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}})}:n.exports=function(l,n){l.super_=n;var e=function(){};e.prototype=n.prototype,l.prototype=new e,l.prototype.constructor=l}},{}],36:[function(l,n,e){n.exports=Array.isArray||function(l){return"[object Array]"==Object.prototype.toString.call(l)}},{}],37:[function(l,n,e){function t(l){return!l||"object"!=typeof l&&"function"!=typeof l}n.exports=function l(){var n=[].slice.call(arguments),e=!1;"boolean"==typeof n[0]&&(e=n.shift());var u,o=n[0];if(t(o))throw new Error("extendee must be an object");for(var r=n.slice(1),i=r.length,a=0;a=o)return l;switch(l){case"%s":return String(u[e++]);case"%d":return Number(u[e++]);case"%j":try{return JSON.stringify(u[e++])}catch(l){return"[Circular]"}default:return l}})),a=u[e];e=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),f(n)?t.showHidden=n:n&&e._extend(t,n),g(t.showHidden)&&(t.showHidden=!1),g(t.depth)&&(t.depth=2),g(t.colors)&&(t.colors=!1),g(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=i),s(t,l,t.depth)}function i(l,n){var e=r.styles[n];return e?"["+r.colors[e][0]+"m"+l+"["+r.colors[e][1]+"m":l}function a(l,n){return l}function s(l,n,t){if(l.customInspect&&n&&k(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var u=n.inspect(t,l);return y(u)||(u=s(l,u,t)),u}var o=function(l,n){if(g(n))return l.stylize("undefined","undefined");if(y(n)){var e="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return l.stylize(e,"string")}return m(n)?l.stylize(""+n,"number"):f(n)?l.stylize(""+n,"boolean"):h(n)?l.stylize("null","null"):void 0}(l,n);if(o)return o;var r=Object.keys(n),i=function(l){var n={};return l.forEach((function(l,e){n[l]=!0})),n}(r);if(l.showHidden&&(r=Object.getOwnPropertyNames(n)),w(n)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return c(n);if(0===r.length){if(k(n)){var a=n.name?": "+n.name:"";return l.stylize("[Function"+a+"]","special")}if(b(n))return l.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return l.stylize(Date.prototype.toString.call(n),"date");if(w(n))return c(n)}var v,x="",E=!1,T=["{","}"];return p(n)&&(E=!0,T=["[","]"]),k(n)&&(x=" [Function"+(n.name?": "+n.name:"")+"]"),b(n)&&(x=" "+RegExp.prototype.toString.call(n)),_(n)&&(x=" "+Date.prototype.toUTCString.call(n)),w(n)&&(x=" "+c(n)),0!==r.length||E&&0!=n.length?t<0?b(n)?l.stylize(RegExp.prototype.toString.call(n),"regexp"):l.stylize("[Object]","special"):(l.seen.push(n),v=E?function(l,n,e,t,u){for(var o=[],r=0,i=n.length;r60?e[0]+(""===n?"":n+"\n ")+" "+l.join(",\n ")+" "+e[1]:e[0]+n+" "+l.join(", ")+" "+e[1]}(v,x,T)):T[0]+x+T[1]}function c(l){return"["+Error.prototype.toString.call(l)+"]"}function d(l,n,e,t,u,o){var r,i,a;if((a=Object.getOwnPropertyDescriptor(n,u)||{value:n[u]}).get?i=a.set?l.stylize("[Getter/Setter]","special"):l.stylize("[Getter]","special"):a.set&&(i=l.stylize("[Setter]","special")),O(t,u)||(r="["+u+"]"),i||(l.seen.indexOf(a.value)<0?(i=h(e)?s(l,a.value,null):s(l,a.value,e-1)).indexOf("\n")>-1&&(i=o?i.split("\n").map((function(l){return" "+l})).join("\n").substr(2):"\n"+i.split("\n").map((function(l){return" "+l})).join("\n")):i=l.stylize("[Circular]","special")),g(r)){if(o&&u.match(/^\d+$/))return i;(r=JSON.stringify(""+u)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=l.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=l.stylize(r,"string"))}return r+": "+i}function p(l){return Array.isArray(l)}function f(l){return"boolean"==typeof l}function h(l){return null===l}function m(l){return"number"==typeof l}function y(l){return"string"==typeof l}function g(l){return void 0===l}function b(l){return v(l)&&"[object RegExp]"===x(l)}function v(l){return"object"==typeof l&&null!==l}function _(l){return v(l)&&"[object Date]"===x(l)}function w(l){return v(l)&&("[object Error]"===x(l)||l instanceof Error)}function k(l){return"function"==typeof l}function x(l){return Object.prototype.toString.call(l)}function E(l){return l<10?"0"+l.toString(10):l.toString(10)}e.debuglog=function(l){if(g(u)&&(u=process.env.NODE_DEBUG||""),l=l.toUpperCase(),!o[l])if(new RegExp("\\b"+l+"\\b","i").test(u)){var n=process.pid;o[l]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",l,n,t)}}else o[l]=function(){};return o[l]},e.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=f,e.isNull=h,e.isNullOrUndefined=function(l){return null==l},e.isNumber=m,e.isString=y,e.isSymbol=function(l){return"symbol"==typeof l},e.isUndefined=g,e.isRegExp=b,e.isObject=v,e.isDate=_,e.isError=w,e.isFunction=k,e.isPrimitive=function(l){return null===l||"boolean"==typeof l||"number"==typeof l||"string"==typeof l||"symbol"==typeof l||void 0===l},e.isBuffer=l("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(l,n){return Object.prototype.hasOwnProperty.call(l,n)}e.log=function(){var l,n;console.log("%s - %s",(n=[E((l=new Date).getHours()),E(l.getMinutes()),E(l.getSeconds())].join(":"),[l.getDate(),T[l.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=l("inherits"),e._extend=function(l,n){if(!n||!v(n))return l;for(var e=Object.keys(n),t=e.length;t--;)l[e[t]]=n[e[t]];return l}},{"./support/isBuffer":40,inherits:35}]},{},[12])(12)},module.exports=f()},7893:l=>{"use strict";function n(l,n){return null!=l&&n in Object(l)}function e(l){return l.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map((function(l){if("constructor"===l||"__proto__"===l||"prototype"===l)return{};var n=/^\[(\d+)\]$/.exec(l);return n?{i:parseFloat(n[1])}:{p:l.replace(/\\([.[\]])/g,"$1")}}))}function t(l,n,e){var t=l,u=null;e=void 0===e?n.length:e;for(var o=0;o1?t(l,o,o.length-1):l,name:r.p||r.i,value:t(l,o)};return i.exists=n(i.parent,i.name),i}l.exports={hasProperty:n,getPathInfo:u,getPathValue:function(l,n){return u(l,n).value},setPathValue:function(l,n,t){return function(l,n,e){for(var t=l,u=e.length,o=null,r=0;r{"use strict";var t=e(4344),u=e(256),o=e(7513),r=e(2571),i=e(1730),a=e(9191),s=e(5887),c=e(9690),d={createSandbox:u,assert:e(1348),match:e(3584).createMatcher,restoreObject:e(3564),expectation:e(9959),defaultConfig:e(3199),setFormatter:i.setFormatter,timers:r.timers,xhr:a.fakeXhr.xhr,FakeXMLHttpRequest:a.fakeXhr.FakeXMLHttpRequest,fakeServer:a.fakeServer,fakeServerWithClock:a.fakeServerWithClock,createFakeServer:a.fakeServer.create.bind(a.fakeServer),createFakeServerWithClock:a.fakeServerWithClock.create.bind(a.fakeServerWithClock),addBehavior:function(l,n){t.addBehavior(c,l,n)}},p=o(new s,d);l.exports=p},1348:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(8432).calledInOrder,o=e(3584).createMatcher,r=e(8432).orderByFirstCall,i=e(2763),a=e(1730),s=e(8432).prototypes.string.slice,c=e(8432).global,d=t.slice,p=t.concat,f=t.forEach,h=t.join,m=t.splice;function y(){var l;function n(){var e=d(arguments);f(e,(function(e){e||l.fail("fake is not a spy"),e.proxy&&e.proxy.isSinonProxy?n(e.proxy):("function"!=typeof e&&l.fail(e+" is not a function"),"function"!=typeof e.getCall&&l.fail(e+" is not stubbed"))}))}function e(n,e){var t=n||c;(t.fail||l.fail).call(t,e)}function t(t,u,o){var r=o,i=u;2===arguments.length&&(r=u,i=t),l[t]=function(u){n(u);var o=d(arguments,1);!function(n,e){switch(n){case"notCalled":case"called":case"calledOnce":case"calledTwice":case"calledThrice":0!==e.length&&l.fail(n+" takes 1 argument but was called with "+(e.length+1)+" arguments")}}(t,o),("function"==typeof i?i(u):"function"==typeof u[i]?u[i].apply(u,o):u[i])?l.pass(t):e(this,(u.printf||u.proxy.printf).apply(u,p([r],o)))}}return l={failException:"AssertError",fail:function(n){var e=new Error(n);throw e.name=this.failException||l.failException,e},pass:function(){},callOrder:function(){n.apply(null,arguments);var t="",o="";if(u(arguments))l.pass("callOrder");else{try{t=h(arguments,", ");for(var i=d(arguments),a=i.length;a;)i[--a].called||m(i,a,1);o=h(r(i),", ")}catch(l){}e(this,"expected "+t+" to be called in order but were called as "+o)}},callCount:function(t,u){if(n(t),t.callCount!==u){var o="expected %n to be called "+i(u)+" but was called %c%C";e(this,t.printf(o))}else l.pass("callCount")},expose:function(l,n){if(!l)throw new TypeError("target is null or undefined");var e=n||{},t=void 0===e.prefix?"assert":e.prefix,u=void 0===e.includeFail||Boolean(e.includeFail),o=this;return f(Object.keys(o),(function(n){"expose"===n||!u&&/^(fail)/.test(n)||(l[function(l,n){return!l||/^fail/.test(n)?n:l+s(n,0,1).toUpperCase()+s(n,1)}(t,n)]=o[n])})),l},match:function(n,t){if(o(t).test(n))l.pass("match");else{var u=["expected value to match"," expected = "+a(t)," actual = "+a(n)];e(this,h(u,"\n"))}}},t("called","expected %n to have been called at least once but was never called"),t("notCalled",(function(l){return!l.called}),"expected %n to not have been called but was called %c%C"),t("calledOnce","expected %n to be called once but was called %c%C"),t("calledTwice","expected %n to be called twice but was called %c%C"),t("calledThrice","expected %n to be called thrice but was called %c%C"),t("calledOn","expected %n to be called with %1 as this but was called with %t"),t("alwaysCalledOn","expected %n to always be called with %1 as this but was called with %t"),t("calledWithNew","expected %n to be called with new"),t("alwaysCalledWithNew","expected %n to always be called with new"),t("calledWith","expected %n to be called with arguments %D"),t("calledWithMatch","expected %n to be called with match %D"),t("alwaysCalledWith","expected %n to always be called with arguments %D"),t("alwaysCalledWithMatch","expected %n to always be called with match %D"),t("calledWithExactly","expected %n to be called with exact arguments %D"),t("calledOnceWithExactly","expected %n to be called once and with exact arguments %D"),t("calledOnceWithMatch","expected %n to be called once and with match %D"),t("alwaysCalledWithExactly","expected %n to always be called with exact arguments %D"),t("neverCalledWith","expected %n to never be called with arguments %*%C"),t("neverCalledWithMatch","expected %n to never be called with match %*%C"),t("threw","%n did not throw exception%C"),t("alwaysThrew","%n did not always throw exception%C"),l}l.exports=y(),l.exports.createAssertObject=y},4344:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(7513),o=e(8432).functionName,r=e(2992),i=e(8432).valueToString,a=e(8084),s=t.concat,c=t.join,d=t.reverse,p=t.slice;function f(l,n,e){var t=n[l.replace(/sArg/,"ArgAt")];if(t>=e.length)throw new TypeError(l+" failed: "+(t+1)+" arguments required but only "+e.length+" present")}var h={create:function(l){var n=u({},h);return delete n.create,delete n.addBehavior,delete n.createBehavior,n.stub=l,l.defaultBehavior&&l.defaultBehavior.promiseLibrary&&(n.promiseLibrary=l.defaultBehavior.promiseLibrary),n},isPresent:function(){return"number"==typeof this.callArgAt||this.exception||this.exceptionCreator||"number"==typeof this.returnArgAt||this.returnThis||"number"==typeof this.resolveArgAt||this.resolveThis||"number"==typeof this.throwArgAt||this.fakeFn||this.returnValueDefined},invoke:function(l,n){var e=function(l,n){if("number"==typeof l.callArgAt){f("callsArg",l,n);var e=function(l,n){var e,t=l.callArgAt;if(t>=0)return n[t];-1===t&&(e=n),-2===t&&(e=d(p(n)));for(var u=l.callArgProp,o=0,r=e.length;o0&&(t+=" Received ["+c(e,", ")+"]"),t):"argument at index "+l.callArgAt+" is not a function: "+n}(l,e,n));if(!l.callbackAsync)return e.apply(l.callbackContext,l.callbackArguments);r((function(){e.apply(l.callbackContext,l.callbackArguments)}))}}(this,n);if(this.exception)throw this.exception;if(this.exceptionCreator)throw this.exception=this.exceptionCreator(),this.exceptionCreator=void 0,this.exception;if("number"==typeof this.returnArgAt)return f("returnsArg",this,n),n[this.returnArgAt];if(this.returnThis)return l;if("number"==typeof this.throwArgAt)throw f("throwsArg",this,n),n[this.throwArgAt];if(this.fakeFn)return this.fakeFn.apply(l,n);if("number"==typeof this.resolveArgAt)return f("resolvesArg",this,n),(this.promiseLibrary||Promise).resolve(n[this.resolveArgAt]);if(this.resolveThis)return(this.promiseLibrary||Promise).resolve(l);if(this.resolve)return(this.promiseLibrary||Promise).resolve(this.returnValue);if(this.reject)return(this.promiseLibrary||Promise).reject(this.returnValue);if(this.callsThrough)return this.effectiveWrappedMethod().apply(l,n);if(this.callsThroughWithNew){var t=this.effectiveWrappedMethod(),u=p(n);return new(t.bind.apply(t,s([null],u)))}return void 0!==this.returnValue?this.returnValue:"number"==typeof this.callArgAt?e:this.returnValue},effectiveWrappedMethod:function(){for(var l=this.stub;l;l=l.parent)if(l.wrappedMethod)return l.wrappedMethod;throw new Error("Unable to find wrapped method")},onCall:function(l){return this.stub.onCall(l)},onFirstCall:function(){return this.stub.onFirstCall()},onSecondCall:function(){return this.stub.onSecondCall()},onThirdCall:function(){return this.stub.onThirdCall()},withArgs:function(){throw new Error('Defining a stub by invoking "stub.onCall(...).withArgs(...)" is not supported. Use "stub.withArgs(...).onCall(...)" to define sequential behavior for calls with certain arguments.')}};function m(l){return function(){return this.defaultBehavior=this.defaultBehavior||h.create(this),this.defaultBehavior[l].apply(this.defaultBehavior,arguments),this}}h.addBehavior=function(l,n,e){h[n]=function(){return e.apply(this,s([this],p(arguments))),this.stub||this},l[n]=m(n)},h.createBehavior=m;var y=a(h);l.exports=u.nonEnum({},h,y)},6180:(l,n,e)=>{"use strict";var t=e(3096),u=e(621),o=e(8432).prototypes.object.hasOwnProperty,r=e(8432).prototypes.array.push;function i(l,n,e,t){"function"==typeof u(t,e).value&&o(n,e)&&r(l,n[e])}l.exports=function(l){var n=[];return t(l,i.bind(null,n,l)),n}},8907:(l,n,e)=>{"use strict";var t=e(2747);function u(l,n){return!1===t.stdout?l:"["+n+"m"+l+"[0m"}n.red=function(l){return u(l,31)},n.green=function(l){return u(l,32)},n.cyan=function(l){return u(l,96)},n.white=function(l){return u(l,39)},n.bold=function(l){return u(l,1)}},256:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(5887),o=t.forEach,r=t.push;function i(l,n,e,t){t&&(n.injectInto&&!(e in n.injectInto)?(n.injectInto[e]=t,r(l.injectedKeys,e)):r(l.args,t))}l.exports=function(l){if(!l)return new u;var n=function(l){var n=new u;return l.useFakeServer&&("object"==typeof l.useFakeServer&&(n.serverPrototype=l.useFakeServer),n.useFakeServer()),l.useFakeTimers&&("object"==typeof l.useFakeTimers?n.useFakeTimers(l.useFakeTimers):n.useFakeTimers()),n}(l);n.args=n.args||[],n.injectedKeys=[],n.injectInto=l.injectInto;var e=n.inject({});return l.properties?o(l.properties,(function(t){var u=e[t]||"sandbox"===t&&n;i(n,l,t,u)})):i(n,l,"sandbox"),n}},1731:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(7265),o=e(8084),r=e(7513),i=t.slice;function a(l,n,e){"function"==typeof n?l.exceptionCreator=n:"string"==typeof n?l.exceptionCreator=function(){var l=new Error(e||"");return l.name=n,l}:n?l.exception=n:l.exceptionCreator=function(){return new Error("Error")}}var s={callsFake:function(l,n){l.fakeFn=n},callsArg:function(l,n){if("number"!=typeof n)throw new TypeError("argument index is not number");l.callArgAt=n,l.callbackArguments=[],l.callbackContext=void 0,l.callArgProp=void 0,l.callbackAsync=!1},callsArgOn:function(l,n,e){if("number"!=typeof n)throw new TypeError("argument index is not number");l.callArgAt=n,l.callbackArguments=[],l.callbackContext=e,l.callArgProp=void 0,l.callbackAsync=!1},callsArgWith:function(l,n){if("number"!=typeof n)throw new TypeError("argument index is not number");l.callArgAt=n,l.callbackArguments=i(arguments,2),l.callbackContext=void 0,l.callArgProp=void 0,l.callbackAsync=!1},callsArgOnWith:function(l,n,e){if("number"!=typeof n)throw new TypeError("argument index is not number");l.callArgAt=n,l.callbackArguments=i(arguments,3),l.callbackContext=e,l.callArgProp=void 0,l.callbackAsync=!1},usingPromise:function(l,n){l.promiseLibrary=n},yields:function(l){l.callArgAt=-1,l.callbackArguments=i(arguments,1),l.callbackContext=void 0,l.callArgProp=void 0,l.callbackAsync=!1},yieldsRight:function(l){l.callArgAt=-2,l.callbackArguments=i(arguments,1),l.callbackContext=void 0,l.callArgProp=void 0,l.callbackAsync=!1},yieldsOn:function(l,n){l.callArgAt=-1,l.callbackArguments=i(arguments,2),l.callbackContext=n,l.callArgProp=void 0,l.callbackAsync=!1},yieldsTo:function(l,n){l.callArgAt=-1,l.callbackArguments=i(arguments,2),l.callbackContext=void 0,l.callArgProp=n,l.callbackAsync=!1},yieldsToOn:function(l,n,e){l.callArgAt=-1,l.callbackArguments=i(arguments,3),l.callbackContext=e,l.callArgProp=n,l.callbackAsync=!1},throws:a,throwsException:a,returns:function(l,n){l.returnValue=n,l.resolve=!1,l.reject=!1,l.returnValueDefined=!0,l.exception=void 0,l.exceptionCreator=void 0,l.fakeFn=void 0},returnsArg:function(l,n){if("number"!=typeof n)throw new TypeError("argument index is not number");l.returnArgAt=n},throwsArg:function(l,n){if("number"!=typeof n)throw new TypeError("argument index is not number");l.throwArgAt=n},returnsThis:function(l){l.returnThis=!0},resolves:function(l,n){l.returnValue=n,l.resolve=!0,l.resolveThis=!1,l.reject=!1,l.returnValueDefined=!0,l.exception=void 0,l.exceptionCreator=void 0,l.fakeFn=void 0},resolvesArg:function(l,n){if("number"!=typeof n)throw new TypeError("argument index is not number");l.resolveArgAt=n,l.returnValue=void 0,l.resolve=!0,l.resolveThis=!1,l.reject=!1,l.returnValueDefined=!1,l.exception=void 0,l.exceptionCreator=void 0,l.fakeFn=void 0},rejects:function(l,n,e){var t;return"string"==typeof n?(t=new Error(e||"")).name=n:t=n||new Error("Error"),l.returnValue=t,l.resolve=!1,l.resolveThis=!1,l.reject=!0,l.returnValueDefined=!0,l.exception=void 0,l.exceptionCreator=void 0,l.fakeFn=void 0,l},resolvesThis:function(l){l.returnValue=void 0,l.resolve=!1,l.resolveThis=!0,l.reject=!1,l.returnValueDefined=!1,l.exception=void 0,l.exceptionCreator=void 0,l.fakeFn=void 0},callThrough:function(l){l.callsThrough=!0},callThroughWithNew:function(l){l.callsThroughWithNew=!0},get:function(l,n){var e=l.stub||l;return Object.defineProperty(e.rootObj,e.propName,{get:n,configurable:u(e.rootObj,e.propName)}),l},set:function(l,n){var e=l.stub||l;return Object.defineProperty(e.rootObj,e.propName,{set:n,configurable:u(e.rootObj,e.propName)}),l},value:function(l,n){var e=l.stub||l;return Object.defineProperty(e.rootObj,e.propName,{value:n,enumerable:!0,configurable:e.shadowsPropOnPrototype||u(e.rootObj,e.propName)}),l}},c=o(s);l.exports=r({},s,c)},8543:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(6212),o=e(2992),r=t.slice;function i(l){return l instanceof Error?l:new Error(l)}var a=0;function s(l){var n,e=function(){var e,t;arguments.length>0&&(e=arguments[0],t=arguments[arguments.length-1]);var u=t&&"function"==typeof t?t:void 0;return n.firstArg=e,n.lastArg=t,n.callback=u,l&&l.apply(this,arguments)};return(n=u(e,l||e)).displayName="fake",n.id="fake#"+a++,n}l.exports=function(){var l=null;function n(l){if(arguments.length>0&&"function"!=typeof l)throw new TypeError("Expected f argument to be a Function");return s(l)}function e(l,n){return s((function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw new TypeError("Expected last argument to be a function");l?o((function(){e.apply(null,n)})):e.apply(null,n)}))}return"function"==typeof Promise&&(l=Promise),n.returns=function(l){return s((function(){return l}))},n.throws=function(l){return s((function(){throw i(l)}))},n.resolves=function(n){return s((function(){return l.resolve(n)}))},n.rejects=function(n){return s((function(){return l.reject(i(n))}))},n.usingPromise=function(e){return l=e,n},n.yields=function(){return e(!1,r(arguments))},n.yieldsAsync=function(){return e(!0,r(arguments))},n}()},9959:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(1337),o=e(5861).toString,r=e(2763),i=e(7513),a=e(3584).createMatcher,s=e(9690),c=e(1348),d=e(3584).deepEqual,p=e(1730),f=e(8432).valueToString,h=t.every,m=t.forEach,y=t.push,g=t.slice;function b(l){return"number"==typeof l.maxCalls&&l.callCount===l.maxCalls}function v(l,n){return a.isMatcher(l)&&l.test(n)||!0}var _={minCalls:1,maxCalls:1,create:function(l){var n=i.nonEnum(s(),_);return delete n.create,n.method=l,n},invoke:function(l,n,e){return this.verifyCallAllowed(n,e),u.apply(this,arguments)},atLeast:function(l){if("number"!=typeof l)throw new TypeError("'"+f(l)+"' is not number");return this.limitsSet||(this.maxCalls=null,this.limitsSet=!0),this.minCalls=l,this},atMost:function(l){if("number"!=typeof l)throw new TypeError("'"+f(l)+"' is not number");return this.limitsSet||(this.minCalls=null,this.limitsSet=!0),this.maxCalls=l,this},never:function(){return this.exactly(0)},once:function(){return this.exactly(1)},twice:function(){return this.exactly(2)},thrice:function(){return this.exactly(3)},exactly:function(l){if("number"!=typeof l)throw new TypeError("'"+f(l)+"' is not a number");return this.atLeast(l),this.atMost(l)},met:function(){return!this.failed&&(!("number"==typeof this.minCalls)||this.callCount>=this.minCalls)},verifyCallAllowed:function(l,n){var e=this.expectedArguments;b(this)&&(this.failed=!0,_.fail(this.method+" already called "+r(this.maxCalls))),"expectedThis"in this&&this.expectedThis!==l&&_.fail(this.method+" called with "+f(l)+" as thisValue, expected "+f(this.expectedThis)),"expectedArguments"in this&&(n||_.fail(this.method+" received no arguments, expected "+p(e)),n.length{"use strict";var t=e(8432).prototypes.array,u=e(9959),o=e(5861).toString,r=e(7513),i=e(3584).deepEqual,a=e(483),s=e(5500),c=t.concat,d=t.filter,p=t.forEach,f=t.every,h=t.join,m=t.push,y=t.slice,g=t.unshift;function b(l){return l&&"string"!=typeof l?b.create(l):u.create(l||"Anonymous mock")}function v(l,n){p(l||[],n)}r(b,{create:function(l){if(!l)throw new TypeError("object is null");var n=r.nonEnum({},b,{object:l});return delete n.create,n},expects:function(l){if(!l)throw new TypeError("method is falsy");if(this.expectations||(this.expectations={},this.proxies=[],this.failures=[]),!this.expectations[l]){this.expectations[l]=[];var n=this;a(this.object,l,(function(){return n.invokeMethod(l,this,arguments)})),m(this.proxies,l)}var e=u.create(l);return e.wrappedMethod=this.object[l].wrappedMethod,m(this.expectations[l],e),s(this.promiseLibrary,e),e},restore:function(){var l=this.object;v(this.proxies,(function(n){"function"==typeof l[n].restore&&l[n].restore()}))},verify:function(){var l=this.expectations||{},n=this.failures?y(this.failures):[],e=[];return v(this.proxies,(function(t){v(l[t],(function(l){l.met()?m(e,String(l)):m(n,String(l))}))})),this.restore(),n.length>0?u.fail(h(c(n,e),"\n")):e.length>0&&u.pass(h(c(n,e),"\n")),!0},usingPromise:function(l){return this.promiseLibrary=l,this},invokeMethod:function(l,n,e){var t,r=this.expectations&&this.expectations[l]?this.expectations[l]:[],a=e||[],s=d(r,(function(l){var n,e;return n=l.expectedArguments||[],e=a,(!l.expectsExactArgCount||n.length===e.length)&&f(n,(function(l,n){return i(e[n],l)}))})),c=d(s,(function(l){return!l.met()&&l.allowsCall(n,e)}));if(c.length>0)return c[0].apply(n,e);var y=[],b=0;if(p(s,(function(l){l.allowsCall(n,e)?t=t||l:b+=1})),t&&0===b)return t.apply(n,e);p(r,(function(l){m(y," "+String(l))})),g(y,"Unexpected call: "+o.call({proxy:l,args:e}));var v=new Error;if(!v.stack)try{throw v}catch(l){}m(this.failures,"Unexpected call: "+o.call({proxy:l,args:e,stack:v.stack})),u.fail(h(y,"\n"))}}),l.exports=b},9970:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array.push;n.incrementCallCount=function(l){l.called=!0,l.callCount+=1,l.notCalled=!1,l.calledOnce=1===l.callCount,l.calledTwice=2===l.callCount,l.calledThrice=3===l.callCount},n.createCallProperties=function(l){l.firstCall=l.getCall(0),l.secondCall=l.getCall(1),l.thirdCall=l.getCall(2),l.lastCall=l.getCall(l.callCount-1)},n.delegateToCalls=function(l,n,e,u,o,r,i){l[n]=function(){if(!this.called)return!!r&&r.apply(this,arguments);if(void 0!==i&&this.callCount!==i)return!1;for(var l,a=0,s=[],c=0,d=this.callCount;c{"use strict";var t=e(8432).prototypes.array,u=e(3584).createMatcher,o=e(3584).deepEqual,r=e(8432).functionName,i=e(1730),a=e(8432).valueToString,s=t.concat,c=t.filter,d=t.join,p=t.map,f=t.reduce,h=t.slice;function m(l,n,e){var t=r(l)+n;throw e.length&&(t+=" Received ["+d(h(e),", ")+"]"),new Error(t)}var y={calledOn:function(l){return u.isMatcher(l)?l.test(this.thisValue):this.thisValue===l},calledWith:function(){var l=this,n=h(arguments);return!(n.length>l.args.length)&&f(n,(function(n,e,t){return n&&o(l.args[t],e)}),!0)},calledWithMatch:function(){var l=this,n=h(arguments);return!(n.length>l.args.length)&&f(n,(function(n,e,t){var o=l.args[t];return n&&u(e).test(o)}),!0)},calledWithExactly:function(){return arguments.length===this.args.length&&this.calledWith.apply(this,arguments)},notCalledWith:function(){return!this.calledWith.apply(this,arguments)},notCalledWithMatch:function(){return!this.calledWithMatch.apply(this,arguments)},returned:function(l){return o(this.returnValue,l)},threw:function(l){return void 0!==l&&this.exception?this.exception===l||this.exception.name===l:Boolean(this.exception)},calledWithNew:function(){return this.proxy.prototype&&this.thisValue instanceof this.proxy},calledBefore:function(l){return this.callIdl.callId},calledImmediatelyBefore:function(l){return this.callId===l.callId-1},calledImmediatelyAfter:function(l){return this.callId===l.callId+1},callArg:function(l){return this.ensureArgIsAFunction(l),this.args[l]()},callArgOn:function(l,n){return this.ensureArgIsAFunction(l),this.args[l].apply(n)},callArgWith:function(l){return this.callArgOnWith.apply(this,s([l,null],h(arguments,1)))},callArgOnWith:function(l,n){this.ensureArgIsAFunction(l);var e=h(arguments,2);return this.args[l].apply(n,e)},throwArg:function(l){if(l>this.args.length)throw new TypeError("Not enough arguments: "+l+" required but only "+this.args.length+" present");throw this.args[l]},yield:function(){return this.yieldOn.apply(this,s([null],h(arguments,0)))},yieldOn:function(l){var n=h(this.args),e=c(n,(function(l){return"function"==typeof l}))[0];return e||m(this.proxy," cannot yield since no callback was passed.",n),e.apply(l,h(arguments,1))},yieldTo:function(l){return this.yieldToOn.apply(this,s([l,null],h(arguments,1)))},yieldToOn:function(l,n){var e=h(this.args),t=c(e,(function(n){return n&&"function"==typeof n[l]}))[0],u=t&&t[l];return u||m(this.proxy," cannot yield to '"+a(l)+"' since no callback was passed.",e),u.apply(n,h(arguments,2))},toString:function(){var l,n=this.proxy?String(this.proxy)+"(":"";return this.args?(l=p(this.args,(function(l){return i(l)})),n=n+d(l,", ")+")",void 0!==this.returnValue&&(n+=" => "+i(this.returnValue)),this.exception&&(n+=" !"+this.exception.name,this.exception.message&&(n+="("+this.exception.message+")")),this.stack&&(n+=(this.stack.split("\n")[3]||"unknown").replace(/^\s*(?:at\s+|@)?/," at ")),n):":("},ensureArgIsAFunction:function(l){if("function"!=typeof this.args[l])throw new TypeError("Expected argument at position "+l+" to be a Function, but was "+typeof this.args[l])}};function g(l,n,e,t,u,o,r){if("number"!=typeof o)throw new TypeError("Call id is not a number");var i,a;e.length>0&&(i=e[0],a=e[e.length-1]);var s=Object.create(y),c=a&&"function"==typeof a?a:void 0;return s.proxy=l,s.thisValue=n,s.args=e,s.firstArg=i,s.lastArg=a,s.callback=c,s.returnValue=t,s.exception=u,s.callId=o,s.errorWithCallStack=r,s}Object.defineProperty(y,"stack",{enumerable:!0,configurable:!0,get:function(){return this.errorWithCallStack&&this.errorWithCallStack.stack||""}}),y.invokeCallback=y.yield,g.toString=y.toString,l.exports=g},1337:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(9970),o=t.push,r=t.forEach,i=t.concat,a=Error.prototype.constructor,s=Function.prototype.bind,c=0;l.exports=function(l,n,e){var t,d,p=this.matchingFakes(e),f=c++;u.incrementCallCount(this),o(this.thisValues,n),o(this.args,e),o(this.callIds,f),r(p,(function(l){u.incrementCallCount(l),o(l.thisValues,n),o(l.args,e),o(l.callIds,f)})),u.createCallProperties(this),r(p,u.createCallProperties);try{this.invoking=!0,this.getCall(this.callCount-1).calledWithNew()?"object"!=typeof(d=new(s.apply(this.func||l,i([n],e))))&&(d=n):d=(this.func||l).apply(n,e)}catch(l){t=l}finally{delete this.invoking}o(this.exceptions,t),o(this.returnValues,d),r(p,(function(l){o(l.exceptions,t),o(l.returnValues,d)}));var h=new a;try{throw h}catch(l){}if(o(this.errorsWithCallStack,h),r(p,(function(l){o(l.errorsWithCallStack,h)})),u.createCallProperties(this),r(p,u.createCallProperties),void 0!==t)throw t;return d}},6212:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(7513),o=e(7253),r=e(5861),i=e(9970),a=e(1337),s=e(1730),c=t.push,d=t.forEach,p=t.slice,f=Object.freeze([]),h={toString:o,named:function(l){this.displayName=l;var n=Object.getOwnPropertyDescriptor(this,"name");return n&&n.configurable&&(n.value=l,Object.defineProperty(this,"name",n)),this},invoke:a,matchingFakes:function(){return f},getCall:function(l){var n=l;return n<0&&(n+=this.callCount),n<0||n>=this.callCount?null:r(this,this.thisValues[n],this.args[n],this.returnValues[n],this.exceptions[n],this.callIds[n],this.errorsWithCallStack[n])},getCalls:function(){var l,n=[];for(l=0;ll.callIds[0]},calledImmediatelyBefore:function(l){return!(!this.called||!l.called)&&this.callIds[this.callCount-1]===l.callIds[l.callCount-1]-1},calledImmediatelyAfter:function(l){return!(!this.called||!l.called)&&this.callIds[this.callCount-1]===l.callIds[l.callCount-1]+1},formatters:e(9168),printf:function(l){var n,e=this,t=p(arguments,1);return(l||"").replace(/%(.)/g,(function(l,u){return"function"==typeof(n=h.formatters[u])?String(n(e,t)):isNaN(parseInt(u,10))?"%"+u:s(t[u-1])}))},resetHistory:function(){if(this.invoking){var l=new Error("Cannot reset Sinon function while invoking it. Move the call to .resetHistory outside of the callback.");throw l.name="InvalidResetException",l}return this.called=!1,this.notCalled=!0,this.calledOnce=!1,this.calledTwice=!1,this.calledThrice=!1,this.callCount=0,this.firstCall=null,this.secondCall=null,this.thirdCall=null,this.lastCall=null,this.args=[],this.firstArg=null,this.lastArg=null,this.returnValues=[],this.thisValues=[],this.exceptions=[],this.callIds=[],this.errorsWithCallStack=[],this.fakes&&d(this.fakes,(function(l){l.resetHistory()})),this}},m=i.delegateToCalls;m(h,"calledOn",!0),m(h,"alwaysCalledOn",!1,"calledOn"),m(h,"calledWith",!0),m(h,"calledOnceWith",!0,"calledWith",!1,void 0,1),m(h,"calledWithMatch",!0),m(h,"alwaysCalledWith",!1,"calledWith"),m(h,"alwaysCalledWithMatch",!1,"calledWithMatch"),m(h,"calledWithExactly",!0),m(h,"calledOnceWithExactly",!0,"calledWithExactly",!1,void 0,1),m(h,"calledOnceWithMatch",!0,"calledWithMatch",!1,void 0,1),m(h,"alwaysCalledWithExactly",!1,"calledWithExactly"),m(h,"neverCalledWith",!1,"notCalledWith",!1,(function(){return!0})),m(h,"neverCalledWithMatch",!1,"notCalledWithMatch",!1,(function(){return!0})),m(h,"threw",!0),m(h,"alwaysThrew",!1,"threw"),m(h,"returned",!0),m(h,"alwaysReturned",!1,"returned"),m(h,"calledWithNew",!0),m(h,"alwaysCalledWithNew",!1,"calledWithNew"),l.exports=function(l,n){var e=function(l,n){var e;switch(n.length){case 0:default:e=function(){return e.invoke(l,this,p(arguments))};break;case 1:e=function(n){return e.invoke(l,this,p(arguments))};break;case 2:e=function(n,t){return e.invoke(l,this,p(arguments))};break;case 3:e=function(n,t,u){return e.invoke(l,this,p(arguments))};break;case 4:e=function(n,t,u,o){return e.invoke(l,this,p(arguments))};break;case 5:e=function(n,t,u,o,r){return e.invoke(l,this,p(arguments))};break;case 6:e=function(n,t,u,o,r,i){return e.invoke(l,this,p(arguments))};break;case 7:e=function(n,t,u,o,r,i,a){return e.invoke(l,this,p(arguments))};break;case 8:e=function(n,t,u,o,r,i,a,s){return e.invoke(l,this,p(arguments))};break;case 9:e=function(n,t,u,o,r,i,a,s,c){return e.invoke(l,this,p(arguments))};break;case 10:e=function(n,t,u,o,r,i,a,s,c,d){return e.invoke(l,this,p(arguments))};break;case 11:e=function(n,t,u,o,r,i,a,s,c,d,f){return e.invoke(l,this,p(arguments))};break;case 12:e=function(n,t,u,o,r,i,a,s,c,d,f,h){return e.invoke(l,this,p(arguments))}}var t=Object.getOwnPropertyDescriptor(n,"name");return t&&t.configurable&&Object.defineProperty(e,"name",t),u.nonEnum(e,{isSinonProxy:!0,called:!1,notCalled:!0,calledOnce:!1,calledTwice:!1,calledThrice:!1,callCount:0,firstCall:null,firstArg:null,secondCall:null,thirdCall:null,lastCall:null,lastArg:null,args:[],returnValues:[],thisValues:[],exceptions:[],callIds:[],errorsWithCallStack:[]}),e}(l,n);return u(e,l),e.prototype=l.prototype,u.nonEnum(e,h),e}},3564:(l,n,e)=>{"use strict";var t=e(8002);function u(l,n){return l[n].restore&&l[n].restore.sinon}function o(l,n){l[n].restore()}l.exports=function(l){return t(o,l,u)}},5887:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(6180),o=e(621),r=e(7265),i=e(3584).createMatcher,a=e(1348),s=e(2571),c=e(4452),d=e(6130),p=e(9690),f=e(8543),h=e(8432).valueToString,m=e(9191).fakeServer,y=e(9191).fakeXhr,g=e(5500),b=t.filter,v=t.forEach,_=t.push,w=t.reverse;function k(l,n){var e=b(l,(function(l){return"function"==typeof l[n]}));v(e,(function(l){l[n]()}))}function x(){var l,n=this,e=[],t=[];function b(l,n){var e=o(l,n);function t(){e.isOwn?Object.defineProperty(l,n,e):delete l[n]}return t.object=l,t.property=n,t}function x(l,n){v(t,(function(e){if(e.object===l&&e.property===n)throw new TypeError("Attempted to replace "+n+" which is already replaced")}))}function E(n,t){var o=n[0];if(void 0===n[1]&&"object"==typeof o){var r=u(t);v(r,(function(l){_(e,l)})),g(l,r)}else _(e,t),g(l,t);return t}n.assert=a.createAssertObject(),n.serverPrototype=m,n.getFakes=function(){return e},n.getRestorers=function(){return t},n.createStubInstance=function(){var n=p.createStubInstance.apply(null,arguments),t=u(n);return v(t,(function(l){_(e,l)})),g(l,t),n},n.inject=function(l){return l.spy=function(){return n.spy.apply(null,arguments)},l.stub=function(){return n.stub.apply(null,arguments)},l.mock=function(){return n.mock.apply(null,arguments)},l.createStubInstance=function(){return n.createStubInstance.apply(n,arguments)},l.fake=function(){return n.fake.apply(null,arguments)},l.replace=function(){return n.replace.apply(null,arguments)},l.replaceSetter=function(){return n.replaceSetter.apply(null,arguments)},l.replaceGetter=function(){return n.replaceGetter.apply(null,arguments)},n.clock&&(l.clock=n.clock),n.server&&(l.server=n.server,l.requests=n.server.requests),l.match=i,l},n.mock=function(){var n=c.apply(null,arguments);return _(e,n),g(l,n),n},n.reset=function(){k(e,"reset"),k(e,"resetHistory")},n.resetBehavior=function(){k(e,"resetBehavior")},n.resetHistory=function(){function l(l){var n=l.resetHistory||l.reset;n&&n.call(l)}v(e,(function(n){if("function"!=typeof n){var e=[];n.get&&_(e,n.get),n.set&&_(e,n.set),v(e,l)}else l(n)}))},n.restore=function(){if(arguments.length)throw new Error("sandbox.restore() does not take any parameters. Perhaps you meant stub.restore()");w(e),k(e,"restore"),e=[],v(t,(function(l){l()})),t=[],n.restoreContext()},n.restoreContext=function(){var l=n.injectedKeys,e=n.injectInto;l&&(v(l,(function(l){delete e[l]})),l=[])},n.replace=function(l,n,e){var u=o(l,n);if(void 0===u)throw new TypeError("Cannot replace non-existent property "+h(n));if(void 0===e)throw new TypeError("Expected replacement argument to be defined");if("function"==typeof u.get)throw new Error("Use sandbox.replaceGetter for replacing getters");if("function"==typeof u.set)throw new Error("Use sandbox.replaceSetter for replacing setters");if(typeof l[n]!=typeof e)throw new TypeError("Cannot replace "+typeof l[n]+" with "+typeof e);return x(l,n),_(t,b(l,n)),l[n]=e,e},n.replaceGetter=function(l,n,e){var u=o(l,n);if(void 0===u)throw new TypeError("Cannot replace non-existent property "+h(n));if("function"!=typeof e)throw new TypeError("Expected replacement argument to be a function");if("function"!=typeof u.get)throw new Error("`object.property` is not a getter");return x(l,n),_(t,b(l,n)),Object.defineProperty(l,n,{get:e,configurable:r(l,n)}),e},n.replaceSetter=function(l,n,e){var u=o(l,n);if(void 0===u)throw new TypeError("Cannot replace non-existent property "+h(n));if("function"!=typeof e)throw new TypeError("Expected replacement argument to be a function");if("function"!=typeof u.set)throw new Error("`object.property` is not a setter");return x(l,n),_(t,b(l,n)),Object.defineProperty(l,n,{set:e,configurable:r(l,n)}),e},n.spy=function(){return E(arguments,d.apply(d,arguments))},n.stub=function(){return E(arguments,p.apply(p,arguments))},n.fake=function(l){var n=f.apply(f,arguments);return _(e,n),n},v(Object.keys(f),(function(l){var t=f[l];"function"==typeof t&&(n.fake[l]=function(){var l=t.apply(t,arguments);return _(e,l),l})})),n.useFakeTimers=function(l){var t=s.useFakeTimers.call(null,l);return n.clock=t,_(e,t),t},n.verify=function(){k(e,"verify")},n.verifyAndRestore=function(){var l;try{n.verify()}catch(n){l=n}if(n.restore(),l)throw l},n.useFakeServer=function(){var l=n.serverPrototype||m;return l&&l.create?(n.server=l.create(),_(e,n.server),n.server):null},n.useFakeXMLHttpRequest=function(){var l=y.useFakeXMLHttpRequest();return _(e,l),l},n.usingPromise=function(t){return l=t,e.promiseLibrary=t,n}}x.prototype.match=i,l.exports=x},9168:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(8907),o=e(3584).createMatcher,r=e(2763),i=e(1730),a=e(9708),s=t.join,c=t.map,d=t.push,p=t.slice;function f(l,n,e){var t=e;return l.test(n)||(l.message=u.red(l.message),t&&(t=u.green(t))),t+" "+l.message}function h(l){var n=c(l,(function(n){var e=n.value;return n.added?e=u.green(e):n.removed&&(e=u.red(e)),2===l.length&&(e+=" "),e}));return s(n,"")}function m(l){return"string"==typeof l?JSON.stringify(l):l}l.exports={c:function(l){return r(l.callCount)},n:function(l){return l.toString()},D:function(l,n){for(var e="",t=0,u=l.callCount;t1&&(e+="\nCall "+(t+1)+":");for(var r=l.getCall(t).args,s=p(n),c=0;c0?"\n"+s(n,"\n"):""},t:function(l){for(var n=[],e=0,t=l.callCount;e{"use strict";var t=e(8432).prototypes.array,u=e(6212),o=e(7513),r=e(8432).functionName,i=e(621),a=e(3584).deepEqual,s=e(7047),c=e(9970),d=e(8002),p=e(483),f=e(8432).valueToString,h=t.forEach,m=t.pop,y=t.push,g=t.slice,b=Array.prototype.filter,v=0;function _(l,n,e){var t=l.matchingArguments;return!(!(t.length<=n.length&&a(g(n,0,t.length),t))||e&&t.length!==n.length)}var w={withArgs:function(){var l=g(arguments),n=m(this.matchingFakes(l,!0));if(n)return n;var e=this,t=this.instantiateFake();return t.matchingArguments=l,t.parent=this,y(this.fakes,t),t.withArgs=function(){return e.withArgs.apply(e,arguments)},h(e.args,(function(l,n){_(t,l)&&(c.incrementCallCount(t),y(t.thisValues,e.thisValues[n]),y(t.args,l),y(t.returnValues,e.returnValues[n]),y(t.exceptions,e.exceptions[n]),y(t.callIds,e.callIds[n]))})),c.createCallProperties(t),t},matchingFakes:function(l,n){return b.call(this.fakes,(function(e){return _(e,l,n)}))}},k=c.delegateToCalls;function x(l){var n,e=l;"function"!=typeof e?e=function(){}:n=r(e);var t=u(e,e);return o.nonEnum(t,w),o.nonEnum(t,{displayName:n||"spy",fakes:[],instantiateFake:x,id:"spy#"+v++}),t}function E(l,n,e){var t,u;if(s(l))throw new TypeError("ES Modules cannot be spied");return n||"function"!=typeof l?n||"object"!=typeof l?l||n?e?(t={},u=i(l,n),h(e,(function(l){t[l]=x(u[l])})),p(l,n,t)):p(l,n,x(l[n])):x((function(){})):d(E,l):x(l)}k(w,"callArg",!1,"callArgWith",!0,(function(){throw new Error(this.toString()+" cannot call arg since it was not yet invoked.")})),w.callArgWith=w.callArg,k(w,"callArgOn",!1,"callArgOnWith",!0,(function(){throw new Error(this.toString()+" cannot call arg since it was not yet invoked.")})),w.callArgOnWith=w.callArgOn,k(w,"throwArg",!1,"throwArg",!1,(function(){throw new Error(this.toString()+" cannot throw arg since it was not yet invoked.")})),k(w,"yield",!1,"yield",!0,(function(){throw new Error(this.toString()+" cannot yield since it was not yet invoked.")})),w.invokeCallback=w.yield,k(w,"yieldOn",!1,"yieldOn",!0,(function(){throw new Error(this.toString()+" cannot yield since it was not yet invoked.")})),k(w,"yieldTo",!1,"yieldTo",!0,(function(l){throw new Error(this.toString()+" cannot yield to '"+f(l)+"' since it was not yet invoked.")})),k(w,"yieldToOn",!1,"yieldToOn",!0,(function(l){throw new Error(this.toString()+" cannot yield to '"+f(l)+"' since it was not yet invoked.")})),o(E,w),l.exports=E},9690:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(4344),o=e(1731),r=e(6212),i=e(8432).functionName,a=e(8432).prototypes.object.hasOwnProperty,s=e(4100),c=e(6130),d=e(7513),p=e(621),f=e(7047),h=e(483),m=e(1156),y=e(8432).valueToString,g=e(8002),b=t.forEach,v=t.pop,_=t.slice,w=t.sort,k=0;function x(l){var n;function e(){var l=_(arguments),e=n.matchingFakes(l);return T(v(w(e,(function(l,n){return l.matchingArguments.length-n.matchingArguments.length})))||n).invoke(this,arguments)}n=r(e,l||e),d.nonEnum(n,c),d.nonEnum(n,E);var t=l?i(l):null;return d.nonEnum(n,{fakes:[],instantiateFake:x,displayName:t||"stub",defaultBehavior:null,behaviors:[],id:"stub#"+k++}),n}function E(l,n){if(arguments.length>2)throw new TypeError("stub(obj, 'meth', fn) has been removed, see documentation");if(f(l))throw new TypeError("ES Modules cannot be stubbed");if(m.apply(null,arguments),s(l,n))throw new TypeError("Cannot stub non-existent property "+y(n));var e=p(l,n),t="object"==typeof l||"function"==typeof l,u=void 0===n&&t,o=!l&&void 0===n,r=t&&void 0!==n&&(void 0===e||"function"!=typeof e.value);if(u)return g(E,l);if(o)return x();var i=x("function"==typeof e.value?e.value:null);return d.nonEnum(i,{rootObj:l,propName:n,shadowsPropOnPrototype:!e.isOwn,restore:function(){void 0!==e&&e.isOwn?Object.defineProperty(l,n,e):delete l[n]}}),r?i:h(l,n,i)}function T(l){var n=l.behaviors[l.callCount-1];return n&&n.isPresent()?n:function(l){return l.defaultBehavior||function(l){return l.parent&&T(l.parent)}(l)||u.create(l)}(l)}E.createStubInstance=function(l,n){if("function"!=typeof l)throw new TypeError("The constructor should be a function.");var e=E(Object.create(l.prototype));return b(Object.keys(n||{}),(function(l){if(!(l in e))throw new Error("Cannot stub "+l+". Property does not exist!");var t=n[l];t&&t.createStubInstance?e[l]=t:e[l].returns(t)})),e};var O={resetBehavior:function(){this.defaultBehavior=null,this.behaviors=[],delete this.returnValue,delete this.returnArgAt,delete this.throwArgAt,delete this.resolveArgAt,delete this.fakeFn,this.returnThis=!1,this.resolveThis=!1,b(this.fakes,(function(l){l.resetBehavior()}))},reset:function(){this.resetHistory(),this.resetBehavior()},onCall:function(l){return this.behaviors[l]||(this.behaviors[l]=u.create(this)),this.behaviors[l]},onFirstCall:function(){return this.onCall(0)},onSecondCall:function(){return this.onCall(1)},onThirdCall:function(){return this.onCall(2)},withArgs:function(){var l=c.withArgs.apply(this,arguments);return this.defaultBehavior&&this.defaultBehavior.promiseLibrary&&(l.defaultBehavior=l.defaultBehavior||u.create(l),l.defaultBehavior.promiseLibrary=this.defaultBehavior.promiseLibrary),l}};b(Object.keys(u),(function(l){a(u,l)&&!a(O,l)&&"create"!==l&&"invoke"!==l&&(O[l]=u.createBehavior(l))})),b(Object.keys(o),(function(l){a(o,l)&&!a(O,l)&&u.addBehavior(E,l,o[l])})),d(E,O),l.exports=E},1156:(l,n,e)=>{"use strict";var t=e(8432).valueToString;l.exports=function(l,n){if(n&&!l){var e=null===l?"null":"undefined";throw new Error("Trying to stub property '"+t(n)+"' of "+e)}}},3199:l=>{"use strict";l.exports={injectInto:null,properties:["spy","stub","mock","clock","server","requests","fake","replace","replaceSetter","replaceGetter","createStubInstance"],useFakeTimers:!0,useFakeServer:!0}},8084:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array.reduce;l.exports=function(l){return t(Object.keys(l),(function(n,e){return e.match(/^(callsArg|yields)/)&&!e.match(/Async/)&&(n[e+"Async"]=function(){var n=l[e].apply(this,arguments);return this.callbackAsync=!0,n}),n}),{})}},7513:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array,u=e(8432).prototypes.object.hasOwnProperty,o=t.join,r=t.push,i=t.slice,a=function(){var l={constructor:function(){return"0"},toString:function(){return"1"},valueOf:function(){return"2"},toLocaleString:function(){return"3"},prototype:function(){return"4"},isPrototypeOf:function(){return"5"},propertyIsEnumerable:function(){return"6"},hasOwnProperty:function(){return"7"},length:function(){return"8"},unique:function(){return"9"}},n=[];for(var e in l)u(l,e)&&r(n,l[e]());return"0123456789"!==o(n,"")}();function s(l,n,e){var t,o,r;for(o=0;o{"use strict";var t,u=e(7835).inspect;function o(){return t?t.apply(null,arguments):u.apply(u,arguments)}o.setFormatter=function(l){if("function"!=typeof l)throw new Error("format.setFormatter must be called with a function");t=l},l.exports=o},7253:l=>{"use strict";l.exports=function(){var l,n,e;if(this.getCall&&this.callCount)for(l=this.callCount;l--;)for(n in e=this.getCall(l).thisValue)try{if(e[n]===this)return n}catch(l){}return this.displayName||"sinon fake"}},3869:l=>{"use strict";function n(l){setTimeout(l,0)}l.exports=function(l,e){return"object"==typeof l&&"function"==typeof l.nextTick?l.nextTick:"function"==typeof e?e:n}},621:l=>{"use strict";l.exports=function(l,n){for(var e,t=l,u=Boolean(l&&Object.getOwnPropertyDescriptor(l,n));t&&!(e=Object.getOwnPropertyDescriptor(t,n));)t=Object.getPrototypeOf(t);return e&&(e.isOwn=u),e}},7047:l=>{"use strict";l.exports=function(l){return l&&"undefined"!=typeof Symbol&&"Module"===l[Symbol.toStringTag]&&Object.isSealed(l)}},4100:l=>{"use strict";l.exports=function(l,n){return l&&void 0!==n&&!(n in l)}},7265:(l,n,e)=>{"use strict";var t=e(621);l.exports=function(l,n){var e=t(l,n);return!e||e.configurable}},2992:(l,n,e)=>{"use strict";var t=e(8432).global,u=e(3869);l.exports=u(t.process,t.setImmediate)},2763:l=>{"use strict";var n=[null,"once","twice","thrice"];l.exports=function(l){return n[l]||(l||0)+" times"}},5500:l=>{"use strict";var n=Array.prototype.forEach;l.exports=function l(e,t){void 0!==e&&(Array.isArray(t)?n.call(t,l.bind(null,e)):"function"==typeof t.usingPromise&&t.usingPromise(e))}},8002:(l,n,e)=>{"use strict";var t=e(8432).functionName,u=e(621),o=e(3096);l.exports=function(l,n,e){var r=!1,i=t(l);if(!n)throw new Error("Trying to "+i+" object but received "+String(n));if(o(n,(function(t,o){o!==Object.prototype&&"constructor"!==t&&"function"==typeof u(o,t).value&&(e?e(n,t)&&(r=!0,l(n,t)):(r=!0,l(n,t)))})),!r)throw new Error("Expected to "+i+" methods on object but found none");return n}},3096:(l,n,e)=>{"use strict";var t=e(8432).prototypes.array.forEach;function u(l,n,e,o,r){var i,a;if("function"==typeof Object.getOwnPropertyNames)t(Object.getOwnPropertyNames(l),(function(t){if(!0!==r[t]){r[t]=!0;var u="function"==typeof Object.getOwnPropertyDescriptor(l,t).get?o:l;n.call(e,t,u)}})),(i=Object.getPrototypeOf(l))&&u(i,n,e,o,r);else for(a in l)n.call(e,l[a],a,l)}l.exports=function(l,n,e){return u(l,n,e,l,{})}},483:(l,n,e)=>{"use strict";var t=e(621),u=e(7513),o=e(8432).prototypes.object.hasOwnProperty,r=e(8432).valueToString;function i(l,n){for(var e in n)o(l,e)||(l[e]=n[e])}var a="keys"in Object;l.exports=function(l,n,e){if(!l)throw new TypeError("Should wrap property of object");if("function"!=typeof e&&"object"!=typeof e)throw new TypeError("Method wrapper should be a function or a property descriptor");function s(l){var e,t;if("function"==typeof(t=l)||Boolean(t&&t.constructor&&t.call&&t.apply)){if(l.restore&&l.restore.sinon)e=new TypeError("Attempted to wrap "+r(n)+" which is already wrapped");else if(l.calledBefore){var u=l.returns?"stubbed":"spied on";e=new TypeError("Attempted to wrap "+r(n)+" which is already "+u)}}else e=new TypeError("Attempted to wrap "+typeof l+" property "+r(n)+" as function");if(e)throw l&&l.stackTraceError&&(e.stack+="\n--------------\n"+l.stackTraceError.stack),e}var c,d,p,f;function h(){s(d=l[n]),l[n]=e,e.displayName=n}var m=l.hasOwnProperty?l.hasOwnProperty(n):o(l,n);if(a){var y="function"==typeof e?{value:e}:e;if((f=t(l,n))?f.restore&&f.restore.sinon&&(c=new TypeError("Attempted to wrap "+n+" which is already wrapped")):c=new TypeError("Attempted to wrap "+typeof d+" property "+n+" as function"),c)throw f&&f.stackTraceError&&(c.stack+="\n--------------\n"+f.stackTraceError.stack),c;var g=Object.keys(y);for(p=0;p{"use strict";var t=e(7513),u=e(4182),o=e(8432).global;function r(l,n){var e=u;null!==n&&"object"==typeof n&&(e=u.withGlobal(n));var t=e.install(l);return t.restore=t.uninstall,t}function i(l,n){var e=o[n];void 0!==e&&(l[n]=e)}n.useFakeTimers=function(l){var n=("number"==typeof l||l instanceof Date)&&1===arguments.length,e=null!==l&&"object"==typeof l&&1===arguments.length;if(void 0===l)return r({now:0});if(n)return r({now:l});if(e){var u=t.nonEnum({},l),o=u.global;return delete u.global,r(u,o)}throw new TypeError("useFakeTimers expected epoch or config object. See https://github.com/sinonjs/sinon")},n.clock={create:function(l){return u.createClock(l)}};var a={setTimeout,clearTimeout,setInterval,clearInterval,Date};i(a,"setImmediate"),i(a,"clearImmediate"),n.timers=a},2747:l=>{"use strict";l.exports={stdout:!1,stderr:!1}},5855:function(l,n,e){l.exports=function(){"use strict";var l="function"==typeof Promise,n="object"==typeof self?self:e.g,t="undefined"!=typeof Symbol,u="undefined"!=typeof Map,o="undefined"!=typeof Set,r="undefined"!=typeof WeakMap,i="undefined"!=typeof WeakSet,a="undefined"!=typeof DataView,s=t&&void 0!==Symbol.iterator,c=t&&void 0!==Symbol.toStringTag,d=o&&"function"==typeof Set.prototype.entries,p=u&&"function"==typeof Map.prototype.entries,f=d&&Object.getPrototypeOf((new Set).entries()),h=p&&Object.getPrototypeOf((new Map).entries()),m=s&&"function"==typeof Array.prototype[Symbol.iterator],y=m&&Object.getPrototypeOf([][Symbol.iterator]()),g=s&&"function"==typeof String.prototype[Symbol.iterator],b=g&&Object.getPrototypeOf(""[Symbol.iterator]());return function(e){var t=typeof e;if("object"!==t)return t;if(null===e)return"null";if(e===n)return"global";if(Array.isArray(e)&&(!1===c||!(Symbol.toStringTag in e)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&e===window.location)return"Location";if("object"==typeof window.document&&e===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&e===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&e===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&e instanceof window.HTMLElement){if("BLOCKQUOTE"===e.tagName)return"HTMLQuoteElement";if("TD"===e.tagName)return"HTMLTableDataCellElement";if("TH"===e.tagName)return"HTMLTableHeaderCellElement"}}var s=c&&e[Symbol.toStringTag];if("string"==typeof s)return s;var d=Object.getPrototypeOf(e);return d===RegExp.prototype?"RegExp":d===Date.prototype?"Date":l&&d===Promise.prototype?"Promise":o&&d===Set.prototype?"Set":u&&d===Map.prototype?"Map":i&&d===WeakSet.prototype?"WeakSet":r&&d===WeakMap.prototype?"WeakMap":a&&d===DataView.prototype?"DataView":u&&d===h?"Map Iterator":o&&d===f?"Set Iterator":m&&d===y?"Array Iterator":g&&d===b?"String Iterator":null===d?"Object":Object.prototype.toString.call(e).slice(8,-1)}}()},3235:(l,n,e)=>{"use strict";e.d(n,{e$:()=>i,hV:()=>r,qg:()=>o});var t=e(6370),u=e(5210);const o="debugRenderer";function r(l){if(!t.registry.hasItem(t.registry.Type.RENDERER,l))throw Error("No renderer with the name "+l+" is registered. Please register your renderer using Blockly.registry.register.");const n=i(t.registry.getClass(t.registry.Type.RENDERER,l));t.registry.register(t.registry.Type.RENDERER,o,n,!0)}function i(l){class n extends l{blockToDebugger=Object.create(null);workspaceListeners=Object.create(null);render(l){super.render(l);const n=this.getDebugger_(l),e=this.makeRenderInfo_(l);e.measure(),n.drawDebug(l,e)}getDebugger_(l){let e=this.blockToDebugger[l.id];return e||(this.regiserWorkspaceListener_(l.workspace),e=new n.DebugDrawerClass(this.getConstants()),this.blockToDebugger[l.id]=e),e}regiserWorkspaceListener_(l){this.workspaceListeners[l.id]||(this.workspaceListeners[l.id]=l.addChangeListener((l=>{const n=l.ids;if(l.type===t.Events.DELETE)for(let l=0;l{"use strict";e.d(n,{J:()=>u});var t=e(6370);class u{constructor(l){this.debugElements_=[],this.svgRoot_=null,this.constants_=l}clearElems(){for(let l,n=0;l=this.debugElements_[n];n++)t.utils.dom.removeNode(l);this.debugElements_=[]}drawSpacerRow(l,n,e){if(!u.config.rowSpacers)return;const o=Math.abs(l.height),r=l.height<0;r&&(n-=o),this.debugElements_.push(t.utils.dom.createSvgElement("rect",{class:"rowSpacerRect blockRenderDebug",x:e?-(l.xPos+l.width):l.xPos,y:n,width:l.width,height:o,stroke:r?"black":"blue",fill:"blue","fill-opacity":"0.5","stroke-width":"1px"},this.svgRoot_))}drawSpacerElem(l,n,e){if(!u.config.elemSpacers)return;const o=Math.abs(l.width),r=l.width<0;let i=r?l.xPos-o:l.xPos;e&&(i=-(i+o));const a=l.centerline-l.height/2;this.debugElements_.push(t.utils.dom.createSvgElement("rect",{class:"elemSpacerRect blockRenderDebug",x:i,y:a,width:o,height:l.height,stroke:"pink",fill:r?"black":"pink","fill-opacity":"0.5","stroke-width":"1px"},this.svgRoot_))}drawRenderedElem(l,n){if(u.config.elems){let e=l.xPos;n&&(e=-(e+l.width));const u=l.centerline-l.height/2;if(this.debugElements_.push(t.utils.dom.createSvgElement("rect",{class:"rowRenderingRect blockRenderDebug",x:e,y:u,width:l.width,height:l.height,stroke:"black",fill:"none","stroke-width":"1px"},this.svgRoot_)),t.blockRendering.Types.isField(l)&&l.field instanceof t.FieldLabel){const n=this.constants_.FIELD_TEXT_BASELINE;this.debugElements_.push(t.utils.dom.createSvgElement("rect",{class:"rowRenderingRect blockRenderDebug",x:e,y:u+n,width:l.width,height:"0.1px",stroke:"red",fill:"none","stroke-width":"0.5px"},this.svgRoot_))}}t.blockRendering.Types.isInput(l)&&u.config.connections&&this.drawConnection(l.connectionModel)}drawConnection(l){if(!u.config.connections)return;let n,e,o;l.type==t.INPUT_VALUE?(e=4,n="magenta",o="none"):l.type==t.OUTPUT_VALUE?(e=2,n="magenta",o=n):l.type==t.NEXT_STATEMENT?(e=4,n="goldenrod",o="none"):l.type==t.PREVIOUS_STATEMENT&&(e=2,n="goldenrod",o=n);const r=l.getOffsetInBlock();this.debugElements_.push(t.utils.dom.createSvgElement("circle",{class:"blockRenderDebug",cx:r.x,cy:r.y,r:e,fill:o,stroke:n},this.svgRoot_))}drawRenderedRow(l,n,e){u.config.rows&&(this.debugElements_.push(t.utils.dom.createSvgElement("rect",{class:"elemRenderingRect blockRenderDebug",x:e?-(l.xPos+l.width):l.xPos,y:l.yPos,width:l.width,height:l.height,stroke:"red",fill:"none","stroke-width":"1px"},this.svgRoot_)),t.blockRendering.Types.isTopOrBottomRow(l)||u.config.connectedBlockBounds&&this.debugElements_.push(t.utils.dom.createSvgElement("rect",{class:"connectedBlockWidth blockRenderDebug",x:e?-(l.xPos+l.widthWithConnectedBlocks):l.xPos,y:l.yPos,width:l.widthWithConnectedBlocks,height:l.height,stroke:this.randomColour_,fill:"none","stroke-width":"1px","stroke-dasharray":"3,3"},this.svgRoot_)))}drawRowWithElements(l,n,e){for(let n=0,u=l.elements.length;n{"use strict";function t(l){l.addChangeListener(o)}function u(l){l.removeChangeListener(o)}function o(l){console.log(l)}e.r(n),e.d(n,{disableLogger:()=>u,enableLogger:()=>t})},7167:(l,n,e)=>{"use strict";e.d(n,{id:()=>t});const t="@blockly/dev-tools"},9062:(l,n,e)=>{"use strict";e.d(n,{w:()=>y});var t=e(7450),u=e(3379),o=e(9127),r=e(5157),i=e(6537),a=e(8557),s=e(5590),c=e(6663),d=e(8145),p=e(7167),f=e(925),h=e(8127);class m{constructor(l,n){this.key_=l,this.state_=Object.create(null),this.defaultState_=n||Object.create(null)}load(){this.state_=JSON.parse(localStorage.getItem(this.key_))||this.defaultState_}get(l){return this.state_[l]}set(l,n){this.state_[l]=n}save(){localStorage.setItem(this.key_,JSON.stringify(this.state_))}}function y(l,n=Blockly.inject,e={toolbox:c.A},y={},g){const{blocklyDiv:b,minimizeButton:v,monacoDiv:_,guiContainer:w,playgroundDiv:k,tabButtons:x,tabsDiv:E}=function(l){l.style.display="flex",l.style.overflow="hidden",l.style.height="100vh",l.style.width="100vw",l.style.userSelect="none",l.style.background="#E4E4E4";const n=document.createElement("div");n.style.flex="2 1 0",l.appendChild(n);const e=document.createElement("div");e.style.height="100%",e.style.width="100%",e.style.maxHeight="100%",n.appendChild(e);const t=document.createElement("div");t.style.width="18px",t.style.background="black",t.style.color="white",t.style.font="12px 'Lucida Grande', sans-serif",t.style.writingMode="vertical-lr",t.style.textOrientation="mixed",t.style.textAlign="center",t.textContent="Collapse",l.appendChild(t);const u=document.createElement("div");u.style.flex="1 1 1",u.style.maxWidth="40vw",u.style.width="100%",u.style.height="100%",u.style.display="flex",u.style.background="grey",u.style.flexDirection="column",u.style.color="#bbb",u.style.font="11px 'Lucida Grande', sans-serif",l.appendChild(u);const o=document.createElement("span");o.textContent="Blockly Playground",o.style.background="#3C3C3C",o.style.fontSize="12px",o.style.padding="7px",u.appendChild(o);const r=document.createElement("div");r.style.maxHeight="50%",r.style.flex="1",r.style.background="#000",r.style.overflow="auto",u.appendChild(r);const i=document.createElement("div");i.style.maxHeight="50%",i.style.background="#1E1E1E",i.style.flex="1",u.appendChild(i);const a=document.createElement("div");a.style.background="#252526",a.style.height="30px",a.style.lineHeight="30px",a.style.position="relative",i.appendChild(a);const s=document.createElement("div");s.style.overflow="auto hidden",s.style.width="calc(100% - 50px)",a.appendChild(s);const c=document.createElement("div");c.style.position="absolute",c.style.height="30px",c.style.width="50px",c.style.top="0",c.style.right="0",c.style.display="flex",c.style.justifyContent="center",c.style.alignItems="center",c.style.background="#252526",a.appendChild(c);const d=document.createElement("div");return d.style.height="calc(100% - 30px)",i.appendChild(d),{blocklyDiv:e,minimizeButton:t,monacoDiv:d,guiContainer:r,playgroundDiv:u,tabsDiv:s,tabButtons:c}}(l);return(0,f.o)(_,{model:null,language:"xml",minimap:{enabled:!1},theme:"vs-dark",scrollBeyondLastLine:!1,automaticLayout:!0},g).then((l=>{let f;const g=window.monaco.editor.createModel(""),_=l.createContextKey("isEditorXml",!0),T=l.createContextKey("isEditorJson",!0),O=new m(`playgroundState_${p.id}`,{activeTab:"JSON",playgroundOpen:!0,autoGenerate:!y||null==y.auto||y.auto,workspaceJson:""});function A(n,e,t,u){const o=function(l){const n=document.createElement("span");return n.style.background="#2D2D2D",n.style.color="#969696",n.style.padding="10px 20px",n.style.lineHeight="30px",n.style.cursor="pointer",n.textContent=l,n}(n);o.setAttribute("data-tab",n),E.appendChild(o);const r=window.monaco.editor.createModel("",e);return{generate:function(){let n,e=r;try{n=t(f)}catch(t){console.error(t),n=t.message,e=g,l.updateOptions({wordWrap:!0})}e.getValue()===n&&l.getModel()===e||(e.pushEditOperations([],[{range:e.getFullModelRange(),text:n}],(()=>null)),l.setModel(e),l.setSelection(new window.monaco.Range(0,0,0,0)))},state:{name:n,model:r,language:e,viewState:void 0},tabElement:o}}O.load();const S=n=>{L=n,B=n.generate;const e="XML"==n.state.name,t="JSON"==n.state.name;l.setModel(L.state.model),l.updateOptions({readOnly:!e&&!t,wordWrap:!1}),Object.values(j).forEach((l=>l.tabElement.style.background=l.tabElement==n.tabElement?"#1E1E1E":"#2D2D2D")),_.set(e),T.set(t),O.set("activeTab",n.state.name),O.save()},C=()=>{if(O.get("autoGenerate")){if(P&&M){M=!1;try{Blockly.serialization.workspaces.load(JSON.parse(P),f)}catch(l){console.warn("Failed to auto import.",l)}}B&&B();let l="";try{l=JSON.stringify(Blockly.serialization.workspaces.save(f),null,2)}catch(l){console.warn("Failed to auto save.",l)}O.set("workspaceJson",l),O.save()}},j={JSON:A("JSON","json",(l=>JSON.stringify(Blockly.serialization.workspaces.save(l),null,2))),XML:A("XML","xml",(l=>Blockly.Xml.domToPrettyText(Blockly.Xml.workspaceToDom(l)))),JavaScript:A("JavaScript","javascript",(l=>(o.javascriptGenerator||Blockly.JavaScript).workspaceToCode(l))),Python:A("Python","python",(l=>(a.pythonGenerator||Blockly.Python).workspaceToCode(l))),Dart:A("Dart","dart",(l=>(u.dartGenerator||Blockly.Dart).workspaceToCode(l))),Lua:A("Lua","lua",(l=>(r.luaGenerator||Blockly.Lua).workspaceToCode(l))),PHP:A("PHP","php",(l=>(i.phpGenerator||Blockly.PHP).workspaceToCode(l)))};E.addEventListener("click",(n=>{const e=n.target.getAttribute("data-tab");if(!e)return;const t=j[e];L.state.viewState=l.saveViewState(),S(t),C(),l.restoreViewState(L.state.viewState),l.focus()}));const P=O.get("workspaceJson")||"",N=j.JSON.state.model;let M=!0;N.setValue(P),N.onDidChangeContent((()=>{O.set("workspaceJson",N.getValue()),O.save()}));const I=O.get("activeTab");let B,L=j[I];L&&S(L);const R=(0,h.Z)((l=>{f=n(b,l),(0,t.M)(f);const e=f.configureContextMenu;return f.configureContextMenu=(l,n)=>{e&&e.call(null,l,n);const t={text:"Download Screenshot",enabled:f.getTopBlocks().length,callback:function(){(0,s.K)(f)}};l.push(t)},C(),f.addChangeListener((l=>{"ui"!==l.type&&"viewport_change"!==l.type&&C()})),f}),e,{disableResize:!0,toolboxes:y.toolboxes||{categories:c.A,simple:d.A,"test blocks":t.m}}),D=R.domElement;D.removeChild(D.firstChild),D.style.position="relative",D.style.minWidth="100%",w.appendChild(D);const F=l=>{const n="none"===k.style.display;n?(k.style.display="flex",v.textContent="Collapse"):(k.style.display="none",v.textContent="Expand"),O.set("playgroundOpen",n),O.save(),Blockly.svgResize(f)};v.addEventListener("click",F),!1===O.get("playgroundOpen")&&F();const q={state:O,addAction:R.addAction,addCheckboxAction:R.addCheckboxAction,addGenerator:function(l,n,e){if(!l||!n)throw Error("usage: addGenerator(label, generator, language?);");j[l]=A(l,e||"javascript",(l=>n.workspaceToCode(l))),I===l&&S(j[l])},getCurrentTab:function(){return L},getGUI:function(){return R},getWorkspace:function(){return f},removeGenerator:function(l){if(!l)throw Error("usage: removeGenerator(label);");if(!(l in j))throw Error("removeGenerator called on invalid label: "+l);const n=j[l];E.removeChild(n.tabElement),delete j[l];const e=Object.keys(j);I===l&&e.length&&S(j[e[0]])}};return function(l,n,e,t){const[u,o]=function(l,n){const e=document.createElement("input");e.setAttribute("type","checkbox"),e.setAttribute("id",l);const t=document.createElement("label");return t.textContent="Auto",t.setAttribute("for",l),[e,t]}("autoGenerate");u.checked=n.state.get("autoGenerate"),u.addEventListener("change",(l=>{const e=l.target;n.state.set("autoGenerate",!!e.checked),n.state.save(),t()})),e.appendChild(u),e.appendChild(o)}(0,q,x,C),function(l,n){const e=()=>{const e=l.getModel().getValue(),t=n.getWorkspace();try{Blockly.Xml.domToWorkspace(Blockly.utils.xml.textToDom(e),t)}catch(l){return!1}return!0},t=()=>{const e=l.getModel().getValue(),t=n.getWorkspace();try{Blockly.serialization.workspaces.load(JSON.parse(e),t)}catch(l){return!1}return!0},u=()=>{n.getCurrentTab().generate()};l.addAction({id:"import-xml",label:"Import from XML",keybindings:[window.monaco.KeyMod.CtrlCmd|window.monaco.KeyCode.Enter],precondition:"isEditorXml",contextMenuGroupId:"playground",contextMenuOrder:0,run:e}),l.addAction({id:"export-xml",label:"Export to XML",keybindings:[window.monaco.KeyMod.CtrlCmd|window.monaco.KeyCode.KEY_S],precondition:"isEditorXml",contextMenuGroupId:"playground",contextMenuOrder:1,run:u}),l.addAction({id:"clean-xml",label:"Clean XML",precondition:"isEditorXml",contextMenuGroupId:"playground",contextMenuOrder:2,run:()=>{const n=l.getModel(),e=n.getValue().replace(/ (x|y|id)="[^"]*"/gim,"");n.pushEditOperations([],[{range:n.getFullModelRange(),text:e}],(()=>null)),l.setSelection(new window.monaco.Range(0,0,0,0))}}),l.addAction({id:"import-json",label:"Import from JSON",keybindings:[window.monaco.KeyMod.CtrlCmd|window.monaco.KeyCode.Enter],precondition:"isEditorJson",contextMenuGroupId:"playground",contextMenuOrder:0,run:t}),l.addAction({id:"generate",label:"Generate",keybindings:[window.monaco.KeyMod.CtrlCmd|window.monaco.KeyCode.KEY_S],precondition:"!isEditorXml",contextMenuGroupId:"playground",contextMenuOrder:1,run:u}),document.addEventListener("keydown",(l=>{const n=l.metaKey||l.ctrlKey;n&&"s"===l.key?(u(),l.preventDefault()):n&&"Enter"===l.key&&(t()||e(),l.preventDefault())}))}(l,q),q}))}},925:(l,n,e)=>{"use strict";function t(l,n,e){return new Promise(((t,o)=>{if(!e){const l=["../node_modules/@blockly/dev-tools/node_modules/monaco-editor/min/vs","../node_modules/monaco-editor/min/vs","https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.19.2/min/vs"];for(let n=0;n{const u=window.require;u.config({paths:{vs:e}}),u(["vs/editor/editor.main"],(()=>{t(function(l,n){const e=window.monaco.editor.create(l,n);return e.layout(),e}(l,n))}))};if(window.require)r();else{const l=document.createElement("script");l.type="text/javascript",l.setAttribute("src",`${e}/loader.js`),l.addEventListener("load",r),document.body.appendChild(l)}}))}function u(l){const n=new XMLHttpRequest;n.open("HEAD",l,!1);try{n.send()}catch(l){return!1}return 404!=n.status}e.d(n,{o:()=>t})},8127:(l,n,e)=>{"use strict";e.d(n,{Z:()=>Tl});var t=e(6370);function u(l,n){var e=l.__state.conversionName.toString(),t=Math.round(l.r),u=Math.round(l.g),o=Math.round(l.b),r=l.a,i=Math.round(l.h),a=l.s.toFixed(1),s=l.v.toFixed(1);if(n||"THREE_CHAR_HEX"===e||"SIX_CHAR_HEX"===e){for(var c=l.hex.toString(16);c.length<6;)c="0"+c;return"#"+c}return"CSS_RGB"===e?"rgb("+t+","+u+","+o+")":"CSS_RGBA"===e?"rgba("+t+","+u+","+o+","+r+")":"HEX"===e?"0x"+l.hex.toString(16):"RGB_ARRAY"===e?"["+t+","+u+","+o+"]":"RGBA_ARRAY"===e?"["+t+","+u+","+o+","+r+"]":"RGB_OBJ"===e?"{r:"+t+",g:"+u+",b:"+o+"}":"RGBA_OBJ"===e?"{r:"+t+",g:"+u+",b:"+o+",a:"+r+"}":"HSV_OBJ"===e?"{h:"+i+",s:"+a+",v:"+s+"}":"HSVA_OBJ"===e?"{h:"+i+",s:"+a+",v:"+s+",a:"+r+"}":"unknown format"}var o=Array.prototype.forEach,r=Array.prototype.slice,i={BREAK:{},extend:function(l){return this.each(r.call(arguments,1),(function(n){(this.isObject(n)?Object.keys(n):[]).forEach(function(e){this.isUndefined(n[e])||(l[e]=n[e])}.bind(this))}),this),l},defaults:function(l){return this.each(r.call(arguments,1),(function(n){(this.isObject(n)?Object.keys(n):[]).forEach(function(e){this.isUndefined(l[e])&&(l[e]=n[e])}.bind(this))}),this),l},compose:function(){var l=r.call(arguments);return function(){for(var n=r.call(arguments),e=l.length-1;e>=0;e--)n=[l[e].apply(this,n)];return n[0]}},each:function(l,n,e){if(l)if(o&&l.forEach&&l.forEach===o)l.forEach(n,e);else if(l.length===l.length+0){var t,u=void 0;for(u=0,t=l.length;u1?i.toArray(arguments):arguments[0];return i.each(a,(function(n){if(n.litmus(l))return i.each(n.conversions,(function(n,e){if(s=n.read(l),!1===c&&!1!==s)return c=s,s.conversionName=e,s.conversion=n,i.BREAK})),i.BREAK})),c},p=void 0,f={hsv_to_rgb:function(l,n,e){var t=Math.floor(l/60)%6,u=l/60-Math.floor(l/60),o=e*(1-n),r=e*(1-u*n),i=e*(1-(1-u)*n),a=[[e,i,o],[r,e,o],[o,e,i],[o,r,e],[i,o,e],[e,o,r]][t];return{r:255*a[0],g:255*a[1],b:255*a[2]}},rgb_to_hsv:function(l,n,e){var t=Math.min(l,n,e),u=Math.max(l,n,e),o=u-t,r=void 0;return 0===u?{h:NaN,s:0,v:0}:(r=l===u?(n-e)/o:n===u?2+(e-l)/o:4+(l-n)/o,(r/=6)<0&&(r+=1),{h:360*r,s:o/u,v:u/255})},rgb_to_hex:function(l,n,e){var t=this.hex_with_component(0,2,l);return t=this.hex_with_component(t,1,n),this.hex_with_component(t,0,e)},component_from_hex:function(l,n){return l>>8*n&255},hex_with_component:function(l,n,e){return e<<(p=8*n)|l&~(255<