diff --git a/coverage/badge.svg b/coverage/badge.svg index 926db23..5cb900e 100644 --- a/coverage/badge.svg +++ b/coverage/badge.svg @@ -1 +1 @@ -Coverage: 72.44%Coverage72.44% \ No newline at end of file +Coverage: 72.72%Coverage72.72% \ No newline at end of file diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json index e2fbbcb..73988cf 100644 --- a/coverage/coverage-final.json +++ b/coverage/coverage-final.json @@ -1,6 +1,7 @@ -{"D:\\Projects\\browser-image-compression\\lib\\image-compression.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\image-compression.js","statementMap":{"0":{"start":{"line":29,"column":17},"end":{"line":29,"column":33}},"1":{"start":{"line":32,"column":4},"end":{"line":32,"column":20}},"2":{"start":{"line":33,"column":4},"end":{"line":33,"column":48}},"3":{"start":{"line":37,"column":4},"end":{"line":37,"column":52}},"4":{"start":{"line":38,"column":4},"end":{"line":38,"column":33}},"5":{"start":{"line":41,"column":24},"end":{"line":41,"column":50}},"6":{"start":{"line":43,"column":22},"end":{"line":43,"column":53}},"7":{"start":{"line":45,"column":2},"end":{"line":45,"column":16}},"8":{"start":{"line":48,"column":25},"end":{"line":48,"column":53}},"9":{"start":{"line":50,"column":2},"end":{"line":50,"column":16}},"10":{"start":{"line":53,"column":38},"end":{"line":53,"column":81}},"11":{"start":{"line":55,"column":2},"end":{"line":55,"column":16}},"12":{"start":{"line":58,"column":26},"end":{"line":58,"column":83}},"13":{"start":{"line":59,"column":2},"end":{"line":59,"column":16}},"14":{"start":{"line":60,"column":33},"end":{"line":60,"column":169}},"15":{"start":{"line":61,"column":2},"end":{"line":61,"column":16}},"16":{"start":{"line":63,"column":16},"end":{"line":63,"column":45}},"17":{"start":{"line":65,"column":25},"end":{"line":65,"column":54}},"18":{"start":{"line":67,"column":19},"end":{"line":67,"column":116}},"19":{"start":{"line":68,"column":2},"end":{"line":68,"column":16}},"20":{"start":{"line":70,"column":28},"end":{"line":70,"column":55}},"21":{"start":{"line":71,"column":27},"end":{"line":71,"column":52}},"22":{"start":{"line":72,"column":2},"end":{"line":75,"column":3}},"23":{"start":{"line":73,"column":4},"end":{"line":73,"column":49}},"24":{"start":{"line":74,"column":4},"end":{"line":74,"column":52}},"25":{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},"26":{"start":{"line":80,"column":4},"end":{"line":82,"column":5}},"27":{"start":{"line":81,"column":6},"end":{"line":81,"column":41}},"28":{"start":{"line":83,"column":4},"end":{"line":83,"column":21}},"29":{"start":{"line":84,"column":4},"end":{"line":84,"column":20}},"30":{"start":{"line":87,"column":21},"end":{"line":87,"column":30}},"31":{"start":{"line":88,"column":23},"end":{"line":88,"column":36}},"32":{"start":{"line":89,"column":20},"end":{"line":89,"column":32}},"33":{"start":{"line":93,"column":15},"end":{"line":93,"column":37}},"34":{"start":{"line":94,"column":2},"end":{"line":116,"column":3}},"35":{"start":{"line":95,"column":21},"end":{"line":95,"column":75}},"36":{"start":{"line":96,"column":22},"end":{"line":96,"column":78}},"37":{"start":{"line":97,"column":4},"end":{"line":100,"column":5}},"38":{"start":{"line":98,"column":6},"end":{"line":98,"column":45}},"39":{"start":{"line":99,"column":6},"end":{"line":99,"column":47}},"40":{"start":{"line":101,"column":4},"end":{"line":101,"column":63}},"41":{"start":{"line":103,"column":4},"end":{"line":103,"column":53}},"42":{"start":{"line":105,"column":4},"end":{"line":105,"column":20}},"43":{"start":{"line":107,"column":4},"end":{"line":107,"column":106}},"44":{"start":{"line":109,"column":4},"end":{"line":109,"column":32}},"45":{"start":{"line":111,"column":4},"end":{"line":111,"column":23}},"46":{"start":{"line":113,"column":4},"end":{"line":113,"column":38}},"47":{"start":{"line":115,"column":4},"end":{"line":115,"column":111}},"48":{"start":{"line":118,"column":2},"end":{"line":118,"column":30}},"49":{"start":{"line":119,"column":2},"end":{"line":119,"column":33}},"50":{"start":{"line":120,"column":2},"end":{"line":120,"column":51}},"51":{"start":{"line":121,"column":2},"end":{"line":121,"column":46}},"52":{"start":{"line":122,"column":2},"end":{"line":122,"column":34}},"53":{"start":{"line":124,"column":2},"end":{"line":124,"column":19}},"54":{"start":{"line":125,"column":2},"end":{"line":125,"column":24}}},"fnMap":{"0":{"name":"compress","decl":{"start":{"line":28,"column":30},"end":{"line":28,"column":38}},"loc":{"start":{"line":28,"column":76},"end":{"line":126,"column":1}},"line":28},"1":{"name":"incProgress","decl":{"start":{"line":31,"column":11},"end":{"line":31,"column":22}},"loc":{"start":{"line":31,"column":32},"end":{"line":34,"column":3}},"line":31},"2":{"name":"setProgress","decl":{"start":{"line":36,"column":11},"end":{"line":36,"column":22}},"loc":{"start":{"line":36,"column":26},"end":{"line":39,"column":3}},"line":36}},"branchMap":{"0":{"loc":{"start":{"line":28,"column":54},"end":{"line":28,"column":74}},"type":"default-arg","locations":[{"start":{"line":28,"column":73},"end":{"line":28,"column":74}}],"line":28},"1":{"loc":{"start":{"line":31,"column":23},"end":{"line":31,"column":30}},"type":"default-arg","locations":[{"start":{"line":31,"column":29},"end":{"line":31,"column":30}}],"line":31},"2":{"loc":{"start":{"line":41,"column":24},"end":{"line":41,"column":50}},"type":"binary-expr","locations":[{"start":{"line":41,"column":24},"end":{"line":41,"column":44}},{"start":{"line":41,"column":48},"end":{"line":41,"column":50}}],"line":41},"3":{"loc":{"start":{"line":58,"column":26},"end":{"line":58,"column":83}},"type":"binary-expr","locations":[{"start":{"line":58,"column":26},"end":{"line":58,"column":49}},{"start":{"line":58,"column":53},"end":{"line":58,"column":83}}],"line":58},"4":{"loc":{"start":{"line":60,"column":33},"end":{"line":60,"column":169}},"type":"cond-expr","locations":[{"start":{"line":60,"column":72},"end":{"line":60,"column":99}},{"start":{"line":60,"column":102},"end":{"line":60,"column":169}}],"line":60},"5":{"loc":{"start":{"line":63,"column":16},"end":{"line":63,"column":45}},"type":"binary-expr","locations":[{"start":{"line":63,"column":16},"end":{"line":63,"column":38}},{"start":{"line":63,"column":42},"end":{"line":63,"column":45}}],"line":63},"6":{"loc":{"start":{"line":65,"column":25},"end":{"line":65,"column":54}},"type":"binary-expr","locations":[{"start":{"line":65,"column":25},"end":{"line":65,"column":41}},{"start":{"line":65,"column":45},"end":{"line":65,"column":54}}],"line":65},"7":{"loc":{"start":{"line":72,"column":2},"end":{"line":75,"column":3}},"type":"if","locations":[{"start":{"line":72,"column":2},"end":{"line":75,"column":3}},{"start":{"line":72,"column":2},"end":{"line":75,"column":3}}],"line":72},"8":{"loc":{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},"type":"if","locations":[{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},{"start":{"line":78,"column":2},"end":{"line":85,"column":3}}],"line":78},"9":{"loc":{"start":{"line":78,"column":6},"end":{"line":78,"column":45}},"type":"binary-expr","locations":[{"start":{"line":78,"column":6},"end":{"line":78,"column":24}},{"start":{"line":78,"column":28},"end":{"line":78,"column":45}}],"line":78},"10":{"loc":{"start":{"line":80,"column":4},"end":{"line":82,"column":5}},"type":"if","locations":[{"start":{"line":80,"column":4},"end":{"line":82,"column":5}},{"start":{"line":80,"column":4},"end":{"line":82,"column":5}}],"line":80},"11":{"loc":{"start":{"line":94,"column":9},"end":{"line":94,"column":85}},"type":"binary-expr","locations":[{"start":{"line":94,"column":9},"end":{"line":94,"column":26}},{"start":{"line":94,"column":31},"end":{"line":94,"column":56}},{"start":{"line":94,"column":60},"end":{"line":94,"column":84}}],"line":94},"12":{"loc":{"start":{"line":95,"column":21},"end":{"line":95,"column":75}},"type":"cond-expr","locations":[{"start":{"line":95,"column":41},"end":{"line":95,"column":60}},{"start":{"line":95,"column":63},"end":{"line":95,"column":75}}],"line":95},"13":{"loc":{"start":{"line":96,"column":22},"end":{"line":96,"column":78}},"type":"cond-expr","locations":[{"start":{"line":96,"column":42},"end":{"line":96,"column":62}},{"start":{"line":96,"column":65},"end":{"line":96,"column":78}}],"line":96},"14":{"loc":{"start":{"line":97,"column":4},"end":{"line":100,"column":5}},"type":"if","locations":[{"start":{"line":97,"column":4},"end":{"line":100,"column":5}},{"start":{"line":97,"column":4},"end":{"line":100,"column":5}}],"line":97}},"s":{"0":6,"1":36,"2":36,"3":8,"4":8,"5":6,"6":6,"7":6,"8":6,"9":6,"10":6,"11":6,"12":6,"13":6,"14":6,"15":6,"16":6,"17":6,"18":6,"19":6,"20":6,"21":6,"22":6,"23":0,"24":0,"25":6,"26":5,"27":0,"28":5,"29":5,"30":1,"31":1,"32":1,"33":1,"34":1,"35":2,"36":2,"37":2,"38":0,"39":0,"40":2,"41":2,"42":2,"43":2,"44":2,"45":2,"46":2,"47":2,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1},"f":{"0":6,"1":36,"2":8},"b":{"0":[6],"1":[36],"2":[6,6],"3":[6,0],"4":[0,6],"5":[6,6],"6":[6,6],"7":[0,6],"8":[5,1],"9":[6,5],"10":[0,5],"11":[3,3,1],"12":[2,0],"13":[2,0],"14":[0,2]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"675840dfb00c00e986c1ca0f42d046138921bb9f","contentHash":"f9f8eca17546487532990f45ebcd67a5c8a2fcd1d44e71b2a52fe989228322ff"} +{"D:\\Projects\\browser-image-compression\\lib\\image-compression.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\image-compression.js","statementMap":{"0":{"start":{"line":29,"column":17},"end":{"line":29,"column":33}},"1":{"start":{"line":32,"column":4},"end":{"line":32,"column":20}},"2":{"start":{"line":33,"column":4},"end":{"line":33,"column":48}},"3":{"start":{"line":37,"column":4},"end":{"line":37,"column":52}},"4":{"start":{"line":38,"column":4},"end":{"line":38,"column":33}},"5":{"start":{"line":41,"column":24},"end":{"line":41,"column":50}},"6":{"start":{"line":43,"column":22},"end":{"line":43,"column":53}},"7":{"start":{"line":45,"column":2},"end":{"line":45,"column":16}},"8":{"start":{"line":48,"column":25},"end":{"line":48,"column":62}},"9":{"start":{"line":50,"column":2},"end":{"line":50,"column":16}},"10":{"start":{"line":53,"column":38},"end":{"line":53,"column":81}},"11":{"start":{"line":55,"column":2},"end":{"line":55,"column":16}},"12":{"start":{"line":58,"column":26},"end":{"line":58,"column":83}},"13":{"start":{"line":59,"column":2},"end":{"line":59,"column":16}},"14":{"start":{"line":60,"column":33},"end":{"line":60,"column":169}},"15":{"start":{"line":61,"column":2},"end":{"line":61,"column":16}},"16":{"start":{"line":63,"column":16},"end":{"line":63,"column":45}},"17":{"start":{"line":65,"column":25},"end":{"line":65,"column":54}},"18":{"start":{"line":67,"column":19},"end":{"line":67,"column":116}},"19":{"start":{"line":68,"column":2},"end":{"line":68,"column":16}},"20":{"start":{"line":70,"column":28},"end":{"line":70,"column":55}},"21":{"start":{"line":71,"column":27},"end":{"line":71,"column":52}},"22":{"start":{"line":72,"column":2},"end":{"line":75,"column":3}},"23":{"start":{"line":73,"column":4},"end":{"line":73,"column":49}},"24":{"start":{"line":74,"column":4},"end":{"line":74,"column":52}},"25":{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},"26":{"start":{"line":80,"column":4},"end":{"line":82,"column":5}},"27":{"start":{"line":81,"column":6},"end":{"line":81,"column":41}},"28":{"start":{"line":83,"column":4},"end":{"line":83,"column":21}},"29":{"start":{"line":84,"column":4},"end":{"line":84,"column":20}},"30":{"start":{"line":87,"column":21},"end":{"line":87,"column":30}},"31":{"start":{"line":88,"column":23},"end":{"line":88,"column":36}},"32":{"start":{"line":89,"column":20},"end":{"line":89,"column":32}},"33":{"start":{"line":93,"column":15},"end":{"line":93,"column":37}},"34":{"start":{"line":94,"column":2},"end":{"line":116,"column":3}},"35":{"start":{"line":95,"column":21},"end":{"line":95,"column":75}},"36":{"start":{"line":96,"column":22},"end":{"line":96,"column":78}},"37":{"start":{"line":97,"column":4},"end":{"line":100,"column":5}},"38":{"start":{"line":98,"column":6},"end":{"line":98,"column":45}},"39":{"start":{"line":99,"column":6},"end":{"line":99,"column":47}},"40":{"start":{"line":101,"column":4},"end":{"line":101,"column":63}},"41":{"start":{"line":103,"column":4},"end":{"line":103,"column":53}},"42":{"start":{"line":105,"column":4},"end":{"line":105,"column":20}},"43":{"start":{"line":107,"column":4},"end":{"line":107,"column":106}},"44":{"start":{"line":109,"column":4},"end":{"line":109,"column":32}},"45":{"start":{"line":111,"column":4},"end":{"line":111,"column":23}},"46":{"start":{"line":113,"column":4},"end":{"line":113,"column":38}},"47":{"start":{"line":115,"column":4},"end":{"line":115,"column":111}},"48":{"start":{"line":118,"column":2},"end":{"line":118,"column":30}},"49":{"start":{"line":119,"column":2},"end":{"line":119,"column":33}},"50":{"start":{"line":120,"column":2},"end":{"line":120,"column":51}},"51":{"start":{"line":121,"column":2},"end":{"line":121,"column":46}},"52":{"start":{"line":122,"column":2},"end":{"line":122,"column":34}},"53":{"start":{"line":124,"column":2},"end":{"line":124,"column":19}},"54":{"start":{"line":125,"column":2},"end":{"line":125,"column":24}}},"fnMap":{"0":{"name":"compress","decl":{"start":{"line":28,"column":30},"end":{"line":28,"column":38}},"loc":{"start":{"line":28,"column":76},"end":{"line":126,"column":1}},"line":28},"1":{"name":"incProgress","decl":{"start":{"line":31,"column":11},"end":{"line":31,"column":22}},"loc":{"start":{"line":31,"column":32},"end":{"line":34,"column":3}},"line":31},"2":{"name":"setProgress","decl":{"start":{"line":36,"column":11},"end":{"line":36,"column":22}},"loc":{"start":{"line":36,"column":26},"end":{"line":39,"column":3}},"line":36}},"branchMap":{"0":{"loc":{"start":{"line":28,"column":54},"end":{"line":28,"column":74}},"type":"default-arg","locations":[{"start":{"line":28,"column":73},"end":{"line":28,"column":74}}],"line":28},"1":{"loc":{"start":{"line":31,"column":23},"end":{"line":31,"column":30}},"type":"default-arg","locations":[{"start":{"line":31,"column":29},"end":{"line":31,"column":30}}],"line":31},"2":{"loc":{"start":{"line":41,"column":24},"end":{"line":41,"column":50}},"type":"binary-expr","locations":[{"start":{"line":41,"column":24},"end":{"line":41,"column":44}},{"start":{"line":41,"column":48},"end":{"line":41,"column":50}}],"line":41},"3":{"loc":{"start":{"line":58,"column":26},"end":{"line":58,"column":83}},"type":"binary-expr","locations":[{"start":{"line":58,"column":26},"end":{"line":58,"column":49}},{"start":{"line":58,"column":53},"end":{"line":58,"column":83}}],"line":58},"4":{"loc":{"start":{"line":60,"column":33},"end":{"line":60,"column":169}},"type":"cond-expr","locations":[{"start":{"line":60,"column":72},"end":{"line":60,"column":99}},{"start":{"line":60,"column":102},"end":{"line":60,"column":169}}],"line":60},"5":{"loc":{"start":{"line":63,"column":16},"end":{"line":63,"column":45}},"type":"binary-expr","locations":[{"start":{"line":63,"column":16},"end":{"line":63,"column":38}},{"start":{"line":63,"column":42},"end":{"line":63,"column":45}}],"line":63},"6":{"loc":{"start":{"line":65,"column":25},"end":{"line":65,"column":54}},"type":"binary-expr","locations":[{"start":{"line":65,"column":25},"end":{"line":65,"column":41}},{"start":{"line":65,"column":45},"end":{"line":65,"column":54}}],"line":65},"7":{"loc":{"start":{"line":72,"column":2},"end":{"line":75,"column":3}},"type":"if","locations":[{"start":{"line":72,"column":2},"end":{"line":75,"column":3}},{"start":{"line":72,"column":2},"end":{"line":75,"column":3}}],"line":72},"8":{"loc":{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},"type":"if","locations":[{"start":{"line":78,"column":2},"end":{"line":85,"column":3}},{"start":{"line":78,"column":2},"end":{"line":85,"column":3}}],"line":78},"9":{"loc":{"start":{"line":78,"column":6},"end":{"line":78,"column":45}},"type":"binary-expr","locations":[{"start":{"line":78,"column":6},"end":{"line":78,"column":24}},{"start":{"line":78,"column":28},"end":{"line":78,"column":45}}],"line":78},"10":{"loc":{"start":{"line":80,"column":4},"end":{"line":82,"column":5}},"type":"if","locations":[{"start":{"line":80,"column":4},"end":{"line":82,"column":5}},{"start":{"line":80,"column":4},"end":{"line":82,"column":5}}],"line":80},"11":{"loc":{"start":{"line":94,"column":9},"end":{"line":94,"column":85}},"type":"binary-expr","locations":[{"start":{"line":94,"column":9},"end":{"line":94,"column":26}},{"start":{"line":94,"column":31},"end":{"line":94,"column":56}},{"start":{"line":94,"column":60},"end":{"line":94,"column":84}}],"line":94},"12":{"loc":{"start":{"line":95,"column":21},"end":{"line":95,"column":75}},"type":"cond-expr","locations":[{"start":{"line":95,"column":41},"end":{"line":95,"column":60}},{"start":{"line":95,"column":63},"end":{"line":95,"column":75}}],"line":95},"13":{"loc":{"start":{"line":96,"column":22},"end":{"line":96,"column":78}},"type":"cond-expr","locations":[{"start":{"line":96,"column":42},"end":{"line":96,"column":62}},{"start":{"line":96,"column":65},"end":{"line":96,"column":78}}],"line":96},"14":{"loc":{"start":{"line":97,"column":4},"end":{"line":100,"column":5}},"type":"if","locations":[{"start":{"line":97,"column":4},"end":{"line":100,"column":5}},{"start":{"line":97,"column":4},"end":{"line":100,"column":5}}],"line":97}},"s":{"0":6,"1":36,"2":36,"3":8,"4":8,"5":6,"6":6,"7":6,"8":6,"9":6,"10":6,"11":6,"12":6,"13":6,"14":6,"15":6,"16":6,"17":6,"18":6,"19":6,"20":6,"21":6,"22":6,"23":0,"24":0,"25":6,"26":5,"27":0,"28":5,"29":5,"30":1,"31":1,"32":1,"33":1,"34":1,"35":2,"36":2,"37":2,"38":0,"39":0,"40":2,"41":2,"42":2,"43":2,"44":2,"45":2,"46":2,"47":2,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1},"f":{"0":6,"1":36,"2":8},"b":{"0":[6],"1":[36],"2":[6,6],"3":[6,0],"4":[0,6],"5":[6,6],"6":[6,6],"7":[0,6],"8":[5,1],"9":[6,5],"10":[0,5],"11":[3,3,1],"12":[2,0],"13":[2,0],"14":[0,2]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"d005515f37668e9739ce5af3c56c5d1e836786cd","contentHash":"72a293377f4d4387a16bd0e9e573440c320b8faf6f190403bd57eb1b635b4bfb"} ,"D:\\Projects\\browser-image-compression\\lib\\index.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\index.js","statementMap":{"0":{"start":{"line":38,"column":15},"end":{"line":38,"column":29}},"1":{"start":{"line":41,"column":17},"end":{"line":41,"column":18}},"2":{"start":{"line":42,"column":25},"end":{"line":42,"column":29}},"3":{"start":{"line":44,"column":2},"end":{"line":44,"column":62}},"4":{"start":{"line":45,"column":23},"end":{"line":45,"column":88}},"5":{"start":{"line":46,"column":2},"end":{"line":46,"column":27}},"6":{"start":{"line":47,"column":2},"end":{"line":52,"column":4}},"7":{"start":{"line":48,"column":4},"end":{"line":48,"column":25}},"8":{"start":{"line":49,"column":4},"end":{"line":51,"column":5}},"9":{"start":{"line":50,"column":6},"end":{"line":50,"column":27}},"10":{"start":{"line":54,"column":2},"end":{"line":58,"column":3}},"11":{"start":{"line":55,"column":4},"end":{"line":55,"column":73}},"12":{"start":{"line":56,"column":9},"end":{"line":58,"column":3}},"13":{"start":{"line":57,"column":4},"end":{"line":57,"column":54}},"14":{"start":{"line":62,"column":22},"end":{"line":62,"column":99}},"15":{"start":{"line":64,"column":2},"end":{"line":70,"column":3}},"16":{"start":{"line":65,"column":4},"end":{"line":69,"column":5}},"17":{"start":{"line":66,"column":6},"end":{"line":66,"column":51}},"18":{"start":{"line":68,"column":6},"end":{"line":68,"column":52}},"19":{"start":{"line":72,"column":2},"end":{"line":84,"column":3}},"20":{"start":{"line":73,"column":4},"end":{"line":81,"column":5}},"21":{"start":{"line":75,"column":6},"end":{"line":75,"column":61}},"22":{"start":{"line":77,"column":6},"end":{"line":79,"column":7}},"23":{"start":{"line":78,"column":8},"end":{"line":78,"column":95}},"24":{"start":{"line":80,"column":6},"end":{"line":80,"column":50}},"25":{"start":{"line":83,"column":4},"end":{"line":83,"column":48}},"26":{"start":{"line":86,"column":2},"end":{"line":93,"column":3}},"27":{"start":{"line":87,"column":4},"end":{"line":87,"column":36}},"28":{"start":{"line":88,"column":4},"end":{"line":88,"column":52}},"29":{"start":{"line":90,"column":4},"end":{"line":92,"column":5}},"30":{"start":{"line":91,"column":6},"end":{"line":91,"column":23}},"31":{"start":{"line":95,"column":2},"end":{"line":95,"column":24}},"32":{"start":{"line":98,"column":0},"end":{"line":98,"column":57}},"33":{"start":{"line":99,"column":0},"end":{"line":99,"column":57}},"34":{"start":{"line":100,"column":0},"end":{"line":100,"column":39}},"35":{"start":{"line":101,"column":0},"end":{"line":101,"column":55}},"36":{"start":{"line":102,"column":0},"end":{"line":102,"column":53}},"37":{"start":{"line":103,"column":0},"end":{"line":103,"column":45}},"38":{"start":{"line":104,"column":0},"end":{"line":104,"column":57}},"39":{"start":{"line":106,"column":0},"end":{"line":106,"column":65}},"40":{"start":{"line":107,"column":0},"end":{"line":107,"column":63}},"41":{"start":{"line":108,"column":0},"end":{"line":108,"column":59}},"42":{"start":{"line":109,"column":0},"end":{"line":109,"column":73}},"43":{"start":{"line":110,"column":0},"end":{"line":110,"column":105}},"44":{"start":{"line":111,"column":0},"end":{"line":111,"column":49}},"45":{"start":{"line":112,"column":0},"end":{"line":112,"column":44}}},"fnMap":{"0":{"name":"imageCompression","decl":{"start":{"line":37,"column":15},"end":{"line":37,"column":31}},"loc":{"start":{"line":37,"column":47},"end":{"line":96,"column":1}},"line":37},"1":{"name":"(anonymous_1)","decl":{"start":{"line":47,"column":20},"end":{"line":47,"column":21}},"loc":{"start":{"line":47,"column":35},"end":{"line":52,"column":3}},"line":47}},"branchMap":{"0":{"loc":{"start":{"line":44,"column":19},"end":{"line":44,"column":61}},"type":"binary-expr","locations":[{"start":{"line":44,"column":19},"end":{"line":44,"column":33}},{"start":{"line":44,"column":37},"end":{"line":44,"column":61}}],"line":44},"1":{"loc":{"start":{"line":45,"column":23},"end":{"line":45,"column":88}},"type":"cond-expr","locations":[{"start":{"line":45,"column":64},"end":{"line":45,"column":81}},{"start":{"line":45,"column":84},"end":{"line":45,"column":88}}],"line":45},"2":{"loc":{"start":{"line":49,"column":4},"end":{"line":51,"column":5}},"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":51,"column":5}},{"start":{"line":49,"column":4},"end":{"line":51,"column":5}}],"line":49},"3":{"loc":{"start":{"line":54,"column":2},"end":{"line":58,"column":3}},"type":"if","locations":[{"start":{"line":54,"column":2},"end":{"line":58,"column":3}},{"start":{"line":54,"column":2},"end":{"line":58,"column":3}}],"line":54},"4":{"loc":{"start":{"line":54,"column":8},"end":{"line":54,"column":58}},"type":"binary-expr","locations":[{"start":{"line":54,"column":8},"end":{"line":54,"column":28}},{"start":{"line":54,"column":32},"end":{"line":54,"column":58}}],"line":54},"5":{"loc":{"start":{"line":56,"column":9},"end":{"line":58,"column":3}},"type":"if","locations":[{"start":{"line":56,"column":9},"end":{"line":58,"column":3}},{"start":{"line":56,"column":9},"end":{"line":58,"column":3}}],"line":56},"6":{"loc":{"start":{"line":62,"column":22},"end":{"line":62,"column":99}},"type":"binary-expr","locations":[{"start":{"line":62,"column":22},"end":{"line":62,"column":62}},{"start":{"line":62,"column":66},"end":{"line":62,"column":99}}],"line":62},"7":{"loc":{"start":{"line":64,"column":2},"end":{"line":70,"column":3}},"type":"if","locations":[{"start":{"line":64,"column":2},"end":{"line":70,"column":3}},{"start":{"line":64,"column":2},"end":{"line":70,"column":3}}],"line":64},"8":{"loc":{"start":{"line":65,"column":4},"end":{"line":69,"column":5}},"type":"if","locations":[{"start":{"line":65,"column":4},"end":{"line":69,"column":5}},{"start":{"line":65,"column":4},"end":{"line":69,"column":5}}],"line":65},"9":{"loc":{"start":{"line":65,"column":8},"end":{"line":65,"column":69}},"type":"binary-expr","locations":[{"start":{"line":65,"column":9},"end":{"line":65,"column":21}},{"start":{"line":65,"column":25},"end":{"line":65,"column":53}},{"start":{"line":65,"column":58},"end":{"line":65,"column":69}}],"line":65},"10":{"loc":{"start":{"line":72,"column":2},"end":{"line":84,"column":3}},"type":"if","locations":[{"start":{"line":72,"column":2},"end":{"line":84,"column":3}},{"start":{"line":72,"column":2},"end":{"line":84,"column":3}}],"line":72},"11":{"loc":{"start":{"line":72,"column":6},"end":{"line":72,"column":66}},"type":"binary-expr","locations":[{"start":{"line":72,"column":6},"end":{"line":72,"column":18}},{"start":{"line":72,"column":22},"end":{"line":72,"column":50}},{"start":{"line":72,"column":54},"end":{"line":72,"column":66}}],"line":72},"12":{"loc":{"start":{"line":77,"column":6},"end":{"line":79,"column":7}},"type":"if","locations":[{"start":{"line":77,"column":6},"end":{"line":79,"column":7}},{"start":{"line":77,"column":6},"end":{"line":79,"column":7}}],"line":77},"13":{"loc":{"start":{"line":90,"column":4},"end":{"line":92,"column":5}},"type":"if","locations":[{"start":{"line":90,"column":4},"end":{"line":92,"column":5}},{"start":{"line":90,"column":4},"end":{"line":92,"column":5}}],"line":90}},"s":{"0":9,"1":9,"2":9,"3":9,"4":9,"5":9,"6":9,"7":44,"8":44,"9":0,"10":9,"11":2,"12":7,"13":1,"14":6,"15":6,"16":0,"17":0,"18":0,"19":6,"20":0,"21":0,"22":0,"23":0,"24":0,"25":6,"26":6,"27":6,"28":6,"29":0,"30":0,"31":6,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1},"f":{"0":9,"1":44},"b":{"0":[9,2],"1":[9,0],"2":[0,44],"3":[2,7],"4":[9,2],"5":[1,6],"6":[6,0],"7":[0,6],"8":[0,0],"9":[0,0,0],"10":[0,6],"11":[6,0,0],"12":[0,0],"13":[0,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"8c2aa6079a38a98261f11d913db44cb3893a449e","contentHash":"2084bed48d2257c1852aac88b19663ea9484fba5b2559ee955d27191c6ff1988"} ,"D:\\Projects\\browser-image-compression\\lib\\polyfill.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\polyfill.js","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"429e9ae55e921fbb055dbd07a45c33747b0258ad","contentHash":"7eddf6e9aeec4e202e5de464152cb8bbe5b3b10f68fc9d434b70f9b921e3eb1e"} -,"D:\\Projects\\browser-image-compression\\lib\\utils.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\utils.js","statementMap":{"0":{"start":{"line":4,"column":18},"end":{"line":4,"column":47}},"1":{"start":{"line":7,"column":21},"end":{"line":7,"column":124}},"2":{"start":{"line":8,"column":26},"end":{"line":8,"column":153}},"3":{"start":{"line":9,"column":32},"end":{"line":9,"column":177}},"4":{"start":{"line":20,"column":2},"end":{"line":46,"column":5}},"5":{"start":{"line":21,"column":16},"end":{"line":21,"column":34}},"6":{"start":{"line":22,"column":17},"end":{"line":22,"column":43}},"7":{"start":{"line":23,"column":17},"end":{"line":23,"column":40}},"8":{"start":{"line":24,"column":12},"end":{"line":24,"column":23}},"9":{"start":{"line":25,"column":18},"end":{"line":25,"column":35}},"10":{"start":{"line":26,"column":4},"end":{"line":28,"column":5}},"11":{"start":{"line":27,"column":6},"end":{"line":27,"column":36}},"12":{"start":{"line":29,"column":17},"end":{"line":29,"column":50}},"13":{"start":{"line":30,"column":4},"end":{"line":30,"column":25}},"14":{"start":{"line":31,"column":4},"end":{"line":31,"column":37}},"15":{"start":{"line":32,"column":4},"end":{"line":32,"column":18}},"16":{"start":{"line":56,"column":2},"end":{"line":61,"column":5}},"17":{"start":{"line":57,"column":19},"end":{"line":57,"column":41}},"18":{"start":{"line":58,"column":4},"end":{"line":58,"column":49}},"19":{"start":{"line":58,"column":26},"end":{"line":58,"column":48}},"20":{"start":{"line":59,"column":4},"end":{"line":59,"column":38}},"21":{"start":{"line":59,"column":28},"end":{"line":59,"column":37}},"22":{"start":{"line":60,"column":4},"end":{"line":60,"column":31}},"23":{"start":{"line":71,"column":2},"end":{"line":76,"column":5}},"24":{"start":{"line":72,"column":16},"end":{"line":72,"column":27}},"25":{"start":{"line":73,"column":4},"end":{"line":73,"column":36}},"26":{"start":{"line":73,"column":23},"end":{"line":73,"column":35}},"27":{"start":{"line":74,"column":4},"end":{"line":74,"column":35}},"28":{"start":{"line":74,"column":25},"end":{"line":74,"column":34}},"29":{"start":{"line":75,"column":4},"end":{"line":75,"column":18}},"30":{"start":{"line":89,"column":20},"end":{"line":89,"column":25}},"31":{"start":{"line":90,"column":24},"end":{"line":90,"column":33}},"32":{"start":{"line":91,"column":2},"end":{"line":102,"column":3}},"33":{"start":{"line":92,"column":4},"end":{"line":92,"column":27}},"34":{"start":{"line":93,"column":9},"end":{"line":102,"column":3}},"35":{"start":{"line":95,"column":4},"end":{"line":95,"column":34}},"36":{"start":{"line":96,"column":9},"end":{"line":102,"column":3}},"37":{"start":{"line":97,"column":4},"end":{"line":97,"column":35}},"38":{"start":{"line":98,"column":9},"end":{"line":102,"column":3}},"39":{"start":{"line":99,"column":4},"end":{"line":99,"column":28}},"40":{"start":{"line":100,"column":9},"end":{"line":102,"column":3}},"41":{"start":{"line":101,"column":4},"end":{"line":101,"column":38}},"42":{"start":{"line":103,"column":2},"end":{"line":103,"column":21}},"43":{"start":{"line":116,"column":22},"end":{"line":116,"column":38}},"44":{"start":{"line":117,"column":28},"end":{"line":117,"column":54}},"45":{"start":{"line":119,"column":14},"end":{"line":119,"column":23}},"46":{"start":{"line":120,"column":15},"end":{"line":120,"column":25}},"47":{"start":{"line":121,"column":13},"end":{"line":121,"column":27}},"48":{"start":{"line":122,"column":16},"end":{"line":122,"column":64}},"49":{"start":{"line":124,"column":2},"end":{"line":136,"column":3}},"50":{"start":{"line":125,"column":26},"end":{"line":125,"column":57}},"51":{"start":{"line":126,"column":27},"end":{"line":126,"column":59}},"52":{"start":{"line":127,"column":4},"end":{"line":133,"column":5}},"53":{"start":{"line":128,"column":6},"end":{"line":128,"column":30}},"54":{"start":{"line":129,"column":6},"end":{"line":129,"column":37}},"55":{"start":{"line":131,"column":6},"end":{"line":131,"column":37}},"56":{"start":{"line":132,"column":6},"end":{"line":132,"column":28}},"57":{"start":{"line":135,"column":4},"end":{"line":135,"column":26}},"58":{"start":{"line":138,"column":2},"end":{"line":140,"column":4}},"59":{"start":{"line":152,"column":2},"end":{"line":161,"column":3}},"60":{"start":{"line":153,"column":4},"end":{"line":153,"column":48}},"61":{"start":{"line":154,"column":4},"end":{"line":154,"column":34}},"62":{"start":{"line":155,"column":4},"end":{"line":157,"column":5}},"63":{"start":{"line":156,"column":6},"end":{"line":156,"column":68}},"64":{"start":{"line":159,"column":4},"end":{"line":159,"column":46}},"65":{"start":{"line":160,"column":4},"end":{"line":160,"column":34}},"66":{"start":{"line":162,"column":2},"end":{"line":162,"column":23}},"67":{"start":{"line":163,"column":2},"end":{"line":163,"column":25}},"68":{"start":{"line":166,"column":2},"end":{"line":166,"column":23}},"69":{"start":{"line":177,"column":28},"end":{"line":177,"column":93}},"70":{"start":{"line":178,"column":24},"end":{"line":178,"column":57}},"71":{"start":{"line":179,"column":2},"end":{"line":182,"column":3}},"72":{"start":{"line":180,"column":4},"end":{"line":180,"column":28}},"73":{"start":{"line":181,"column":4},"end":{"line":181,"column":52}},"74":{"start":{"line":183,"column":2},"end":{"line":183,"column":56}},"75":{"start":{"line":184,"column":2},"end":{"line":184,"column":16}},"76":{"start":{"line":193,"column":2},"end":{"line":195,"column":3}},"77":{"start":{"line":194,"column":4},"end":{"line":194,"column":30}},"78":{"start":{"line":196,"column":2},"end":{"line":205,"column":71}},"79":{"start":{"line":206,"column":2},"end":{"line":206,"column":28}},"80":{"start":{"line":217,"column":2},"end":{"line":235,"column":3}},"81":{"start":{"line":218,"column":4},"end":{"line":220,"column":5}},"82":{"start":{"line":219,"column":6},"end":{"line":219,"column":62}},"83":{"start":{"line":221,"column":4},"end":{"line":221,"column":40}},"84":{"start":{"line":223,"column":4},"end":{"line":225,"column":5}},"85":{"start":{"line":224,"column":6},"end":{"line":224,"column":23}},"86":{"start":{"line":226,"column":4},"end":{"line":234,"column":5}},"87":{"start":{"line":227,"column":22},"end":{"line":227,"column":52}},"88":{"start":{"line":228,"column":6},"end":{"line":228,"column":37}},"89":{"start":{"line":230,"column":6},"end":{"line":232,"column":7}},"90":{"start":{"line":231,"column":8},"end":{"line":231,"column":26}},"91":{"start":{"line":233,"column":6},"end":{"line":233,"column":15}},"92":{"start":{"line":236,"column":17},"end":{"line":236,"column":50}},"93":{"start":{"line":237,"column":2},"end":{"line":237,"column":23}},"94":{"start":{"line":252,"column":2},"end":{"line":269,"column":3}},"95":{"start":{"line":253,"column":16},"end":{"line":253,"column":39}},"96":{"start":{"line":254,"column":21},"end":{"line":254,"column":72}},"97":{"start":{"line":255,"column":16},"end":{"line":255,"column":79}},"98":{"start":{"line":256,"column":4},"end":{"line":256,"column":47}},"99":{"start":{"line":257,"column":4},"end":{"line":257,"column":25}},"100":{"start":{"line":258,"column":4},"end":{"line":258,"column":41}},"101":{"start":{"line":259,"column":9},"end":{"line":269,"column":3}},"102":{"start":{"line":260,"column":4},"end":{"line":260,"column":67}},"103":{"start":{"line":261,"column":4},"end":{"line":261,"column":25}},"104":{"start":{"line":262,"column":4},"end":{"line":262,"column":41}},"105":{"start":{"line":267,"column":20},"end":{"line":267,"column":55}},"106":{"start":{"line":268,"column":4},"end":{"line":268,"column":73}},"107":{"start":{"line":270,"column":2},"end":{"line":270,"column":14}},"108":{"start":{"line":282,"column":2},"end":{"line":282,"column":19}},"109":{"start":{"line":284,"column":2},"end":{"line":284,"column":20}},"110":{"start":{"line":290,"column":2},"end":{"line":290,"column":96}},"111":{"start":{"line":290,"column":55},"end":{"line":290,"column":96}},"112":{"start":{"line":294,"column":23},"end":{"line":299,"column":65}},"113":{"start":{"line":300,"column":24},"end":{"line":300,"column":86}},"114":{"start":{"line":302,"column":26},"end":{"line":302,"column":68}},"115":{"start":{"line":303,"column":25},"end":{"line":303,"column":128}},"116":{"start":{"line":304,"column":2},"end":{"line":304,"column":39}},"117":{"start":{"line":305,"column":14},"end":{"line":305,"column":57}},"118":{"start":{"line":308,"column":2},"end":{"line":308,"column":74}},"119":{"start":{"line":309,"column":2},"end":{"line":309,"column":43}},"120":{"start":{"line":321,"column":2},"end":{"line":358,"column":5}},"121":{"start":{"line":322,"column":19},"end":{"line":322,"column":41}},"122":{"start":{"line":323,"column":4},"end":{"line":355,"column":6}},"123":{"start":{"line":324,"column":19},"end":{"line":324,"column":48}},"124":{"start":{"line":325,"column":6},"end":{"line":327,"column":7}},"125":{"start":{"line":326,"column":8},"end":{"line":326,"column":27}},"126":{"start":{"line":328,"column":21},"end":{"line":328,"column":36}},"127":{"start":{"line":329,"column":19},"end":{"line":329,"column":20}},"128":{"start":{"line":330,"column":6},"end":{"line":353,"column":7}},"129":{"start":{"line":331,"column":8},"end":{"line":331,"column":71}},"130":{"start":{"line":331,"column":52},"end":{"line":331,"column":71}},"131":{"start":{"line":332,"column":23},"end":{"line":332,"column":52}},"132":{"start":{"line":333,"column":8},"end":{"line":333,"column":20}},"133":{"start":{"line":334,"column":8},"end":{"line":352,"column":9}},"134":{"start":{"line":335,"column":10},"end":{"line":337,"column":11}},"135":{"start":{"line":336,"column":12},"end":{"line":336,"column":31}},"136":{"start":{"line":339,"column":25},"end":{"line":339,"column":69}},"137":{"start":{"line":340,"column":10},"end":{"line":340,"column":55}},"138":{"start":{"line":341,"column":23},"end":{"line":341,"column":53}},"139":{"start":{"line":342,"column":10},"end":{"line":342,"column":22}},"140":{"start":{"line":343,"column":10},"end":{"line":347,"column":11}},"141":{"start":{"line":343,"column":23},"end":{"line":343,"column":24}},"142":{"start":{"line":344,"column":12},"end":{"line":346,"column":13}},"143":{"start":{"line":345,"column":14},"end":{"line":345,"column":76}},"144":{"start":{"line":348,"column":15},"end":{"line":352,"column":9}},"145":{"start":{"line":349,"column":10},"end":{"line":349,"column":16}},"146":{"start":{"line":351,"column":10},"end":{"line":351,"column":50}},"147":{"start":{"line":354,"column":6},"end":{"line":354,"column":25}},"148":{"start":{"line":356,"column":4},"end":{"line":356,"column":38}},"149":{"start":{"line":356,"column":28},"end":{"line":356,"column":37}},"150":{"start":{"line":357,"column":4},"end":{"line":357,"column":35}},"151":{"start":{"line":368,"column":20},"end":{"line":368,"column":26}},"152":{"start":{"line":369,"column":21},"end":{"line":369,"column":27}},"153":{"start":{"line":370,"column":31},"end":{"line":370,"column":38}},"154":{"start":{"line":372,"column":23},"end":{"line":372,"column":108}},"155":{"start":{"line":374,"column":18},"end":{"line":374,"column":24}},"156":{"start":{"line":377,"column":2},"end":{"line":389,"column":3}},"157":{"start":{"line":378,"column":4},"end":{"line":378,"column":57}},"158":{"start":{"line":379,"column":4},"end":{"line":385,"column":5}},"159":{"start":{"line":380,"column":6},"end":{"line":380,"column":41}},"160":{"start":{"line":381,"column":6},"end":{"line":381,"column":61}},"161":{"start":{"line":383,"column":6},"end":{"line":383,"column":60}},"162":{"start":{"line":384,"column":6},"end":{"line":384,"column":42}},"163":{"start":{"line":386,"column":4},"end":{"line":386,"column":67}},"164":{"start":{"line":388,"column":4},"end":{"line":388,"column":32}},"165":{"start":{"line":391,"column":2},"end":{"line":391,"column":19}},"166":{"start":{"line":403,"column":20},"end":{"line":403,"column":26}},"167":{"start":{"line":404,"column":21},"end":{"line":404,"column":27}},"168":{"start":{"line":406,"column":27},"end":{"line":406,"column":60}},"169":{"start":{"line":409,"column":2},"end":{"line":415,"column":3}},"170":{"start":{"line":410,"column":4},"end":{"line":410,"column":29}},"171":{"start":{"line":411,"column":4},"end":{"line":411,"column":29}},"172":{"start":{"line":413,"column":4},"end":{"line":413,"column":28}},"173":{"start":{"line":414,"column":4},"end":{"line":414,"column":30}},"174":{"start":{"line":418,"column":2},"end":{"line":442,"column":3}},"175":{"start":{"line":420,"column":6},"end":{"line":420,"column":43}},"176":{"start":{"line":421,"column":6},"end":{"line":421,"column":12}},"177":{"start":{"line":423,"column":6},"end":{"line":423,"column":49}},"178":{"start":{"line":424,"column":6},"end":{"line":424,"column":12}},"179":{"start":{"line":426,"column":6},"end":{"line":426,"column":44}},"180":{"start":{"line":427,"column":6},"end":{"line":427,"column":12}},"181":{"start":{"line":429,"column":6},"end":{"line":429,"column":38}},"182":{"start":{"line":430,"column":6},"end":{"line":430,"column":12}},"183":{"start":{"line":432,"column":6},"end":{"line":432,"column":44}},"184":{"start":{"line":433,"column":6},"end":{"line":433,"column":12}},"185":{"start":{"line":435,"column":6},"end":{"line":435,"column":49}},"186":{"start":{"line":436,"column":6},"end":{"line":436,"column":12}},"187":{"start":{"line":438,"column":6},"end":{"line":438,"column":43}},"188":{"start":{"line":439,"column":6},"end":{"line":439,"column":12}},"189":{"start":{"line":441,"column":6},"end":{"line":441,"column":12}},"190":{"start":{"line":444,"column":2},"end":{"line":444,"column":45}},"191":{"start":{"line":446,"column":2},"end":{"line":446,"column":30}},"192":{"start":{"line":448,"column":2},"end":{"line":448,"column":19}}},"fnMap":{"0":{"name":"getFilefromDataUrl","decl":{"start":{"line":19,"column":16},"end":{"line":19,"column":34}},"loc":{"start":{"line":19,"column":81},"end":{"line":47,"column":1}},"line":19},"1":{"name":"(anonymous_1)","decl":{"start":{"line":20,"column":21},"end":{"line":20,"column":22}},"loc":{"start":{"line":20,"column":34},"end":{"line":46,"column":3}},"line":20},"2":{"name":"getDataUrlFromFile","decl":{"start":{"line":55,"column":16},"end":{"line":55,"column":34}},"loc":{"start":{"line":55,"column":41},"end":{"line":62,"column":1}},"line":55},"3":{"name":"(anonymous_3)","decl":{"start":{"line":56,"column":21},"end":{"line":56,"column":22}},"loc":{"start":{"line":56,"column":42},"end":{"line":61,"column":3}},"line":56},"4":{"name":"(anonymous_4)","decl":{"start":{"line":58,"column":20},"end":{"line":58,"column":21}},"loc":{"start":{"line":58,"column":26},"end":{"line":58,"column":48}},"line":58},"5":{"name":"(anonymous_5)","decl":{"start":{"line":59,"column":21},"end":{"line":59,"column":22}},"loc":{"start":{"line":59,"column":28},"end":{"line":59,"column":37}},"line":59},"6":{"name":"loadImage","decl":{"start":{"line":70,"column":16},"end":{"line":70,"column":25}},"loc":{"start":{"line":70,"column":31},"end":{"line":77,"column":1}},"line":70},"7":{"name":"(anonymous_7)","decl":{"start":{"line":71,"column":21},"end":{"line":71,"column":22}},"loc":{"start":{"line":71,"column":42},"end":{"line":76,"column":3}},"line":71},"8":{"name":"(anonymous_8)","decl":{"start":{"line":73,"column":17},"end":{"line":73,"column":18}},"loc":{"start":{"line":73,"column":23},"end":{"line":73,"column":35}},"line":73},"9":{"name":"(anonymous_9)","decl":{"start":{"line":74,"column":18},"end":{"line":74,"column":19}},"loc":{"start":{"line":74,"column":25},"end":{"line":74,"column":34}},"line":74},"10":{"name":"getBrowserName","decl":{"start":{"line":88,"column":16},"end":{"line":88,"column":30}},"loc":{"start":{"line":88,"column":33},"end":{"line":104,"column":1}},"line":88},"11":{"name":"approximateBelowMaximumCanvasSizeOfBrowser","decl":{"start":{"line":115,"column":16},"end":{"line":115,"column":58}},"loc":{"start":{"line":115,"column":82},"end":{"line":141,"column":1}},"line":115},"12":{"name":"getNewCanvasAndCtx","decl":{"start":{"line":149,"column":16},"end":{"line":149,"column":34}},"loc":{"start":{"line":149,"column":50},"end":{"line":167,"column":1}},"line":149},"13":{"name":"drawImageInCanvas","decl":{"start":{"line":176,"column":16},"end":{"line":176,"column":33}},"loc":{"start":{"line":176,"column":61},"end":{"line":185,"column":1}},"line":176},"14":{"name":"isIOS","decl":{"start":{"line":192,"column":16},"end":{"line":192,"column":21}},"loc":{"start":{"line":192,"column":24},"end":{"line":207,"column":1}},"line":192},"15":{"name":"drawFileInCanvas","decl":{"start":{"line":215,"column":22},"end":{"line":215,"column":38}},"loc":{"start":{"line":215,"column":45},"end":{"line":238,"column":1}},"line":215},"16":{"name":"canvasToFile","decl":{"start":{"line":250,"column":22},"end":{"line":250,"column":34}},"loc":{"start":{"line":250,"column":94},"end":{"line":271,"column":1}},"line":250},"17":{"name":"cleanupCanvasMemory","decl":{"start":{"line":278,"column":16},"end":{"line":278,"column":35}},"loc":{"start":{"line":278,"column":44},"end":{"line":285,"column":1}},"line":278},"18":{"name":"isAutoOrientationInBrowser","decl":{"start":{"line":289,"column":22},"end":{"line":289,"column":48}},"loc":{"start":{"line":289,"column":51},"end":{"line":310,"column":1}},"line":289},"19":{"name":"getExifOrientation","decl":{"start":{"line":320,"column":16},"end":{"line":320,"column":34}},"loc":{"start":{"line":320,"column":41},"end":{"line":359,"column":1}},"line":320},"20":{"name":"(anonymous_20)","decl":{"start":{"line":321,"column":21},"end":{"line":321,"column":22}},"loc":{"start":{"line":321,"column":42},"end":{"line":358,"column":3}},"line":321},"21":{"name":"(anonymous_21)","decl":{"start":{"line":323,"column":20},"end":{"line":323,"column":21}},"loc":{"start":{"line":323,"column":27},"end":{"line":355,"column":5}},"line":323},"22":{"name":"(anonymous_22)","decl":{"start":{"line":356,"column":21},"end":{"line":356,"column":22}},"loc":{"start":{"line":356,"column":28},"end":{"line":356,"column":37}},"line":356},"23":{"name":"handleMaxWidthOrHeight","decl":{"start":{"line":367,"column":16},"end":{"line":367,"column":38}},"loc":{"start":{"line":367,"column":56},"end":{"line":392,"column":1}},"line":367},"24":{"name":"followExifOrientation","decl":{"start":{"line":402,"column":16},"end":{"line":402,"column":37}},"loc":{"start":{"line":402,"column":63},"end":{"line":449,"column":1}},"line":402}},"branchMap":{"0":{"loc":{"start":{"line":7,"column":21},"end":{"line":7,"column":124}},"type":"binary-expr","locations":[{"start":{"line":7,"column":21},"end":{"line":7,"column":30}},{"start":{"line":7,"column":34},"end":{"line":7,"column":48}},{"start":{"line":7,"column":52},"end":{"line":7,"column":74}},{"start":{"line":7,"column":78},"end":{"line":7,"column":124}}],"line":7},"1":{"loc":{"start":{"line":8,"column":26},"end":{"line":8,"column":153}},"type":"binary-expr","locations":[{"start":{"line":8,"column":26},"end":{"line":8,"column":35}},{"start":{"line":8,"column":41},"end":{"line":8,"column":53}},{"start":{"line":8,"column":57},"end":{"line":8,"column":103}},{"start":{"line":8,"column":109},"end":{"line":8,"column":143}},{"start":{"line":8,"column":147},"end":{"line":8,"column":151}}],"line":8},"2":{"loc":{"start":{"line":9,"column":32},"end":{"line":9,"column":177}},"type":"binary-expr","locations":[{"start":{"line":9,"column":32},"end":{"line":9,"column":41}},{"start":{"line":9,"column":47},"end":{"line":9,"column":59}},{"start":{"line":9,"column":63},"end":{"line":9,"column":115}},{"start":{"line":9,"column":121},"end":{"line":9,"column":161}},{"start":{"line":9,"column":165},"end":{"line":9,"column":175}}],"line":9},"3":{"loc":{"start":{"line":19,"column":54},"end":{"line":19,"column":79}},"type":"default-arg","locations":[{"start":{"line":19,"column":69},"end":{"line":19,"column":79}}],"line":19},"4":{"loc":{"start":{"line":91,"column":2},"end":{"line":102,"column":3}},"type":"if","locations":[{"start":{"line":91,"column":2},"end":{"line":102,"column":3}},{"start":{"line":91,"column":2},"end":{"line":102,"column":3}}],"line":91},"5":{"loc":{"start":{"line":93,"column":9},"end":{"line":102,"column":3}},"type":"if","locations":[{"start":{"line":93,"column":9},"end":{"line":102,"column":3}},{"start":{"line":93,"column":9},"end":{"line":102,"column":3}}],"line":93},"6":{"loc":{"start":{"line":93,"column":13},"end":{"line":93,"column":128}},"type":"binary-expr","locations":[{"start":{"line":93,"column":13},"end":{"line":93,"column":46}},{"start":{"line":93,"column":50},"end":{"line":93,"column":75}},{"start":{"line":93,"column":79},"end":{"line":93,"column":128}}],"line":93},"7":{"loc":{"start":{"line":96,"column":9},"end":{"line":102,"column":3}},"type":"if","locations":[{"start":{"line":96,"column":9},"end":{"line":102,"column":3}},{"start":{"line":96,"column":9},"end":{"line":102,"column":3}}],"line":96},"8":{"loc":{"start":{"line":98,"column":9},"end":{"line":102,"column":3}},"type":"if","locations":[{"start":{"line":98,"column":9},"end":{"line":102,"column":3}},{"start":{"line":98,"column":9},"end":{"line":102,"column":3}}],"line":98},"9":{"loc":{"start":{"line":100,"column":9},"end":{"line":102,"column":3}},"type":"if","locations":[{"start":{"line":100,"column":9},"end":{"line":102,"column":3}},{"start":{"line":100,"column":9},"end":{"line":102,"column":3}}],"line":100},"10":{"loc":{"start":{"line":100,"column":13},"end":{"line":100,"column":74}},"type":"binary-expr","locations":[{"start":{"line":100,"column":13},"end":{"line":100,"column":36}},{"start":{"line":100,"column":40},"end":{"line":100,"column":74}}],"line":100},"11":{"loc":{"start":{"line":122,"column":16},"end":{"line":122,"column":64}},"type":"cond-expr","locations":[{"start":{"line":122,"column":33},"end":{"line":122,"column":47}},{"start":{"line":122,"column":50},"end":{"line":122,"column":64}}],"line":122},"12":{"loc":{"start":{"line":127,"column":4},"end":{"line":133,"column":5}},"type":"if","locations":[{"start":{"line":127,"column":4},"end":{"line":133,"column":5}},{"start":{"line":127,"column":4},"end":{"line":133,"column":5}}],"line":127},"13":{"loc":{"start":{"line":155,"column":4},"end":{"line":157,"column":5}},"type":"if","locations":[{"start":{"line":155,"column":4},"end":{"line":157,"column":5}},{"start":{"line":155,"column":4},"end":{"line":157,"column":5}}],"line":155},"14":{"loc":{"start":{"line":176,"column":39},"end":{"line":176,"column":59}},"type":"default-arg","locations":[{"start":{"line":176,"column":50},"end":{"line":176,"column":59}}],"line":176},"15":{"loc":{"start":{"line":179,"column":2},"end":{"line":182,"column":3}},"type":"if","locations":[{"start":{"line":179,"column":2},"end":{"line":182,"column":3}},{"start":{"line":179,"column":2},"end":{"line":182,"column":3}}],"line":179},"16":{"loc":{"start":{"line":179,"column":6},"end":{"line":179,"column":40}},"type":"binary-expr","locations":[{"start":{"line":179,"column":6},"end":{"line":179,"column":14}},{"start":{"line":179,"column":18},"end":{"line":179,"column":40}}],"line":179},"17":{"loc":{"start":{"line":193,"column":2},"end":{"line":195,"column":3}},"type":"if","locations":[{"start":{"line":193,"column":2},"end":{"line":195,"column":3}},{"start":{"line":193,"column":2},"end":{"line":195,"column":3}}],"line":193},"18":{"loc":{"start":{"line":196,"column":23},"end":{"line":205,"column":70}},"type":"binary-expr","locations":[{"start":{"line":196,"column":23},"end":{"line":203,"column":32}},{"start":{"line":205,"column":6},"end":{"line":205,"column":41}},{"start":{"line":205,"column":45},"end":{"line":205,"column":69}}],"line":196},"19":{"loc":{"start":{"line":218,"column":4},"end":{"line":220,"column":5}},"type":"if","locations":[{"start":{"line":218,"column":4},"end":{"line":220,"column":5}},{"start":{"line":218,"column":4},"end":{"line":220,"column":5}}],"line":218},"20":{"loc":{"start":{"line":223,"column":4},"end":{"line":225,"column":5}},"type":"if","locations":[{"start":{"line":223,"column":4},"end":{"line":225,"column":5}},{"start":{"line":223,"column":4},"end":{"line":225,"column":5}}],"line":223},"21":{"loc":{"start":{"line":230,"column":6},"end":{"line":232,"column":7}},"type":"if","locations":[{"start":{"line":230,"column":6},"end":{"line":232,"column":7}},{"start":{"line":230,"column":6},"end":{"line":232,"column":7}}],"line":230},"22":{"loc":{"start":{"line":250,"column":81},"end":{"line":250,"column":92}},"type":"default-arg","locations":[{"start":{"line":250,"column":91},"end":{"line":250,"column":92}}],"line":250},"23":{"loc":{"start":{"line":252,"column":2},"end":{"line":269,"column":3}},"type":"if","locations":[{"start":{"line":252,"column":2},"end":{"line":269,"column":3}},{"start":{"line":252,"column":2},"end":{"line":269,"column":3}}],"line":252},"24":{"loc":{"start":{"line":259,"column":9},"end":{"line":269,"column":3}},"type":"if","locations":[{"start":{"line":259,"column":9},"end":{"line":269,"column":3}},{"start":{"line":259,"column":9},"end":{"line":269,"column":3}}],"line":259},"25":{"loc":{"start":{"line":259,"column":13},"end":{"line":259,"column":87}},"type":"binary-expr","locations":[{"start":{"line":259,"column":13},"end":{"line":259,"column":50}},{"start":{"line":259,"column":54},"end":{"line":259,"column":87}}],"line":259},"26":{"loc":{"start":{"line":290,"column":2},"end":{"line":290,"column":96}},"type":"if","locations":[{"start":{"line":290,"column":2},"end":{"line":290,"column":96}},{"start":{"line":290,"column":2},"end":{"line":290,"column":96}}],"line":290},"27":{"loc":{"start":{"line":308,"column":38},"end":{"line":308,"column":73}},"type":"binary-expr","locations":[{"start":{"line":308,"column":38},"end":{"line":308,"column":53}},{"start":{"line":308,"column":57},"end":{"line":308,"column":73}}],"line":308},"28":{"loc":{"start":{"line":325,"column":6},"end":{"line":327,"column":7}},"type":"if","locations":[{"start":{"line":325,"column":6},"end":{"line":327,"column":7}},{"start":{"line":325,"column":6},"end":{"line":327,"column":7}}],"line":325},"29":{"loc":{"start":{"line":331,"column":8},"end":{"line":331,"column":71}},"type":"if","locations":[{"start":{"line":331,"column":8},"end":{"line":331,"column":71}},{"start":{"line":331,"column":8},"end":{"line":331,"column":71}}],"line":331},"30":{"loc":{"start":{"line":334,"column":8},"end":{"line":352,"column":9}},"type":"if","locations":[{"start":{"line":334,"column":8},"end":{"line":352,"column":9}},{"start":{"line":334,"column":8},"end":{"line":352,"column":9}}],"line":334},"31":{"loc":{"start":{"line":335,"column":10},"end":{"line":337,"column":11}},"type":"if","locations":[{"start":{"line":335,"column":10},"end":{"line":337,"column":11}},{"start":{"line":335,"column":10},"end":{"line":337,"column":11}}],"line":335},"32":{"loc":{"start":{"line":344,"column":12},"end":{"line":346,"column":13}},"type":"if","locations":[{"start":{"line":344,"column":12},"end":{"line":346,"column":13}},{"start":{"line":344,"column":12},"end":{"line":346,"column":13}}],"line":344},"33":{"loc":{"start":{"line":348,"column":15},"end":{"line":352,"column":9}},"type":"if","locations":[{"start":{"line":348,"column":15},"end":{"line":352,"column":9}},{"start":{"line":348,"column":15},"end":{"line":352,"column":9}}],"line":348},"34":{"loc":{"start":{"line":372,"column":23},"end":{"line":372,"column":108}},"type":"binary-expr","locations":[{"start":{"line":372,"column":23},"end":{"line":372,"column":49}},{"start":{"line":372,"column":54},"end":{"line":372,"column":78}},{"start":{"line":372,"column":82},"end":{"line":372,"column":107}}],"line":372},"35":{"loc":{"start":{"line":377,"column":2},"end":{"line":389,"column":3}},"type":"if","locations":[{"start":{"line":377,"column":2},"end":{"line":389,"column":3}},{"start":{"line":377,"column":2},"end":{"line":389,"column":3}}],"line":377},"36":{"loc":{"start":{"line":379,"column":4},"end":{"line":385,"column":5}},"type":"if","locations":[{"start":{"line":379,"column":4},"end":{"line":385,"column":5}},{"start":{"line":379,"column":4},"end":{"line":385,"column":5}}],"line":379},"37":{"loc":{"start":{"line":409,"column":2},"end":{"line":415,"column":3}},"type":"if","locations":[{"start":{"line":409,"column":2},"end":{"line":415,"column":3}},{"start":{"line":409,"column":2},"end":{"line":415,"column":3}}],"line":409},"38":{"loc":{"start":{"line":409,"column":6},"end":{"line":409,"column":48}},"type":"binary-expr","locations":[{"start":{"line":409,"column":6},"end":{"line":409,"column":25}},{"start":{"line":409,"column":29},"end":{"line":409,"column":48}}],"line":409},"39":{"loc":{"start":{"line":418,"column":2},"end":{"line":442,"column":3}},"type":"switch","locations":[{"start":{"line":419,"column":4},"end":{"line":421,"column":12}},{"start":{"line":422,"column":4},"end":{"line":424,"column":12}},{"start":{"line":425,"column":4},"end":{"line":427,"column":12}},{"start":{"line":428,"column":4},"end":{"line":430,"column":12}},{"start":{"line":431,"column":4},"end":{"line":433,"column":12}},{"start":{"line":434,"column":4},"end":{"line":436,"column":12}},{"start":{"line":437,"column":4},"end":{"line":439,"column":12}},{"start":{"line":440,"column":4},"end":{"line":441,"column":12}}],"line":418}},"s":{"0":1,"1":1,"2":1,"3":1,"4":9,"5":9,"6":9,"7":9,"8":9,"9":9,"10":9,"11":11172561,"12":9,"13":9,"14":9,"15":9,"16":15,"17":15,"18":15,"19":15,"20":15,"21":0,"22":15,"23":15,"24":15,"25":15,"26":15,"27":15,"28":0,"29":15,"30":14,"31":14,"32":14,"33":0,"34":14,"35":0,"36":14,"37":0,"38":14,"39":0,"40":14,"41":0,"42":14,"43":14,"44":14,"45":14,"46":14,"47":14,"48":14,"49":14,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":14,"59":26,"60":26,"61":0,"62":0,"63":0,"64":26,"65":26,"66":26,"67":26,"68":26,"69":14,"70":14,"71":14,"72":8,"73":8,"74":14,"75":14,"76":13,"77":12,"78":1,"79":1,"80":13,"81":13,"82":0,"83":13,"84":13,"85":0,"86":13,"87":13,"88":13,"89":0,"90":0,"91":0,"92":13,"93":13,"94":9,"95":3,"96":3,"97":3,"98":3,"99":3,"100":3,"101":6,"102":0,"103":0,"104":0,"105":6,"106":6,"107":9,"108":18,"109":18,"110":6,"111":5,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":1,"149":0,"150":1,"151":6,"152":6,"153":6,"154":6,"155":6,"156":6,"157":4,"158":4,"159":2,"160":2,"161":2,"162":2,"163":4,"164":4,"165":6,"166":6,"167":6,"168":6,"169":6,"170":0,"171":0,"172":6,"173":6,"174":6,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":6,"190":6,"191":6,"192":6},"f":{"0":9,"1":9,"2":15,"3":15,"4":15,"5":0,"6":15,"7":15,"8":15,"9":0,"10":14,"11":14,"12":26,"13":14,"14":13,"15":13,"16":9,"17":18,"18":6,"19":1,"20":1,"21":1,"22":0,"23":6,"24":6},"b":{"0":[1,1,0,0],"1":[1,1,0,1,1],"2":[1,1,0,1,1],"3":[2],"4":[0,14],"5":[0,14],"6":[14,0,0],"7":[0,14],"8":[0,14],"9":[0,14],"10":[14,14],"11":[9,5],"12":[0,0],"13":[0,0],"14":[1],"15":[8,6],"16":[14,13],"17":[12,1],"18":[1,1,0],"19":[0,13],"20":[0,13],"21":[0,0],"22":[1],"23":[3,6],"24":[0,6],"25":[6,0],"26":[5,1],"27":[1,0],"28":[1,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[6,4,0],"35":[4,2],"36":[2,2],"37":[0,6],"38":[6,0],"39":[0,0,0,0,0,0,0,6]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"f99226677772ee9b7d6cc566967835d56f3437d3","contentHash":"62fb2ae2ff354524e5704c232469bc85c432c0eb5ba40cbcc36e65306b64772e"} -,"D:\\Projects\\browser-image-compression\\lib\\config\\max-canvas-size.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\config\\max-canvas-size.js","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"0951626fe107b8fcc2e342a45b0b5c806ef949a9","contentHash":"ad2e67541ef866f3e1b3fcc4a9203abaf621463ec126bbed85d9e0afe50c637b"} +,"D:\\Projects\\browser-image-compression\\lib\\utils.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\utils.js","statementMap":{"0":{"start":{"line":5,"column":18},"end":{"line":5,"column":47}},"1":{"start":{"line":8,"column":21},"end":{"line":8,"column":124}},"2":{"start":{"line":9,"column":26},"end":{"line":9,"column":153}},"3":{"start":{"line":10,"column":32},"end":{"line":10,"column":177}},"4":{"start":{"line":21,"column":2},"end":{"line":47,"column":5}},"5":{"start":{"line":22,"column":16},"end":{"line":22,"column":34}},"6":{"start":{"line":23,"column":17},"end":{"line":23,"column":43}},"7":{"start":{"line":24,"column":17},"end":{"line":24,"column":40}},"8":{"start":{"line":25,"column":12},"end":{"line":25,"column":23}},"9":{"start":{"line":26,"column":18},"end":{"line":26,"column":35}},"10":{"start":{"line":27,"column":4},"end":{"line":29,"column":5}},"11":{"start":{"line":28,"column":6},"end":{"line":28,"column":36}},"12":{"start":{"line":30,"column":17},"end":{"line":30,"column":50}},"13":{"start":{"line":31,"column":4},"end":{"line":31,"column":25}},"14":{"start":{"line":32,"column":4},"end":{"line":32,"column":37}},"15":{"start":{"line":33,"column":4},"end":{"line":33,"column":18}},"16":{"start":{"line":57,"column":2},"end":{"line":62,"column":5}},"17":{"start":{"line":58,"column":19},"end":{"line":58,"column":41}},"18":{"start":{"line":59,"column":4},"end":{"line":59,"column":49}},"19":{"start":{"line":59,"column":26},"end":{"line":59,"column":48}},"20":{"start":{"line":60,"column":4},"end":{"line":60,"column":38}},"21":{"start":{"line":60,"column":28},"end":{"line":60,"column":37}},"22":{"start":{"line":61,"column":4},"end":{"line":61,"column":31}},"23":{"start":{"line":72,"column":2},"end":{"line":77,"column":5}},"24":{"start":{"line":73,"column":16},"end":{"line":73,"column":27}},"25":{"start":{"line":74,"column":4},"end":{"line":74,"column":36}},"26":{"start":{"line":74,"column":23},"end":{"line":74,"column":35}},"27":{"start":{"line":75,"column":4},"end":{"line":75,"column":35}},"28":{"start":{"line":75,"column":25},"end":{"line":75,"column":34}},"29":{"start":{"line":76,"column":4},"end":{"line":76,"column":18}},"30":{"start":{"line":90,"column":2},"end":{"line":92,"column":3}},"31":{"start":{"line":91,"column":4},"end":{"line":91,"column":39}},"32":{"start":{"line":93,"column":20},"end":{"line":93,"column":36}},"33":{"start":{"line":94,"column":24},"end":{"line":94,"column":33}},"34":{"start":{"line":95,"column":2},"end":{"line":106,"column":3}},"35":{"start":{"line":96,"column":4},"end":{"line":96,"column":38}},"36":{"start":{"line":97,"column":9},"end":{"line":106,"column":3}},"37":{"start":{"line":99,"column":4},"end":{"line":99,"column":45}},"38":{"start":{"line":100,"column":9},"end":{"line":106,"column":3}},"39":{"start":{"line":101,"column":4},"end":{"line":101,"column":46}},"40":{"start":{"line":102,"column":9},"end":{"line":106,"column":3}},"41":{"start":{"line":103,"column":4},"end":{"line":103,"column":39}},"42":{"start":{"line":104,"column":9},"end":{"line":106,"column":3}},"43":{"start":{"line":105,"column":4},"end":{"line":105,"column":34}},"44":{"start":{"line":107,"column":2},"end":{"line":107,"column":44}},"45":{"start":{"line":108,"column":2},"end":{"line":108,"column":37}},"46":{"start":{"line":121,"column":22},"end":{"line":121,"column":38}},"47":{"start":{"line":122,"column":28},"end":{"line":122,"column":56}},"48":{"start":{"line":124,"column":14},"end":{"line":124,"column":23}},"49":{"start":{"line":125,"column":15},"end":{"line":125,"column":25}},"50":{"start":{"line":126,"column":13},"end":{"line":126,"column":27}},"51":{"start":{"line":127,"column":16},"end":{"line":127,"column":64}},"52":{"start":{"line":129,"column":2},"end":{"line":141,"column":3}},"53":{"start":{"line":130,"column":26},"end":{"line":130,"column":57}},"54":{"start":{"line":131,"column":27},"end":{"line":131,"column":59}},"55":{"start":{"line":132,"column":4},"end":{"line":138,"column":5}},"56":{"start":{"line":133,"column":6},"end":{"line":133,"column":30}},"57":{"start":{"line":134,"column":6},"end":{"line":134,"column":37}},"58":{"start":{"line":136,"column":6},"end":{"line":136,"column":37}},"59":{"start":{"line":137,"column":6},"end":{"line":137,"column":28}},"60":{"start":{"line":140,"column":4},"end":{"line":140,"column":26}},"61":{"start":{"line":143,"column":2},"end":{"line":145,"column":4}},"62":{"start":{"line":157,"column":2},"end":{"line":166,"column":3}},"63":{"start":{"line":158,"column":4},"end":{"line":158,"column":48}},"64":{"start":{"line":159,"column":4},"end":{"line":159,"column":34}},"65":{"start":{"line":160,"column":4},"end":{"line":162,"column":5}},"66":{"start":{"line":161,"column":6},"end":{"line":161,"column":68}},"67":{"start":{"line":164,"column":4},"end":{"line":164,"column":46}},"68":{"start":{"line":165,"column":4},"end":{"line":165,"column":34}},"69":{"start":{"line":167,"column":2},"end":{"line":167,"column":23}},"70":{"start":{"line":168,"column":2},"end":{"line":168,"column":25}},"71":{"start":{"line":171,"column":2},"end":{"line":171,"column":23}},"72":{"start":{"line":182,"column":28},"end":{"line":182,"column":93}},"73":{"start":{"line":183,"column":24},"end":{"line":183,"column":57}},"74":{"start":{"line":184,"column":2},"end":{"line":187,"column":3}},"75":{"start":{"line":185,"column":4},"end":{"line":185,"column":28}},"76":{"start":{"line":186,"column":4},"end":{"line":186,"column":52}},"77":{"start":{"line":188,"column":2},"end":{"line":188,"column":56}},"78":{"start":{"line":189,"column":2},"end":{"line":189,"column":16}},"79":{"start":{"line":198,"column":2},"end":{"line":200,"column":3}},"80":{"start":{"line":199,"column":4},"end":{"line":199,"column":30}},"81":{"start":{"line":201,"column":2},"end":{"line":210,"column":71}},"82":{"start":{"line":211,"column":2},"end":{"line":211,"column":28}},"83":{"start":{"line":222,"column":2},"end":{"line":240,"column":3}},"84":{"start":{"line":223,"column":4},"end":{"line":225,"column":5}},"85":{"start":{"line":224,"column":6},"end":{"line":224,"column":66}},"86":{"start":{"line":226,"column":4},"end":{"line":226,"column":40}},"87":{"start":{"line":228,"column":4},"end":{"line":230,"column":5}},"88":{"start":{"line":229,"column":6},"end":{"line":229,"column":23}},"89":{"start":{"line":231,"column":4},"end":{"line":239,"column":5}},"90":{"start":{"line":232,"column":22},"end":{"line":232,"column":52}},"91":{"start":{"line":233,"column":6},"end":{"line":233,"column":37}},"92":{"start":{"line":235,"column":6},"end":{"line":237,"column":7}},"93":{"start":{"line":236,"column":8},"end":{"line":236,"column":26}},"94":{"start":{"line":238,"column":6},"end":{"line":238,"column":15}},"95":{"start":{"line":241,"column":17},"end":{"line":241,"column":70}},"96":{"start":{"line":242,"column":2},"end":{"line":242,"column":23}},"97":{"start":{"line":257,"column":2},"end":{"line":274,"column":3}},"98":{"start":{"line":258,"column":16},"end":{"line":258,"column":39}},"99":{"start":{"line":259,"column":21},"end":{"line":259,"column":72}},"100":{"start":{"line":260,"column":16},"end":{"line":260,"column":79}},"101":{"start":{"line":261,"column":4},"end":{"line":261,"column":47}},"102":{"start":{"line":262,"column":4},"end":{"line":262,"column":25}},"103":{"start":{"line":263,"column":4},"end":{"line":263,"column":41}},"104":{"start":{"line":264,"column":9},"end":{"line":274,"column":3}},"105":{"start":{"line":265,"column":4},"end":{"line":265,"column":67}},"106":{"start":{"line":266,"column":4},"end":{"line":266,"column":25}},"107":{"start":{"line":267,"column":4},"end":{"line":267,"column":41}},"108":{"start":{"line":272,"column":20},"end":{"line":272,"column":55}},"109":{"start":{"line":273,"column":4},"end":{"line":273,"column":73}},"110":{"start":{"line":275,"column":2},"end":{"line":275,"column":14}},"111":{"start":{"line":287,"column":2},"end":{"line":287,"column":19}},"112":{"start":{"line":289,"column":2},"end":{"line":289,"column":20}},"113":{"start":{"line":295,"column":2},"end":{"line":295,"column":108}},"114":{"start":{"line":295,"column":61},"end":{"line":295,"column":108}},"115":{"start":{"line":299,"column":23},"end":{"line":304,"column":65}},"116":{"start":{"line":305,"column":24},"end":{"line":305,"column":86}},"117":{"start":{"line":307,"column":26},"end":{"line":307,"column":68}},"118":{"start":{"line":308,"column":25},"end":{"line":308,"column":128}},"119":{"start":{"line":309,"column":2},"end":{"line":309,"column":39}},"120":{"start":{"line":310,"column":14},"end":{"line":310,"column":57}},"121":{"start":{"line":313,"column":2},"end":{"line":313,"column":80}},"122":{"start":{"line":314,"column":2},"end":{"line":314,"column":49}},"123":{"start":{"line":326,"column":2},"end":{"line":363,"column":5}},"124":{"start":{"line":327,"column":19},"end":{"line":327,"column":41}},"125":{"start":{"line":328,"column":4},"end":{"line":360,"column":6}},"126":{"start":{"line":329,"column":19},"end":{"line":329,"column":48}},"127":{"start":{"line":330,"column":6},"end":{"line":332,"column":7}},"128":{"start":{"line":331,"column":8},"end":{"line":331,"column":27}},"129":{"start":{"line":333,"column":21},"end":{"line":333,"column":36}},"130":{"start":{"line":334,"column":19},"end":{"line":334,"column":20}},"131":{"start":{"line":335,"column":6},"end":{"line":358,"column":7}},"132":{"start":{"line":336,"column":8},"end":{"line":336,"column":71}},"133":{"start":{"line":336,"column":52},"end":{"line":336,"column":71}},"134":{"start":{"line":337,"column":23},"end":{"line":337,"column":52}},"135":{"start":{"line":338,"column":8},"end":{"line":338,"column":20}},"136":{"start":{"line":339,"column":8},"end":{"line":357,"column":9}},"137":{"start":{"line":340,"column":10},"end":{"line":342,"column":11}},"138":{"start":{"line":341,"column":12},"end":{"line":341,"column":31}},"139":{"start":{"line":344,"column":25},"end":{"line":344,"column":69}},"140":{"start":{"line":345,"column":10},"end":{"line":345,"column":55}},"141":{"start":{"line":346,"column":23},"end":{"line":346,"column":53}},"142":{"start":{"line":347,"column":10},"end":{"line":347,"column":22}},"143":{"start":{"line":348,"column":10},"end":{"line":352,"column":11}},"144":{"start":{"line":348,"column":23},"end":{"line":348,"column":24}},"145":{"start":{"line":349,"column":12},"end":{"line":351,"column":13}},"146":{"start":{"line":350,"column":14},"end":{"line":350,"column":76}},"147":{"start":{"line":353,"column":15},"end":{"line":357,"column":9}},"148":{"start":{"line":354,"column":10},"end":{"line":354,"column":16}},"149":{"start":{"line":356,"column":10},"end":{"line":356,"column":50}},"150":{"start":{"line":359,"column":6},"end":{"line":359,"column":25}},"151":{"start":{"line":361,"column":4},"end":{"line":361,"column":38}},"152":{"start":{"line":361,"column":28},"end":{"line":361,"column":37}},"153":{"start":{"line":362,"column":4},"end":{"line":362,"column":35}},"154":{"start":{"line":373,"column":20},"end":{"line":373,"column":26}},"155":{"start":{"line":374,"column":21},"end":{"line":374,"column":27}},"156":{"start":{"line":375,"column":31},"end":{"line":375,"column":38}},"157":{"start":{"line":377,"column":23},"end":{"line":377,"column":108}},"158":{"start":{"line":379,"column":18},"end":{"line":379,"column":24}},"159":{"start":{"line":382,"column":2},"end":{"line":394,"column":3}},"160":{"start":{"line":383,"column":4},"end":{"line":383,"column":57}},"161":{"start":{"line":384,"column":4},"end":{"line":390,"column":5}},"162":{"start":{"line":385,"column":6},"end":{"line":385,"column":41}},"163":{"start":{"line":386,"column":6},"end":{"line":386,"column":61}},"164":{"start":{"line":388,"column":6},"end":{"line":388,"column":60}},"165":{"start":{"line":389,"column":6},"end":{"line":389,"column":42}},"166":{"start":{"line":391,"column":4},"end":{"line":391,"column":67}},"167":{"start":{"line":393,"column":4},"end":{"line":393,"column":32}},"168":{"start":{"line":396,"column":2},"end":{"line":396,"column":19}},"169":{"start":{"line":408,"column":20},"end":{"line":408,"column":26}},"170":{"start":{"line":409,"column":21},"end":{"line":409,"column":27}},"171":{"start":{"line":411,"column":27},"end":{"line":411,"column":60}},"172":{"start":{"line":414,"column":2},"end":{"line":420,"column":3}},"173":{"start":{"line":415,"column":4},"end":{"line":415,"column":29}},"174":{"start":{"line":416,"column":4},"end":{"line":416,"column":29}},"175":{"start":{"line":418,"column":4},"end":{"line":418,"column":28}},"176":{"start":{"line":419,"column":4},"end":{"line":419,"column":30}},"177":{"start":{"line":423,"column":2},"end":{"line":447,"column":3}},"178":{"start":{"line":425,"column":6},"end":{"line":425,"column":43}},"179":{"start":{"line":426,"column":6},"end":{"line":426,"column":12}},"180":{"start":{"line":428,"column":6},"end":{"line":428,"column":49}},"181":{"start":{"line":429,"column":6},"end":{"line":429,"column":12}},"182":{"start":{"line":431,"column":6},"end":{"line":431,"column":44}},"183":{"start":{"line":432,"column":6},"end":{"line":432,"column":12}},"184":{"start":{"line":434,"column":6},"end":{"line":434,"column":38}},"185":{"start":{"line":435,"column":6},"end":{"line":435,"column":12}},"186":{"start":{"line":437,"column":6},"end":{"line":437,"column":44}},"187":{"start":{"line":438,"column":6},"end":{"line":438,"column":12}},"188":{"start":{"line":440,"column":6},"end":{"line":440,"column":49}},"189":{"start":{"line":441,"column":6},"end":{"line":441,"column":12}},"190":{"start":{"line":443,"column":6},"end":{"line":443,"column":43}},"191":{"start":{"line":444,"column":6},"end":{"line":444,"column":12}},"192":{"start":{"line":446,"column":6},"end":{"line":446,"column":12}},"193":{"start":{"line":449,"column":2},"end":{"line":449,"column":45}},"194":{"start":{"line":451,"column":2},"end":{"line":451,"column":30}},"195":{"start":{"line":453,"column":2},"end":{"line":453,"column":19}}},"fnMap":{"0":{"name":"getFilefromDataUrl","decl":{"start":{"line":20,"column":16},"end":{"line":20,"column":34}},"loc":{"start":{"line":20,"column":81},"end":{"line":48,"column":1}},"line":20},"1":{"name":"(anonymous_1)","decl":{"start":{"line":21,"column":21},"end":{"line":21,"column":22}},"loc":{"start":{"line":21,"column":34},"end":{"line":47,"column":3}},"line":21},"2":{"name":"getDataUrlFromFile","decl":{"start":{"line":56,"column":16},"end":{"line":56,"column":34}},"loc":{"start":{"line":56,"column":41},"end":{"line":63,"column":1}},"line":56},"3":{"name":"(anonymous_3)","decl":{"start":{"line":57,"column":21},"end":{"line":57,"column":22}},"loc":{"start":{"line":57,"column":42},"end":{"line":62,"column":3}},"line":57},"4":{"name":"(anonymous_4)","decl":{"start":{"line":59,"column":20},"end":{"line":59,"column":21}},"loc":{"start":{"line":59,"column":26},"end":{"line":59,"column":48}},"line":59},"5":{"name":"(anonymous_5)","decl":{"start":{"line":60,"column":21},"end":{"line":60,"column":22}},"loc":{"start":{"line":60,"column":28},"end":{"line":60,"column":37}},"line":60},"6":{"name":"loadImage","decl":{"start":{"line":71,"column":16},"end":{"line":71,"column":25}},"loc":{"start":{"line":71,"column":31},"end":{"line":78,"column":1}},"line":71},"7":{"name":"(anonymous_7)","decl":{"start":{"line":72,"column":21},"end":{"line":72,"column":22}},"loc":{"start":{"line":72,"column":42},"end":{"line":77,"column":3}},"line":72},"8":{"name":"(anonymous_8)","decl":{"start":{"line":74,"column":17},"end":{"line":74,"column":18}},"loc":{"start":{"line":74,"column":23},"end":{"line":74,"column":35}},"line":74},"9":{"name":"(anonymous_9)","decl":{"start":{"line":75,"column":18},"end":{"line":75,"column":19}},"loc":{"start":{"line":75,"column":25},"end":{"line":75,"column":34}},"line":75},"10":{"name":"getBrowserName","decl":{"start":{"line":89,"column":16},"end":{"line":89,"column":30}},"loc":{"start":{"line":89,"column":33},"end":{"line":109,"column":1}},"line":89},"11":{"name":"approximateBelowMaximumCanvasSizeOfBrowser","decl":{"start":{"line":120,"column":16},"end":{"line":120,"column":58}},"loc":{"start":{"line":120,"column":82},"end":{"line":146,"column":1}},"line":120},"12":{"name":"getNewCanvasAndCtx","decl":{"start":{"line":154,"column":16},"end":{"line":154,"column":34}},"loc":{"start":{"line":154,"column":50},"end":{"line":172,"column":1}},"line":154},"13":{"name":"drawImageInCanvas","decl":{"start":{"line":181,"column":16},"end":{"line":181,"column":33}},"loc":{"start":{"line":181,"column":61},"end":{"line":190,"column":1}},"line":181},"14":{"name":"isIOS","decl":{"start":{"line":197,"column":16},"end":{"line":197,"column":21}},"loc":{"start":{"line":197,"column":24},"end":{"line":212,"column":1}},"line":197},"15":{"name":"drawFileInCanvas","decl":{"start":{"line":220,"column":22},"end":{"line":220,"column":38}},"loc":{"start":{"line":220,"column":59},"end":{"line":243,"column":1}},"line":220},"16":{"name":"canvasToFile","decl":{"start":{"line":255,"column":22},"end":{"line":255,"column":34}},"loc":{"start":{"line":255,"column":94},"end":{"line":276,"column":1}},"line":255},"17":{"name":"cleanupCanvasMemory","decl":{"start":{"line":283,"column":16},"end":{"line":283,"column":35}},"loc":{"start":{"line":283,"column":44},"end":{"line":290,"column":1}},"line":283},"18":{"name":"isAutoOrientationInBrowser","decl":{"start":{"line":294,"column":22},"end":{"line":294,"column":48}},"loc":{"start":{"line":294,"column":51},"end":{"line":315,"column":1}},"line":294},"19":{"name":"getExifOrientation","decl":{"start":{"line":325,"column":16},"end":{"line":325,"column":34}},"loc":{"start":{"line":325,"column":41},"end":{"line":364,"column":1}},"line":325},"20":{"name":"(anonymous_20)","decl":{"start":{"line":326,"column":21},"end":{"line":326,"column":22}},"loc":{"start":{"line":326,"column":42},"end":{"line":363,"column":3}},"line":326},"21":{"name":"(anonymous_21)","decl":{"start":{"line":328,"column":20},"end":{"line":328,"column":21}},"loc":{"start":{"line":328,"column":27},"end":{"line":360,"column":5}},"line":328},"22":{"name":"(anonymous_22)","decl":{"start":{"line":361,"column":21},"end":{"line":361,"column":22}},"loc":{"start":{"line":361,"column":28},"end":{"line":361,"column":37}},"line":361},"23":{"name":"handleMaxWidthOrHeight","decl":{"start":{"line":372,"column":16},"end":{"line":372,"column":38}},"loc":{"start":{"line":372,"column":56},"end":{"line":397,"column":1}},"line":372},"24":{"name":"followExifOrientation","decl":{"start":{"line":407,"column":16},"end":{"line":407,"column":37}},"loc":{"start":{"line":407,"column":63},"end":{"line":454,"column":1}},"line":407}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":21},"end":{"line":8,"column":124}},"type":"binary-expr","locations":[{"start":{"line":8,"column":21},"end":{"line":8,"column":30}},{"start":{"line":8,"column":34},"end":{"line":8,"column":48}},{"start":{"line":8,"column":52},"end":{"line":8,"column":74}},{"start":{"line":8,"column":78},"end":{"line":8,"column":124}}],"line":8},"1":{"loc":{"start":{"line":9,"column":26},"end":{"line":9,"column":153}},"type":"binary-expr","locations":[{"start":{"line":9,"column":26},"end":{"line":9,"column":35}},{"start":{"line":9,"column":41},"end":{"line":9,"column":53}},{"start":{"line":9,"column":57},"end":{"line":9,"column":103}},{"start":{"line":9,"column":109},"end":{"line":9,"column":143}},{"start":{"line":9,"column":147},"end":{"line":9,"column":151}}],"line":9},"2":{"loc":{"start":{"line":10,"column":32},"end":{"line":10,"column":177}},"type":"binary-expr","locations":[{"start":{"line":10,"column":32},"end":{"line":10,"column":41}},{"start":{"line":10,"column":47},"end":{"line":10,"column":59}},{"start":{"line":10,"column":63},"end":{"line":10,"column":115}},{"start":{"line":10,"column":121},"end":{"line":10,"column":161}},{"start":{"line":10,"column":165},"end":{"line":10,"column":175}}],"line":10},"3":{"loc":{"start":{"line":20,"column":54},"end":{"line":20,"column":79}},"type":"default-arg","locations":[{"start":{"line":20,"column":69},"end":{"line":20,"column":79}}],"line":20},"4":{"loc":{"start":{"line":90,"column":2},"end":{"line":92,"column":3}},"type":"if","locations":[{"start":{"line":90,"column":2},"end":{"line":92,"column":3}},{"start":{"line":90,"column":2},"end":{"line":92,"column":3}}],"line":90},"5":{"loc":{"start":{"line":95,"column":2},"end":{"line":106,"column":3}},"type":"if","locations":[{"start":{"line":95,"column":2},"end":{"line":106,"column":3}},{"start":{"line":95,"column":2},"end":{"line":106,"column":3}}],"line":95},"6":{"loc":{"start":{"line":97,"column":9},"end":{"line":106,"column":3}},"type":"if","locations":[{"start":{"line":97,"column":9},"end":{"line":106,"column":3}},{"start":{"line":97,"column":9},"end":{"line":106,"column":3}}],"line":97},"7":{"loc":{"start":{"line":97,"column":13},"end":{"line":97,"column":128}},"type":"binary-expr","locations":[{"start":{"line":97,"column":13},"end":{"line":97,"column":46}},{"start":{"line":97,"column":50},"end":{"line":97,"column":75}},{"start":{"line":97,"column":79},"end":{"line":97,"column":128}}],"line":97},"8":{"loc":{"start":{"line":100,"column":9},"end":{"line":106,"column":3}},"type":"if","locations":[{"start":{"line":100,"column":9},"end":{"line":106,"column":3}},{"start":{"line":100,"column":9},"end":{"line":106,"column":3}}],"line":100},"9":{"loc":{"start":{"line":102,"column":9},"end":{"line":106,"column":3}},"type":"if","locations":[{"start":{"line":102,"column":9},"end":{"line":106,"column":3}},{"start":{"line":102,"column":9},"end":{"line":106,"column":3}}],"line":102},"10":{"loc":{"start":{"line":104,"column":9},"end":{"line":106,"column":3}},"type":"if","locations":[{"start":{"line":104,"column":9},"end":{"line":106,"column":3}},{"start":{"line":104,"column":9},"end":{"line":106,"column":3}}],"line":104},"11":{"loc":{"start":{"line":104,"column":13},"end":{"line":104,"column":74}},"type":"binary-expr","locations":[{"start":{"line":104,"column":13},"end":{"line":104,"column":36}},{"start":{"line":104,"column":40},"end":{"line":104,"column":74}}],"line":104},"12":{"loc":{"start":{"line":127,"column":16},"end":{"line":127,"column":64}},"type":"cond-expr","locations":[{"start":{"line":127,"column":33},"end":{"line":127,"column":47}},{"start":{"line":127,"column":50},"end":{"line":127,"column":64}}],"line":127},"13":{"loc":{"start":{"line":132,"column":4},"end":{"line":138,"column":5}},"type":"if","locations":[{"start":{"line":132,"column":4},"end":{"line":138,"column":5}},{"start":{"line":132,"column":4},"end":{"line":138,"column":5}}],"line":132},"14":{"loc":{"start":{"line":160,"column":4},"end":{"line":162,"column":5}},"type":"if","locations":[{"start":{"line":160,"column":4},"end":{"line":162,"column":5}},{"start":{"line":160,"column":4},"end":{"line":162,"column":5}}],"line":160},"15":{"loc":{"start":{"line":181,"column":39},"end":{"line":181,"column":59}},"type":"default-arg","locations":[{"start":{"line":181,"column":50},"end":{"line":181,"column":59}}],"line":181},"16":{"loc":{"start":{"line":184,"column":2},"end":{"line":187,"column":3}},"type":"if","locations":[{"start":{"line":184,"column":2},"end":{"line":187,"column":3}},{"start":{"line":184,"column":2},"end":{"line":187,"column":3}}],"line":184},"17":{"loc":{"start":{"line":184,"column":6},"end":{"line":184,"column":40}},"type":"binary-expr","locations":[{"start":{"line":184,"column":6},"end":{"line":184,"column":14}},{"start":{"line":184,"column":18},"end":{"line":184,"column":40}}],"line":184},"18":{"loc":{"start":{"line":198,"column":2},"end":{"line":200,"column":3}},"type":"if","locations":[{"start":{"line":198,"column":2},"end":{"line":200,"column":3}},{"start":{"line":198,"column":2},"end":{"line":200,"column":3}}],"line":198},"19":{"loc":{"start":{"line":201,"column":23},"end":{"line":210,"column":70}},"type":"binary-expr","locations":[{"start":{"line":201,"column":23},"end":{"line":208,"column":32}},{"start":{"line":210,"column":6},"end":{"line":210,"column":41}},{"start":{"line":210,"column":45},"end":{"line":210,"column":69}}],"line":201},"20":{"loc":{"start":{"line":220,"column":45},"end":{"line":220,"column":57}},"type":"default-arg","locations":[{"start":{"line":220,"column":55},"end":{"line":220,"column":57}}],"line":220},"21":{"loc":{"start":{"line":223,"column":4},"end":{"line":225,"column":5}},"type":"if","locations":[{"start":{"line":223,"column":4},"end":{"line":225,"column":5}},{"start":{"line":223,"column":4},"end":{"line":225,"column":5}}],"line":223},"22":{"loc":{"start":{"line":223,"column":8},"end":{"line":223,"column":103}},"type":"binary-expr","locations":[{"start":{"line":223,"column":8},"end":{"line":223,"column":15}},{"start":{"line":223,"column":19},"end":{"line":223,"column":103}}],"line":223},"23":{"loc":{"start":{"line":228,"column":4},"end":{"line":230,"column":5}},"type":"if","locations":[{"start":{"line":228,"column":4},"end":{"line":230,"column":5}},{"start":{"line":228,"column":4},"end":{"line":230,"column":5}}],"line":228},"24":{"loc":{"start":{"line":235,"column":6},"end":{"line":237,"column":7}},"type":"if","locations":[{"start":{"line":235,"column":6},"end":{"line":237,"column":7}},{"start":{"line":235,"column":6},"end":{"line":237,"column":7}}],"line":235},"25":{"loc":{"start":{"line":241,"column":40},"end":{"line":241,"column":69}},"type":"binary-expr","locations":[{"start":{"line":241,"column":40},"end":{"line":241,"column":56}},{"start":{"line":241,"column":60},"end":{"line":241,"column":69}}],"line":241},"26":{"loc":{"start":{"line":255,"column":81},"end":{"line":255,"column":92}},"type":"default-arg","locations":[{"start":{"line":255,"column":91},"end":{"line":255,"column":92}}],"line":255},"27":{"loc":{"start":{"line":257,"column":2},"end":{"line":274,"column":3}},"type":"if","locations":[{"start":{"line":257,"column":2},"end":{"line":274,"column":3}},{"start":{"line":257,"column":2},"end":{"line":274,"column":3}}],"line":257},"28":{"loc":{"start":{"line":264,"column":9},"end":{"line":274,"column":3}},"type":"if","locations":[{"start":{"line":264,"column":9},"end":{"line":274,"column":3}},{"start":{"line":264,"column":9},"end":{"line":274,"column":3}}],"line":264},"29":{"loc":{"start":{"line":264,"column":13},"end":{"line":264,"column":87}},"type":"binary-expr","locations":[{"start":{"line":264,"column":13},"end":{"line":264,"column":50}},{"start":{"line":264,"column":54},"end":{"line":264,"column":87}}],"line":264},"30":{"loc":{"start":{"line":295,"column":2},"end":{"line":295,"column":108}},"type":"if","locations":[{"start":{"line":295,"column":2},"end":{"line":295,"column":108}},{"start":{"line":295,"column":2},"end":{"line":295,"column":108}}],"line":295},"31":{"loc":{"start":{"line":313,"column":44},"end":{"line":313,"column":79}},"type":"binary-expr","locations":[{"start":{"line":313,"column":44},"end":{"line":313,"column":59}},{"start":{"line":313,"column":63},"end":{"line":313,"column":79}}],"line":313},"32":{"loc":{"start":{"line":330,"column":6},"end":{"line":332,"column":7}},"type":"if","locations":[{"start":{"line":330,"column":6},"end":{"line":332,"column":7}},{"start":{"line":330,"column":6},"end":{"line":332,"column":7}}],"line":330},"33":{"loc":{"start":{"line":336,"column":8},"end":{"line":336,"column":71}},"type":"if","locations":[{"start":{"line":336,"column":8},"end":{"line":336,"column":71}},{"start":{"line":336,"column":8},"end":{"line":336,"column":71}}],"line":336},"34":{"loc":{"start":{"line":339,"column":8},"end":{"line":357,"column":9}},"type":"if","locations":[{"start":{"line":339,"column":8},"end":{"line":357,"column":9}},{"start":{"line":339,"column":8},"end":{"line":357,"column":9}}],"line":339},"35":{"loc":{"start":{"line":340,"column":10},"end":{"line":342,"column":11}},"type":"if","locations":[{"start":{"line":340,"column":10},"end":{"line":342,"column":11}},{"start":{"line":340,"column":10},"end":{"line":342,"column":11}}],"line":340},"36":{"loc":{"start":{"line":349,"column":12},"end":{"line":351,"column":13}},"type":"if","locations":[{"start":{"line":349,"column":12},"end":{"line":351,"column":13}},{"start":{"line":349,"column":12},"end":{"line":351,"column":13}}],"line":349},"37":{"loc":{"start":{"line":353,"column":15},"end":{"line":357,"column":9}},"type":"if","locations":[{"start":{"line":353,"column":15},"end":{"line":357,"column":9}},{"start":{"line":353,"column":15},"end":{"line":357,"column":9}}],"line":353},"38":{"loc":{"start":{"line":377,"column":23},"end":{"line":377,"column":108}},"type":"binary-expr","locations":[{"start":{"line":377,"column":23},"end":{"line":377,"column":49}},{"start":{"line":377,"column":54},"end":{"line":377,"column":78}},{"start":{"line":377,"column":82},"end":{"line":377,"column":107}}],"line":377},"39":{"loc":{"start":{"line":382,"column":2},"end":{"line":394,"column":3}},"type":"if","locations":[{"start":{"line":382,"column":2},"end":{"line":394,"column":3}},{"start":{"line":382,"column":2},"end":{"line":394,"column":3}}],"line":382},"40":{"loc":{"start":{"line":384,"column":4},"end":{"line":390,"column":5}},"type":"if","locations":[{"start":{"line":384,"column":4},"end":{"line":390,"column":5}},{"start":{"line":384,"column":4},"end":{"line":390,"column":5}}],"line":384},"41":{"loc":{"start":{"line":414,"column":2},"end":{"line":420,"column":3}},"type":"if","locations":[{"start":{"line":414,"column":2},"end":{"line":420,"column":3}},{"start":{"line":414,"column":2},"end":{"line":420,"column":3}}],"line":414},"42":{"loc":{"start":{"line":414,"column":6},"end":{"line":414,"column":48}},"type":"binary-expr","locations":[{"start":{"line":414,"column":6},"end":{"line":414,"column":25}},{"start":{"line":414,"column":29},"end":{"line":414,"column":48}}],"line":414},"43":{"loc":{"start":{"line":423,"column":2},"end":{"line":447,"column":3}},"type":"switch","locations":[{"start":{"line":424,"column":4},"end":{"line":426,"column":12}},{"start":{"line":427,"column":4},"end":{"line":429,"column":12}},{"start":{"line":430,"column":4},"end":{"line":432,"column":12}},{"start":{"line":433,"column":4},"end":{"line":435,"column":12}},{"start":{"line":436,"column":4},"end":{"line":438,"column":12}},{"start":{"line":439,"column":4},"end":{"line":441,"column":12}},{"start":{"line":442,"column":4},"end":{"line":444,"column":12}},{"start":{"line":445,"column":4},"end":{"line":446,"column":12}}],"line":423}},"s":{"0":1,"1":1,"2":1,"3":1,"4":9,"5":9,"6":9,"7":9,"8":9,"9":9,"10":9,"11":11172561,"12":9,"13":9,"14":9,"15":9,"16":15,"17":15,"18":15,"19":15,"20":15,"21":0,"22":15,"23":15,"24":15,"25":15,"26":15,"27":15,"28":0,"29":15,"30":27,"31":26,"32":1,"33":1,"34":1,"35":0,"36":1,"37":0,"38":1,"39":0,"40":1,"41":0,"42":1,"43":0,"44":1,"45":1,"46":14,"47":14,"48":14,"49":14,"50":14,"51":14,"52":14,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":14,"62":26,"63":26,"64":0,"65":0,"66":0,"67":26,"68":26,"69":26,"70":26,"71":26,"72":14,"73":14,"74":14,"75":8,"76":8,"77":14,"78":14,"79":13,"80":12,"81":1,"82":1,"83":13,"84":13,"85":0,"86":13,"87":13,"88":0,"89":13,"90":13,"91":13,"92":0,"93":0,"94":0,"95":13,"96":13,"97":9,"98":3,"99":3,"100":3,"101":3,"102":3,"103":3,"104":6,"105":0,"106":0,"107":0,"108":6,"109":6,"110":9,"111":18,"112":18,"113":6,"114":5,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":1,"152":0,"153":1,"154":6,"155":6,"156":6,"157":6,"158":6,"159":6,"160":4,"161":4,"162":2,"163":2,"164":2,"165":2,"166":4,"167":4,"168":6,"169":6,"170":6,"171":6,"172":6,"173":0,"174":0,"175":6,"176":6,"177":6,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":6,"193":6,"194":6,"195":6},"f":{"0":9,"1":9,"2":15,"3":15,"4":15,"5":0,"6":15,"7":15,"8":15,"9":0,"10":27,"11":14,"12":26,"13":14,"14":13,"15":13,"16":9,"17":18,"18":6,"19":1,"20":1,"21":1,"22":0,"23":6,"24":6},"b":{"0":[1,1,0,0],"1":[1,1,0,1,1],"2":[1,1,0,1,1],"3":[2],"4":[26,1],"5":[0,1],"6":[0,1],"7":[1,0,0],"8":[0,1],"9":[0,1],"10":[0,1],"11":[1,1],"12":[9,5],"13":[0,0],"14":[0,0],"15":[1],"16":[8,6],"17":[14,13],"18":[12,1],"19":[1,1,0],"20":[7],"21":[0,13],"22":[13,13],"23":[0,13],"24":[0,0],"25":[13,13],"26":[1],"27":[3,6],"28":[0,6],"29":[6,0],"30":[5,1],"31":[1,0],"32":[1,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[6,4,0],"39":[4,2],"40":[2,2],"41":[0,6],"42":[6,0],"43":[0,0,0,0,0,0,0,6]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"592cc74948933f15cc9aa36c65efcad321e522df","contentHash":"ae9cecb0d0372faf1e9a69a8749f7e2fd19d9b62cfa45230056aade386b27ded"} +,"D:\\Projects\\browser-image-compression\\lib\\config\\browser-name.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\config\\browser-name.js","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"375b76f6d557607e167768c53951819e5c9eea35","contentHash":"e7b5a631034b593f1a05c3989a71ea8e392098c65d2942d621372766db80cfb0"} +,"D:\\Projects\\browser-image-compression\\lib\\config\\max-canvas-size.js": {"path":"D:\\Projects\\browser-image-compression\\lib\\config\\max-canvas-size.js","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"0951626fe107b8fcc2e342a45b0b5c806ef949a9","contentHash":"fb7abcbadc028e9b1de06526f2b743bfd9f434798e101603f00145efeb00fbbc"} } diff --git a/coverage/coverage-summary.json b/coverage/coverage-summary.json index d6aec0a..aada204 100644 --- a/coverage/coverage-summary.json +++ b/coverage/coverage-summary.json @@ -1,7 +1,8 @@ -{"total": {"lines":{"total":286,"covered":210,"skipped":0,"pct":73.42},"statements":{"total":294,"covered":213,"skipped":0,"pct":72.44},"functions":{"total":30,"covered":27,"skipped":0,"pct":90},"branches":{"total":153,"covered":86,"skipped":0,"pct":56.2}} +{"total": {"lines":{"total":289,"covered":213,"skipped":0,"pct":73.7},"statements":{"total":297,"covered":216,"skipped":0,"pct":72.72},"functions":{"total":30,"covered":27,"skipped":0,"pct":90},"branches":{"total":160,"covered":93,"skipped":0,"pct":58.12}} ,"D:\\Projects\\browser-image-compression\\lib\\image-compression.js": {"lines":{"total":55,"covered":50,"skipped":0,"pct":90.9},"functions":{"total":3,"covered":3,"skipped":0,"pct":100},"statements":{"total":55,"covered":50,"skipped":0,"pct":90.9},"branches":{"total":29,"covered":22,"skipped":0,"pct":75.86}} ,"D:\\Projects\\browser-image-compression\\lib\\index.js": {"lines":{"total":46,"covered":35,"skipped":0,"pct":76.08},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":46,"covered":35,"skipped":0,"pct":76.08},"branches":{"total":30,"covered":14,"skipped":0,"pct":46.66}} ,"D:\\Projects\\browser-image-compression\\lib\\polyfill.js": {"lines":{"total":0,"covered":0,"skipped":0,"pct":100},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":0,"covered":0,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} -,"D:\\Projects\\browser-image-compression\\lib\\utils.js": {"lines":{"total":185,"covered":125,"skipped":0,"pct":67.56},"functions":{"total":25,"covered":22,"skipped":0,"pct":88},"statements":{"total":193,"covered":128,"skipped":0,"pct":66.32},"branches":{"total":94,"covered":50,"skipped":0,"pct":53.19}} +,"D:\\Projects\\browser-image-compression\\lib\\utils.js": {"lines":{"total":188,"covered":128,"skipped":0,"pct":68.08},"functions":{"total":25,"covered":22,"skipped":0,"pct":88},"statements":{"total":196,"covered":131,"skipped":0,"pct":66.83},"branches":{"total":101,"covered":57,"skipped":0,"pct":56.43}} +,"D:\\Projects\\browser-image-compression\\lib\\config\\browser-name.js": {"lines":{"total":0,"covered":0,"skipped":0,"pct":100},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":0,"covered":0,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} ,"D:\\Projects\\browser-image-compression\\lib\\config\\max-canvas-size.js": {"lines":{"total":0,"covered":0,"skipped":0,"pct":100},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":0,"covered":0,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} } diff --git a/coverage/index.html b/coverage/index.html index b104e2e..983cc37 100644 --- a/coverage/index.html +++ b/coverage/index.html @@ -23,16 +23,16 @@

All files

- 72.44% + 72.72% Statements - 213/294 + 216/297
- 56.2% + 58.12% Branches - 86/153 + 93/160
@@ -44,9 +44,9 @@

All files

- 73.42% + 73.7% Lines - 210/286 + 213/289
@@ -74,17 +74,17 @@

All files

lib - +
- 72.44% - 213/294 - 56.2% - 86/153 + 72.72% + 216/297 + 58.12% + 93/160 90% 27/30 - 73.42% - 210/286 + 73.7% + 213/289 @@ -110,7 +110,7 @@

All files

diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html index b104e2e..983cc37 100644 --- a/coverage/lcov-report/index.html +++ b/coverage/lcov-report/index.html @@ -23,16 +23,16 @@

All files

- 72.44% + 72.72% Statements - 213/294 + 216/297
- 56.2% + 58.12% Branches - 86/153 + 93/160
@@ -44,9 +44,9 @@

All files

- 73.42% + 73.7% Lines - 210/286 + 213/289
@@ -74,17 +74,17 @@

All files

lib - +
- 72.44% - 213/294 - 56.2% - 86/153 + 72.72% + 216/297 + 58.12% + 93/160 90% 27/30 - 73.42% - 210/286 + 73.7% + 213/289 @@ -110,7 +110,7 @@

All files

diff --git a/coverage/lcov.info b/coverage/lcov.info index ce1ee7d..37f4998 100644 --- a/coverage/lcov.info +++ b/coverage/lcov.info @@ -197,31 +197,31 @@ BRH:0 end_of_record TN: SF:lib\utils.js -FN:19,getFilefromDataUrl -FN:20,(anonymous_1) -FN:55,getDataUrlFromFile -FN:56,(anonymous_3) -FN:58,(anonymous_4) -FN:59,(anonymous_5) -FN:70,loadImage -FN:71,(anonymous_7) -FN:73,(anonymous_8) -FN:74,(anonymous_9) -FN:88,getBrowserName -FN:115,approximateBelowMaximumCanvasSizeOfBrowser -FN:149,getNewCanvasAndCtx -FN:176,drawImageInCanvas -FN:192,isIOS -FN:215,drawFileInCanvas -FN:250,canvasToFile -FN:278,cleanupCanvasMemory -FN:289,isAutoOrientationInBrowser -FN:320,getExifOrientation -FN:321,(anonymous_20) -FN:323,(anonymous_21) -FN:356,(anonymous_22) -FN:367,handleMaxWidthOrHeight -FN:402,followExifOrientation +FN:20,getFilefromDataUrl +FN:21,(anonymous_1) +FN:56,getDataUrlFromFile +FN:57,(anonymous_3) +FN:59,(anonymous_4) +FN:60,(anonymous_5) +FN:71,loadImage +FN:72,(anonymous_7) +FN:74,(anonymous_8) +FN:75,(anonymous_9) +FN:89,getBrowserName +FN:120,approximateBelowMaximumCanvasSizeOfBrowser +FN:154,getNewCanvasAndCtx +FN:181,drawImageInCanvas +FN:197,isIOS +FN:220,drawFileInCanvas +FN:255,canvasToFile +FN:283,cleanupCanvasMemory +FN:294,isAutoOrientationInBrowser +FN:325,getExifOrientation +FN:326,(anonymous_20) +FN:328,(anonymous_21) +FN:361,(anonymous_22) +FN:372,handleMaxWidthOrHeight +FN:407,followExifOrientation FNF:25 FNH:22 FNDA:9,getFilefromDataUrl @@ -234,7 +234,7 @@ FNDA:15,loadImage FNDA:15,(anonymous_7) FNDA:15,(anonymous_8) FNDA:0,(anonymous_9) -FNDA:14,getBrowserName +FNDA:27,getBrowserName FNDA:14,approximateBelowMaximumCanvasSizeOfBrowser FNDA:26,getNewCanvasAndCtx FNDA:14,drawImageInCanvas @@ -249,289 +249,308 @@ FNDA:1,(anonymous_21) FNDA:0,(anonymous_22) FNDA:6,handleMaxWidthOrHeight FNDA:6,followExifOrientation -DA:4,1 -DA:7,1 +DA:5,1 DA:8,1 DA:9,1 -DA:20,9 +DA:10,1 DA:21,9 DA:22,9 DA:23,9 DA:24,9 DA:25,9 DA:26,9 -DA:27,11172561 -DA:29,9 +DA:27,9 +DA:28,11172561 DA:30,9 DA:31,9 DA:32,9 -DA:56,15 +DA:33,9 DA:57,15 DA:58,15 DA:59,15 DA:60,15 -DA:71,15 +DA:61,15 DA:72,15 DA:73,15 DA:74,15 DA:75,15 -DA:89,14 -DA:90,14 -DA:91,14 -DA:92,0 -DA:93,14 -DA:95,0 -DA:96,14 -DA:97,0 -DA:98,14 +DA:76,15 +DA:90,27 +DA:91,26 +DA:93,1 +DA:94,1 +DA:95,1 +DA:96,0 +DA:97,1 DA:99,0 -DA:100,14 +DA:100,1 DA:101,0 -DA:103,14 -DA:116,14 -DA:117,14 -DA:119,14 -DA:120,14 +DA:102,1 +DA:103,0 +DA:104,1 +DA:105,0 +DA:107,1 +DA:108,1 DA:121,14 DA:122,14 DA:124,14 -DA:125,0 -DA:126,0 -DA:127,0 -DA:128,0 -DA:129,0 +DA:125,14 +DA:126,14 +DA:127,14 +DA:129,14 +DA:130,0 DA:131,0 DA:132,0 -DA:135,0 -DA:138,14 -DA:152,26 -DA:153,26 -DA:154,0 -DA:155,0 -DA:156,0 -DA:159,26 -DA:160,26 -DA:162,26 -DA:163,26 -DA:166,26 -DA:177,14 -DA:178,14 -DA:179,14 -DA:180,8 -DA:181,8 +DA:133,0 +DA:134,0 +DA:136,0 +DA:137,0 +DA:140,0 +DA:143,14 +DA:157,26 +DA:158,26 +DA:159,0 +DA:160,0 +DA:161,0 +DA:164,26 +DA:165,26 +DA:167,26 +DA:168,26 +DA:171,26 +DA:182,14 DA:183,14 DA:184,14 -DA:193,13 -DA:194,12 -DA:196,1 -DA:206,1 -DA:217,13 -DA:218,13 -DA:219,0 -DA:221,13 +DA:185,8 +DA:186,8 +DA:188,14 +DA:189,14 +DA:198,13 +DA:199,12 +DA:201,1 +DA:211,1 +DA:222,13 DA:223,13 DA:224,0 DA:226,13 -DA:227,13 DA:228,13 -DA:230,0 -DA:231,0 -DA:233,0 -DA:236,13 -DA:237,13 -DA:252,9 -DA:253,3 -DA:254,3 -DA:255,3 -DA:256,3 -DA:257,3 +DA:229,0 +DA:231,13 +DA:232,13 +DA:233,13 +DA:235,0 +DA:236,0 +DA:238,0 +DA:241,13 +DA:242,13 +DA:257,9 DA:258,3 -DA:259,6 -DA:260,0 -DA:261,0 -DA:262,0 -DA:267,6 -DA:268,6 -DA:270,9 -DA:282,18 -DA:284,18 -DA:290,6 -DA:294,1 -DA:300,1 -DA:302,1 -DA:303,1 -DA:304,1 +DA:259,3 +DA:260,3 +DA:261,3 +DA:262,3 +DA:263,3 +DA:264,6 +DA:265,0 +DA:266,0 +DA:267,0 +DA:272,6 +DA:273,6 +DA:275,9 +DA:287,18 +DA:289,18 +DA:295,6 +DA:299,1 DA:305,1 +DA:307,1 DA:308,1 DA:309,1 -DA:321,1 -DA:322,1 -DA:323,1 -DA:324,1 -DA:325,1 +DA:310,1 +DA:313,1 +DA:314,1 DA:326,1 -DA:328,0 -DA:329,0 -DA:330,0 -DA:331,0 -DA:332,0 +DA:327,1 +DA:328,1 +DA:329,1 +DA:330,1 +DA:331,1 DA:333,0 DA:334,0 DA:335,0 DA:336,0 +DA:337,0 +DA:338,0 DA:339,0 DA:340,0 DA:341,0 -DA:342,0 -DA:343,0 DA:344,0 DA:345,0 +DA:346,0 +DA:347,0 DA:348,0 DA:349,0 -DA:351,0 +DA:350,0 +DA:353,0 DA:354,0 -DA:356,1 -DA:357,1 -DA:368,6 -DA:369,6 -DA:370,6 -DA:372,6 +DA:356,0 +DA:359,0 +DA:361,1 +DA:362,1 +DA:373,6 DA:374,6 +DA:375,6 DA:377,6 -DA:378,4 -DA:379,4 -DA:380,2 -DA:381,2 -DA:383,2 -DA:384,2 -DA:386,4 -DA:388,4 -DA:391,6 -DA:403,6 -DA:404,6 -DA:406,6 +DA:379,6 +DA:382,6 +DA:383,4 +DA:384,4 +DA:385,2 +DA:386,2 +DA:388,2 +DA:389,2 +DA:391,4 +DA:393,4 +DA:396,6 +DA:408,6 DA:409,6 -DA:410,0 -DA:411,0 -DA:413,6 +DA:411,6 DA:414,6 +DA:415,0 +DA:416,0 DA:418,6 -DA:420,0 -DA:421,0 -DA:423,0 -DA:424,0 +DA:419,6 +DA:423,6 +DA:425,0 DA:426,0 -DA:427,0 +DA:428,0 DA:429,0 -DA:430,0 +DA:431,0 DA:432,0 -DA:433,0 +DA:434,0 DA:435,0 -DA:436,0 +DA:437,0 DA:438,0 -DA:439,0 -DA:441,6 -DA:444,6 +DA:440,0 +DA:441,0 +DA:443,0 +DA:444,0 DA:446,6 -DA:448,6 -LF:185 -LH:125 -BRDA:7,0,0,1 -BRDA:7,0,1,1 -BRDA:7,0,2,0 -BRDA:7,0,3,0 -BRDA:8,1,0,1 -BRDA:8,1,1,1 -BRDA:8,1,2,0 -BRDA:8,1,3,1 -BRDA:8,1,4,1 -BRDA:9,2,0,1 -BRDA:9,2,1,1 -BRDA:9,2,2,0 -BRDA:9,2,3,1 -BRDA:9,2,4,1 -BRDA:19,3,0,2 -BRDA:91,4,0,0 -BRDA:91,4,1,14 -BRDA:93,5,0,0 -BRDA:93,5,1,14 -BRDA:93,6,0,14 -BRDA:93,6,1,0 -BRDA:93,6,2,0 -BRDA:96,7,0,0 -BRDA:96,7,1,14 -BRDA:98,8,0,0 -BRDA:98,8,1,14 -BRDA:100,9,0,0 -BRDA:100,9,1,14 -BRDA:100,10,0,14 -BRDA:100,10,1,14 -BRDA:122,11,0,9 -BRDA:122,11,1,5 -BRDA:127,12,0,0 -BRDA:127,12,1,0 -BRDA:155,13,0,0 -BRDA:155,13,1,0 -BRDA:176,14,0,1 -BRDA:179,15,0,8 -BRDA:179,15,1,6 -BRDA:179,16,0,14 -BRDA:179,16,1,13 -BRDA:193,17,0,12 -BRDA:193,17,1,1 -BRDA:196,18,0,1 -BRDA:196,18,1,1 -BRDA:196,18,2,0 -BRDA:218,19,0,0 -BRDA:218,19,1,13 -BRDA:223,20,0,0 -BRDA:223,20,1,13 -BRDA:230,21,0,0 -BRDA:230,21,1,0 -BRDA:250,22,0,1 -BRDA:252,23,0,3 -BRDA:252,23,1,6 -BRDA:259,24,0,0 -BRDA:259,24,1,6 -BRDA:259,25,0,6 -BRDA:259,25,1,0 -BRDA:290,26,0,5 -BRDA:290,26,1,1 -BRDA:308,27,0,1 -BRDA:308,27,1,0 -BRDA:325,28,0,1 -BRDA:325,28,1,0 -BRDA:331,29,0,0 -BRDA:331,29,1,0 -BRDA:334,30,0,0 -BRDA:334,30,1,0 -BRDA:335,31,0,0 -BRDA:335,31,1,0 -BRDA:344,32,0,0 -BRDA:344,32,1,0 -BRDA:348,33,0,0 -BRDA:348,33,1,0 -BRDA:372,34,0,6 -BRDA:372,34,1,4 -BRDA:372,34,2,0 -BRDA:377,35,0,4 -BRDA:377,35,1,2 -BRDA:379,36,0,2 -BRDA:379,36,1,2 -BRDA:409,37,0,0 -BRDA:409,37,1,6 -BRDA:409,38,0,6 -BRDA:409,38,1,0 -BRDA:418,39,0,0 -BRDA:418,39,1,0 -BRDA:418,39,2,0 -BRDA:418,39,3,0 -BRDA:418,39,4,0 -BRDA:418,39,5,0 -BRDA:418,39,6,0 -BRDA:418,39,7,6 -BRF:94 -BRH:50 +DA:449,6 +DA:451,6 +DA:453,6 +LF:188 +LH:128 +BRDA:8,0,0,1 +BRDA:8,0,1,1 +BRDA:8,0,2,0 +BRDA:8,0,3,0 +BRDA:9,1,0,1 +BRDA:9,1,1,1 +BRDA:9,1,2,0 +BRDA:9,1,3,1 +BRDA:9,1,4,1 +BRDA:10,2,0,1 +BRDA:10,2,1,1 +BRDA:10,2,2,0 +BRDA:10,2,3,1 +BRDA:10,2,4,1 +BRDA:20,3,0,2 +BRDA:90,4,0,26 +BRDA:90,4,1,1 +BRDA:95,5,0,0 +BRDA:95,5,1,1 +BRDA:97,6,0,0 +BRDA:97,6,1,1 +BRDA:97,7,0,1 +BRDA:97,7,1,0 +BRDA:97,7,2,0 +BRDA:100,8,0,0 +BRDA:100,8,1,1 +BRDA:102,9,0,0 +BRDA:102,9,1,1 +BRDA:104,10,0,0 +BRDA:104,10,1,1 +BRDA:104,11,0,1 +BRDA:104,11,1,1 +BRDA:127,12,0,9 +BRDA:127,12,1,5 +BRDA:132,13,0,0 +BRDA:132,13,1,0 +BRDA:160,14,0,0 +BRDA:160,14,1,0 +BRDA:181,15,0,1 +BRDA:184,16,0,8 +BRDA:184,16,1,6 +BRDA:184,17,0,14 +BRDA:184,17,1,13 +BRDA:198,18,0,12 +BRDA:198,18,1,1 +BRDA:201,19,0,1 +BRDA:201,19,1,1 +BRDA:201,19,2,0 +BRDA:220,20,0,7 +BRDA:223,21,0,0 +BRDA:223,21,1,13 +BRDA:223,22,0,13 +BRDA:223,22,1,13 +BRDA:228,23,0,0 +BRDA:228,23,1,13 +BRDA:235,24,0,0 +BRDA:235,24,1,0 +BRDA:241,25,0,13 +BRDA:241,25,1,13 +BRDA:255,26,0,1 +BRDA:257,27,0,3 +BRDA:257,27,1,6 +BRDA:264,28,0,0 +BRDA:264,28,1,6 +BRDA:264,29,0,6 +BRDA:264,29,1,0 +BRDA:295,30,0,5 +BRDA:295,30,1,1 +BRDA:313,31,0,1 +BRDA:313,31,1,0 +BRDA:330,32,0,1 +BRDA:330,32,1,0 +BRDA:336,33,0,0 +BRDA:336,33,1,0 +BRDA:339,34,0,0 +BRDA:339,34,1,0 +BRDA:340,35,0,0 +BRDA:340,35,1,0 +BRDA:349,36,0,0 +BRDA:349,36,1,0 +BRDA:353,37,0,0 +BRDA:353,37,1,0 +BRDA:377,38,0,6 +BRDA:377,38,1,4 +BRDA:377,38,2,0 +BRDA:382,39,0,4 +BRDA:382,39,1,2 +BRDA:384,40,0,2 +BRDA:384,40,1,2 +BRDA:414,41,0,0 +BRDA:414,41,1,6 +BRDA:414,42,0,6 +BRDA:414,42,1,0 +BRDA:423,43,0,0 +BRDA:423,43,1,0 +BRDA:423,43,2,0 +BRDA:423,43,3,0 +BRDA:423,43,4,0 +BRDA:423,43,5,0 +BRDA:423,43,6,0 +BRDA:423,43,7,6 +BRF:101 +BRH:57 +end_of_record +TN: +SF:lib\config\browser-name.js +FNF:0 +FNH:0 +LF:0 +LH:0 +BRF:0 +BRH:0 end_of_record TN: SF:lib\config\max-canvas-size.js diff --git a/dist/browser-image-compression.d.ts b/dist/browser-image-compression.d.ts index 1446cdc..82dd799 100644 --- a/dist/browser-image-compression.d.ts +++ b/dist/browser-image-compression.d.ts @@ -29,7 +29,7 @@ declare namespace imageCompression { function getFilefromDataUrl(dataUrl: string, filename: string, lastModified?: number): Promise; function loadImage(src: string): Promise; function drawImageInCanvas(img: HTMLImageElement, fileType?: string): HTMLCanvasElement; - function drawFileInCanvas(file: File): Promise<[ImageBitmap | HTMLImageElement, HTMLCanvasElement]>; + function drawFileInCanvas(file: File, options?: Options): Promise<[ImageBitmap | HTMLImageElement, HTMLCanvasElement]>; function canvasToFile(canvas: HTMLCanvasElement, fileType: string, fileName: string, fileLastModified: number, quality?: number): Promise; function getExifOrientation(file: File): Promise; } diff --git a/dist/browser-image-compression.js b/dist/browser-image-compression.js index a20cf00..1200638 100644 --- a/dist/browser-image-compression.js +++ b/dist/browser-image-compression.js @@ -1,9 +1,9 @@ /** * Browser Image Compression - * v1.0.16 + * v1.0.17 * by Donald * https://github.com/Donaldcwl/browser-image-compression */ -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).imageCompression=r()}(this,(function(){"use strict";function _mergeNamespaces(e,r){return r.forEach((function(r){Object.keys(r).forEach((function(t){if("default"!==t&&!(t in e)){var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:function(){return r[t]}})}}))})),Object.freeze(e)}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function _objectSpread2(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,a=new Array(r);t=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=match[1])));var engineV8Version=version&&+version,fails=function(e){try{return!!e()}catch(e){return!0}},nativeSymbol=!!Object.getOwnPropertySymbols&&!fails((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,WellKnownSymbolsStore=shared("wks"),Symbol$1=global$1.Symbol,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(e){return has$1(WellKnownSymbolsStore,e)&&(nativeSymbol||"string"==typeof WellKnownSymbolsStore[e])||(nativeSymbol&&has$1(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},TO_STRING_TAG$4=wellKnownSymbol("toStringTag"),test$1={};test$1[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$1),descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),isObject=function(e){return"object"==typeof e?null!==e:isCallable(e)},document$3=global$1.document,EXISTS$1=isObject(document$3)&&isObject(document$3.createElement),documentCreateElement=function(e){return EXISTS$1?document$3.createElement(e):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(e){if(isObject(e))return e;throw TypeError(String(e)+" is not an object")},isSymbol=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var r=getBuiltIn("Symbol");return isCallable(r)&&Object(e)instanceof r},tryToString=function(e){try{return String(e)}catch(e){return"Object"}},aCallable=function(e){if(isCallable(e))return e;throw TypeError(tryToString(e)+" is not a function")},getMethod=function(e,r){var t=e[r];return null==t?void 0:aCallable(t)},ordinaryToPrimitive=function(e,r){var t,a;if("string"===r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;if(isCallable(t=e.valueOf)&&!isObject(a=t.call(e)))return a;if("string"!==r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;throw TypeError("Can't convert object to primitive value")},TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),toPrimitive=function(e,r){if(!isObject(e)||isSymbol(e))return e;var t,a=getMethod(e,TO_PRIMITIVE);if(a){if(void 0===r&&(r="default"),t=a.call(e,r),!isObject(t)||isSymbol(t))return t;throw TypeError("Can't convert object to primitive value")}return void 0===r&&(r="number"),ordinaryToPrimitive(e,r)},toPropertyKey=function(e){var r=toPrimitive(e,"string");return isSymbol(r)?r:String(r)},$defineProperty=Object.defineProperty,f$5=descriptors?$defineProperty:function defineProperty(e,r,t){if(anObject(e),r=toPropertyKey(r),anObject(t),ie8DomDefine)try{return $defineProperty(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported");return"value"in t&&(e[r]=t.value),e},objectDefineProperty={f:f$5},createPropertyDescriptor=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}},createNonEnumerableProperty=descriptors?function(e,r,t){return objectDefineProperty.f(e,r,createPropertyDescriptor(1,t))}:function(e,r,t){return e[r]=t,e},functionToString=Function.toString;isCallable(sharedStore.inspectSource)||(sharedStore.inspectSource=function(e){return functionToString.call(e)});var inspectSource=sharedStore.inspectSource,WeakMap$1=global$1.WeakMap,nativeWeakMap=isCallable(WeakMap$1)&&/native code/.test(inspectSource(WeakMap$1)),keys$2=shared("keys"),sharedKey=function(e){return keys$2[e]||(keys$2[e]=uid(e))},hiddenKeys$1={},OBJECT_ALREADY_INITIALIZED="Object already initialized",WeakMap=global$1.WeakMap,set$2,get$1,has,enforce=function(e){return has(e)?get$1(e):set$2(e,{})},getterFor=function(e){return function(r){var t;if(!isObject(r)||(t=get$1(r)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}};if(nativeWeakMap||sharedStore.state){var store=sharedStore.state||(sharedStore.state=new WeakMap),wmget=store.get,wmhas=store.has,wmset=store.set;set$2=function(e,r){if(wmhas.call(store,e))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,wmset.call(store,e,r),r},get$1=function(e){return wmget.call(store,e)||{}},has=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys$1[STATE]=!0,set$2=function(e,r){if(has$1(e,STATE))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,createNonEnumerableProperty(e,STATE,r),r},get$1=function(e){return has$1(e,STATE)?e[STATE]:{}},has=function(e){return has$1(e,STATE)}}var internalState={set:set$2,get:get$1,has:has,enforce:enforce,getterFor:getterFor},FunctionPrototype$1=Function.prototype,getDescriptor=descriptors&&Object.getOwnPropertyDescriptor,EXISTS=has$1(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function something(){}.name,CONFIGURABLE=EXISTS&&(!descriptors||descriptors&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},redefine=createCommonjsModule((function(e){var r=functionName.CONFIGURABLE,t=internalState.get,a=internalState.enforce,i=String(String).split("String");(e.exports=function(e,t,s,c){var l,u=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet,h=c&&void 0!==c.name?c.name:t;isCallable(s)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!has$1(s,"name")||r&&s.name!==h)&&createNonEnumerableProperty(s,"name",h),(l=a(s)).source||(l.source=i.join("string"==typeof h?h:""))),e!==global$1?(u?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=s:createNonEnumerableProperty(e,t,s)):p?e[t]=s:setGlobal(t,s)})(Function.prototype,"toString",(function toString(){return isCallable(this)&&t(this).source||inspectSource(this)}))})),toString$1={}.toString,classofRaw=function(e){return toString$1.call(e).slice(8,-1)},TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,r){try{return e[r]}catch(e){}},classof=toStringTagSupport?classofRaw:function(e){var r,t,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(r=Object(e),TO_STRING_TAG$3))?t:CORRECT_ARGUMENTS?classofRaw(r):"Object"==(a=classofRaw(r))&&isCallable(r.callee)?"Arguments":a},objectToString=toStringTagSupport?{}.toString:function toString(){return"[object "+classof(this)+"]"};toStringTagSupport||redefine(Object.prototype,"toString",objectToString,{unsafe:!0});var $propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$4&&!$propertyIsEnumerable.call({1:2},1),f$4=NASHORN_BUG?function propertyIsEnumerable(e){var r=getOwnPropertyDescriptor$4(this,e);return!!r&&r.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable={f:f$4},split="".split,indexedObject=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$3=descriptors?$getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,r){if(e=toIndexedObject(e),r=toPropertyKey(r),ie8DomDefine)try{return $getOwnPropertyDescriptor(e,r)}catch(e){}if(has$1(e,r))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,r),e[r])},objectGetOwnPropertyDescriptor={f:f$3},ceil=Math.ceil,floor$7=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor$7:ceil)(e)},min$6=Math.min,toLength=function(e){return e>0?min$6(toInteger(e),9007199254740991):0},max$2=Math.max,min$5=Math.min,toAbsoluteIndex=function(e,r){var t=toInteger(e);return t<0?max$2(t+r,0):min$5(t,r)},createMethod$5=function(e){return function(r,t,a){var i,s=toIndexedObject(r),c=toLength(s.length),l=toAbsoluteIndex(a,c);if(e&&t!=t){for(;c>l;)if((i=s[l++])!=i)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===t)return e||l||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(e,r){var t,a=toIndexedObject(e),i=0,s=[];for(t in a)!has$1(hiddenKeys$1,t)&&has$1(a,t)&&s.push(t);for(;r.length>i;)has$1(a,t=r[i++])&&(~indexOf(s,t)||s.push(t));return s},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys=enumBugKeys.concat("length","prototype"),f$2=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return objectKeysInternal(e,hiddenKeys)},objectGetOwnPropertyNames={f:f$2},f$1=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$1},ownKeys=getBuiltIn("Reflect","ownKeys")||function ownKeys(e){var r=objectGetOwnPropertyNames.f(anObject(e)),t=objectGetOwnPropertySymbols.f;return t?r.concat(t(e)):r},copyConstructorProperties=function(e,r){for(var t=ownKeys(r),a=objectDefineProperty.f,i=objectGetOwnPropertyDescriptor.f,s=0;ss;s++)if((l=callFn(e[s]))&&l instanceof Result)return l;return new Result(!1)}a=getIterator(e,i)}for(u=a.next;!(p=u.call(a)).done;){try{l=callFn(p.value)}catch(e){iteratorClose(a,"throw",e)}if("object"==typeof l&&l&&l instanceof Result)return l}return new Result(!1)},ITERATOR$6=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$6]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration=function(e,r){if(!r&&!SAFE_CLOSING)return!1;var t=!1;try{var a={};a[ITERATOR$6]=function(){return{next:function(){return{done:t=!0}}}},e(a)}catch(e){}return t},empty=[],construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=constructorRegExp.exec,INCORRECT_TO_STRING=!constructorRegExp.exec((function(){})),isConstructorModern=function(e){if(!isCallable(e))return!1;try{return construct(Object,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable(e))return!1;switch(classof(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return INCORRECT_TO_STRING||!!exec.call(constructorRegExp,inspectSource(e))},isConstructor=!construct||fails((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,aConstructor=function(e){if(isConstructor(e))return e;throw TypeError(tryToString(e)+" is not a constructor")},SPECIES$5=wellKnownSymbol("species"),speciesConstructor=function(e,r){var t,a=anObject(e).constructor;return void 0===a||null==(t=anObject(a)[SPECIES$5])?r:aConstructor(t)},html=getBuiltIn("document","documentElement"),engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent),engineIsNode="process"==classofRaw(global$1.process),set$1=global$1.setImmediate,clear=global$1.clearImmediate,process$2=global$1.process,MessageChannel=global$1.MessageChannel,Dispatch=global$1.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",location,defer,channel,port;try{location=global$1.location}catch(e){}var run=function(e){if(queue.hasOwnProperty(e)){var r=queue[e];delete queue[e],r()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$1.postMessage(String(e),location.protocol+"//"+location.host)};set$1&&clear||(set$1=function setImmediate(e){for(var r=[],t=arguments.length,a=1;t>a;)r.push(arguments[a++]);return queue[++counter]=function(){(isCallable(e)?e:Function(e)).apply(void 0,r)},defer(counter),counter},clear=function clearImmediate(e){delete queue[e]},engineIsNode?defer=function(e){process$2.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!engineIsIos?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=functionBindContext(port.postMessage,port,1)):global$1.addEventListener&&isCallable(global$1.postMessage)&&!global$1.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global$1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(e){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$1,clear:clear},engineIsIosPebble=/ipad|iphone|ipod/i.test(engineUserAgent)&&void 0!==global$1.Pebble,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(engineUserAgent),getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,MutationObserver=global$1.MutationObserver||global$1.WebKitMutationObserver,document$2=global$1.document,process$1=global$1.process,Promise$1=global$1.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,flush,head,last,notify$1,toggle,node,promise,then;queueMicrotask||(flush=function(){var e,r;for(engineIsNode&&(e=process$1.domain)&&e.exit();head;){r=head.fn,head=head.next;try{r()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},engineIsIos||engineIsNode||engineIsWebosWebkit||!MutationObserver||!document$2?!engineIsIosPebble&&Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),promise.constructor=Promise$1,then=promise.then,notify$1=function(){then.call(promise,flush)}):notify$1=engineIsNode?function(){process$1.nextTick(flush)}:function(){macrotask.call(global$1,flush)}:(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}));var microtask=queueMicrotask||function(e){var r={fn:e,next:void 0};last&&(last.next=r),head||(head=r,notify$1()),last=r},PromiseCapability=function(e){var r,t;this.promise=new e((function(e,a){if(void 0!==r||void 0!==t)throw TypeError("Bad Promise constructor");r=e,t=a})),this.resolve=aCallable(r),this.reject=aCallable(t)},f=function(e){return new PromiseCapability(e)},newPromiseCapability$1={f:f},promiseResolve=function(e,r){if(anObject(e),isObject(r)&&r.constructor===e)return r;var t=newPromiseCapability$1.f(e);return(0,t.resolve)(r),t.promise},hostReportErrors=function(e,r){var t=global$1.console;t&&t.error&&(1===arguments.length?t.error(e):t.error(e,r))},perform=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},engineIsBrowser="object"==typeof window,task=task$1.set,SPECIES$4=wellKnownSymbol("species"),PROMISE="Promise",getInternalState$4=internalState.get,setInternalState$5=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),NativePromisePrototype=nativePromiseConstructor&&nativePromiseConstructor.prototype,PromiseConstructor=nativePromiseConstructor,PromiseConstructorPrototype=NativePromisePrototype,TypeError$1=global$1.TypeError,document$1=global$1.document,process=global$1.process,newPromiseCapability=newPromiseCapability$1.f,newGenericPromiseCapability=newPromiseCapability,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),NATIVE_REJECTION_EVENT=isCallable(global$1.PromiseRejectionEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,SUBCLASSING=!1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,FORCED$6=isForced_1(PROMISE,(function(){var e=inspectSource(PromiseConstructor),r=e!==String(PromiseConstructor);if(!r&&66===engineV8Version)return!0;if(engineV8Version>=51&&/native code/.test(e))return!1;var t=new PromiseConstructor((function(e){e(1)})),FakePromise=function(e){e((function(){}),(function(){}))};return(t.constructor={})[SPECIES$4]=FakePromise,!(SUBCLASSING=t.then((function(){}))instanceof FakePromise)||!r&&engineIsBrowser&&!NATIVE_REJECTION_EVENT})),INCORRECT_ITERATION=FORCED$6||!checkCorrectnessOfIteration((function(e){PromiseConstructor.all(e).catch((function(){}))})),isThenable=function(e){var r;return!(!isObject(e)||!isCallable(r=e.then))&&r},notify=function(e,r){if(!e.notified){e.notified=!0;var t=e.reactions;microtask((function(){for(var a=e.value,i=e.state==FULFILLED,s=0;t.length>s;){var c,l,u,p=t[s++],d=i?p.ok:p.fail,h=p.resolve,y=p.reject,A=p.domain;try{d?(i||(e.rejection===UNHANDLED&&onHandleUnhandled(e),e.rejection=HANDLED),!0===d?c=a:(A&&A.enter(),c=d(a),A&&(A.exit(),u=!0)),c===p.promise?y(TypeError$1("Promise-chain cycle")):(l=isThenable(c))?l.call(c,h,y):h(c)):y(a)}catch(e){A&&!u&&A.exit(),y(e)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(e)}))}},dispatchEvent=function(e,r,t){var a,i;DISPATCH_EVENT?((a=document$1.createEvent("Event")).promise=r,a.reason=t,a.initEvent(e,!1,!0),global$1.dispatchEvent(a)):a={promise:r,reason:t},!NATIVE_REJECTION_EVENT&&(i=global$1["on"+e])?i(a):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",t)},onUnhandled=function(e){task.call(global$1,(function(){var r,t=e.facade,a=e.value;if(isUnhandled(e)&&(r=perform((function(){engineIsNode?process.emit("unhandledRejection",a,t):dispatchEvent(UNHANDLED_REJECTION,t,a)})),e.rejection=engineIsNode||isUnhandled(e)?UNHANDLED:HANDLED,r.error))throw r.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){task.call(global$1,(function(){var r=e.facade;engineIsNode?process.emit("rejectionHandled",r):dispatchEvent(REJECTION_HANDLED,r,e.value)}))},bind=function(e,r,t){return function(a){e(r,a,t)}},internalReject=function(e,r,t){e.done||(e.done=!0,t&&(e=t),e.value=r,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,r,t){if(!e.done){e.done=!0,t&&(e=t);try{if(e.facade===r)throw TypeError$1("Promise can't be resolved itself");var a=isThenable(r);a?microtask((function(){var t={done:!1};try{a.call(r,bind(internalResolve,t,e),bind(internalReject,t,e))}catch(r){internalReject(t,r,e)}})):(e.value=r,e.state=FULFILLED,notify(e,!1))}catch(r){internalReject({done:!1},r,e)}}};if(FORCED$6&&(PromiseConstructor=function Promise(e){anInstance(this,PromiseConstructor,PROMISE),aCallable(e),Internal.call(this);var r=getInternalState$4(this);try{e(bind(internalResolve,r),bind(internalReject,r))}catch(e){internalReject(r,e)}},PromiseConstructorPrototype=PromiseConstructor.prototype,Internal=function Promise(e){setInternalState$5(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})},Internal.prototype=redefineAll(PromiseConstructorPrototype,{then:function then(e,r){var t=getInternalPromiseState(this),a=newPromiseCapability(speciesConstructor(this,PromiseConstructor));return a.ok=!isCallable(e)||e,a.fail=isCallable(r)&&r,a.domain=engineIsNode?process.domain:void 0,t.parent=!0,t.reactions.push(a),t.state!=PENDING&¬ify(t,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal,r=getInternalState$4(e);this.promise=e,this.resolve=bind(internalResolve,r),this.reject=bind(internalReject,r)},newPromiseCapability$1.f=newPromiseCapability=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable(nativePromiseConstructor)&&NativePromisePrototype!==Object.prototype)){nativeThen=NativePromisePrototype.then,SUBCLASSING||(redefine(NativePromisePrototype,"then",(function then(e,r){var t=this;return new PromiseConstructor((function(e,r){nativeThen.call(t,e,r)})).then(e,r)}),{unsafe:!0}),redefine(NativePromisePrototype,"catch",PromiseConstructorPrototype.catch,{unsafe:!0}));try{delete NativePromisePrototype.constructor}catch(e){}objectSetPrototypeOf&&objectSetPrototypeOf(NativePromisePrototype,PromiseConstructorPrototype)}_export({global:!0,wrap:!0,forced:FORCED$6},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE),PromiseWrapper=getBuiltIn(PROMISE),_export({target:PROMISE,stat:!0,forced:FORCED$6},{reject:function reject(e){var r=newPromiseCapability(this);return r.reject.call(void 0,e),r.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED$6},{resolve:function resolve(e){return promiseResolve(this,e)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function all(e){var r=this,t=newPromiseCapability(r),a=t.resolve,i=t.reject,s=perform((function(){var t=aCallable(r.resolve),s=[],c=0,l=1;iterate(e,(function(e){var u=c++,p=!1;s.push(void 0),l++,t.call(r,e).then((function(e){p||(p=!0,s[u]=e,--l||a(s))}),i)})),--l||a(s)}));return s.error&&i(s.value),t.promise},race:function race(e){var r=this,t=newPromiseCapability(r),a=t.reject,i=perform((function(){var i=aCallable(r.resolve);iterate(e,(function(e){i.call(r,e).then(t.resolve,a)}))}));return i.error&&a(i.value),t.promise}});var inheritIfRequired=function(e,r,t){var a,i;return objectSetPrototypeOf&&isCallable(a=r.constructor)&&a!==t&&isObject(i=a.prototype)&&i!==t.prototype&&objectSetPrototypeOf(e,i),e},objectKeys=Object.keys||function keys(e){return objectKeysInternal(e,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function defineProperties(e,r){anObject(e);for(var t,a=objectKeys(r),i=a.length,s=0;i>s;)objectDefineProperty.f(e,t=a[s++],r[t]);return e},GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var r=e.parentWindow.Object;return e=null,r},NullProtoObjectViaIFrame=function(){var e,r=documentCreateElement("iframe"),t="java"+SCRIPT+":";return r.style.display="none",html.appendChild(r),r.src=String(t),(e=r.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys[e]];return NullProtoObject()};hiddenKeys$1[IE_PROTO$1]=!0;var objectCreate=Object.create||function create(e,r){var t;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject(e),t=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,t[IE_PROTO$1]=e):t=NullProtoObject(),void 0===r?t:objectDefineProperties(t,r)},toString=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},whitespaces="\t\n\v\f\r                 \u2028\u2029\ufeff",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$4=function(e){return function(r){var t=toString(requireObjectCoercible(r));return 1&e&&(t=t.replace(ltrim,"")),2&e&&(t=t.replace(rtrim,"")),t}},stringTrim={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},getOwnPropertyNames$1=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,defineProperty$4=objectDefineProperty.f,trim=stringTrim.trim,NUMBER="Number",NativeNumber=global$1[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classofRaw(objectCreate(NumberPrototype))==NUMBER,toNumber=function(e){if(isSymbol(e))throw TypeError("Cannot convert a Symbol value to a number");var r,t,a,i,s,c,l,u,p=toPrimitive(e,"number");if("string"==typeof p&&p.length>2)if(43===(r=(p=trim(p)).charCodeAt(0))||45===r){if(88===(t=p.charCodeAt(2))||120===t)return NaN}else if(48===r){switch(p.charCodeAt(1)){case 66:case 98:a=2,i=49;break;case 79:case 111:a=8,i=55;break;default:return+p}for(c=(s=p.slice(2)).length,l=0;li)return NaN;return parseInt(s,a)}return+p};if(isForced_1(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var NumberWrapper=function Number(e){var r=arguments.length<1?0:e,t=this;return t instanceof NumberWrapper&&(BROKEN_CLASSOF?fails((function(){NumberPrototype.valueOf.call(t)})):classofRaw(t)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(r)),t,NumberWrapper):toNumber(r)},keys$1=descriptors?getOwnPropertyNames$1(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),j$1=0,key$1;keys$1.length>j$1;j$1++)has$1(NativeNumber,key$1=keys$1[j$1])&&!has$1(NumberWrapper,key$1)&&defineProperty$4(NumberWrapper,key$1,getOwnPropertyDescriptor$1(NativeNumber,key$1));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global$1,NUMBER,NumberWrapper)}var FUNCTION_NAME_EXISTS=functionName.EXISTS,defineProperty$3=objectDefineProperty.f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME$1="name";descriptors&&!FUNCTION_NAME_EXISTS&&defineProperty$3(FunctionPrototype,NAME$1,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(e){return""}}}),_export({global:!0},{globalThis:global$1});var $assign=Object.assign,defineProperty$2=Object.defineProperty,objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},r={},t=Symbol();return e[t]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),7!=$assign({},e)[t]||"abcdefghijklmnopqrst"!=objectKeys($assign({},r)).join("")}))?function assign(e,r){for(var t=toObject(e),a=arguments.length,i=1,s=objectGetOwnPropertySymbols.f,c=objectPropertyIsEnumerable.f;a>i;)for(var l,u=indexedObject(arguments[i++]),p=s?objectKeys(u).concat(s(u)):objectKeys(u),d=p.length,h=0;d>h;)l=p[h++],descriptors&&!c.call(u,l)||(t[l]=u[l]);return t}:$assign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign});var path=global$1;path.Object.assign;var regexpFlags=function(){var e=anObject(this),r="";return e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.sticky&&(r+="y"),r},$RegExp$2=global$1.RegExp,UNSUPPORTED_Y$2=fails((function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET=fails((function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={UNSUPPORTED_Y:UNSUPPORTED_Y$2,BROKEN_CARET:BROKEN_CARET},$RegExp$1=global$1.RegExp,regexpUnsupportedDotAll=fails((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),$RegExp=global$1.RegExp,regexpUnsupportedNcg=fails((function(){var e=$RegExp("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})),getInternalState$3=internalState.get,nativeExec=RegExp.prototype.exec,nativeReplace=shared("native-string-replace",String.prototype.replace),patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=(re1=/a/,re2=/b*/g,nativeExec.call(re1,"a"),nativeExec.call(re2,"a"),0!==re1.lastIndex||0!==re2.lastIndex),re1,re2,UNSUPPORTED_Y$1=regexpStickyHelpers.UNSUPPORTED_Y||regexpStickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||regexpUnsupportedDotAll||regexpUnsupportedNcg;PATCH&&(patchedExec=function exec(e){var r,t,a,i,s,c,l,u=this,p=getInternalState$3(u),d=toString(e),h=p.raw;if(h)return h.lastIndex=u.lastIndex,r=patchedExec.call(h,d),u.lastIndex=h.lastIndex,r;var y=p.groups,A=UNSUPPORTED_Y$1&&u.sticky,g=regexpFlags.call(u),v=u.source,m=0,E=d;if(A&&(-1===(g=g.replace("y","")).indexOf("g")&&(g+="g"),E=d.slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==d.charAt(u.lastIndex-1))&&(v="(?: "+v+")",E=" "+E,m++),t=new RegExp("^(?:"+v+")",g)),NPCG_INCLUDED&&(t=new RegExp("^"+v+"$(?!\\s)",g)),UPDATES_LAST_INDEX_WRONG&&(a=u.lastIndex),i=nativeExec.call(A?t:u,E),A?i?(i.input=i.input.slice(m),i[0]=i[0].slice(m),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&i&&(u.lastIndex=u.global?i.index+i[0].length:a),NPCG_INCLUDED&&i&&i.length>1&&nativeReplace.call(i[0],t,(function(){for(s=1;s=l?e?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(i=s.charCodeAt(c+1))<56320||i>57343?e?s.charAt(c):a:e?s.slice(c,c+2):i-56320+(a-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex=function(e,r,t){return r+(t?charAt$1(e,r).length:1)},regexpExecAbstract=function(e,r){var t=e.exec;if(isCallable(t)){var a=t.call(e,r);return null!==a&&anObject(a),a}if("RegExp"===classofRaw(e))return regexpExec.call(e,r);throw TypeError("RegExp#exec called on incompatible receiver")},UNSUPPORTED_Y=regexpStickyHelpers.UNSUPPORTED_Y,arrayPush=[].push,min$4=Math.min,MAX_UINT32=4294967295,SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails((function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var t="ab".split(e);return 2!==t.length||"a"!==t[0]||"b"!==t[1]}));fixRegexpWellKnownSymbolLogic("split",(function(e,r,t){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var a=toString(requireObjectCoercible(this)),i=void 0===t?MAX_UINT32:t>>>0;if(0===i)return[];if(void 0===e)return[a];if(!isRegexp(e))return r.call(a,e,i);for(var s,c,l,u=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=new RegExp(e.source,p+"g");(s=regexpExec.call(h,a))&&!((c=h.lastIndex)>d&&(u.push(a.slice(d,s.index)),s.length>1&&s.index=i));)h.lastIndex===s.index&&h.lastIndex++;return d===a.length?!l&&h.test("")||u.push(""):u.push(a.slice(d)),u.length>i?u.slice(0,i):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)}:r,[function split(r,t){var i=requireObjectCoercible(this),s=null==r?void 0:getMethod(r,e);return s?s.call(r,i,t):a.call(toString(i),r,t)},function(e,i){var s=anObject(this),c=toString(e),l=t(a,s,c,i,a!==r);if(l.done)return l.value;var u=speciesConstructor(s,RegExp),p=s.unicode,d=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),h=new u(UNSUPPORTED_Y?"^(?:"+s.source+")":s,d),y=void 0===i?MAX_UINT32:i>>>0;if(0===y)return[];if(0===c.length)return null===regexpExecAbstract(h,c)?[c]:[];for(var A=0,g=0,v=[];g=r.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==t?{value:a,done:!1}:"values"==t?{value:r[a],done:!1}:{value:[a,r[a]],done:!1}}),"values");iterators.Arguments=iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var arrayBufferNative="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,defineProperty$1=objectDefineProperty.f,Int8Array$3=global$1.Int8Array,Int8ArrayPrototype=Int8Array$3&&Int8Array$3.prototype,Uint8ClampedArray=global$1.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray&&Uint8ClampedArray.prototype,TypedArray=Int8Array$3&&objectGetPrototypeOf(Int8Array$3),TypedArrayPrototype=Int8ArrayPrototype&&objectGetPrototypeOf(Int8ArrayPrototype),ObjectPrototype$1=Object.prototype,isPrototypeOf=ObjectPrototype$1.isPrototypeOf,TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),TYPED_ARRAY_TAG=uid("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR$1=uid("TYPED_ARRAY_CONSTRUCTOR"),NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferNative&&!!objectSetPrototypeOf&&"Opera"!==classof(global$1.opera),TYPED_ARRAY_TAG_REQIRED=!1,NAME,Constructor,Prototype,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView=function isView(e){if(!isObject(e))return!1;var r=classof(e);return"DataView"===r||has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},isTypedArray=function(e){if(!isObject(e))return!1;var r=classof(e);return has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},aTypedArray$m=function(e){if(isTypedArray(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor$2=function(e){if(isCallable(e)&&(!objectSetPrototypeOf||isPrototypeOf.call(TypedArray,e)))return e;throw TypeError(tryToString(e)+" is not a typed array constructor")},exportTypedArrayMethod$n=function(e,r,t){if(descriptors){if(t)for(var a in TypedArrayConstructorsList){var i=global$1[a];if(i&&has$1(i.prototype,e))try{delete i.prototype[e]}catch(e){}}TypedArrayPrototype[e]&&!t||redefine(TypedArrayPrototype,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&Int8ArrayPrototype[e]||r)}},exportTypedArrayStaticMethod=function(e,r,t){var a,i;if(descriptors){if(objectSetPrototypeOf){if(t)for(a in TypedArrayConstructorsList)if((i=global$1[a])&&has$1(i,e))try{delete i[e]}catch(e){}if(TypedArray[e]&&!t)return;try{return redefine(TypedArray,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&TypedArray[e]||r)}catch(e){}}for(a in TypedArrayConstructorsList)!(i=global$1[a])||i[e]&&!t||redefine(i,e,r)}};for(NAME in TypedArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype?createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor):NATIVE_ARRAY_BUFFER_VIEWS$1=!1;for(NAME in BigIntArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype&&createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!isCallable(TypedArray)||TypedArray===Function.prototype)&&(TypedArray=function TypedArray(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME],TypedArray);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!TypedArrayPrototype||TypedArrayPrototype===ObjectPrototype$1)&&(TypedArrayPrototype=TypedArray.prototype,NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME].prototype,TypedArrayPrototype);if(NATIVE_ARRAY_BUFFER_VIEWS$1&&objectGetPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype&&objectSetPrototypeOf(Uint8ClampedArrayPrototype,TypedArrayPrototype),descriptors&&!has$1(TypedArrayPrototype,TO_STRING_TAG$1))for(NAME in TYPED_ARRAY_TAG_REQIRED=!0,defineProperty$1(TypedArrayPrototype,TO_STRING_TAG$1,{get:function(){return isObject(this)?this[TYPED_ARRAY_TAG]:void 0}}),TypedArrayConstructorsList)global$1[NAME]&&createNonEnumerableProperty(global$1[NAME],TYPED_ARRAY_TAG,NAME);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$1,TYPED_ARRAY_CONSTRUCTOR:TYPED_ARRAY_CONSTRUCTOR$1,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED&&TYPED_ARRAY_TAG,aTypedArray:aTypedArray$m,aTypedArrayConstructor:aTypedArrayConstructor$2,exportTypedArrayMethod:exportTypedArrayMethod$n,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod,isView:isView,isTypedArray:isTypedArray,TypedArray:TypedArray,TypedArrayPrototype:TypedArrayPrototype},NATIVE_ARRAY_BUFFER_VIEWS=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$1=global$1.ArrayBuffer,Int8Array$2=global$1.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS||!fails((function(){Int8Array$2(1)}))||!fails((function(){new Int8Array$2(-1)}))||!checkCorrectnessOfIteration((function(e){new Int8Array$2,new Int8Array$2(null),new Int8Array$2(1.5),new Int8Array$2(e)}),!0)||fails((function(){return 1!==new Int8Array$2(new ArrayBuffer$1(2),1,void 0).length})),toIndex=function(e){if(void 0===e)return 0;var r=toInteger(e),t=toLength(r);if(r!==t)throw RangeError("Wrong length or index");return t},abs=Math.abs,pow$1=Math.pow,floor$6=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(e,r,t){var a,i,s,c=new Array(t),l=8*t-r-1,u=(1<>1,d=23===r?pow$1(2,-24)-pow$1(2,-77):0,h=e<0||0===e&&1/e<0?1:0,y=0;for((e=abs(e))!=e||e===1/0?(i=e!=e?1:0,a=u):(a=floor$6(log(e)/LN2),e*(s=pow$1(2,-a))<1&&(a--,s*=2),(e+=a+p>=1?d/s:d*pow$1(2,1-p))*s>=2&&(a++,s/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(e*s-1)*pow$1(2,r),a+=p):(i=e*pow$1(2,p-1)*pow$1(2,r),a=0));r>=8;c[y++]=255&i,i/=256,r-=8);for(a=a<0;c[y++]=255&a,a/=256,l-=8);return c[--y]|=128*h,c},unpack=function(e,r){var t,a=e.length,i=8*a-r-1,s=(1<>1,l=i-7,u=a-1,p=e[u--],d=127&p;for(p>>=7;l>0;d=256*d+e[u],u--,l-=8);for(t=d&(1<<-l)-1,d>>=-l,l+=r;l>0;t=256*t+e[u],u--,l-=8);if(0===d)d=1-c;else{if(d===s)return t?NaN:p?-1/0:1/0;t+=pow$1(2,r),d-=c}return(p?-1:1)*t*pow$1(2,d-r)},ieee754={pack:pack,unpack:unpack},arrayFill=function fill(e){for(var r=toObject(this),t=toLength(r.length),a=arguments.length,i=toAbsoluteIndex(a>1?arguments[1]:void 0,t),s=a>2?arguments[2]:void 0,c=void 0===s?t:toAbsoluteIndex(s,t);c>i;)r[i++]=e;return r},getOwnPropertyNames=objectGetOwnPropertyNames.f,defineProperty=objectDefineProperty.f,PROPER_FUNCTION_NAME$2=functionName.PROPER,CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,getInternalState$1=internalState.get,setInternalState$3=internalState.set,ARRAY_BUFFER="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer=global$1[ARRAY_BUFFER],$ArrayBuffer=NativeArrayBuffer,$DataView=global$1[DATA_VIEW],$DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,RangeError$1=global$1.RangeError,packIEEE754=ieee754.pack,unpackIEEE754=ieee754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter=function(e,r){defineProperty(e[PROTOTYPE],r,{get:function(){return getInternalState$1(this)[r]}})},get=function(e,r,t,a){var i=toIndex(t),s=getInternalState$1(e);if(i+r>s.byteLength)throw RangeError$1(WRONG_INDEX);var c=getInternalState$1(s.buffer).bytes,l=i+s.byteOffset,u=c.slice(l,l+r);return a?u:u.reverse()},set=function(e,r,t,a,i,s){var c=toIndex(t),l=getInternalState$1(e);if(c+r>l.byteLength)throw RangeError$1(WRONG_INDEX);for(var u=getInternalState$1(l.buffer).bytes,p=c+l.byteOffset,d=a(+i),h=0;hj;)(key=keys[j++])in $ArrayBuffer||createNonEnumerableProperty($ArrayBuffer,key,NativeArrayBuffer[key]);ArrayBufferPrototype.constructor=$ArrayBuffer}objectSetPrototypeOf&&objectGetPrototypeOf($DataViewPrototype)!==ObjectPrototype&&objectSetPrototypeOf($DataViewPrototype,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=$DataViewPrototype.setInt8;testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||redefineAll($DataViewPrototype,{setInt8:function setInt8(e,r){$setInt8.call(this,e,r<<24>>24)},setUint8:function setUint8(e,r){$setInt8.call(this,e,r<<24>>24)}},{unsafe:!0})}else $ArrayBuffer=function ArrayBuffer(e){anInstance(this,$ArrayBuffer,ARRAY_BUFFER);var r=toIndex(e);setInternalState$3(this,{bytes:arrayFill.call(new Array(r),0),byteLength:r}),descriptors||(this.byteLength=r)},$DataView=function DataView(e,r,t){anInstance(this,$DataView,DATA_VIEW),anInstance(e,$ArrayBuffer,DATA_VIEW);var a=getInternalState$1(e).byteLength,i=toInteger(r);if(i<0||i>a)throw RangeError$1("Wrong offset");if(i+(t=void 0===t?a-i:toLength(t))>a)throw RangeError$1(WRONG_LENGTH);setInternalState$3(this,{buffer:e,byteLength:t,byteOffset:i}),descriptors||(this.buffer=e,this.byteLength=t,this.byteOffset=i)},descriptors&&(addGetter($ArrayBuffer,"byteLength"),addGetter($DataView,"buffer"),addGetter($DataView,"byteLength"),addGetter($DataView,"byteOffset")),redefineAll($DataView[PROTOTYPE],{getInt8:function getInt8(e){return get(this,1,e)[0]<<24>>24},getUint8:function getUint8(e){return get(this,1,e)[0]},getInt16:function getInt16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return r[1]<<8|r[0]},getInt32:function getInt32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function getUint32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function getFloat32(e){return unpackIEEE754(get(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function getFloat64(e){return unpackIEEE754(get(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function setInt8(e,r){set(this,1,e,packInt8,r)},setUint8:function setUint8(e,r){set(this,1,e,packInt8,r)},setInt16:function setInt16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setUint16:function setUint16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setInt32:function setInt32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setUint32:function setUint32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setFloat32:function setFloat32(e,r){set(this,4,e,packFloat32,r,arguments.length>2?arguments[2]:void 0)},setFloat64:function setFloat64(e,r){set(this,8,e,packFloat64,r,arguments.length>2?arguments[2]:void 0)}});setToStringTag($ArrayBuffer,ARRAY_BUFFER),setToStringTag($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},floor$5=Math.floor,isInteger=function isInteger(e){return!isObject(e)&&isFinite(e)&&floor$5(e)===e},toPositiveInteger=function(e){var r=toInteger(e);if(r<0)throw RangeError("The argument can't be less than 0");return r},toOffset=function(e,r){var t=toPositiveInteger(e);if(t%r)throw RangeError("Wrong offset");return t},aTypedArrayConstructor$1=arrayBufferViewCore.aTypedArrayConstructor,typedArrayFrom=function from(e){var r,t,a,i,s,c,l=aConstructor(this),u=toObject(e),p=arguments.length,d=p>1?arguments[1]:void 0,h=void 0!==d,y=getIteratorMethod(u);if(y&&!isArrayIteratorMethod(y))for(c=(s=getIterator(u,y)).next,u=[];!(i=c.call(s)).done;)u.push(i.value);for(h&&p>2&&(d=functionBindContext(d,arguments[2],2)),t=toLength(u.length),a=new(aTypedArrayConstructor$1(l))(t),r=0;t>r;r++)a[r]=h?d(u[r],r):u[r];return a},isArray=Array.isArray||function isArray(e){return"Array"==classofRaw(e)},SPECIES$2=wellKnownSymbol("species"),arraySpeciesConstructor=function(e){var r;return isArray(e)&&(r=e.constructor,(isConstructor(r)&&(r===Array||isArray(r.prototype))||isObject(r)&&null===(r=r[SPECIES$2]))&&(r=void 0)),void 0===r?Array:r},arraySpeciesCreate=function(e,r){return new(arraySpeciesConstructor(e))(0===r?0:r)},push=[].push,createMethod$2=function(e){var r=1==e,t=2==e,a=3==e,i=4==e,s=6==e,c=7==e,l=5==e||s;return function(u,p,d,h){for(var y,A,g=toObject(u),v=indexedObject(g),m=functionBindContext(p,d,3),E=toLength(v.length),I=0,P=h||arraySpeciesCreate,b=r?P(u,E):t||c?P(u,0):void 0;E>I;I++)if((l||I in v)&&(A=m(y=v[I],I,g),e))if(r)b[I]=A;else if(A)switch(e){case 3:return!0;case 5:return y;case 6:return I;case 2:push.call(b,y)}else switch(e){case 4:return!1;case 7:push.call(b,y)}return s?-1:a||i?i:b}},arrayIteration={forEach:createMethod$2(0),map:createMethod$2(1),filter:createMethod$2(2),some:createMethod$2(3),every:createMethod$2(4),find:createMethod$2(5),findIndex:createMethod$2(6),filterReject:createMethod$2(7)},typedArrayConstructor=createCommonjsModule((function(e){var r=objectGetOwnPropertyNames.f,t=arrayIteration.forEach,a=internalState.get,i=internalState.set,s=objectDefineProperty.f,c=objectGetOwnPropertyDescriptor.f,l=Math.round,u=global$1.RangeError,p=arrayBuffer.ArrayBuffer,d=arrayBuffer.DataView,h=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,y=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,A=arrayBufferViewCore.TYPED_ARRAY_TAG,g=arrayBufferViewCore.TypedArray,v=arrayBufferViewCore.TypedArrayPrototype,m=arrayBufferViewCore.aTypedArrayConstructor,E=arrayBufferViewCore.isTypedArray,fromList=function(e,r){for(var t=0,a=r.length,i=new(m(e))(a);a>t;)i[t]=r[t++];return i},addGetter=function(e,r){s(e,r,{get:function(){return a(this)[r]}})},isArrayBuffer=function(e){var r;return e instanceof p||"ArrayBuffer"==(r=classof(e))||"SharedArrayBuffer"==r},isTypedArrayIndex=function(e,r){return E(e)&&!isSymbol(r)&&r in e&&isInteger(+r)&&r>=0},I=function getOwnPropertyDescriptor(e,r){return r=toPropertyKey(r),isTypedArrayIndex(e,r)?createPropertyDescriptor(2,e[r]):c(e,r)},P=function defineProperty(e,r,t){return r=toPropertyKey(r),!(isTypedArrayIndex(e,r)&&isObject(t)&&has$1(t,"value"))||has$1(t,"get")||has$1(t,"set")||t.configurable||has$1(t,"writable")&&!t.writable||has$1(t,"enumerable")&&!t.enumerable?s(e,r,t):(e[r]=t.value,e)};descriptors?(h||(objectGetOwnPropertyDescriptor.f=I,objectDefineProperty.f=P,addGetter(v,"buffer"),addGetter(v,"byteOffset"),addGetter(v,"byteLength"),addGetter(v,"length")),_export({target:"Object",stat:!0,forced:!h},{getOwnPropertyDescriptor:I,defineProperty:P}),e.exports=function(e,c,m){var I=e.match(/\d+$/)[0]/8,P=e+(m?"Clamped":"")+"Array",b="get"+e,T="set"+e,S=global$1[P],R=S,_=R&&R.prototype,U={},addElement=function(e,r){s(e,r,{get:function(){return function(e,r){var t=a(e);return t.view[b](r*I+t.byteOffset,!0)}(this,r)},set:function(e){return function(e,r,t){var i=a(e);m&&(t=(t=l(t))<0?0:t>255?255:255&t),i.view[T](r*I+i.byteOffset,t,!0)}(this,r,e)},enumerable:!0})};h?typedArrayConstructorsRequireWrappers&&(R=c((function(e,r,t,a){return anInstance(e,R,P),inheritIfRequired(isObject(r)?isArrayBuffer(r)?void 0!==a?new S(r,toOffset(t,I),a):void 0!==t?new S(r,toOffset(t,I)):new S(r):E(r)?fromList(R,r):typedArrayFrom.call(R,r):new S(toIndex(r)),e,R)})),objectSetPrototypeOf&&objectSetPrototypeOf(R,g),t(r(S),(function(e){e in R||createNonEnumerableProperty(R,e,S[e])})),R.prototype=_):(R=c((function(e,r,t,a){anInstance(e,R,P);var s,c,l,h=0,y=0;if(isObject(r)){if(!isArrayBuffer(r))return E(r)?fromList(R,r):typedArrayFrom.call(R,r);s=r,y=toOffset(t,I);var A=r.byteLength;if(void 0===a){if(A%I)throw u("Wrong length");if((c=A-y)<0)throw u("Wrong length")}else if((c=toLength(a)*I)+y>A)throw u("Wrong length");l=c/I}else l=toIndex(r),s=new p(c=l*I);for(i(e,{buffer:s,byteOffset:y,byteLength:c,length:l,view:new d(s)});h2?arguments[2]:void 0,l=min$3((void 0===c?a:toAbsoluteIndex(c,a))-s,a-i),u=1;for(s0;)s in t?t[i]=t[s]:delete t[i],i+=u,s+=u;return t},aTypedArray$l=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$m=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$m("copyWithin",(function copyWithin(e,r){return arrayCopyWithin.call(aTypedArray$l(this),e,r,arguments.length>2?arguments[2]:void 0)}));var $every=arrayIteration.every,aTypedArray$k=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$l=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$l("every",(function every(e){return $every(aTypedArray$k(this),e,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$j=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$k=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$k("fill",(function fill(e){return arrayFill.apply(aTypedArray$j(this),arguments)}));var arrayFromConstructorAndList=function(e,r){for(var t=0,a=r.length,i=new e(a);a>t;)i[t]=r[t++];return i},TYPED_ARRAY_CONSTRUCTOR=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,aTypedArrayConstructor=arrayBufferViewCore.aTypedArrayConstructor,typedArraySpeciesConstructor=function(e){return aTypedArrayConstructor(speciesConstructor(e,e[TYPED_ARRAY_CONSTRUCTOR]))},typedArrayFromSpeciesAndList=function(e,r){return arrayFromConstructorAndList(typedArraySpeciesConstructor(e),r)},$filter$1=arrayIteration.filter,aTypedArray$i=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$j=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$j("filter",(function filter(e){var r=$filter$1(aTypedArray$i(this),e,arguments.length>1?arguments[1]:void 0);return typedArrayFromSpeciesAndList(this,r)}));var $find=arrayIteration.find,aTypedArray$h=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$i=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$i("find",(function find(e){return $find(aTypedArray$h(this),e,arguments.length>1?arguments[1]:void 0)}));var $findIndex=arrayIteration.findIndex,aTypedArray$g=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$h=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$h("findIndex",(function findIndex(e){return $findIndex(aTypedArray$g(this),e,arguments.length>1?arguments[1]:void 0)}));var $forEach$1=arrayIteration.forEach,aTypedArray$f=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$g=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$g("forEach",(function forEach(e){$forEach$1(aTypedArray$f(this),e,arguments.length>1?arguments[1]:void 0)}));var $includes$1=arrayIncludes.includes,aTypedArray$e=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$f=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$f("includes",(function includes(e){return $includes$1(aTypedArray$e(this),e,arguments.length>1?arguments[1]:void 0)}));var $indexOf=arrayIncludes.indexOf,aTypedArray$d=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$e=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$e("indexOf",(function indexOf(e){return $indexOf(aTypedArray$d(this),e,arguments.length>1?arguments[1]:void 0)}));var PROPER_FUNCTION_NAME$1=functionName.PROPER,ITERATOR$3=wellKnownSymbol("iterator"),Uint8Array$2=global$1.Uint8Array,arrayValues=es_array_iterator.values,arrayKeys=es_array_iterator.keys,arrayEntries=es_array_iterator.entries,aTypedArray$c=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$d=arrayBufferViewCore.exportTypedArrayMethod,nativeTypedArrayIterator=Uint8Array$2&&Uint8Array$2.prototype[ITERATOR$3],PROPER_ARRAY_VALUES_NAME=!!nativeTypedArrayIterator&&"values"===nativeTypedArrayIterator.name,typedArrayValues=function values(){return arrayValues.call(aTypedArray$c(this))};exportTypedArrayMethod$d("entries",(function entries(){return arrayEntries.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("keys",(function keys(){return arrayKeys.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("values",typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME),exportTypedArrayMethod$d(ITERATOR$3,typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME);var aTypedArray$b=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$c=arrayBufferViewCore.exportTypedArrayMethod,$join=[].join;exportTypedArrayMethod$c("join",(function join(e){return $join.apply(aTypedArray$b(this),arguments)}));var arrayMethodIsStrict=function(e,r){var t=[][e];return!!t&&fails((function(){t.call(null,r||function(){throw 1},1)}))},min$2=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$2=arrayMethodIsStrict("lastIndexOf"),FORCED$5=NEGATIVE_ZERO||!STRICT_METHOD$2,arrayLastIndexOf=FORCED$5?function lastIndexOf(e){if(NEGATIVE_ZERO)return $lastIndexOf.apply(this,arguments)||0;var r=toIndexedObject(this),t=toLength(r.length),a=t-1;for(arguments.length>1&&(a=min$2(a,toInteger(arguments[1]))),a<0&&(a=t+a);a>=0;a--)if(a in r&&r[a]===e)return a||0;return-1}:$lastIndexOf,aTypedArray$a=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$b=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$b("lastIndexOf",(function lastIndexOf(e){return arrayLastIndexOf.apply(aTypedArray$a(this),arguments)}));var $map=arrayIteration.map,aTypedArray$9=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$a=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$a("map",(function map(e){return $map(aTypedArray$9(this),e,arguments.length>1?arguments[1]:void 0,(function(e,r){return new(typedArraySpeciesConstructor(e))(r)}))}));var createMethod$1=function(e){return function(r,t,a,i){aCallable(t);var s=toObject(r),c=indexedObject(s),l=toLength(s.length),u=e?l-1:0,p=e?-1:1;if(a<2)for(;;){if(u in c){i=c[u],u+=p;break}if(u+=p,e?u<0:l<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:l>u;u+=p)u in c&&(i=t(i,c[u],u,s));return i}},arrayReduce={left:createMethod$1(!1),right:createMethod$1(!0)},$reduce=arrayReduce.left,aTypedArray$8=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$9=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$9("reduce",(function reduce(e){return $reduce(aTypedArray$8(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var $reduceRight=arrayReduce.right,aTypedArray$7=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$8=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$8("reduceRight",(function reduceRight(e){return $reduceRight(aTypedArray$7(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$6=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$7=arrayBufferViewCore.exportTypedArrayMethod,floor$4=Math.floor;exportTypedArrayMethod$7("reverse",(function reverse(){for(var e,r=aTypedArray$6(this).length,t=floor$4(r/2),a=0;a1?arguments[1]:void 0,1),t=this.length,a=toObject(e),i=toLength(a.length),s=0;if(i+r>t)throw RangeError("Wrong length");for(;si;)c[i]=t[i++];return c}),FORCED$3);var $some=arrayIteration.some,aTypedArray$3=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$4=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$4("some",(function some(e){return $some(aTypedArray$3(this),e,arguments.length>1?arguments[1]:void 0)}));var floor$3=Math.floor,mergeSort=function(e,r){var t=e.length,a=floor$3(t/2);return t<8?insertionSort(e,r):merge(mergeSort(e.slice(0,a),r),mergeSort(e.slice(a),r),r)},insertionSort=function(e,r){for(var t,a,i=e.length,s=1;s0;)e[a]=e[--a];a!==s++&&(e[a]=t)}return e},merge=function(e,r,t){for(var a=e.length,i=r.length,s=0,c=0,l=[];s0&&1/t<0?1:-1:r>t}};exportTypedArrayMethod$3("sort",(function sort(e){if(void 0!==e&&aCallable(e),STABLE_SORT$1)return nativeSort$1.call(this,e);aTypedArray$2(this);var r,t=toLength(this.length),a=Array(t);for(r=0;r1?arguments[1]:void 0)}}),addToUnscopables("includes");var notARegexp=function(e){if(isRegexp(e))throw TypeError("The method doesn't accept regular expressions");return e},MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[MATCH]=!1,"/./"[e](r)}catch(e){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function includes(e){return!!~toString(requireObjectCoercible(this)).indexOf(toString(notARegexp(e)),arguments.length>1?arguments[1]:void 0)}});var createProperty=function(e,r,t){var a=toPropertyKey(r);a in e?objectDefineProperty.f(e,a,createPropertyDescriptor(0,t)):e[a]=t},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return engineV8Version>=51||!fails((function(){var r=[];return(r.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==r[e](Boolean).foo}))},HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("slice"),SPECIES=wellKnownSymbol("species"),nativeSlice=[].slice,max$1=Math.max;_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function slice(e,r){var t,a,i,s=toIndexedObject(this),c=toLength(s.length),l=toAbsoluteIndex(e,c),u=toAbsoluteIndex(void 0===r?c:r,c);if(isArray(s)&&(t=s.constructor,(isConstructor(t)&&(t===Array||isArray(t.prototype))||isObject(t)&&null===(t=t[SPECIES]))&&(t=void 0),t===Array||void 0===t))return nativeSlice.call(s,l,u);for(a=new(void 0===t?Array:t)(max$1(u-l,0)),i=0;l1?arguments[1]:void 0)}});var PROPER_FUNCTION_NAME=functionName.PROPER,TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails((function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=PROPER_FUNCTION_NAME&&nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,(function toString$1(){var e=anObject(this),r=toString(e.source),t=e.flags;return"/"+r+"/"+toString(void 0===t&&e instanceof RegExp&&!("flags"in RegExpPrototype)?regexpFlags.call(e):t)}),{unsafe:!0});var test=[],nativeSort=test.sort,FAILS_ON_UNDEFINED=fails((function(){test.sort(void 0)})),FAILS_ON_NULL=fails((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict("sort"),STABLE_SORT=!fails((function(){if(engineV8Version)return engineV8Version<70;if(!(engineFfVersion&&engineFfVersion>3)){if(engineIsIeOrEdge)return!0;if(engineWebkitVersion)return engineWebkitVersion<603;var e,r,t,a,i="";for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(a=0;a<47;a++)test.push({k:r+a,v:t})}for(test.sort((function(e,r){return r.v-e.v})),a=0;atoString(t)?1:-1}};_export({target:"Array",proto:!0,forced:FORCED$1},{sort:function sort(e){void 0!==e&&aCallable(e);var r=toObject(this);if(STABLE_SORT)return void 0===e?nativeSort.call(r):nativeSort.call(r,e);var t,a,i=[],s=toLength(r.length);for(a=0;a>>24&255,a[t+1]=i>>>16&255,a[t+2]=i>>>8&255,a[t+3]=i>>>0&255,new Uint8Array(a.buffer,0,t+4)},UZIP.deflateRaw=function(e,r){null==r&&(r={level:6});var t=new Uint8Array(50+Math.floor(1.1*e.length)),a=UZIP.F.deflateRaw(e,t,a,r.level);return new Uint8Array(t.buffer,0,a)},UZIP.encode=function(e,r){null==r&&(r=!1);var t=0,a=UZIP.bin.writeUint,i=UZIP.bin.writeUshort,s={};for(var c in e){var l=!UZIP._noNeed(c)&&!r,u=e[c],p=UZIP.crc.crc(u,0,u.length);s[c]={cpr:l,usize:u.length,crc:p,file:l?UZIP.deflateRaw(u):u}}for(var c in s)t+=s[c].file.length+30+46+2*UZIP.bin.sizeUTF8(c);t+=22;var d=new Uint8Array(t),h=0,y=[];for(var c in s){var A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,0)}var g=0,v=h;for(var c in s){A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,1,y[g++])}var m=h-v;return a(d,h,101010256),h+=4,i(d,h+=4,g),i(d,h+=2,g),a(d,h+=2,m),a(d,h+=4,v),h+=4,h+=2,d.buffer},UZIP._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(r)},UZIP._writeHeader=function(e,r,t,a,i,s){var c=UZIP.bin.writeUint,l=UZIP.bin.writeUshort,u=a.file;return c(e,r,0==i?67324752:33639248),r+=4,1==i&&(r+=2),l(e,r,20),l(e,r+=2,0),l(e,r+=2,a.cpr?8:0),c(e,r+=2,0),c(e,r+=4,a.crc),c(e,r+=4,u.length),c(e,r+=4,a.usize),l(e,r+=4,UZIP.bin.sizeUTF8(t)),l(e,r+=2,0),r+=2,1==i&&(r+=2,r+=2,c(e,r+=6,s),r+=4),r+=UZIP.bin.writeUTF8(e,r,t),0==i&&(e.set(u,r),r+=u.length),r},UZIP.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,a=0;a<8;a++)1&t?t=3988292384^t>>>1:t>>>=1;e[r]=t}return e}(),update:function(e,r,t,a){for(var i=0;i>>8;return e},crc:function(e,r,t){return 4294967295^UZIP.crc.update(4294967295,e,r,t)}},UZIP.adler=function(e,r,t){for(var a=1,i=0,s=r,c=r+t;s>8&255},readUint:function(e,r){return 16777216*e[r+3]+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,t){e[r]=255&t,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},readASCII:function(e,r,t){for(var a="",i=0;i>6,e[r+i+1]=128|c>>0&63,i+=2;else if(0==(4294901760&c))e[r+i]=224|c>>12,e[r+i+1]=128|c>>6&63,e[r+i+2]=128|c>>0&63,i+=3;else{if(0!=(4292870144&c))throw"e";e[r+i]=240|c>>18,e[r+i+1]=128|c>>12&63,e[r+i+2]=128|c>>6&63,e[r+i+3]=128|c>>0&63,i+=4}}return i},sizeUTF8:function(e){for(var r=e.length,t=0,a=0;a>>3}var y=s.lits,A=s.strt,g=s.prev,v=0,m=0,E=0,I=0,P=0,b=0;for(h>2&&(A[b=UZIP.F._hash(e,0)]=0),u=0;u14e3||m>26697)&&h-u>100&&(d>>16,_=65535&S;if(0!=S){_=65535&S;var U=c(R=S>>>16,s.of0);s.lhst[257+U]++;var w=c(_,s.df0);s.dhst[w]++,I+=s.exb[U]+s.dxb[w],y[v]=R<<23|u-d,y[v+1]=_<<16|U<<8|w,v+=2,d=u+R}else s.lhst[e[u]]++;m++}}for(E==u&&0!=e.length||(d>>3},UZIP.F._bestMatch=function(e,r,t,a,i,s){var c=32767&r,l=t[c],u=c-l+32768&32767;if(l==c||a!=UZIP.F._hash(e,r-u))return 0;for(var p=0,d=0,h=Math.min(32767,r);u<=h&&0!=--s&&l!=c;){if(0==p||e[r+p]==e[r+p-u]){var y=UZIP.F._howLong(e,r,u);if(y>p){if(d=u,(p=y)>=i)break;u+2A&&(A=m,l=v)}}}u+=(c=l)-(l=t[c])+32768&32767}return p<<16|d},UZIP.F._howLong=function(e,r,t){if(e[r]!=e[r-t]||e[r+1]!=e[r+1-t]||e[r+2]!=e[r+2-t])return 0;var a=r,i=Math.min(e.length,r+258);for(r+=3;r>>23,B=$+(8388607&x);$>16,V=D>>8&255,k=255&D;b(l,u=UZIP.F._writeLit(257+V,w,l,u),M-I.of0[V]),u+=I.exb[V],P(l,u=UZIP.F._writeLit(k,O,l,u),G-I.df0[k]),u+=I.dxb[k],$+=M}}u=UZIP.F._writeLit(256,w,l,u)}return u},UZIP.F._copyExact=function(e,r,t,a,i){var s=i>>>3;return a[s]=t,a[s+1]=t>>>8,a[s+2]=255-a[s],a[s+3]=255-a[s+1],s+=4,a.set(new Uint8Array(e.buffer,r,t),s),i+(t+4<<3)},UZIP.F.getTrees=function(){for(var e=UZIP.F.U,r=UZIP.F._hufTree(e.lhst,e.ltree,15),t=UZIP.F._hufTree(e.dhst,e.dtree,15),a=[],i=UZIP.F._lenCodes(e.ltree,a),s=[],c=UZIP.F._lenCodes(e.dtree,s),l=0;l4&&0==e.itree[1+(e.ordr[p-1]<<1)];)p--;return[r,t,u,i,c,p,a,s]},UZIP.F.getSecond=function(e){for(var r=[],t=0;t>1)+",");return r},UZIP.F.contSize=function(e,r){for(var t=0,a=0;a15&&(UZIP.F._putsE(t,a,c,l),a+=l)}return a},UZIP.F._lenCodes=function(e,r){for(var t=e.length;2!=t&&0==e[t-1];)t-=2;for(var a=0;a>>1,138))<11?r.push(17,p-3):r.push(18,p-11),a+=2*p-2}else if(i==l&&s==i&&c==i){for(u=a+5;u+2>>1,6);r.push(16,p-3),a+=2*p-2}else r.push(i,0)}return t>>>1},UZIP.F._hufTree=function(e,r,t){var a=[],i=e.length,s=r.length,c=0;for(c=0;ct&&(UZIP.F.restrictDepth(u,t,v),v=t),c=0;cr;a++){var c=e[a].d;e[a].d=r,s+=i-(1<>>=t-r;s>0;){(c=e[a].d)=0;a--)e[a].d==r&&s<0&&(e[a].d--,s++);0!=s&&console.log("debt left")},UZIP.F._goodIndex=function(e,r){var t=0;return r[16|t]<=e&&(t|=16),r[8|t]<=e&&(t|=8),r[4|t]<=e&&(t|=4),r[2|t]<=e&&(t|=2),r[1|t]<=e&&(t|=1),t},UZIP.F._writeLit=function(e,r,t,a){return UZIP.F._putsF(t,a,r[e<<1]),a+r[1+(e<<1)]},UZIP.F.inflate=function(e,r){var t=Uint8Array;if(3==e[0]&&0==e[1])return r||new t(0);var a=UZIP.F,i=a._bitsF,s=a._bitsE,c=a._decodeTiny,l=a.makeCodes,u=a.codes2map,p=a._get17,d=a.U,h=null==r;h&&(r=new t(e.length>>>2<<3));for(var y,A,g=0,v=0,m=0,E=0,I=0,P=0,b=0,T=0,S=0;0==g;)if(g=i(e,S,1),v=i(e,S+1,2),S+=3,0!=v){if(h&&(r=UZIP.F._check(r,T+(1<<17))),1==v&&(y=d.flmap,A=d.fdmap,P=511,b=31),2==v){m=s(e,S,5)+257,E=s(e,S+5,5)+1,I=s(e,S+10,4)+4,S+=14;for(var R=0;R<38;R+=2)d.itree[R]=0,d.itree[R+1]=0;var _=1;for(R=0;R_&&(_=U)}S+=3*I,l(d.itree,_),u(d.itree,_,d.imap),y=d.lmap,A=d.dmap,S=c(d.imap,(1<<_)-1,m+E,e,S,d.ttree);var w=a._copyOut(d.ttree,0,m,d.ltree);P=(1<>>4;if($>>>8==0)r[T++]=$;else{if(256==$)break;var L=T+$-254;if($>264){var x=d.ldef[$-257];L=T+(x>>>3)+s(e,S,7&x),S+=7&x}var M=A[p(e,S)&b];S+=15&M;var B=M>>>4,D=d.ddef[B],G=(D>>>4)+i(e,S,15&D);for(S+=15&D,h&&(r=UZIP.F._check(r,T+(1<<17)));T>>3),k=e[V-4]|e[V-3]<<8;h&&(r=UZIP.F._check(r,T+k)),r.set(new t(e.buffer,e.byteOffset+V,k),T),S=V+k<<3,T+=k}return r.length==T?r:r.slice(0,T)},UZIP.F._check=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(Math.max(t<<1,r));return a.set(e,0),a},UZIP.F._decodeTiny=function(e,r,t,a,i,s){for(var c=UZIP.F._bitsE,l=UZIP.F._get17,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++}},UZIP.F.revCodes=function(e,r){for(var t=UZIP.F.U.rev15,a=15-r,i=0;i>>a}},UZIP.F._putsE=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},UZIP.F._putsF=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},UZIP.F._bitsE=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},UZIP.F._get25=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},UZIP.F.U=(r=Uint16Array,t=Uint32Array,{next_code:new r(16),bl_count:new r(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new t(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new r(65536),prev:new r(32768)}),function(){for(var e=UZIP.F.U,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.rev15[r]=(t>>>16|t<<16)>>>17}function pushV(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.ldef[r]=e.of0[r]<<3|e.exb[r],e.ddef[r]=e.df0[r]<<4|e.dxb[r];pushV(e.fltree,144,8),pushV(e.fltree,112,9),pushV(e.fltree,24,7),pushV(e.fltree,8,8),UZIP.F.makeCodes(e.fltree,9),UZIP.F.codes2map(e.fltree,9,e.flmap),UZIP.F.revCodes(e.fltree,9),pushV(e.fdtree,32,5),UZIP.F.makeCodes(e.fdtree,5),UZIP.F.codes2map(e.fdtree,5,e.fdmap),UZIP.F.revCodes(e.fdtree,5),pushV(e.itree,19,0),pushV(e.ltree,286,0),pushV(e.dtree,30,0),pushV(e.ttree,320,0)}()})),UZIP=Object.freeze(_mergeNamespaces({__proto__:null,default:UZIP_1},[UZIP_1])),UPNG={},N,W,H;UPNG.toRGBA8=function(e){var r=e.width,t=e.height;if(null==e.tabs.acTL)return[UPNG.toRGBA8.decodeImage(e.data,r,t,e).buffer];var a=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var i=r*t*4,s=new Uint8Array(i),c=new Uint8Array(i),l=new Uint8Array(i),u=0;u>3)]>>7-((7&A)<<0)&1);l[P]=b[w],l[P+1]=b[w+1],l[P+2]=b[w+2],l[P+3]=O>2)]>>6-((3&A)<<1)&3);l[P]=b[w],l[P+1]=b[w+1],l[P+2]=b[w+2],l[P+3]=O>1)]>>4-((1&A)<<2)&15);l[P]=b[w],l[P+1]=b[w+1],l[P+2]=b[w+2],l[P+3]=O>>3)]>>>7-(7&M)&1))==255*m?0:255;u[x+M]=B<<24|C<<16|C<<8|C}else if(2==d)for(M=0;M>>2)]>>>6-((3&M)<<1)&3))==85*m?0:255;u[x+M]=B<<24|C<<16|C<<8|C}else if(4==d)for(M=0;M>>1)]>>>4-((1&M)<<2)&15))==17*m?0:255;u[x+M]=B<<24|C<<16|C<<8|C}else if(8==d)for(M=0;M>>2<<5));0==s;)if(s=v(e,A,1),c=v(e,A+1,2),A+=3,0!=c){if(S&&(r=H.H.W(r,y+(1<<17))),1==c&&(t=T.J,a=T.h,d=511,h=31),2==c){l=m(e,A,5)+257,u=m(e,A+5,5)+1,p=m(e,A+10,4)+4,A+=14;for(var R=1,_=0;_<38;_+=2)T.Q[_]=0,T.Q[_+1]=0;for(_=0;_R&&(R=U)}A+=3*p,I(T.Q,R),P(T.Q,R,T.u),t=T.w,a=T.d,A=E(T.u,(1<>>4;if($>>>8==0)r[y++]=$;else{if(256==$)break;var L=y+$-254;if($>264){var x=T.q[$-257];L=y+(x>>>3)+m(e,A,7&x),A+=7&x}var M=a[b(e,A)&h];A+=15&M;var B=M>>>4,D=T.c[B],G=(D>>>4)+v(e,A,15&D);for(A+=15&D;y>>3),k=e[V-4]|e[V-3]<<8;S&&(r=H.H.W(r,y+k)),r.set(new i(e.buffer,e.byteOffset+V,k),y),A=V+k<<3,y+=k}return r.length==y?r:r.slice(0,y)},H.H.W=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(t<<1);return a.set(e,0),a},H.H.R=function(e,r,t,a,i,s){for(var c=H.H.e,l=H.H.Z,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++},H.H.l=function(e,r){for(var t=H.H.m.r,a=15-r,i=0;i>>a}},H.H.M=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},H.H.I=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},H.H.e=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},H.H.i=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},H.H.m=(N=Uint16Array,W=Uint32Array,{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(32768),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(65536),g:new N(32768)}),function(){for(var e=H.H.m,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.r[r]=(t>>>16|t<<16)>>>17}function n(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.q[r]=e.S[r]<<3|e.T[r],e.c[r]=e.p[r]<<4|e.z[r];n(e._,144,8),n(e._,112,9),n(e._,24,7),n(e._,8,8),H.H.n(e._,9),H.H.A(e._,9,e.J),H.H.l(e._,9),n(e.$,32,5),H.H.n(e.$,5),H.H.A(e.$,5,e.h),H.H.l(e.$,5),n(e.Q,19,0),n(e.C,286,0),n(e.D,30,0),n(e.v,320,0)}(),H.H.N),UPNG.decode._readInterlace=function(e,r){for(var t=r.width,a=r.height,i=UPNG.decode._getBPP(r),s=i>>3,c=Math.ceil(t*i/8),l=new Uint8Array(a*c),u=0,p=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],y=[8,8,4,4,2,2,1],A=0;A<7;){for(var g=h[A],v=y[A],m=0,E=0,I=p[A];I>3])>>7-(7&_)&1,l[S*c+(R>>3)]|=U<<7-((7&R)<<0);if(2==i)U=(U=e[_>>3])>>6-(7&_)&3,l[S*c+(R>>2)]|=U<<6-((3&R)<<1);if(4==i)U=(U=e[_>>3])>>4-(7&_)&15,l[S*c+(R>>1)]|=U<<4-((1&R)<<2);if(i>=8)for(var w=S*c+R*s,O=0;O>3)+O];_+=i,R+=v}T++,S+=g}m*E!=0&&(u+=E*(1+b)),A+=1}return l},UPNG.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},UPNG.decode._filterZero=function(e,r,t,a,i){var s=UPNG.decode._getBPP(r),c=Math.ceil(a*s/8),l=UPNG.decode._paeth;s=Math.ceil(s/8);var u=0,p=1,d=e[t],h=0;if(d>1&&(e[t]=[0,0,1][d-2]),3==d)for(h=s;h>>1)&255;for(var y=0;y>>1);for(;h>>1)}else{for(;h>8&255,e[r+1]=255&t},readUint:function readUint(e,r){return 16777216*e[r]+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function writeUint(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=255&t},readASCII:function readASCII(e,r,t){for(var a="",i=0;i=0&&l>=0?(h=A*r+g<<2,y=(l+A)*i+c+g<<2):(h=(-l+A)*r-c+g<<2,y=A*i+g<<2),0==u)a[y]=e[h],a[y+1]=e[h+1],a[y+2]=e[h+2],a[y+3]=e[h+3];else if(1==u){var v=e[h+3]*(1/255),m=e[h]*v,E=e[h+1]*v,I=e[h+2]*v,P=a[y+3]*(1/255),b=a[y]*P,T=a[y+1]*P,S=a[y+2]*P,R=1-v,_=v+P*R,U=0==_?0:1/_;a[y+3]=255*_,a[y+0]=(m+b*R)*U,a[y+1]=(E+T*R)*U,a[y+2]=(I+S*R)*U}else if(2==u){v=e[h+3],m=e[h],E=e[h+1],I=e[h+2],P=a[y+3],b=a[y],T=a[y+1],S=a[y+2];v==P&&m==b&&E==T&&I==S?(a[y]=0,a[y+1]=0,a[y+2]=0,a[y+3]=0):(a[y]=m,a[y+1]=E,a[y+2]=I,a[y+3]=v)}else if(3==u){v=e[h+3],m=e[h],E=e[h+1],I=e[h+2],P=a[y+3],b=a[y],T=a[y+1],S=a[y+2];if(v==P&&m==b&&E==T&&I==S)continue;if(v<220&&P>20)return!1}return!0},UPNG.encode=function(e,r,t,a,i,s,c){null==a&&(a=0),null==c&&(c=!1);var l=UPNG.encode.compress(e,r,t,a,[!1,!1,!1,0,c]);return UPNG.encode.compressPNG(l,-1),UPNG.encode._main(l,r,t,i,s)},UPNG.encodeLL=function(e,r,t,a,i,s,c,l){for(var u={ctype:0+(1==a?0:2)+(0==i?0:4),depth:s,frames:[]},p=(a+i)*s,d=p*r,h=0;h1,h=!1,y=33+(d?20:0);if(null!=i.sRGB&&(y+=13),null!=i.pHYs&&(y+=21),3==e.ctype){for(var A=e.plte.length,g=0;g>>24!=255&&(h=!0);y+=8+3*A+4+(h?8+1*A+4:0)}for(var v=0;v>>8&255,S=P>>>16&255;m[p+I+0]=b,m[p+I+1]=T,m[p+I+2]=S}if(c(m,p+=3*A,s(m,p-3*A-4,3*A+4)),p+=4,h){c(m,p,A),u(m,p+=4,"tRNS"),p+=4;for(g=0;g>>24&255;c(m,p+=A,s(m,p-A-4,A+4)),p+=4}}var R=0;for(v=0;v>2,O>>2));for(A=0;AL&&M==$[m-L])x[m]=x[m-L];else{var B=P[M];if(null==B&&(P[M]=B=b.length,b.push(M),b.length>=300))break;x[m]=B}}}var D=b.length;D<=256&&0==p&&(h=D<=2?1:D<=4?2:D<=16?4:8,h=Math.max(h,u));for(A=0;A>1)]|=Z[z+K]<<4-4*(1&K);else if(2==h)for(K=0;K>2)]|=Z[z+K]<<6-2*(3&K);else if(1==h)for(K=0;K>3)]|=Z[z+K]<<7-1*(7&K)}V=q,d=3,Y=1}else if(0==E&&1==I.length){q=new Uint8Array(L*G*3);var X=L*G;for(m=0;m_&&(_=O),wU&&(U=w))}-1==_&&(S=R=_=U=0),i&&(1==(1&S)&&S--,1==(1&R)&&R--);var C=(_-S+1)*(U-R+1);Cm&&(m=b),TE&&(E=T))}-1==m&&(g=v=m=E=0),c&&(1==(1&g)&&g--,1==(1&v)&&v--),s={x:g,y:v,width:m-g+1,height:E-v+1};var _=a[i];_.rect=s,_.blend=1,_.img=new Uint8Array(s.width*s.height*4),0==a[i-1].dispose?(UPNG._copyTile(p,r,t,_.img,s.width,s.height,-s.x,-s.y,0),UPNG.encode._prepareDiff(y,r,t,_.img,s)):UPNG._copyTile(y,r,t,_.img,s.width,s.height,-s.x,-s.y,0)},UPNG.encode._prepareDiff=function(e,r,t,a,i){UPNG._copyTile(e,r,t,a,i.width,i.height,-i.x,-i.y,2)},UPNG.encode._filterZero=function(e,r,t,a,i,s,c){var l,u=[],p=[0,1,2,3,4];-1!=s?p=[s]:(r*a>5e5||1==t)&&(p=[0]),c&&(l={level:0});for(var d,h=UZIP,y=0;y>1)+256&255;if(4==s)for(p=i;p>1)&255;for(p=i;p>1)&255}if(4==s){for(p=0;p>>1:t>>>=1;e[r]=t}return e}(),update:function update(e,r,t,a){for(var i=0;i>>8;return e},crc:function crc(e,r,t){return 4294967295^UPNG.crc.update(4294967295,e,r,t)}},UPNG.quantize=function(e,r){var t,a=new Uint8Array(e),i=a.slice(0),s=new Uint32Array(i.buffer),c=UPNG.quantize.getKDtree(i,r),l=c[0],u=c[1],p=UPNG.quantize.planeDst,d=a,h=s,y=d.length,A=new Uint8Array(a.length>>2);if(a.length<2e7)for(var g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}else for(g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}return{abuf:i.buffer,inds:A,plte:u}},UPNG.quantize.getKDtree=function(e,r,t){null==t&&(t=1e-4);var a=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=UPNG.quantize.stats(e,i.i0,i.i1),i.est=UPNG.quantize.estats(i.bst);for(var s=[i];s.lengthc&&(c=s[u].est.L,l=u);if(c=d||p.i1<=d)p.est.L=0;else{var h={i0:p.i0,i1:d,bst:null,est:null,tdst:0,left:null,right:null};h.bst=UPNG.quantize.stats(e,h.i0,h.i1),h.est=UPNG.quantize.estats(h.bst);var y={i0:d,i1:p.i1,bst:null,est:null,tdst:0,left:null,right:null};y.bst={R:[],m:[],N:p.bst.N-h.bst.N};for(u=0;u<16;u++)y.bst.R[u]=p.bst.R[u]-h.bst.R[u];for(u=0;u<4;u++)y.bst.m[u]=p.bst.m[u]-h.bst.m[u];y.est=UPNG.quantize.estats(y.bst),p.left=h,p.right=y,s[l]=h,s.push(y)}}s.sort((function(e,r){return r.bst.N-e.bst.N}));for(u=0;u0&&(c=e.right,l=e.left);var u=UPNG.quantize.getNearest(c,r,t,a,i);if(u.tdst<=s*s)return u;var p=UPNG.quantize.getNearest(l,r,t,a,i);return p.tdsts;)a-=4;if(t>=a)break;var l=r[t>>2];r[t>>2]=r[a>>2],r[a>>2]=l,t+=4,a-=4}for(;c(e,t,i)>s;)t-=4;return t+4},UPNG.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},UPNG.quantize.stats=function(e,r,t){for(var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],s=t-r>>2,c=r;c>>0}},UPNG.M4={multVec:function multVec(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function dot(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function sml(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},UPNG.encode.concatRGBA=function(e){for(var r=0,t=0;t2&&void 0!==arguments[2]?arguments[2]:Date.now();return new Promise((function(a){for(var i=e.split(","),s=i[0].match(/:(.*?);/)[1],c=globalThis.atob(i[1]),l=c.length,u=new Uint8Array(l);l--;)u[l]=c.charCodeAt(l);var p=new Blob([u],{type:s});p.name=r,p.lastModified=t,a(p)}))}function getDataUrlFromFile(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(){return r(a.result)},a.onerror=function(e){return t(e)},a.readAsDataURL(e)}))}function loadImage(e){return new Promise((function(r,t){var a=new Image;a.onload=function(){return r(a)},a.onerror=function(e){return t(e)},a.src=e}))}function getBrowserName(){var e="etc",r=navigator.userAgent;return/Chrom(e|ium)/i.test(r)?e="chrome":/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(r)?e="mobile safari":/Safari/i.test(r)?e="desktop safari":/Firefox/i.test(r)?e="firefox":(/MSIE/i.test(r)||!0==!!document.documentMode)&&(e="internet explorer"),e}function approximateBelowMaximumCanvasSizeOfBrowser(e,r){for(var t=getBrowserName(),a=MaxCanvasSize[t],i=e,s=r,c=i*s,l=i>s?s/i:i/s;c>a*a;){var u=(a+i)/2,p=(a+s)/2;u1&&void 0!==arguments[1]?arguments[1]:void 0,t=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),a=t.width,i=t.height,s=getNewCanvasAndCtx(a,i),c=_slicedToArray(s,2),l=c[0],u=c[1];return r&&/jpe?g/.test(r)&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height)),u.drawImage(e,0,0,l.width,l.height),l}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e){return new Promise((function(r,t){var a,i,s=function $Try_2_Post(){try{return i=drawImageInCanvas(a,e.type),r([a,i])}catch(e){return t(e)}},c=function $Try_2_Catch(r){try{0;var i=function $Try_3_Catch(e){try{throw e}catch(e){return t(e)}};try{return getDataUrlFromFile(e).then((function(e){try{return loadImage(e).then((function(e){try{return a=e,function $Try_3_Post(){try{return s()}catch(e){return t(e)}}()}catch(e){return i(e)}}),i)}catch(e){return i(e)}}),i)}catch(e){i(e)}}catch(e){return t(e)}};try{if(isIOS())throw new Error("Skip createImageBitmap on IOS device");return createImageBitmap(e).then((function(e){try{return a=e,s()}catch(e){return c()}}),c)}catch(e){c()}}))}function canvasToFile(e,r,t,a){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return new Promise((function(s,c){var l,u,p;if("image/png"===r)return u=e.getContext("2d").getImageData(0,0,e.width,e.height).data,p=UPNG.encode([u],e.width,e.height,256*i),(l=new Blob([p],{type:r})).name=t,l.lastModified=a,$If_4.call(this);{return"function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?e.convertToBlob({type:r,quality:i}).then(function(e){try{return(l=e).name=t,l.lastModified=a,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c):getFilefromDataUrl(e.toDataURL(r,i),t,a).then(function(e){try{return l=e,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c);function $If_5(){return $If_4.call(this)}}function $If_4(){return s(l)}}))}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise((function(e,r){var t,a,i,s;return void 0!==isAutoOrientationInBrowser.result?e(isAutoOrientationInBrowser.result):("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(c){try{return drawFileInCanvas(t=c).then((function(c){try{return canvasToFile(a=c[1],t.type,t.name,t.lastModified).then((function(t){try{return i=t,cleanupCanvasMemory(a),drawFileInCanvas(i).then((function(t){try{return s=t[0],isAutoOrientationInBrowser.result=1===s.width&&2===s.height,e(isAutoOrientationInBrowser.result)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r))}))}function getExifOrientation(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(e){var t=new DataView(e.target.result);if(65496!=t.getUint16(0,!1))return r(-2);for(var a=t.byteLength,i=2;is||i>s)){var l=_slicedToArray(getNewCanvasAndCtx(a,i),2);c=l[0],t=l[1],a>i?(c.width=s,c.height=i/a*s):(c.width=a/i*s,c.height=s),t.drawImage(e,0,0,c.width,c.height),cleanupCanvasMemory(e)}return c}function followExifOrientation(e,r){var t=e.width,a=e.height,i=_slicedToArray(getNewCanvasAndCtx(t,a),2),s=i[0],c=i[1];switch(r>4&&r<9?(s.width=a,s.height=t):(s.width=t,s.height=a),r){case 2:c.transform(-1,0,0,1,t,0);break;case 3:c.transform(-1,0,0,-1,t,a);break;case 4:c.transform(1,0,0,-1,0,a);break;case 5:c.transform(0,1,1,0,0,0);break;case 6:c.transform(0,1,-1,0,a,0);break;case 7:c.transform(0,-1,-1,0,a,t);break;case 8:c.transform(0,-1,1,0,0,t)}return c.drawImage(e,0,0,t,a),cleanupCanvasMemory(e),s}function compress(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(a,i){var s,c,l,u,p,d,h,y,A,g,v,m,E,I,P,b,T,S;function incProgress(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;s+=e,r.onProgress(Math.min(s,100))}function setProgress(e){s=Math.min(Math.max(e,s),100),r.onProgress(s)}return s=t,c=r.maxIteration||10,l=1024*r.maxSizeMB*1024,incProgress(),drawFileInCanvas(e).then(function(t){try{var s=_slicedToArray(t,2);return u=s[1],incProgress(),p=handleMaxWidthOrHeight(u,r),incProgress(),new Promise((function(t,a){var i;if(!(i=r.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,$If_2.call(this)}catch(e){return a(e)}}.bind(this),a);function $If_2(){return t(i)}return $If_2.call(this)})).then(function(t){try{return d=t,incProgress(),isAutoOrientationInBrowser().then(function(t){try{return h=t?p:followExifOrientation(p,d),incProgress(),y=r.initialQuality||1,A=r.fileType||e.type,canvasToFile(h,A,e.name,e.lastModified,y).then(function(r){try{{if(g=r,incProgress(),v=g.size>l,m=g.size>e.size,!v&&!m)return setProgress(100),a(g);var t;function $Loop_3(){if(c--&&(P>l||P>E)){var r,t,a=_slicedToArray(getNewCanvasAndCtx(r=v?.95*S.width:S.width,t=v?.95*S.height:S.height),2);return T=a[0],a[1].drawImage(S,0,0,r,t),y*=.95,canvasToFile(T,A,e.name,e.lastModified,y).then((function(e){try{return b=e,cleanupCanvasMemory(S),S=T,P=b.size,setProgress(Math.min(99,Math.floor((I-P)/(I-l)*100))),$Loop_3}catch(e){return i(e)}}),i)}return[1]}return E=e.size,I=g.size,P=I,S=h,(t=function(e){for(;e;){if(e.then)return void e.then(t,i);try{if(e.pop){if(e.length)return e.pop()?$Loop_3_exit.call(this):e;e=$Loop_3}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))($Loop_3);function $Loop_3_exit(){return cleanupCanvasMemory(S),cleanupCanvasMemory(T),cleanupCanvasMemory(p),cleanupCanvasMemory(h),cleanupCanvasMemory(u),setProgress(100),a(b)}}}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}))}var charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:toString(e),index:0})}),(function next(){var e,r=getInternalState(this),t=r.string,a=r.index;return a>=t.length?{value:void 0,done:!0}:(e=charAt(t,a),r.index+=e.length,{value:e,done:!1})}));var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},classList=documentCreateElement("span").classList,DOMTokenListPrototype=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype===Object.prototype?void 0:DOMTokenListPrototype,ITERATOR$2=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values,handlePrototype$1=function(e,r){if(e){if(e[ITERATOR$2]!==ArrayValues)try{createNonEnumerableProperty(e,ITERATOR$2,ArrayValues)}catch(r){e[ITERATOR$2]=ArrayValues}if(e[TO_STRING_TAG]||createNonEnumerableProperty(e,TO_STRING_TAG,r),domIterables[r])for(var t in es_array_iterator)if(e[t]!==es_array_iterator[t])try{createNonEnumerableProperty(e,t,es_array_iterator[t])}catch(r){e[t]=es_array_iterator[t]}}};for(var COLLECTION_NAME$1 in domIterables)handlePrototype$1(global$1[COLLECTION_NAME$1]&&global$1[COLLECTION_NAME$1].prototype,COLLECTION_NAME$1);handlePrototype$1(domTokenListPrototype,"DOMTokenList");var ITERATOR$1=wellKnownSymbol("iterator"),nativeUrl=!fails((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),r=e.searchParams,t="";return e.pathname="c%20d",r.forEach((function(e,a){r.delete("b"),t+=a+e})),isPure&&!e.toJSON||!r.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[ITERATOR$1]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==t||"x"!==new URL("http://x",void 0).host})),callWithSafeIterationClosing=function(e,r,t,a){try{return a?r(anObject(t)[0],t[1]):r(t)}catch(r){iteratorClose(e,"throw",r)}},arrayFrom=function from(e){var r=toObject(e),t=isConstructor(this),a=arguments.length,i=a>1?arguments[1]:void 0,s=void 0!==i;s&&(i=functionBindContext(i,a>2?arguments[2]:void 0,2));var c,l,u,p,d,h,y=getIteratorMethod(r),A=0;if(!y||this==Array&&isArrayIteratorMethod(y))for(c=toLength(r.length),l=t?new this(c):Array(c);c>A;A++)h=s?i(r[A],A):r[A],createProperty(l,A,h);else for(d=(p=getIterator(r,y)).next,l=t?new this:[];!(u=d.call(p)).done;A++)h=s?callWithSafeIterationClosing(p,i,[u.value,A],!0):u.value,createProperty(l,A,h);return l.length=A,l},maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,floor$2=Math.floor,stringFromCharCode=String.fromCharCode,ucs2decode=function(e){for(var r=[],t=0,a=e.length;t=55296&&i<=56319&&t>1,e+=floor$2(e/r);e>baseMinusTMin*tMax>>1;a+=base)e=floor$2(e/baseMinusTMin);return floor$2(a+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var r,t,a=[],i=(e=ucs2decode(e)).length,s=initialN,c=0,l=initialBias;for(r=0;r=s&&tfloor$2((maxInt-c)/h))throw RangeError(OVERFLOW_ERROR);for(c+=(d-s)*h,s=d,r=0;rmaxInt)throw RangeError(OVERFLOW_ERROR);if(t==s){for(var y=c,A=base;;A+=base){var g=A<=l?tMin:A>=l+tMax?tMax:A-l;if(y0?arguments[0]:void 0,d=this,h=[];if(setInternalState$1(d,{type:URL_SEARCH_PARAMS,entries:h,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==p)if(isObject(p))if(e=getIteratorMethod(p))for(t=(r=getIterator(p,e)).next;!(a=t.call(r)).done;){if((c=(s=(i=getIterator(anObject(a.value))).next).call(i)).done||(l=s.call(i)).done||!s.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:toString(c.value),value:toString(l.value)})}else for(u in p)has$1(p,u)&&h.push({key:u,value:toString(p[u])});else parseSearchParams(h,"string"==typeof p?"?"===p.charAt(0)?p.slice(1):p:toString(p))},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(redefineAll(URLSearchParamsPrototype,{append:function append(e,r){validateArgumentsLength(arguments.length,2);var t=getInternalParamsState(this);t.entries.push({key:toString(e),value:toString(r)}),t.updateURL()},delete:function(e){validateArgumentsLength(arguments.length,1);for(var r=getInternalParamsState(this),t=r.entries,a=toString(e),i=0;ie.key){i.splice(r,0,e);break}r===t&&i.push(e)}a.updateURL()},forEach:function forEach(e){for(var r,t=getInternalParamsState(this).entries,a=functionBindContext(e,arguments.length>1?arguments[1]:void 0,3),i=0;i1?wrapRequestOptions(arguments[1]):{})}}),isCallable(NativeRequest)){var RequestConstructor=function Request(e){return anInstance(this,RequestConstructor,"Request"),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,_export({global:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},codeAt=stringMultibyte.codeAt,NativeURL=global$1.URL,URLSearchParams$1=web_urlSearchParams.URLSearchParams,getInternalSearchParamsState=web_urlSearchParams.getState,setInternalState=internalState.set,getInternalURLState=internalState.getterFor("URL"),floor$1=Math.floor,pow=Math.pow,INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[A-Za-z]/,ALPHANUMERIC=/[\d+-.A-Za-z]/,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\dA-Fa-f]+$/,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseHost=function(e,r){var t,a,i;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return INVALID_HOST;if(!(t=parseIPv6(r.slice(1,-1))))return INVALID_HOST;e.host=t}else if(isSpecial(e)){if(r=stringPunycodeToAscii(r),FORBIDDEN_HOST_CODE_POINT.test(r))return INVALID_HOST;if(null===(t=parseIPv4(r)))return INVALID_HOST;e.host=t}else{if(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(r))return INVALID_HOST;for(t="",a=arrayFrom(r),i=0;i4)return e;for(t=[],a=0;a1&&"0"==i.charAt(0)&&(s=HEX_START.test(i)?16:8,i=i.slice(8==s?1:2)),""===i)c=0;else{if(!(10==s?DEC:8==s?OCT:HEX).test(i))return e;c=parseInt(i,s)}t.push(c)}for(a=0;a=pow(256,5-r))return null}else if(c>255)return null;for(l=t.pop(),a=0;a6)return;for(a=0;chr();){if(i=null,a>0){if(!("."==chr()&&a<4))return;h++}if(!DIGIT.test(chr()))return;for(;DIGIT.test(chr());){if(s=parseInt(chr(),10),null===i)i=s;else{if(0==i)return;i=10*i+s}if(i>255)return;h++}u[p]=256*u[p]+i,2!=++a&&4!=a||p++}if(4!=a)return;break}if(":"==chr()){if(h++,!chr())return}else if(chr())return;u[p++]=r}else{if(null!==d)return;h++,d=++p}}if(null!==d)for(c=p-d,p=7;0!=p&&c>0;)l=u[p],u[p--]=u[d+c-1],u[d+--c]=l;else if(8!=p)return;return u},findLongestZeroSequence=function(e){for(var r=null,t=1,a=null,i=0,s=0;s<8;s++)0!==e[s]?(i>t&&(r=a,t=i),a=null,i=0):(null===a&&(a=s),++i);return i>t&&(r=a,t=i),r},serializeHost=function(e){var r,t,a,i;if("number"==typeof e){for(r=[],t=0;t<4;t++)r.unshift(e%256),e=floor$1(e/256);return r.join(".")}if("object"==typeof e){for(r="",a=findLongestZeroSequence(e),t=0;t<8;t++)i&&0===e[t]||(i&&(i=!1),a===t?(r+=t?":":"::",i=!0):(r+=e[t].toString(16),t<7&&(r+=":")));return"["+r+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=objectAssign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=objectAssign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=objectAssign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,r){var t=codeAt(e,0);return t>32&&t<127&&!has$1(r,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(e){return has$1(specialSchemes,e.scheme)},includesCredentials=function(e){return""!=e.username||""!=e.password},cannotHaveUsernamePasswordPort=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},isWindowsDriveLetter=function(e,r){var t;return 2==e.length&&ALPHA.test(e.charAt(0))&&(":"==(t=e.charAt(1))||!r&&"|"==t)},startsWithWindowsDriveLetter=function(e){var r;return e.length>1&&isWindowsDriveLetter(e.slice(0,2))&&(2==e.length||"/"===(r=e.charAt(2))||"\\"===r||"?"===r||"#"===r)},shortenURLsPath=function(e){var r=e.path,t=r.length;!t||"file"==e.scheme&&1==t&&isWindowsDriveLetter(r[0],!0)||r.pop()},isSingleDot=function(e){return"."===e||"%2e"===e.toLowerCase()},isDoubleDot=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},parseURL=function(e,r,t,a){var i,s,c,l,u=t||SCHEME_START,p=0,d="",h=!1,y=!1,A=!1;for(t||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,r=r.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),r=r.replace(TAB_AND_NEW_LINE,""),i=arrayFrom(r);p<=i.length;){switch(s=i[p],u){case SCHEME_START:if(!s||!ALPHA.test(s)){if(t)return INVALID_SCHEME;u=NO_SCHEME;continue}d+=s.toLowerCase(),u=SCHEME;break;case SCHEME:if(s&&(ALPHANUMERIC.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(t)return INVALID_SCHEME;d="",u=NO_SCHEME,p=0;continue}if(t&&(isSpecial(e)!=has$1(specialSchemes,d)||"file"==d&&(includesCredentials(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,t)return void(isSpecial(e)&&specialSchemes[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?u=FILE:isSpecial(e)&&a&&a.scheme==e.scheme?u=SPECIAL_RELATIVE_OR_AUTHORITY:isSpecial(e)?u=SPECIAL_AUTHORITY_SLASHES:"/"==i[p+1]?(u=PATH_OR_AUTHORITY,p++):(e.cannotBeABaseURL=!0,e.path.push(""),u=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!a||a.cannotBeABaseURL&&"#"!=s)return INVALID_SCHEME;if(a.cannotBeABaseURL&&"#"==s){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=FRAGMENT;break}u="file"==a.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=s||"/"!=i[p+1]){u=RELATIVE;continue}u=SPECIAL_AUTHORITY_IGNORE_SLASHES,p++;break;case PATH_OR_AUTHORITY:if("/"==s){u=AUTHORITY;break}u=PATH;continue;case RELATIVE:if(e.scheme=a.scheme,s==EOF)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==s||"\\"==s&&isSpecial(e))u=RELATIVE_SLASH;else if("?"==s)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=PATH;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}break;case RELATIVE_SLASH:if(!isSpecial(e)||"/"!=s&&"\\"!=s){if("/"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=PATH;continue}u=AUTHORITY}else u=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(u=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=s||"/"!=d.charAt(p+1))continue;p++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=s&&"\\"!=s){u=AUTHORITY;continue}break;case AUTHORITY:if("@"==s){h&&(d="%40"+d),h=!0,c=arrayFrom(d);for(var g=0;g65535)return INVALID_PORT;e.port=isSpecial(e)&&E===specialSchemes[e.scheme]?null:E,d=""}if(t)return;u=PATH_START;continue}return INVALID_PORT}d+=s;break;case FILE:if(e.scheme="file","/"==s||"\\"==s)u=FILE_SLASH;else{if(!a||"file"!=a.scheme){u=PATH;continue}if(s==EOF)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==s)e.host=a.host,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){startsWithWindowsDriveLetter(i.slice(p).join(""))||(e.host=a.host,e.path=a.path.slice(),shortenURLsPath(e)),u=PATH;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}}break;case FILE_SLASH:if("/"==s||"\\"==s){u=FILE_HOST;break}a&&"file"==a.scheme&&!startsWithWindowsDriveLetter(i.slice(p).join(""))&&(isWindowsDriveLetter(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=PATH;continue;case FILE_HOST:if(s==EOF||"/"==s||"\\"==s||"?"==s||"#"==s){if(!t&&isWindowsDriveLetter(d))u=PATH;else if(""==d){if(e.host="",t)return;u=PATH_START}else{if(l=parseHost(e,d))return l;if("localhost"==e.host&&(e.host=""),t)return;d="",u=PATH_START}continue}d+=s;break;case PATH_START:if(isSpecial(e)){if(u=PATH,"/"!=s&&"\\"!=s)continue}else if(t||"?"!=s)if(t||"#"!=s){if(s!=EOF&&(u=PATH,"/"!=s))continue}else e.fragment="",u=FRAGMENT;else e.query="",u=QUERY;break;case PATH:if(s==EOF||"/"==s||"\\"==s&&isSpecial(e)||!t&&("?"==s||"#"==s)){if(isDoubleDot(d)?(shortenURLsPath(e),"/"==s||"\\"==s&&isSpecial(e)||e.path.push("")):isSingleDot(d)?"/"==s||"\\"==s&&isSpecial(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&isWindowsDriveLetter(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(s==EOF||"?"==s||"#"==s))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==s?(e.query="",u=QUERY):"#"==s&&(e.fragment="",u=FRAGMENT)}else d+=percentEncode(s,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==s?(e.query="",u=QUERY):"#"==s?(e.fragment="",u=FRAGMENT):s!=EOF&&(e.path[0]+=percentEncode(s,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=s?s!=EOF&&("'"==s&&isSpecial(e)?e.query+="%27":e.query+="#"==s?"%23":percentEncode(s,C0ControlPercentEncodeSet)):(e.fragment="",u=FRAGMENT);break;case FRAGMENT:s!=EOF&&(e.fragment+=percentEncode(s,fragmentPercentEncodeSet))}p++}},URLConstructor=function URL(e){var r,t,a=anInstance(this,URLConstructor,"URL"),i=arguments.length>1?arguments[1]:void 0,s=toString(e),c=setInternalState(a,{type:"URL"});if(void 0!==i)if(i instanceof URLConstructor)r=getInternalURLState(i);else if(t=parseURL(r={},toString(i)))throw TypeError(t);if(t=parseURL(c,s,null,r))throw TypeError(t);var l=c.searchParams=new URLSearchParams$1,u=getInternalSearchParamsState(l);u.updateSearchParams(c.query),u.updateURL=function(){c.query=String(l)||null},descriptors||(a.href=serializeURL.call(a),a.origin=getOrigin.call(a),a.protocol=getProtocol.call(a),a.username=getUsername.call(a),a.password=getPassword.call(a),a.host=getHost.call(a),a.hostname=getHostname.call(a),a.port=getPort.call(a),a.pathname=getPathname.call(a),a.search=getSearch.call(a),a.searchParams=getSearchParams.call(a),a.hash=getHash.call(a))},URLPrototype=URLConstructor.prototype,serializeURL=function(){var e=getInternalURLState(this),r=e.scheme,t=e.username,a=e.password,i=e.host,s=e.port,c=e.path,l=e.query,u=e.fragment,p=r+":";return null!==i?(p+="//",includesCredentials(e)&&(p+=t+(a?":"+a:"")+"@"),p+=serializeHost(i),null!==s&&(p+=":"+s)):"file"==r&&(p+="//"),p+=e.cannotBeABaseURL?c[0]:c.length?"/"+c.join("/"):"",null!==l&&(p+="?"+l),null!==u&&(p+="#"+u),p},getOrigin=function(){var e=getInternalURLState(this),r=e.scheme,t=e.port;if("blob"==r)try{return new URLConstructor(r.path[0]).origin}catch(e){return"null"}return"file"!=r&&isSpecial(e)?r+"://"+serializeHost(e.host)+(null!==t?":"+t:""):"null"},getProtocol=function(){return getInternalURLState(this).scheme+":"},getUsername=function(){return getInternalURLState(this).username},getPassword=function(){return getInternalURLState(this).password},getHost=function(){var e=getInternalURLState(this),r=e.host,t=e.port;return null===r?"":null===t?serializeHost(r):serializeHost(r)+":"+t},getHostname=function(){var e=getInternalURLState(this).host;return null===e?"":serializeHost(e)},getPort=function(){var e=getInternalURLState(this).port;return null===e?"":String(e)},getPathname=function(){var e=getInternalURLState(this),r=e.path;return e.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},getSearch=function(){var e=getInternalURLState(this).query;return e?"?"+e:""},getSearchParams=function(){return getInternalURLState(this).searchParams},getHash=function(){var e=getInternalURLState(this).fragment;return e?"#"+e:""},accessorDescriptor=function(e,r){return{get:e,set:r,configurable:!0,enumerable:!0}};if(descriptors&&objectDefineProperties(URLPrototype,{href:accessorDescriptor(serializeURL,(function(e){var r=getInternalURLState(this),t=toString(e),a=parseURL(r,t);if(a)throw TypeError(a);getInternalSearchParamsState(r.searchParams).updateSearchParams(r.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(e){var r=getInternalURLState(this);parseURL(r,toString(e)+":",SCHEME_START)})),username:accessorDescriptor(getUsername,(function(e){var r=getInternalURLState(this),t=arrayFrom(toString(e));if(!cannotHaveUsernamePasswordPort(r)){r.username="";for(var a=0;a1?arguments[1]:void 0)},handlePrototype=function(e){if(e&&e.forEach!==arrayForEach)try{createNonEnumerableProperty(e,"forEach",arrayForEach)}catch(r){e.forEach=arrayForEach}};for(var COLLECTION_NAME in domIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype);handlePrototype(domTokenListPrototype);var propertyIsEnumerable=objectPropertyIsEnumerable.f,createMethod=function(e){return function(r){for(var t,a=toIndexedObject(r),i=objectKeys(a),s=i.length,c=0,l=[];s>c;)t=i[c++],descriptors&&!propertyIsEnumerable.call(a,t)||l.push(e?[t,a[t]]:a[t]);return l}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$entries=objectToArray.entries;_export({target:"Object",stat:!0},{entries:function entries(e){return $entries(e)}});var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,$startsWith="".startsWith,min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegexpLogic("startsWith"),MDN_POLYFILL_BUG=!(CORRECT_IS_REGEXP_LOGIC||(descriptor=getOwnPropertyDescriptor(String.prototype,"startsWith"),!descriptor||descriptor.writable)),descriptor;_export({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function startsWith(e){var r=toString(requireObjectCoercible(this));notARegexp(e);var t=toLength(min$1(arguments.length>1?arguments[1]:void 0,r.length)),a=toString(e);return $startsWith?$startsWith.call(r,a,t):r.slice(t,t+a.length)===a}});var floor=Math.floor,replace="".replace,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(e,r,t,a,i,s){var c=t+e.length,l=a.length,u=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==i&&(i=toObject(i),u=SUBSTITUTION_SYMBOLS),replace.call(s,u,(function(s,u){var p;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,t);case"'":return r.slice(c);case"<":p=i[u.slice(1,-1)];break;default:var d=+u;if(0===d)return s;if(d>l){var h=floor(d/10);return 0===h?s:h<=l?void 0===a[h-1]?u.charAt(1):a[h-1]+u.charAt(1):s}p=a[d-1]}return void 0===p?"":p}))},REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}));fixRegexpWellKnownSymbolLogic("replace",(function(e,r,t){var a=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function replace(e,t){var a=requireObjectCoercible(this),i=null==e?void 0:getMethod(e,REPLACE);return i?i.call(e,a,t):r.call(toString(a),e,t)},function(e,i){var s=anObject(this),c=toString(e);if("string"==typeof i&&-1===i.indexOf(a)&&-1===i.indexOf("$<")){var l=t(r,s,c,i);if(l.done)return l.value}var u=isCallable(i);u||(i=toString(i));var p=s.global;if(p){var d=s.unicode;s.lastIndex=0}for(var h=[];;){var y=regexpExecAbstract(s,c);if(null===y)break;if(h.push(y),!p)break;""===toString(y[0])&&(s.lastIndex=advanceStringIndex(c,toLength(s.lastIndex),d))}for(var A="",g=0,v=0;v=g&&(A+=c.slice(g,E)+S,g=E+m.length)}return A+c.slice(g)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=engineV8Version>=51||!fails((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var r=e[IS_CONCAT_SPREADABLE];return void 0!==r?!!r:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function concat(e){var r,t,a,i,s,c=toObject(this),l=arraySpeciesCreate(c,0),u=0;for(r=-1,a=arguments.length;rMAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(t=0;t=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(l,u++,s)}return l.length=u,l}});var cnt=0,imageCompressionLibUrl,worker;function createWorker(e){var r=[];return"function"==typeof e?r.push("(".concat(e,")()")):r.push(e),new Worker(URL.createObjectURL(new Blob(r)))}function createSourceObject(e){return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}function stringify(e){return JSON.stringify(e,(function(e,r){return"function"==typeof r?"BIC_FN:::(function () { return ".concat(r.toString()," })()"):r}))}function parse(o){if("string"==typeof o)return o;var result={};return Object.entries(o).forEach((function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];if("string"==typeof value&&value.startsWith("BIC_FN:::"))try{result[key]=eval(value.replace(/^BIC_FN:::/,""))}catch(e){throw e}else result[key]=parse(value)})),result}function generateLib(){return createSourceObject("\n // reconstruct library\n function imageCompression (){return (".concat(imageCompression,").apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ").concat(imageCompression.getDataUrlFromFile,"\n imageCompression.getFilefromDataUrl = ").concat(imageCompression.getFilefromDataUrl,"\n imageCompression.loadImage = ").concat(imageCompression.loadImage,"\n imageCompression.drawImageInCanvas = ").concat(imageCompression.drawImageInCanvas,"\n imageCompression.drawFileInCanvas = ").concat(imageCompression.drawFileInCanvas,"\n imageCompression.canvasToFile = ").concat(imageCompression.canvasToFile,"\n imageCompression.getExifOrientation = ").concat(imageCompression.getExifOrientation,"\n imageCompression.handleMaxWidthOrHeight = ").concat(imageCompression.handleMaxWidthOrHeight,"\n imageCompression.followExifOrientation = ").concat(imageCompression.followExifOrientation,"\n imageCompression.cleanupCanvasMemory = ").concat(imageCompression.cleanupCanvasMemory,"\n imageCompression.isAutoOrientationInBrowser = ").concat(imageCompression.isAutoOrientationInBrowser,"\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ").concat(imageCompression.approximateBelowMaximumCanvasSizeOfBrowser,"\n imageCompression.getBrowserName = ").concat(imageCompression.getBrowserName,"\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ").concat(isIOS,"\n \n getNewCanvasAndCtx = ").concat(getNewCanvasAndCtx,"\n CustomFileReader = FileReader\n CustomFile = File\n MaxCanvasSize = ").concat(JSON.stringify(MaxCanvasSize),"\n function compress (){return (").concat(compress,").apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ").concat(parse,"\n const UPNG = {}\n UPNG.toRGBA8 = ").concat(UPNG.toRGBA8,"\n UPNG.toRGBA8.decodeImage = ").concat(UPNG.toRGBA8.decodeImage,"\n UPNG.decode = ").concat(UPNG.decode,"\n UPNG.decode._decompress = ").concat(UPNG.decode._decompress,"\n UPNG.decode._inflate = ").concat(UPNG.decode._inflate,"\n UPNG.decode._readInterlace = ").concat(UPNG.decode._readInterlace,"\n UPNG.decode._getBPP = ").concat(UPNG.decode._getBPP," \n UPNG.decode._filterZero = ").concat(UPNG.decode._filterZero,"\n UPNG.decode._paeth = ").concat(UPNG.decode._paeth,"\n UPNG.decode._IHDR = ").concat(UPNG.decode._IHDR,"\n UPNG._bin = parse(").concat(stringify(UPNG._bin),")\n UPNG._copyTile = ").concat(UPNG._copyTile,"\n UPNG.encode = ").concat(UPNG.encode,"\n UPNG.encodeLL = ").concat(UPNG.encodeLL," \n UPNG.encode._main = ").concat(UPNG.encode._main,"\n UPNG.encode.compressPNG = ").concat(UPNG.encode.compressPNG," \n UPNG.encode.compress = ").concat(UPNG.encode.compress,"\n UPNG.encode.framize = ").concat(UPNG.encode.framize," \n UPNG.encode._updateFrame = ").concat(UPNG.encode._updateFrame," \n UPNG.encode._prepareDiff = ").concat(UPNG.encode._prepareDiff," \n UPNG.encode._filterZero = ").concat(UPNG.encode._filterZero," \n UPNG.encode._filterLine = ").concat(UPNG.encode._filterLine,"\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,"\n UPNG.crc = parse(").concat(stringify(UPNG.crc),")\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ").concat(UPNG.quantize," \n UPNG.quantize.getKDtree = ").concat(UPNG.quantize.getKDtree," \n UPNG.quantize.getNearest = ").concat(UPNG.quantize.getNearest," \n UPNG.quantize.planeDst = ").concat(UPNG.quantize.planeDst," \n UPNG.quantize.dist = ").concat(UPNG.quantize.dist," \n UPNG.quantize.splitPixels = ").concat(UPNG.quantize.splitPixels," \n UPNG.quantize.vecDot = ").concat(UPNG.quantize.vecDot," \n UPNG.quantize.stats = ").concat(UPNG.quantize.stats," \n UPNG.quantize.estats = ").concat(UPNG.quantize.estats,"\n UPNG.M4 = parse(").concat(stringify(UPNG.M4),")\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,'\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP["parse"] = ').concat(UZIP_1.parse,"\n UZIP._readLocal = ").concat(UZIP_1._readLocal,"\n UZIP.inflateRaw = ").concat(UZIP_1.inflateRaw,"\n UZIP.inflate = ").concat(UZIP_1.inflate,"\n UZIP.deflate = ").concat(UZIP_1.deflate,"\n UZIP.deflateRaw = ").concat(UZIP_1.deflateRaw,"\n UZIP.encode = ").concat(UZIP_1.encode,"\n UZIP._noNeed = ").concat(UZIP_1._noNeed,"\n UZIP._writeHeader = ").concat(UZIP_1._writeHeader,"\n UZIP.crc = parse(").concat(stringify(UZIP_1.crc),")\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ").concat(UZIP_1.adler,"\n UZIP.bin = parse(").concat(stringify(UZIP_1.bin),")\n UZIP.F = {}\n UZIP.F.deflateRaw = ").concat(UZIP_1.F.deflateRaw,"\n UZIP.F._bestMatch = ").concat(UZIP_1.F._bestMatch,"\n UZIP.F._howLong = ").concat(UZIP_1.F._howLong,"\n UZIP.F._hash = ").concat(UZIP_1.F._hash,"\n UZIP.saved = ").concat(UZIP_1.saved,"\n UZIP.F._writeBlock = ").concat(UZIP_1.F._writeBlock,"\n UZIP.F._copyExact = ").concat(UZIP_1.F._copyExact,"\n UZIP.F.getTrees = ").concat(UZIP_1.F.getTrees,"\n UZIP.F.getSecond = ").concat(UZIP_1.F.getSecond,"\n UZIP.F.nonZero = ").concat(UZIP_1.F.nonZero,"\n UZIP.F.contSize = ").concat(UZIP_1.F.contSize,"\n UZIP.F._codeTiny = ").concat(UZIP_1.F._codeTiny," \n UZIP.F._lenCodes = ").concat(UZIP_1.F._lenCodes," \n UZIP.F._hufTree = ").concat(UZIP_1.F._hufTree," \n UZIP.F.setDepth = ").concat(UZIP_1.F.setDepth," \n UZIP.F.restrictDepth = ").concat(UZIP_1.F.restrictDepth,"\n UZIP.F._goodIndex = ").concat(UZIP_1.F._goodIndex," \n UZIP.F._writeLit = ").concat(UZIP_1.F._writeLit," \n UZIP.F.inflate = ").concat(UZIP_1.F.inflate," \n UZIP.F._check = ").concat(UZIP_1.F._check," \n UZIP.F._decodeTiny = ").concat(UZIP_1.F._decodeTiny," \n UZIP.F._copyOut = ").concat(UZIP_1.F._copyOut," \n UZIP.F.makeCodes = ").concat(UZIP_1.F.makeCodes," \n UZIP.F.codes2map = ").concat(UZIP_1.F.codes2map," \n UZIP.F.revCodes = ").concat(UZIP_1.F.revCodes," \n\n // used only in deflate\n UZIP.F._putsE = ").concat(UZIP_1.F._putsE,"\n UZIP.F._putsF = ").concat(UZIP_1.F._putsF,"\n \n UZIP.F._bitsE = ").concat(UZIP_1.F._bitsE,"\n UZIP.F._bitsF = ").concat(UZIP_1.F._bitsF,"\n\n UZIP.F._get17 = ").concat(UZIP_1.F._get17,"\n UZIP.F._get25 = ").concat(UZIP_1.F._get25,"\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n "))}function generateWorkerScript(){return createWorker("\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n })\n ")}function compressOnWebWorker(e,r){return new Promise((function(t,a){var i=cnt+=1;imageCompressionLibUrl||(imageCompressionLibUrl=generateLib()),worker||(worker=generateWorkerScript()),worker.addEventListener("message",(function handler(e){if(e.data.id===i){if(void 0!==e.data.progress)return void r.onProgress(e.data.progress);worker.removeEventListener("message",handler),e.data.error&&a(new Error(e.data.error)),t(e.data.file)}})),worker.addEventListener("error",a),worker.postMessage({file:e,id:i,imageCompressionLibUrl:imageCompressionLibUrl,options:_objectSpread2(_objectSpread2({},r),{},{onProgress:void 0})})}))}function imageCompression(e,r){return new Promise((function(t,a){var i,s,c,l,u,p;if(i=_objectSpread2({},r),c=0,l=i.onProgress,i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,u="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=function(e){c=e,"function"==typeof l&&l(c)},!(e instanceof Blob||e instanceof CustomFile))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(p="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!u||"function"!=typeof Worker||p)return compress(e,i).then(function(e){try{return s=e,$If_3.call(this)}catch(e){return a(e)}}.bind(this),a);var d=function(){try{return $If_3.call(this)}catch(e){return a(e)}}.bind(this),h=function $Try_1_Catch(r){try{return compress(e,i).then((function(e){try{return s=e,d()}catch(e){return a(e)}}),a)}catch(e){return a(e)}};try{return compressOnWebWorker(e,i).then((function(e){try{return s=e,d()}catch(e){return h()}}),h)}catch(e){h()}function $If_3(){try{s.name=e.name,s.lastModified=e.lastModified}catch(e){}return t(s)}}))}return imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.getBrowserName=getBrowserName,imageCompression.version="1.0.16",imageCompression})); +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).imageCompression=r()}(this,(function(){"use strict";function _mergeNamespaces(e,r){return r.forEach((function(r){Object.keys(r).forEach((function(t){if("default"!==t&&!(t in e)){var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:function(){return r[t]}})}}))})),Object.freeze(e)}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function _objectSpread2(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,a=new Array(r);t=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=match[1])));var engineV8Version=version&&+version,fails=function(e){try{return!!e()}catch(e){return!0}},nativeSymbol=!!Object.getOwnPropertySymbols&&!fails((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,WellKnownSymbolsStore=shared("wks"),Symbol$1=global$1.Symbol,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(e){return has$1(WellKnownSymbolsStore,e)&&(nativeSymbol||"string"==typeof WellKnownSymbolsStore[e])||(nativeSymbol&&has$1(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},TO_STRING_TAG$4=wellKnownSymbol("toStringTag"),test$1={};test$1[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$1),descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),isObject=function(e){return"object"==typeof e?null!==e:isCallable(e)},document$3=global$1.document,EXISTS$1=isObject(document$3)&&isObject(document$3.createElement),documentCreateElement=function(e){return EXISTS$1?document$3.createElement(e):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(e){if(isObject(e))return e;throw TypeError(String(e)+" is not an object")},isSymbol=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var r=getBuiltIn("Symbol");return isCallable(r)&&Object(e)instanceof r},tryToString=function(e){try{return String(e)}catch(e){return"Object"}},aCallable=function(e){if(isCallable(e))return e;throw TypeError(tryToString(e)+" is not a function")},getMethod=function(e,r){var t=e[r];return null==t?void 0:aCallable(t)},ordinaryToPrimitive=function(e,r){var t,a;if("string"===r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;if(isCallable(t=e.valueOf)&&!isObject(a=t.call(e)))return a;if("string"!==r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;throw TypeError("Can't convert object to primitive value")},TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),toPrimitive=function(e,r){if(!isObject(e)||isSymbol(e))return e;var t,a=getMethod(e,TO_PRIMITIVE);if(a){if(void 0===r&&(r="default"),t=a.call(e,r),!isObject(t)||isSymbol(t))return t;throw TypeError("Can't convert object to primitive value")}return void 0===r&&(r="number"),ordinaryToPrimitive(e,r)},toPropertyKey=function(e){var r=toPrimitive(e,"string");return isSymbol(r)?r:String(r)},$defineProperty=Object.defineProperty,f$5=descriptors?$defineProperty:function defineProperty(e,r,t){if(anObject(e),r=toPropertyKey(r),anObject(t),ie8DomDefine)try{return $defineProperty(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported");return"value"in t&&(e[r]=t.value),e},objectDefineProperty={f:f$5},createPropertyDescriptor=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}},createNonEnumerableProperty=descriptors?function(e,r,t){return objectDefineProperty.f(e,r,createPropertyDescriptor(1,t))}:function(e,r,t){return e[r]=t,e},functionToString=Function.toString;isCallable(sharedStore.inspectSource)||(sharedStore.inspectSource=function(e){return functionToString.call(e)});var inspectSource=sharedStore.inspectSource,WeakMap$1=global$1.WeakMap,nativeWeakMap=isCallable(WeakMap$1)&&/native code/.test(inspectSource(WeakMap$1)),keys$2=shared("keys"),sharedKey=function(e){return keys$2[e]||(keys$2[e]=uid(e))},hiddenKeys$1={},OBJECT_ALREADY_INITIALIZED="Object already initialized",WeakMap=global$1.WeakMap,set$2,get$1,has,enforce=function(e){return has(e)?get$1(e):set$2(e,{})},getterFor=function(e){return function(r){var t;if(!isObject(r)||(t=get$1(r)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}};if(nativeWeakMap||sharedStore.state){var store=sharedStore.state||(sharedStore.state=new WeakMap),wmget=store.get,wmhas=store.has,wmset=store.set;set$2=function(e,r){if(wmhas.call(store,e))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,wmset.call(store,e,r),r},get$1=function(e){return wmget.call(store,e)||{}},has=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys$1[STATE]=!0,set$2=function(e,r){if(has$1(e,STATE))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,createNonEnumerableProperty(e,STATE,r),r},get$1=function(e){return has$1(e,STATE)?e[STATE]:{}},has=function(e){return has$1(e,STATE)}}var internalState={set:set$2,get:get$1,has:has,enforce:enforce,getterFor:getterFor},FunctionPrototype$1=Function.prototype,getDescriptor=descriptors&&Object.getOwnPropertyDescriptor,EXISTS=has$1(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function something(){}.name,CONFIGURABLE=EXISTS&&(!descriptors||descriptors&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},redefine=createCommonjsModule((function(e){var r=functionName.CONFIGURABLE,t=internalState.get,a=internalState.enforce,i=String(String).split("String");(e.exports=function(e,t,s,c){var l,u=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet,h=c&&void 0!==c.name?c.name:t;isCallable(s)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!has$1(s,"name")||r&&s.name!==h)&&createNonEnumerableProperty(s,"name",h),(l=a(s)).source||(l.source=i.join("string"==typeof h?h:""))),e!==global$1?(u?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=s:createNonEnumerableProperty(e,t,s)):p?e[t]=s:setGlobal(t,s)})(Function.prototype,"toString",(function toString(){return isCallable(this)&&t(this).source||inspectSource(this)}))})),toString$1={}.toString,classofRaw=function(e){return toString$1.call(e).slice(8,-1)},TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,r){try{return e[r]}catch(e){}},classof=toStringTagSupport?classofRaw:function(e){var r,t,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(r=Object(e),TO_STRING_TAG$3))?t:CORRECT_ARGUMENTS?classofRaw(r):"Object"==(a=classofRaw(r))&&isCallable(r.callee)?"Arguments":a},objectToString=toStringTagSupport?{}.toString:function toString(){return"[object "+classof(this)+"]"};toStringTagSupport||redefine(Object.prototype,"toString",objectToString,{unsafe:!0});var $propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$4&&!$propertyIsEnumerable.call({1:2},1),f$4=NASHORN_BUG?function propertyIsEnumerable(e){var r=getOwnPropertyDescriptor$4(this,e);return!!r&&r.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable={f:f$4},split="".split,indexedObject=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$3=descriptors?$getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,r){if(e=toIndexedObject(e),r=toPropertyKey(r),ie8DomDefine)try{return $getOwnPropertyDescriptor(e,r)}catch(e){}if(has$1(e,r))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,r),e[r])},objectGetOwnPropertyDescriptor={f:f$3},ceil=Math.ceil,floor$7=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor$7:ceil)(e)},min$6=Math.min,toLength=function(e){return e>0?min$6(toInteger(e),9007199254740991):0},max$2=Math.max,min$5=Math.min,toAbsoluteIndex=function(e,r){var t=toInteger(e);return t<0?max$2(t+r,0):min$5(t,r)},createMethod$5=function(e){return function(r,t,a){var i,s=toIndexedObject(r),c=toLength(s.length),l=toAbsoluteIndex(a,c);if(e&&t!=t){for(;c>l;)if((i=s[l++])!=i)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===t)return e||l||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(e,r){var t,a=toIndexedObject(e),i=0,s=[];for(t in a)!has$1(hiddenKeys$1,t)&&has$1(a,t)&&s.push(t);for(;r.length>i;)has$1(a,t=r[i++])&&(~indexOf(s,t)||s.push(t));return s},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys=enumBugKeys.concat("length","prototype"),f$2=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return objectKeysInternal(e,hiddenKeys)},objectGetOwnPropertyNames={f:f$2},f$1=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$1},ownKeys=getBuiltIn("Reflect","ownKeys")||function ownKeys(e){var r=objectGetOwnPropertyNames.f(anObject(e)),t=objectGetOwnPropertySymbols.f;return t?r.concat(t(e)):r},copyConstructorProperties=function(e,r){for(var t=ownKeys(r),a=objectDefineProperty.f,i=objectGetOwnPropertyDescriptor.f,s=0;ss;s++)if((l=callFn(e[s]))&&l instanceof Result)return l;return new Result(!1)}a=getIterator(e,i)}for(u=a.next;!(p=u.call(a)).done;){try{l=callFn(p.value)}catch(e){iteratorClose(a,"throw",e)}if("object"==typeof l&&l&&l instanceof Result)return l}return new Result(!1)},ITERATOR$6=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$6]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration=function(e,r){if(!r&&!SAFE_CLOSING)return!1;var t=!1;try{var a={};a[ITERATOR$6]=function(){return{next:function(){return{done:t=!0}}}},e(a)}catch(e){}return t},empty=[],construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=constructorRegExp.exec,INCORRECT_TO_STRING=!constructorRegExp.exec((function(){})),isConstructorModern=function(e){if(!isCallable(e))return!1;try{return construct(Object,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable(e))return!1;switch(classof(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return INCORRECT_TO_STRING||!!exec.call(constructorRegExp,inspectSource(e))},isConstructor=!construct||fails((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,aConstructor=function(e){if(isConstructor(e))return e;throw TypeError(tryToString(e)+" is not a constructor")},SPECIES$5=wellKnownSymbol("species"),speciesConstructor=function(e,r){var t,a=anObject(e).constructor;return void 0===a||null==(t=anObject(a)[SPECIES$5])?r:aConstructor(t)},html=getBuiltIn("document","documentElement"),engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent),engineIsNode="process"==classofRaw(global$1.process),set$1=global$1.setImmediate,clear=global$1.clearImmediate,process$2=global$1.process,MessageChannel=global$1.MessageChannel,Dispatch=global$1.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",location,defer,channel,port;try{location=global$1.location}catch(e){}var run=function(e){if(queue.hasOwnProperty(e)){var r=queue[e];delete queue[e],r()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$1.postMessage(String(e),location.protocol+"//"+location.host)};set$1&&clear||(set$1=function setImmediate(e){for(var r=[],t=arguments.length,a=1;t>a;)r.push(arguments[a++]);return queue[++counter]=function(){(isCallable(e)?e:Function(e)).apply(void 0,r)},defer(counter),counter},clear=function clearImmediate(e){delete queue[e]},engineIsNode?defer=function(e){process$2.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!engineIsIos?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=functionBindContext(port.postMessage,port,1)):global$1.addEventListener&&isCallable(global$1.postMessage)&&!global$1.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global$1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(e){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$1,clear:clear},engineIsIosPebble=/ipad|iphone|ipod/i.test(engineUserAgent)&&void 0!==global$1.Pebble,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(engineUserAgent),getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,MutationObserver=global$1.MutationObserver||global$1.WebKitMutationObserver,document$2=global$1.document,process$1=global$1.process,Promise$1=global$1.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,flush,head,last,notify$1,toggle,node,promise,then;queueMicrotask||(flush=function(){var e,r;for(engineIsNode&&(e=process$1.domain)&&e.exit();head;){r=head.fn,head=head.next;try{r()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},engineIsIos||engineIsNode||engineIsWebosWebkit||!MutationObserver||!document$2?!engineIsIosPebble&&Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),promise.constructor=Promise$1,then=promise.then,notify$1=function(){then.call(promise,flush)}):notify$1=engineIsNode?function(){process$1.nextTick(flush)}:function(){macrotask.call(global$1,flush)}:(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}));var microtask=queueMicrotask||function(e){var r={fn:e,next:void 0};last&&(last.next=r),head||(head=r,notify$1()),last=r},PromiseCapability=function(e){var r,t;this.promise=new e((function(e,a){if(void 0!==r||void 0!==t)throw TypeError("Bad Promise constructor");r=e,t=a})),this.resolve=aCallable(r),this.reject=aCallable(t)},f=function(e){return new PromiseCapability(e)},newPromiseCapability$1={f:f},promiseResolve=function(e,r){if(anObject(e),isObject(r)&&r.constructor===e)return r;var t=newPromiseCapability$1.f(e);return(0,t.resolve)(r),t.promise},hostReportErrors=function(e,r){var t=global$1.console;t&&t.error&&(1===arguments.length?t.error(e):t.error(e,r))},perform=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},engineIsBrowser="object"==typeof window,task=task$1.set,SPECIES$4=wellKnownSymbol("species"),PROMISE="Promise",getInternalState$4=internalState.get,setInternalState$5=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),NativePromisePrototype=nativePromiseConstructor&&nativePromiseConstructor.prototype,PromiseConstructor=nativePromiseConstructor,PromiseConstructorPrototype=NativePromisePrototype,TypeError$1=global$1.TypeError,document$1=global$1.document,process=global$1.process,newPromiseCapability=newPromiseCapability$1.f,newGenericPromiseCapability=newPromiseCapability,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),NATIVE_REJECTION_EVENT=isCallable(global$1.PromiseRejectionEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,SUBCLASSING=!1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,FORCED$6=isForced_1(PROMISE,(function(){var e=inspectSource(PromiseConstructor),r=e!==String(PromiseConstructor);if(!r&&66===engineV8Version)return!0;if(engineV8Version>=51&&/native code/.test(e))return!1;var t=new PromiseConstructor((function(e){e(1)})),FakePromise=function(e){e((function(){}),(function(){}))};return(t.constructor={})[SPECIES$4]=FakePromise,!(SUBCLASSING=t.then((function(){}))instanceof FakePromise)||!r&&engineIsBrowser&&!NATIVE_REJECTION_EVENT})),INCORRECT_ITERATION=FORCED$6||!checkCorrectnessOfIteration((function(e){PromiseConstructor.all(e).catch((function(){}))})),isThenable=function(e){var r;return!(!isObject(e)||!isCallable(r=e.then))&&r},notify=function(e,r){if(!e.notified){e.notified=!0;var t=e.reactions;microtask((function(){for(var a=e.value,i=e.state==FULFILLED,s=0;t.length>s;){var c,l,u,p=t[s++],d=i?p.ok:p.fail,h=p.resolve,y=p.reject,A=p.domain;try{d?(i||(e.rejection===UNHANDLED&&onHandleUnhandled(e),e.rejection=HANDLED),!0===d?c=a:(A&&A.enter(),c=d(a),A&&(A.exit(),u=!0)),c===p.promise?y(TypeError$1("Promise-chain cycle")):(l=isThenable(c))?l.call(c,h,y):h(c)):y(a)}catch(e){A&&!u&&A.exit(),y(e)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(e)}))}},dispatchEvent=function(e,r,t){var a,i;DISPATCH_EVENT?((a=document$1.createEvent("Event")).promise=r,a.reason=t,a.initEvent(e,!1,!0),global$1.dispatchEvent(a)):a={promise:r,reason:t},!NATIVE_REJECTION_EVENT&&(i=global$1["on"+e])?i(a):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",t)},onUnhandled=function(e){task.call(global$1,(function(){var r,t=e.facade,a=e.value;if(isUnhandled(e)&&(r=perform((function(){engineIsNode?process.emit("unhandledRejection",a,t):dispatchEvent(UNHANDLED_REJECTION,t,a)})),e.rejection=engineIsNode||isUnhandled(e)?UNHANDLED:HANDLED,r.error))throw r.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){task.call(global$1,(function(){var r=e.facade;engineIsNode?process.emit("rejectionHandled",r):dispatchEvent(REJECTION_HANDLED,r,e.value)}))},bind=function(e,r,t){return function(a){e(r,a,t)}},internalReject=function(e,r,t){e.done||(e.done=!0,t&&(e=t),e.value=r,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,r,t){if(!e.done){e.done=!0,t&&(e=t);try{if(e.facade===r)throw TypeError$1("Promise can't be resolved itself");var a=isThenable(r);a?microtask((function(){var t={done:!1};try{a.call(r,bind(internalResolve,t,e),bind(internalReject,t,e))}catch(r){internalReject(t,r,e)}})):(e.value=r,e.state=FULFILLED,notify(e,!1))}catch(r){internalReject({done:!1},r,e)}}};if(FORCED$6&&(PromiseConstructor=function Promise(e){anInstance(this,PromiseConstructor,PROMISE),aCallable(e),Internal.call(this);var r=getInternalState$4(this);try{e(bind(internalResolve,r),bind(internalReject,r))}catch(e){internalReject(r,e)}},PromiseConstructorPrototype=PromiseConstructor.prototype,Internal=function Promise(e){setInternalState$5(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})},Internal.prototype=redefineAll(PromiseConstructorPrototype,{then:function then(e,r){var t=getInternalPromiseState(this),a=newPromiseCapability(speciesConstructor(this,PromiseConstructor));return a.ok=!isCallable(e)||e,a.fail=isCallable(r)&&r,a.domain=engineIsNode?process.domain:void 0,t.parent=!0,t.reactions.push(a),t.state!=PENDING&¬ify(t,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal,r=getInternalState$4(e);this.promise=e,this.resolve=bind(internalResolve,r),this.reject=bind(internalReject,r)},newPromiseCapability$1.f=newPromiseCapability=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable(nativePromiseConstructor)&&NativePromisePrototype!==Object.prototype)){nativeThen=NativePromisePrototype.then,SUBCLASSING||(redefine(NativePromisePrototype,"then",(function then(e,r){var t=this;return new PromiseConstructor((function(e,r){nativeThen.call(t,e,r)})).then(e,r)}),{unsafe:!0}),redefine(NativePromisePrototype,"catch",PromiseConstructorPrototype.catch,{unsafe:!0}));try{delete NativePromisePrototype.constructor}catch(e){}objectSetPrototypeOf&&objectSetPrototypeOf(NativePromisePrototype,PromiseConstructorPrototype)}_export({global:!0,wrap:!0,forced:FORCED$6},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE),PromiseWrapper=getBuiltIn(PROMISE),_export({target:PROMISE,stat:!0,forced:FORCED$6},{reject:function reject(e){var r=newPromiseCapability(this);return r.reject.call(void 0,e),r.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED$6},{resolve:function resolve(e){return promiseResolve(this,e)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function all(e){var r=this,t=newPromiseCapability(r),a=t.resolve,i=t.reject,s=perform((function(){var t=aCallable(r.resolve),s=[],c=0,l=1;iterate(e,(function(e){var u=c++,p=!1;s.push(void 0),l++,t.call(r,e).then((function(e){p||(p=!0,s[u]=e,--l||a(s))}),i)})),--l||a(s)}));return s.error&&i(s.value),t.promise},race:function race(e){var r=this,t=newPromiseCapability(r),a=t.reject,i=perform((function(){var i=aCallable(r.resolve);iterate(e,(function(e){i.call(r,e).then(t.resolve,a)}))}));return i.error&&a(i.value),t.promise}});var inheritIfRequired=function(e,r,t){var a,i;return objectSetPrototypeOf&&isCallable(a=r.constructor)&&a!==t&&isObject(i=a.prototype)&&i!==t.prototype&&objectSetPrototypeOf(e,i),e},objectKeys=Object.keys||function keys(e){return objectKeysInternal(e,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function defineProperties(e,r){anObject(e);for(var t,a=objectKeys(r),i=a.length,s=0;i>s;)objectDefineProperty.f(e,t=a[s++],r[t]);return e},GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var r=e.parentWindow.Object;return e=null,r},NullProtoObjectViaIFrame=function(){var e,r=documentCreateElement("iframe"),t="java"+SCRIPT+":";return r.style.display="none",html.appendChild(r),r.src=String(t),(e=r.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys[e]];return NullProtoObject()};hiddenKeys$1[IE_PROTO$1]=!0;var objectCreate=Object.create||function create(e,r){var t;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject(e),t=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,t[IE_PROTO$1]=e):t=NullProtoObject(),void 0===r?t:objectDefineProperties(t,r)},toString=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},whitespaces="\t\n\v\f\r                 \u2028\u2029\ufeff",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$4=function(e){return function(r){var t=toString(requireObjectCoercible(r));return 1&e&&(t=t.replace(ltrim,"")),2&e&&(t=t.replace(rtrim,"")),t}},stringTrim={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},getOwnPropertyNames$1=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,defineProperty$4=objectDefineProperty.f,trim=stringTrim.trim,NUMBER="Number",NativeNumber=global$1[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classofRaw(objectCreate(NumberPrototype))==NUMBER,toNumber=function(e){if(isSymbol(e))throw TypeError("Cannot convert a Symbol value to a number");var r,t,a,i,s,c,l,u,p=toPrimitive(e,"number");if("string"==typeof p&&p.length>2)if(43===(r=(p=trim(p)).charCodeAt(0))||45===r){if(88===(t=p.charCodeAt(2))||120===t)return NaN}else if(48===r){switch(p.charCodeAt(1)){case 66:case 98:a=2,i=49;break;case 79:case 111:a=8,i=55;break;default:return+p}for(c=(s=p.slice(2)).length,l=0;li)return NaN;return parseInt(s,a)}return+p};if(isForced_1(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var NumberWrapper=function Number(e){var r=arguments.length<1?0:e,t=this;return t instanceof NumberWrapper&&(BROKEN_CLASSOF?fails((function(){NumberPrototype.valueOf.call(t)})):classofRaw(t)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(r)),t,NumberWrapper):toNumber(r)},keys$1=descriptors?getOwnPropertyNames$1(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),j$1=0,key$1;keys$1.length>j$1;j$1++)has$1(NativeNumber,key$1=keys$1[j$1])&&!has$1(NumberWrapper,key$1)&&defineProperty$4(NumberWrapper,key$1,getOwnPropertyDescriptor$1(NativeNumber,key$1));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global$1,NUMBER,NumberWrapper)}var FUNCTION_NAME_EXISTS=functionName.EXISTS,defineProperty$3=objectDefineProperty.f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME$1="name";descriptors&&!FUNCTION_NAME_EXISTS&&defineProperty$3(FunctionPrototype,NAME$1,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(e){return""}}}),_export({global:!0},{globalThis:global$1});var $assign=Object.assign,defineProperty$2=Object.defineProperty,objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},r={},t=Symbol();return e[t]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),7!=$assign({},e)[t]||"abcdefghijklmnopqrst"!=objectKeys($assign({},r)).join("")}))?function assign(e,r){for(var t=toObject(e),a=arguments.length,i=1,s=objectGetOwnPropertySymbols.f,c=objectPropertyIsEnumerable.f;a>i;)for(var l,u=indexedObject(arguments[i++]),p=s?objectKeys(u).concat(s(u)):objectKeys(u),d=p.length,h=0;d>h;)l=p[h++],descriptors&&!c.call(u,l)||(t[l]=u[l]);return t}:$assign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign});var path=global$1;path.Object.assign;var regexpFlags=function(){var e=anObject(this),r="";return e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.sticky&&(r+="y"),r},$RegExp$2=global$1.RegExp,UNSUPPORTED_Y$2=fails((function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET=fails((function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={UNSUPPORTED_Y:UNSUPPORTED_Y$2,BROKEN_CARET:BROKEN_CARET},$RegExp$1=global$1.RegExp,regexpUnsupportedDotAll=fails((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),$RegExp=global$1.RegExp,regexpUnsupportedNcg=fails((function(){var e=$RegExp("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})),getInternalState$3=internalState.get,nativeExec=RegExp.prototype.exec,nativeReplace=shared("native-string-replace",String.prototype.replace),patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=(re1=/a/,re2=/b*/g,nativeExec.call(re1,"a"),nativeExec.call(re2,"a"),0!==re1.lastIndex||0!==re2.lastIndex),re1,re2,UNSUPPORTED_Y$1=regexpStickyHelpers.UNSUPPORTED_Y||regexpStickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||regexpUnsupportedDotAll||regexpUnsupportedNcg;PATCH&&(patchedExec=function exec(e){var r,t,a,i,s,c,l,u=this,p=getInternalState$3(u),d=toString(e),h=p.raw;if(h)return h.lastIndex=u.lastIndex,r=patchedExec.call(h,d),u.lastIndex=h.lastIndex,r;var y=p.groups,A=UNSUPPORTED_Y$1&&u.sticky,g=regexpFlags.call(u),E=u.source,v=0,m=d;if(A&&(-1===(g=g.replace("y","")).indexOf("g")&&(g+="g"),m=d.slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==d.charAt(u.lastIndex-1))&&(E="(?: "+E+")",m=" "+m,v++),t=new RegExp("^(?:"+E+")",g)),NPCG_INCLUDED&&(t=new RegExp("^"+E+"$(?!\\s)",g)),UPDATES_LAST_INDEX_WRONG&&(a=u.lastIndex),i=nativeExec.call(A?t:u,m),A?i?(i.input=i.input.slice(v),i[0]=i[0].slice(v),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&i&&(u.lastIndex=u.global?i.index+i[0].length:a),NPCG_INCLUDED&&i&&i.length>1&&nativeReplace.call(i[0],t,(function(){for(s=1;s=l?e?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(i=s.charCodeAt(c+1))<56320||i>57343?e?s.charAt(c):a:e?s.slice(c,c+2):i-56320+(a-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex=function(e,r,t){return r+(t?charAt$1(e,r).length:1)},regexpExecAbstract=function(e,r){var t=e.exec;if(isCallable(t)){var a=t.call(e,r);return null!==a&&anObject(a),a}if("RegExp"===classofRaw(e))return regexpExec.call(e,r);throw TypeError("RegExp#exec called on incompatible receiver")},UNSUPPORTED_Y=regexpStickyHelpers.UNSUPPORTED_Y,arrayPush=[].push,min$4=Math.min,MAX_UINT32=4294967295,SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails((function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var t="ab".split(e);return 2!==t.length||"a"!==t[0]||"b"!==t[1]}));fixRegexpWellKnownSymbolLogic("split",(function(e,r,t){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var a=toString(requireObjectCoercible(this)),i=void 0===t?MAX_UINT32:t>>>0;if(0===i)return[];if(void 0===e)return[a];if(!isRegexp(e))return r.call(a,e,i);for(var s,c,l,u=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=new RegExp(e.source,p+"g");(s=regexpExec.call(h,a))&&!((c=h.lastIndex)>d&&(u.push(a.slice(d,s.index)),s.length>1&&s.index=i));)h.lastIndex===s.index&&h.lastIndex++;return d===a.length?!l&&h.test("")||u.push(""):u.push(a.slice(d)),u.length>i?u.slice(0,i):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)}:r,[function split(r,t){var i=requireObjectCoercible(this),s=null==r?void 0:getMethod(r,e);return s?s.call(r,i,t):a.call(toString(i),r,t)},function(e,i){var s=anObject(this),c=toString(e),l=t(a,s,c,i,a!==r);if(l.done)return l.value;var u=speciesConstructor(s,RegExp),p=s.unicode,d=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),h=new u(UNSUPPORTED_Y?"^(?:"+s.source+")":s,d),y=void 0===i?MAX_UINT32:i>>>0;if(0===y)return[];if(0===c.length)return null===regexpExecAbstract(h,c)?[c]:[];for(var A=0,g=0,E=[];g=r.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==t?{value:a,done:!1}:"values"==t?{value:r[a],done:!1}:{value:[a,r[a]],done:!1}}),"values");iterators.Arguments=iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var arrayBufferNative="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,defineProperty$1=objectDefineProperty.f,Int8Array$3=global$1.Int8Array,Int8ArrayPrototype=Int8Array$3&&Int8Array$3.prototype,Uint8ClampedArray=global$1.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray&&Uint8ClampedArray.prototype,TypedArray=Int8Array$3&&objectGetPrototypeOf(Int8Array$3),TypedArrayPrototype=Int8ArrayPrototype&&objectGetPrototypeOf(Int8ArrayPrototype),ObjectPrototype$1=Object.prototype,isPrototypeOf=ObjectPrototype$1.isPrototypeOf,TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),TYPED_ARRAY_TAG=uid("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR$1=uid("TYPED_ARRAY_CONSTRUCTOR"),NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferNative&&!!objectSetPrototypeOf&&"Opera"!==classof(global$1.opera),TYPED_ARRAY_TAG_REQIRED=!1,NAME,Constructor,Prototype,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView=function isView(e){if(!isObject(e))return!1;var r=classof(e);return"DataView"===r||has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},isTypedArray=function(e){if(!isObject(e))return!1;var r=classof(e);return has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},aTypedArray$m=function(e){if(isTypedArray(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor$2=function(e){if(isCallable(e)&&(!objectSetPrototypeOf||isPrototypeOf.call(TypedArray,e)))return e;throw TypeError(tryToString(e)+" is not a typed array constructor")},exportTypedArrayMethod$n=function(e,r,t){if(descriptors){if(t)for(var a in TypedArrayConstructorsList){var i=global$1[a];if(i&&has$1(i.prototype,e))try{delete i.prototype[e]}catch(e){}}TypedArrayPrototype[e]&&!t||redefine(TypedArrayPrototype,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&Int8ArrayPrototype[e]||r)}},exportTypedArrayStaticMethod=function(e,r,t){var a,i;if(descriptors){if(objectSetPrototypeOf){if(t)for(a in TypedArrayConstructorsList)if((i=global$1[a])&&has$1(i,e))try{delete i[e]}catch(e){}if(TypedArray[e]&&!t)return;try{return redefine(TypedArray,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&TypedArray[e]||r)}catch(e){}}for(a in TypedArrayConstructorsList)!(i=global$1[a])||i[e]&&!t||redefine(i,e,r)}};for(NAME in TypedArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype?createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor):NATIVE_ARRAY_BUFFER_VIEWS$1=!1;for(NAME in BigIntArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype&&createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!isCallable(TypedArray)||TypedArray===Function.prototype)&&(TypedArray=function TypedArray(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME],TypedArray);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!TypedArrayPrototype||TypedArrayPrototype===ObjectPrototype$1)&&(TypedArrayPrototype=TypedArray.prototype,NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME].prototype,TypedArrayPrototype);if(NATIVE_ARRAY_BUFFER_VIEWS$1&&objectGetPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype&&objectSetPrototypeOf(Uint8ClampedArrayPrototype,TypedArrayPrototype),descriptors&&!has$1(TypedArrayPrototype,TO_STRING_TAG$1))for(NAME in TYPED_ARRAY_TAG_REQIRED=!0,defineProperty$1(TypedArrayPrototype,TO_STRING_TAG$1,{get:function(){return isObject(this)?this[TYPED_ARRAY_TAG]:void 0}}),TypedArrayConstructorsList)global$1[NAME]&&createNonEnumerableProperty(global$1[NAME],TYPED_ARRAY_TAG,NAME);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$1,TYPED_ARRAY_CONSTRUCTOR:TYPED_ARRAY_CONSTRUCTOR$1,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED&&TYPED_ARRAY_TAG,aTypedArray:aTypedArray$m,aTypedArrayConstructor:aTypedArrayConstructor$2,exportTypedArrayMethod:exportTypedArrayMethod$n,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod,isView:isView,isTypedArray:isTypedArray,TypedArray:TypedArray,TypedArrayPrototype:TypedArrayPrototype},NATIVE_ARRAY_BUFFER_VIEWS=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$1=global$1.ArrayBuffer,Int8Array$2=global$1.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS||!fails((function(){Int8Array$2(1)}))||!fails((function(){new Int8Array$2(-1)}))||!checkCorrectnessOfIteration((function(e){new Int8Array$2,new Int8Array$2(null),new Int8Array$2(1.5),new Int8Array$2(e)}),!0)||fails((function(){return 1!==new Int8Array$2(new ArrayBuffer$1(2),1,void 0).length})),toIndex=function(e){if(void 0===e)return 0;var r=toInteger(e),t=toLength(r);if(r!==t)throw RangeError("Wrong length or index");return t},abs=Math.abs,pow$1=Math.pow,floor$6=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(e,r,t){var a,i,s,c=new Array(t),l=8*t-r-1,u=(1<>1,d=23===r?pow$1(2,-24)-pow$1(2,-77):0,h=e<0||0===e&&1/e<0?1:0,y=0;for((e=abs(e))!=e||e===1/0?(i=e!=e?1:0,a=u):(a=floor$6(log(e)/LN2),e*(s=pow$1(2,-a))<1&&(a--,s*=2),(e+=a+p>=1?d/s:d*pow$1(2,1-p))*s>=2&&(a++,s/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(e*s-1)*pow$1(2,r),a+=p):(i=e*pow$1(2,p-1)*pow$1(2,r),a=0));r>=8;c[y++]=255&i,i/=256,r-=8);for(a=a<0;c[y++]=255&a,a/=256,l-=8);return c[--y]|=128*h,c},unpack=function(e,r){var t,a=e.length,i=8*a-r-1,s=(1<>1,l=i-7,u=a-1,p=e[u--],d=127&p;for(p>>=7;l>0;d=256*d+e[u],u--,l-=8);for(t=d&(1<<-l)-1,d>>=-l,l+=r;l>0;t=256*t+e[u],u--,l-=8);if(0===d)d=1-c;else{if(d===s)return t?NaN:p?-1/0:1/0;t+=pow$1(2,r),d-=c}return(p?-1:1)*t*pow$1(2,d-r)},ieee754={pack:pack,unpack:unpack},arrayFill=function fill(e){for(var r=toObject(this),t=toLength(r.length),a=arguments.length,i=toAbsoluteIndex(a>1?arguments[1]:void 0,t),s=a>2?arguments[2]:void 0,c=void 0===s?t:toAbsoluteIndex(s,t);c>i;)r[i++]=e;return r},getOwnPropertyNames=objectGetOwnPropertyNames.f,defineProperty=objectDefineProperty.f,PROPER_FUNCTION_NAME$2=functionName.PROPER,CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,getInternalState$1=internalState.get,setInternalState$3=internalState.set,ARRAY_BUFFER="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer=global$1[ARRAY_BUFFER],$ArrayBuffer=NativeArrayBuffer,$DataView=global$1[DATA_VIEW],$DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,RangeError$1=global$1.RangeError,packIEEE754=ieee754.pack,unpackIEEE754=ieee754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter=function(e,r){defineProperty(e[PROTOTYPE],r,{get:function(){return getInternalState$1(this)[r]}})},get=function(e,r,t,a){var i=toIndex(t),s=getInternalState$1(e);if(i+r>s.byteLength)throw RangeError$1(WRONG_INDEX);var c=getInternalState$1(s.buffer).bytes,l=i+s.byteOffset,u=c.slice(l,l+r);return a?u:u.reverse()},set=function(e,r,t,a,i,s){var c=toIndex(t),l=getInternalState$1(e);if(c+r>l.byteLength)throw RangeError$1(WRONG_INDEX);for(var u=getInternalState$1(l.buffer).bytes,p=c+l.byteOffset,d=a(+i),h=0;hj;)(key=keys[j++])in $ArrayBuffer||createNonEnumerableProperty($ArrayBuffer,key,NativeArrayBuffer[key]);ArrayBufferPrototype.constructor=$ArrayBuffer}objectSetPrototypeOf&&objectGetPrototypeOf($DataViewPrototype)!==ObjectPrototype&&objectSetPrototypeOf($DataViewPrototype,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=$DataViewPrototype.setInt8;testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||redefineAll($DataViewPrototype,{setInt8:function setInt8(e,r){$setInt8.call(this,e,r<<24>>24)},setUint8:function setUint8(e,r){$setInt8.call(this,e,r<<24>>24)}},{unsafe:!0})}else $ArrayBuffer=function ArrayBuffer(e){anInstance(this,$ArrayBuffer,ARRAY_BUFFER);var r=toIndex(e);setInternalState$3(this,{bytes:arrayFill.call(new Array(r),0),byteLength:r}),descriptors||(this.byteLength=r)},$DataView=function DataView(e,r,t){anInstance(this,$DataView,DATA_VIEW),anInstance(e,$ArrayBuffer,DATA_VIEW);var a=getInternalState$1(e).byteLength,i=toInteger(r);if(i<0||i>a)throw RangeError$1("Wrong offset");if(i+(t=void 0===t?a-i:toLength(t))>a)throw RangeError$1(WRONG_LENGTH);setInternalState$3(this,{buffer:e,byteLength:t,byteOffset:i}),descriptors||(this.buffer=e,this.byteLength=t,this.byteOffset=i)},descriptors&&(addGetter($ArrayBuffer,"byteLength"),addGetter($DataView,"buffer"),addGetter($DataView,"byteLength"),addGetter($DataView,"byteOffset")),redefineAll($DataView[PROTOTYPE],{getInt8:function getInt8(e){return get(this,1,e)[0]<<24>>24},getUint8:function getUint8(e){return get(this,1,e)[0]},getInt16:function getInt16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return r[1]<<8|r[0]},getInt32:function getInt32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function getUint32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function getFloat32(e){return unpackIEEE754(get(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function getFloat64(e){return unpackIEEE754(get(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function setInt8(e,r){set(this,1,e,packInt8,r)},setUint8:function setUint8(e,r){set(this,1,e,packInt8,r)},setInt16:function setInt16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setUint16:function setUint16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setInt32:function setInt32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setUint32:function setUint32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setFloat32:function setFloat32(e,r){set(this,4,e,packFloat32,r,arguments.length>2?arguments[2]:void 0)},setFloat64:function setFloat64(e,r){set(this,8,e,packFloat64,r,arguments.length>2?arguments[2]:void 0)}});setToStringTag($ArrayBuffer,ARRAY_BUFFER),setToStringTag($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},floor$5=Math.floor,isInteger=function isInteger(e){return!isObject(e)&&isFinite(e)&&floor$5(e)===e},toPositiveInteger=function(e){var r=toInteger(e);if(r<0)throw RangeError("The argument can't be less than 0");return r},toOffset=function(e,r){var t=toPositiveInteger(e);if(t%r)throw RangeError("Wrong offset");return t},aTypedArrayConstructor$1=arrayBufferViewCore.aTypedArrayConstructor,typedArrayFrom=function from(e){var r,t,a,i,s,c,l=aConstructor(this),u=toObject(e),p=arguments.length,d=p>1?arguments[1]:void 0,h=void 0!==d,y=getIteratorMethod(u);if(y&&!isArrayIteratorMethod(y))for(c=(s=getIterator(u,y)).next,u=[];!(i=c.call(s)).done;)u.push(i.value);for(h&&p>2&&(d=functionBindContext(d,arguments[2],2)),t=toLength(u.length),a=new(aTypedArrayConstructor$1(l))(t),r=0;t>r;r++)a[r]=h?d(u[r],r):u[r];return a},isArray=Array.isArray||function isArray(e){return"Array"==classofRaw(e)},SPECIES$2=wellKnownSymbol("species"),arraySpeciesConstructor=function(e){var r;return isArray(e)&&(r=e.constructor,(isConstructor(r)&&(r===Array||isArray(r.prototype))||isObject(r)&&null===(r=r[SPECIES$2]))&&(r=void 0)),void 0===r?Array:r},arraySpeciesCreate=function(e,r){return new(arraySpeciesConstructor(e))(0===r?0:r)},push=[].push,createMethod$2=function(e){var r=1==e,t=2==e,a=3==e,i=4==e,s=6==e,c=7==e,l=5==e||s;return function(u,p,d,h){for(var y,A,g=toObject(u),E=indexedObject(g),v=functionBindContext(p,d,3),m=toLength(E.length),I=0,R=h||arraySpeciesCreate,P=r?R(u,m):t||c?R(u,0):void 0;m>I;I++)if((l||I in E)&&(A=v(y=E[I],I,g),e))if(r)P[I]=A;else if(A)switch(e){case 3:return!0;case 5:return y;case 6:return I;case 2:push.call(P,y)}else switch(e){case 4:return!1;case 7:push.call(P,y)}return s?-1:a||i?i:P}},arrayIteration={forEach:createMethod$2(0),map:createMethod$2(1),filter:createMethod$2(2),some:createMethod$2(3),every:createMethod$2(4),find:createMethod$2(5),findIndex:createMethod$2(6),filterReject:createMethod$2(7)},typedArrayConstructor=createCommonjsModule((function(e){var r=objectGetOwnPropertyNames.f,t=arrayIteration.forEach,a=internalState.get,i=internalState.set,s=objectDefineProperty.f,c=objectGetOwnPropertyDescriptor.f,l=Math.round,u=global$1.RangeError,p=arrayBuffer.ArrayBuffer,d=arrayBuffer.DataView,h=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,y=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,A=arrayBufferViewCore.TYPED_ARRAY_TAG,g=arrayBufferViewCore.TypedArray,E=arrayBufferViewCore.TypedArrayPrototype,v=arrayBufferViewCore.aTypedArrayConstructor,m=arrayBufferViewCore.isTypedArray,fromList=function(e,r){for(var t=0,a=r.length,i=new(v(e))(a);a>t;)i[t]=r[t++];return i},addGetter=function(e,r){s(e,r,{get:function(){return a(this)[r]}})},isArrayBuffer=function(e){var r;return e instanceof p||"ArrayBuffer"==(r=classof(e))||"SharedArrayBuffer"==r},isTypedArrayIndex=function(e,r){return m(e)&&!isSymbol(r)&&r in e&&isInteger(+r)&&r>=0},I=function getOwnPropertyDescriptor(e,r){return r=toPropertyKey(r),isTypedArrayIndex(e,r)?createPropertyDescriptor(2,e[r]):c(e,r)},R=function defineProperty(e,r,t){return r=toPropertyKey(r),!(isTypedArrayIndex(e,r)&&isObject(t)&&has$1(t,"value"))||has$1(t,"get")||has$1(t,"set")||t.configurable||has$1(t,"writable")&&!t.writable||has$1(t,"enumerable")&&!t.enumerable?s(e,r,t):(e[r]=t.value,e)};descriptors?(h||(objectGetOwnPropertyDescriptor.f=I,objectDefineProperty.f=R,addGetter(E,"buffer"),addGetter(E,"byteOffset"),addGetter(E,"byteLength"),addGetter(E,"length")),_export({target:"Object",stat:!0,forced:!h},{getOwnPropertyDescriptor:I,defineProperty:R}),e.exports=function(e,c,v){var I=e.match(/\d+$/)[0]/8,R=e+(v?"Clamped":"")+"Array",P="get"+e,S="set"+e,b=global$1[R],T=b,_=T&&T.prototype,O={},addElement=function(e,r){s(e,r,{get:function(){return function(e,r){var t=a(e);return t.view[P](r*I+t.byteOffset,!0)}(this,r)},set:function(e){return function(e,r,t){var i=a(e);v&&(t=(t=l(t))<0?0:t>255?255:255&t),i.view[S](r*I+i.byteOffset,t,!0)}(this,r,e)},enumerable:!0})};h?typedArrayConstructorsRequireWrappers&&(T=c((function(e,r,t,a){return anInstance(e,T,R),inheritIfRequired(isObject(r)?isArrayBuffer(r)?void 0!==a?new b(r,toOffset(t,I),a):void 0!==t?new b(r,toOffset(t,I)):new b(r):m(r)?fromList(T,r):typedArrayFrom.call(T,r):new b(toIndex(r)),e,T)})),objectSetPrototypeOf&&objectSetPrototypeOf(T,g),t(r(b),(function(e){e in T||createNonEnumerableProperty(T,e,b[e])})),T.prototype=_):(T=c((function(e,r,t,a){anInstance(e,T,R);var s,c,l,h=0,y=0;if(isObject(r)){if(!isArrayBuffer(r))return m(r)?fromList(T,r):typedArrayFrom.call(T,r);s=r,y=toOffset(t,I);var A=r.byteLength;if(void 0===a){if(A%I)throw u("Wrong length");if((c=A-y)<0)throw u("Wrong length")}else if((c=toLength(a)*I)+y>A)throw u("Wrong length");l=c/I}else l=toIndex(r),s=new p(c=l*I);for(i(e,{buffer:s,byteOffset:y,byteLength:c,length:l,view:new d(s)});h2?arguments[2]:void 0,l=min$3((void 0===c?a:toAbsoluteIndex(c,a))-s,a-i),u=1;for(s0;)s in t?t[i]=t[s]:delete t[i],i+=u,s+=u;return t},aTypedArray$l=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$m=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$m("copyWithin",(function copyWithin(e,r){return arrayCopyWithin.call(aTypedArray$l(this),e,r,arguments.length>2?arguments[2]:void 0)}));var $every=arrayIteration.every,aTypedArray$k=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$l=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$l("every",(function every(e){return $every(aTypedArray$k(this),e,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$j=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$k=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$k("fill",(function fill(e){return arrayFill.apply(aTypedArray$j(this),arguments)}));var arrayFromConstructorAndList=function(e,r){for(var t=0,a=r.length,i=new e(a);a>t;)i[t]=r[t++];return i},TYPED_ARRAY_CONSTRUCTOR=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,aTypedArrayConstructor=arrayBufferViewCore.aTypedArrayConstructor,typedArraySpeciesConstructor=function(e){return aTypedArrayConstructor(speciesConstructor(e,e[TYPED_ARRAY_CONSTRUCTOR]))},typedArrayFromSpeciesAndList=function(e,r){return arrayFromConstructorAndList(typedArraySpeciesConstructor(e),r)},$filter$1=arrayIteration.filter,aTypedArray$i=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$j=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$j("filter",(function filter(e){var r=$filter$1(aTypedArray$i(this),e,arguments.length>1?arguments[1]:void 0);return typedArrayFromSpeciesAndList(this,r)}));var $find=arrayIteration.find,aTypedArray$h=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$i=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$i("find",(function find(e){return $find(aTypedArray$h(this),e,arguments.length>1?arguments[1]:void 0)}));var $findIndex=arrayIteration.findIndex,aTypedArray$g=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$h=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$h("findIndex",(function findIndex(e){return $findIndex(aTypedArray$g(this),e,arguments.length>1?arguments[1]:void 0)}));var $forEach$1=arrayIteration.forEach,aTypedArray$f=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$g=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$g("forEach",(function forEach(e){$forEach$1(aTypedArray$f(this),e,arguments.length>1?arguments[1]:void 0)}));var $includes$1=arrayIncludes.includes,aTypedArray$e=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$f=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$f("includes",(function includes(e){return $includes$1(aTypedArray$e(this),e,arguments.length>1?arguments[1]:void 0)}));var $indexOf=arrayIncludes.indexOf,aTypedArray$d=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$e=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$e("indexOf",(function indexOf(e){return $indexOf(aTypedArray$d(this),e,arguments.length>1?arguments[1]:void 0)}));var PROPER_FUNCTION_NAME$1=functionName.PROPER,ITERATOR$3=wellKnownSymbol("iterator"),Uint8Array$2=global$1.Uint8Array,arrayValues=es_array_iterator.values,arrayKeys=es_array_iterator.keys,arrayEntries=es_array_iterator.entries,aTypedArray$c=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$d=arrayBufferViewCore.exportTypedArrayMethod,nativeTypedArrayIterator=Uint8Array$2&&Uint8Array$2.prototype[ITERATOR$3],PROPER_ARRAY_VALUES_NAME=!!nativeTypedArrayIterator&&"values"===nativeTypedArrayIterator.name,typedArrayValues=function values(){return arrayValues.call(aTypedArray$c(this))};exportTypedArrayMethod$d("entries",(function entries(){return arrayEntries.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("keys",(function keys(){return arrayKeys.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("values",typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME),exportTypedArrayMethod$d(ITERATOR$3,typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME);var aTypedArray$b=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$c=arrayBufferViewCore.exportTypedArrayMethod,$join=[].join;exportTypedArrayMethod$c("join",(function join(e){return $join.apply(aTypedArray$b(this),arguments)}));var arrayMethodIsStrict=function(e,r){var t=[][e];return!!t&&fails((function(){t.call(null,r||function(){throw 1},1)}))},min$2=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$2=arrayMethodIsStrict("lastIndexOf"),FORCED$5=NEGATIVE_ZERO||!STRICT_METHOD$2,arrayLastIndexOf=FORCED$5?function lastIndexOf(e){if(NEGATIVE_ZERO)return $lastIndexOf.apply(this,arguments)||0;var r=toIndexedObject(this),t=toLength(r.length),a=t-1;for(arguments.length>1&&(a=min$2(a,toInteger(arguments[1]))),a<0&&(a=t+a);a>=0;a--)if(a in r&&r[a]===e)return a||0;return-1}:$lastIndexOf,aTypedArray$a=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$b=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$b("lastIndexOf",(function lastIndexOf(e){return arrayLastIndexOf.apply(aTypedArray$a(this),arguments)}));var $map=arrayIteration.map,aTypedArray$9=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$a=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$a("map",(function map(e){return $map(aTypedArray$9(this),e,arguments.length>1?arguments[1]:void 0,(function(e,r){return new(typedArraySpeciesConstructor(e))(r)}))}));var createMethod$1=function(e){return function(r,t,a,i){aCallable(t);var s=toObject(r),c=indexedObject(s),l=toLength(s.length),u=e?l-1:0,p=e?-1:1;if(a<2)for(;;){if(u in c){i=c[u],u+=p;break}if(u+=p,e?u<0:l<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:l>u;u+=p)u in c&&(i=t(i,c[u],u,s));return i}},arrayReduce={left:createMethod$1(!1),right:createMethod$1(!0)},$reduce=arrayReduce.left,aTypedArray$8=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$9=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$9("reduce",(function reduce(e){return $reduce(aTypedArray$8(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var $reduceRight=arrayReduce.right,aTypedArray$7=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$8=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$8("reduceRight",(function reduceRight(e){return $reduceRight(aTypedArray$7(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$6=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$7=arrayBufferViewCore.exportTypedArrayMethod,floor$4=Math.floor;exportTypedArrayMethod$7("reverse",(function reverse(){for(var e,r=aTypedArray$6(this).length,t=floor$4(r/2),a=0;a1?arguments[1]:void 0,1),t=this.length,a=toObject(e),i=toLength(a.length),s=0;if(i+r>t)throw RangeError("Wrong length");for(;si;)c[i]=t[i++];return c}),FORCED$3);var $some=arrayIteration.some,aTypedArray$3=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$4=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$4("some",(function some(e){return $some(aTypedArray$3(this),e,arguments.length>1?arguments[1]:void 0)}));var floor$3=Math.floor,mergeSort=function(e,r){var t=e.length,a=floor$3(t/2);return t<8?insertionSort(e,r):merge(mergeSort(e.slice(0,a),r),mergeSort(e.slice(a),r),r)},insertionSort=function(e,r){for(var t,a,i=e.length,s=1;s0;)e[a]=e[--a];a!==s++&&(e[a]=t)}return e},merge=function(e,r,t){for(var a=e.length,i=r.length,s=0,c=0,l=[];s0&&1/t<0?1:-1:r>t}};exportTypedArrayMethod$3("sort",(function sort(e){if(void 0!==e&&aCallable(e),STABLE_SORT$1)return nativeSort$1.call(this,e);aTypedArray$2(this);var r,t=toLength(this.length),a=Array(t);for(r=0;r1?arguments[1]:void 0)}}),addToUnscopables("includes");var notARegexp=function(e){if(isRegexp(e))throw TypeError("The method doesn't accept regular expressions");return e},MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[MATCH]=!1,"/./"[e](r)}catch(e){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function includes(e){return!!~toString(requireObjectCoercible(this)).indexOf(toString(notARegexp(e)),arguments.length>1?arguments[1]:void 0)}});var createProperty=function(e,r,t){var a=toPropertyKey(r);a in e?objectDefineProperty.f(e,a,createPropertyDescriptor(0,t)):e[a]=t},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return engineV8Version>=51||!fails((function(){var r=[];return(r.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==r[e](Boolean).foo}))},HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("slice"),SPECIES=wellKnownSymbol("species"),nativeSlice=[].slice,max$1=Math.max;_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function slice(e,r){var t,a,i,s=toIndexedObject(this),c=toLength(s.length),l=toAbsoluteIndex(e,c),u=toAbsoluteIndex(void 0===r?c:r,c);if(isArray(s)&&(t=s.constructor,(isConstructor(t)&&(t===Array||isArray(t.prototype))||isObject(t)&&null===(t=t[SPECIES]))&&(t=void 0),t===Array||void 0===t))return nativeSlice.call(s,l,u);for(a=new(void 0===t?Array:t)(max$1(u-l,0)),i=0;l1?arguments[1]:void 0)}});var PROPER_FUNCTION_NAME=functionName.PROPER,TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails((function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=PROPER_FUNCTION_NAME&&nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,(function toString$1(){var e=anObject(this),r=toString(e.source),t=e.flags;return"/"+r+"/"+toString(void 0===t&&e instanceof RegExp&&!("flags"in RegExpPrototype)?regexpFlags.call(e):t)}),{unsafe:!0});var test=[],nativeSort=test.sort,FAILS_ON_UNDEFINED=fails((function(){test.sort(void 0)})),FAILS_ON_NULL=fails((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict("sort"),STABLE_SORT=!fails((function(){if(engineV8Version)return engineV8Version<70;if(!(engineFfVersion&&engineFfVersion>3)){if(engineIsIeOrEdge)return!0;if(engineWebkitVersion)return engineWebkitVersion<603;var e,r,t,a,i="";for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(a=0;a<47;a++)test.push({k:r+a,v:t})}for(test.sort((function(e,r){return r.v-e.v})),a=0;atoString(t)?1:-1}};_export({target:"Array",proto:!0,forced:FORCED$1},{sort:function sort(e){void 0!==e&&aCallable(e);var r=toObject(this);if(STABLE_SORT)return void 0===e?nativeSort.call(r):nativeSort.call(r,e);var t,a,i=[],s=toLength(r.length);for(a=0;a>>24&255,a[t+1]=i>>>16&255,a[t+2]=i>>>8&255,a[t+3]=i>>>0&255,new Uint8Array(a.buffer,0,t+4)},UZIP.deflateRaw=function(e,r){null==r&&(r={level:6});var t=new Uint8Array(50+Math.floor(1.1*e.length)),a=UZIP.F.deflateRaw(e,t,a,r.level);return new Uint8Array(t.buffer,0,a)},UZIP.encode=function(e,r){null==r&&(r=!1);var t=0,a=UZIP.bin.writeUint,i=UZIP.bin.writeUshort,s={};for(var c in e){var l=!UZIP._noNeed(c)&&!r,u=e[c],p=UZIP.crc.crc(u,0,u.length);s[c]={cpr:l,usize:u.length,crc:p,file:l?UZIP.deflateRaw(u):u}}for(var c in s)t+=s[c].file.length+30+46+2*UZIP.bin.sizeUTF8(c);t+=22;var d=new Uint8Array(t),h=0,y=[];for(var c in s){var A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,0)}var g=0,E=h;for(var c in s){A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,1,y[g++])}var v=h-E;return a(d,h,101010256),h+=4,i(d,h+=4,g),i(d,h+=2,g),a(d,h+=2,v),a(d,h+=4,E),h+=4,h+=2,d.buffer},UZIP._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(r)},UZIP._writeHeader=function(e,r,t,a,i,s){var c=UZIP.bin.writeUint,l=UZIP.bin.writeUshort,u=a.file;return c(e,r,0==i?67324752:33639248),r+=4,1==i&&(r+=2),l(e,r,20),l(e,r+=2,0),l(e,r+=2,a.cpr?8:0),c(e,r+=2,0),c(e,r+=4,a.crc),c(e,r+=4,u.length),c(e,r+=4,a.usize),l(e,r+=4,UZIP.bin.sizeUTF8(t)),l(e,r+=2,0),r+=2,1==i&&(r+=2,r+=2,c(e,r+=6,s),r+=4),r+=UZIP.bin.writeUTF8(e,r,t),0==i&&(e.set(u,r),r+=u.length),r},UZIP.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,a=0;a<8;a++)1&t?t=3988292384^t>>>1:t>>>=1;e[r]=t}return e}(),update:function(e,r,t,a){for(var i=0;i>>8;return e},crc:function(e,r,t){return 4294967295^UZIP.crc.update(4294967295,e,r,t)}},UZIP.adler=function(e,r,t){for(var a=1,i=0,s=r,c=r+t;s>8&255},readUint:function(e,r){return 16777216*e[r+3]+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,t){e[r]=255&t,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},readASCII:function(e,r,t){for(var a="",i=0;i>6,e[r+i+1]=128|c>>0&63,i+=2;else if(0==(4294901760&c))e[r+i]=224|c>>12,e[r+i+1]=128|c>>6&63,e[r+i+2]=128|c>>0&63,i+=3;else{if(0!=(4292870144&c))throw"e";e[r+i]=240|c>>18,e[r+i+1]=128|c>>12&63,e[r+i+2]=128|c>>6&63,e[r+i+3]=128|c>>0&63,i+=4}}return i},sizeUTF8:function(e){for(var r=e.length,t=0,a=0;a>>3}var y=s.lits,A=s.strt,g=s.prev,E=0,v=0,m=0,I=0,R=0,P=0;for(h>2&&(A[P=UZIP.F._hash(e,0)]=0),u=0;u14e3||v>26697)&&h-u>100&&(d>>16,_=65535&b;if(0!=b){_=65535&b;var O=c(T=b>>>16,s.of0);s.lhst[257+O]++;var w=c(_,s.df0);s.dhst[w]++,I+=s.exb[O]+s.dxb[w],y[E]=T<<23|u-d,y[E+1]=_<<16|O<<8|w,E+=2,d=u+T}else s.lhst[e[u]]++;v++}}for(m==u&&0!=e.length||(d>>3},UZIP.F._bestMatch=function(e,r,t,a,i,s){var c=32767&r,l=t[c],u=c-l+32768&32767;if(l==c||a!=UZIP.F._hash(e,r-u))return 0;for(var p=0,d=0,h=Math.min(32767,r);u<=h&&0!=--s&&l!=c;){if(0==p||e[r+p]==e[r+p-u]){var y=UZIP.F._howLong(e,r,u);if(y>p){if(d=u,(p=y)>=i)break;u+2A&&(A=v,l=E)}}}u+=(c=l)-(l=t[c])+32768&32767}return p<<16|d},UZIP.F._howLong=function(e,r,t){if(e[r]!=e[r-t]||e[r+1]!=e[r+1-t]||e[r+2]!=e[r+2-t])return 0;var a=r,i=Math.min(e.length,r+258);for(r+=3;r>>23,B=$+(8388607&M);$>16,V=D>>8&255,k=255&D;P(l,u=UZIP.F._writeLit(257+V,w,l,u),x-I.of0[V]),u+=I.exb[V],R(l,u=UZIP.F._writeLit(k,U,l,u),G-I.df0[k]),u+=I.dxb[k],$+=x}}u=UZIP.F._writeLit(256,w,l,u)}return u},UZIP.F._copyExact=function(e,r,t,a,i){var s=i>>>3;return a[s]=t,a[s+1]=t>>>8,a[s+2]=255-a[s],a[s+3]=255-a[s+1],s+=4,a.set(new Uint8Array(e.buffer,r,t),s),i+(t+4<<3)},UZIP.F.getTrees=function(){for(var e=UZIP.F.U,r=UZIP.F._hufTree(e.lhst,e.ltree,15),t=UZIP.F._hufTree(e.dhst,e.dtree,15),a=[],i=UZIP.F._lenCodes(e.ltree,a),s=[],c=UZIP.F._lenCodes(e.dtree,s),l=0;l4&&0==e.itree[1+(e.ordr[p-1]<<1)];)p--;return[r,t,u,i,c,p,a,s]},UZIP.F.getSecond=function(e){for(var r=[],t=0;t>1)+",");return r},UZIP.F.contSize=function(e,r){for(var t=0,a=0;a15&&(UZIP.F._putsE(t,a,c,l),a+=l)}return a},UZIP.F._lenCodes=function(e,r){for(var t=e.length;2!=t&&0==e[t-1];)t-=2;for(var a=0;a>>1,138))<11?r.push(17,p-3):r.push(18,p-11),a+=2*p-2}else if(i==l&&s==i&&c==i){for(u=a+5;u+2>>1,6);r.push(16,p-3),a+=2*p-2}else r.push(i,0)}return t>>>1},UZIP.F._hufTree=function(e,r,t){var a=[],i=e.length,s=r.length,c=0;for(c=0;ct&&(UZIP.F.restrictDepth(u,t,E),E=t),c=0;cr;a++){var c=e[a].d;e[a].d=r,s+=i-(1<>>=t-r;s>0;){(c=e[a].d)=0;a--)e[a].d==r&&s<0&&(e[a].d--,s++);0!=s&&console.log("debt left")},UZIP.F._goodIndex=function(e,r){var t=0;return r[16|t]<=e&&(t|=16),r[8|t]<=e&&(t|=8),r[4|t]<=e&&(t|=4),r[2|t]<=e&&(t|=2),r[1|t]<=e&&(t|=1),t},UZIP.F._writeLit=function(e,r,t,a){return UZIP.F._putsF(t,a,r[e<<1]),a+r[1+(e<<1)]},UZIP.F.inflate=function(e,r){var t=Uint8Array;if(3==e[0]&&0==e[1])return r||new t(0);var a=UZIP.F,i=a._bitsF,s=a._bitsE,c=a._decodeTiny,l=a.makeCodes,u=a.codes2map,p=a._get17,d=a.U,h=null==r;h&&(r=new t(e.length>>>2<<3));for(var y,A,g=0,E=0,v=0,m=0,I=0,R=0,P=0,S=0,b=0;0==g;)if(g=i(e,b,1),E=i(e,b+1,2),b+=3,0!=E){if(h&&(r=UZIP.F._check(r,S+(1<<17))),1==E&&(y=d.flmap,A=d.fdmap,R=511,P=31),2==E){v=s(e,b,5)+257,m=s(e,b+5,5)+1,I=s(e,b+10,4)+4,b+=14;for(var T=0;T<38;T+=2)d.itree[T]=0,d.itree[T+1]=0;var _=1;for(T=0;T_&&(_=O)}b+=3*I,l(d.itree,_),u(d.itree,_,d.imap),y=d.lmap,A=d.dmap,b=c(d.imap,(1<<_)-1,v+m,e,b,d.ttree);var w=a._copyOut(d.ttree,0,v,d.ltree);R=(1<>>4;if($>>>8==0)r[S++]=$;else{if(256==$)break;var L=S+$-254;if($>264){var M=d.ldef[$-257];L=S+(M>>>3)+s(e,b,7&M),b+=7&M}var x=A[p(e,b)&P];b+=15&x;var B=x>>>4,D=d.ddef[B],G=(D>>>4)+i(e,b,15&D);for(b+=15&D,h&&(r=UZIP.F._check(r,S+(1<<17)));S>>3),k=e[V-4]|e[V-3]<<8;h&&(r=UZIP.F._check(r,S+k)),r.set(new t(e.buffer,e.byteOffset+V,k),S),b=V+k<<3,S+=k}return r.length==S?r:r.slice(0,S)},UZIP.F._check=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(Math.max(t<<1,r));return a.set(e,0),a},UZIP.F._decodeTiny=function(e,r,t,a,i,s){for(var c=UZIP.F._bitsE,l=UZIP.F._get17,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++}},UZIP.F.revCodes=function(e,r){for(var t=UZIP.F.U.rev15,a=15-r,i=0;i>>a}},UZIP.F._putsE=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},UZIP.F._putsF=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},UZIP.F._bitsE=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},UZIP.F._get25=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},UZIP.F.U=(r=Uint16Array,t=Uint32Array,{next_code:new r(16),bl_count:new r(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new t(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new r(65536),prev:new r(32768)}),function(){for(var e=UZIP.F.U,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.rev15[r]=(t>>>16|t<<16)>>>17}function pushV(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.ldef[r]=e.of0[r]<<3|e.exb[r],e.ddef[r]=e.df0[r]<<4|e.dxb[r];pushV(e.fltree,144,8),pushV(e.fltree,112,9),pushV(e.fltree,24,7),pushV(e.fltree,8,8),UZIP.F.makeCodes(e.fltree,9),UZIP.F.codes2map(e.fltree,9,e.flmap),UZIP.F.revCodes(e.fltree,9),pushV(e.fdtree,32,5),UZIP.F.makeCodes(e.fdtree,5),UZIP.F.codes2map(e.fdtree,5,e.fdmap),UZIP.F.revCodes(e.fdtree,5),pushV(e.itree,19,0),pushV(e.ltree,286,0),pushV(e.dtree,30,0),pushV(e.ttree,320,0)}()})),UZIP=Object.freeze(_mergeNamespaces({__proto__:null,default:UZIP_1},[UZIP_1])),UPNG={},N,W,H;UPNG.toRGBA8=function(e){var r=e.width,t=e.height;if(null==e.tabs.acTL)return[UPNG.toRGBA8.decodeImage(e.data,r,t,e).buffer];var a=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var i=r*t*4,s=new Uint8Array(i),c=new Uint8Array(i),l=new Uint8Array(i),u=0;u>3)]>>7-((7&A)<<0)&1);l[R]=P[w],l[R+1]=P[w+1],l[R+2]=P[w+2],l[R+3]=U>2)]>>6-((3&A)<<1)&3);l[R]=P[w],l[R+1]=P[w+1],l[R+2]=P[w+2],l[R+3]=U>1)]>>4-((1&A)<<2)&15);l[R]=P[w],l[R+1]=P[w+1],l[R+2]=P[w+2],l[R+3]=U>>3)]>>>7-(7&x)&1))==255*v?0:255;u[M+x]=B<<24|C<<16|C<<8|C}else if(2==d)for(x=0;x>>2)]>>>6-((3&x)<<1)&3))==85*v?0:255;u[M+x]=B<<24|C<<16|C<<8|C}else if(4==d)for(x=0;x>>1)]>>>4-((1&x)<<2)&15))==17*v?0:255;u[M+x]=B<<24|C<<16|C<<8|C}else if(8==d)for(x=0;x>>2<<5));0==s;)if(s=E(e,A,1),c=E(e,A+1,2),A+=3,0!=c){if(b&&(r=H.H.W(r,y+(1<<17))),1==c&&(t=S.J,a=S.h,d=511,h=31),2==c){l=v(e,A,5)+257,u=v(e,A+5,5)+1,p=v(e,A+10,4)+4,A+=14;for(var T=1,_=0;_<38;_+=2)S.Q[_]=0,S.Q[_+1]=0;for(_=0;_T&&(T=O)}A+=3*p,I(S.Q,T),R(S.Q,T,S.u),t=S.w,a=S.d,A=m(S.u,(1<>>4;if($>>>8==0)r[y++]=$;else{if(256==$)break;var L=y+$-254;if($>264){var M=S.q[$-257];L=y+(M>>>3)+v(e,A,7&M),A+=7&M}var x=a[P(e,A)&h];A+=15&x;var B=x>>>4,D=S.c[B],G=(D>>>4)+E(e,A,15&D);for(A+=15&D;y>>3),k=e[V-4]|e[V-3]<<8;b&&(r=H.H.W(r,y+k)),r.set(new i(e.buffer,e.byteOffset+V,k),y),A=V+k<<3,y+=k}return r.length==y?r:r.slice(0,y)},H.H.W=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(t<<1);return a.set(e,0),a},H.H.R=function(e,r,t,a,i,s){for(var c=H.H.e,l=H.H.Z,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++},H.H.l=function(e,r){for(var t=H.H.m.r,a=15-r,i=0;i>>a}},H.H.M=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},H.H.I=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},H.H.e=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},H.H.i=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},H.H.m=(N=Uint16Array,W=Uint32Array,{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(32768),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(65536),g:new N(32768)}),function(){for(var e=H.H.m,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.r[r]=(t>>>16|t<<16)>>>17}function n(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.q[r]=e.S[r]<<3|e.T[r],e.c[r]=e.p[r]<<4|e.z[r];n(e._,144,8),n(e._,112,9),n(e._,24,7),n(e._,8,8),H.H.n(e._,9),H.H.A(e._,9,e.J),H.H.l(e._,9),n(e.$,32,5),H.H.n(e.$,5),H.H.A(e.$,5,e.h),H.H.l(e.$,5),n(e.Q,19,0),n(e.C,286,0),n(e.D,30,0),n(e.v,320,0)}(),H.H.N),UPNG.decode._readInterlace=function(e,r){for(var t=r.width,a=r.height,i=UPNG.decode._getBPP(r),s=i>>3,c=Math.ceil(t*i/8),l=new Uint8Array(a*c),u=0,p=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],y=[8,8,4,4,2,2,1],A=0;A<7;){for(var g=h[A],E=y[A],v=0,m=0,I=p[A];I>3])>>7-(7&_)&1,l[b*c+(T>>3)]|=O<<7-((7&T)<<0);if(2==i)O=(O=e[_>>3])>>6-(7&_)&3,l[b*c+(T>>2)]|=O<<6-((3&T)<<1);if(4==i)O=(O=e[_>>3])>>4-(7&_)&15,l[b*c+(T>>1)]|=O<<4-((1&T)<<2);if(i>=8)for(var w=b*c+T*s,U=0;U>3)+U];_+=i,T+=E}S++,b+=g}v*m!=0&&(u+=m*(1+P)),A+=1}return l},UPNG.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},UPNG.decode._filterZero=function(e,r,t,a,i){var s=UPNG.decode._getBPP(r),c=Math.ceil(a*s/8),l=UPNG.decode._paeth;s=Math.ceil(s/8);var u=0,p=1,d=e[t],h=0;if(d>1&&(e[t]=[0,0,1][d-2]),3==d)for(h=s;h>>1)&255;for(var y=0;y>>1);for(;h>>1)}else{for(;h>8&255,e[r+1]=255&t},readUint:function readUint(e,r){return 16777216*e[r]+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function writeUint(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=255&t},readASCII:function readASCII(e,r,t){for(var a="",i=0;i=0&&l>=0?(h=A*r+g<<2,y=(l+A)*i+c+g<<2):(h=(-l+A)*r-c+g<<2,y=A*i+g<<2),0==u)a[y]=e[h],a[y+1]=e[h+1],a[y+2]=e[h+2],a[y+3]=e[h+3];else if(1==u){var E=e[h+3]*(1/255),v=e[h]*E,m=e[h+1]*E,I=e[h+2]*E,R=a[y+3]*(1/255),P=a[y]*R,S=a[y+1]*R,b=a[y+2]*R,T=1-E,_=E+R*T,O=0==_?0:1/_;a[y+3]=255*_,a[y+0]=(v+P*T)*O,a[y+1]=(m+S*T)*O,a[y+2]=(I+b*T)*O}else if(2==u){E=e[h+3],v=e[h],m=e[h+1],I=e[h+2],R=a[y+3],P=a[y],S=a[y+1],b=a[y+2];E==R&&v==P&&m==S&&I==b?(a[y]=0,a[y+1]=0,a[y+2]=0,a[y+3]=0):(a[y]=v,a[y+1]=m,a[y+2]=I,a[y+3]=E)}else if(3==u){E=e[h+3],v=e[h],m=e[h+1],I=e[h+2],R=a[y+3],P=a[y],S=a[y+1],b=a[y+2];if(E==R&&v==P&&m==S&&I==b)continue;if(E<220&&R>20)return!1}return!0},UPNG.encode=function(e,r,t,a,i,s,c){null==a&&(a=0),null==c&&(c=!1);var l=UPNG.encode.compress(e,r,t,a,[!1,!1,!1,0,c]);return UPNG.encode.compressPNG(l,-1),UPNG.encode._main(l,r,t,i,s)},UPNG.encodeLL=function(e,r,t,a,i,s,c,l){for(var u={ctype:0+(1==a?0:2)+(0==i?0:4),depth:s,frames:[]},p=(a+i)*s,d=p*r,h=0;h1,h=!1,y=33+(d?20:0);if(null!=i.sRGB&&(y+=13),null!=i.pHYs&&(y+=21),3==e.ctype){for(var A=e.plte.length,g=0;g>>24!=255&&(h=!0);y+=8+3*A+4+(h?8+1*A+4:0)}for(var E=0;E>>8&255,b=R>>>16&255;v[p+I+0]=P,v[p+I+1]=S,v[p+I+2]=b}if(c(v,p+=3*A,s(v,p-3*A-4,3*A+4)),p+=4,h){c(v,p,A),u(v,p+=4,"tRNS"),p+=4;for(g=0;g>>24&255;c(v,p+=A,s(v,p-A-4,A+4)),p+=4}}var T=0;for(E=0;E>2,U>>2));for(A=0;AL&&x==$[v-L])M[v]=M[v-L];else{var B=R[x];if(null==B&&(R[x]=B=P.length,P.push(x),P.length>=300))break;M[v]=B}}}var D=P.length;D<=256&&0==p&&(h=D<=2?1:D<=4?2:D<=16?4:8,h=Math.max(h,u));for(A=0;A>1)]|=q[K+z]<<4-4*(1&z);else if(2==h)for(z=0;z>2)]|=q[K+z]<<6-2*(3&z);else if(1==h)for(z=0;z>3)]|=q[K+z]<<7-1*(7&z)}V=Z,d=3,Y=1}else if(0==m&&1==I.length){Z=new Uint8Array(L*G*3);var X=L*G;for(v=0;v_&&(_=U),wO&&(O=w))}-1==_&&(b=T=_=O=0),i&&(1==(1&b)&&b--,1==(1&T)&&T--);var C=(_-b+1)*(O-T+1);Cv&&(v=P),Sm&&(m=S))}-1==v&&(g=E=v=m=0),c&&(1==(1&g)&&g--,1==(1&E)&&E--),s={x:g,y:E,width:v-g+1,height:m-E+1};var _=a[i];_.rect=s,_.blend=1,_.img=new Uint8Array(s.width*s.height*4),0==a[i-1].dispose?(UPNG._copyTile(p,r,t,_.img,s.width,s.height,-s.x,-s.y,0),UPNG.encode._prepareDiff(y,r,t,_.img,s)):UPNG._copyTile(y,r,t,_.img,s.width,s.height,-s.x,-s.y,0)},UPNG.encode._prepareDiff=function(e,r,t,a,i){UPNG._copyTile(e,r,t,a,i.width,i.height,-i.x,-i.y,2)},UPNG.encode._filterZero=function(e,r,t,a,i,s,c){var l,u=[],p=[0,1,2,3,4];-1!=s?p=[s]:(r*a>5e5||1==t)&&(p=[0]),c&&(l={level:0});for(var d,h=UZIP,y=0;y>1)+256&255;if(4==s)for(p=i;p>1)&255;for(p=i;p>1)&255}if(4==s){for(p=0;p>>1:t>>>=1;e[r]=t}return e}(),update:function update(e,r,t,a){for(var i=0;i>>8;return e},crc:function crc(e,r,t){return 4294967295^UPNG.crc.update(4294967295,e,r,t)}},UPNG.quantize=function(e,r){var t,a=new Uint8Array(e),i=a.slice(0),s=new Uint32Array(i.buffer),c=UPNG.quantize.getKDtree(i,r),l=c[0],u=c[1],p=UPNG.quantize.planeDst,d=a,h=s,y=d.length,A=new Uint8Array(a.length>>2);if(a.length<2e7)for(var g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}else for(g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}return{abuf:i.buffer,inds:A,plte:u}},UPNG.quantize.getKDtree=function(e,r,t){null==t&&(t=1e-4);var a=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=UPNG.quantize.stats(e,i.i0,i.i1),i.est=UPNG.quantize.estats(i.bst);for(var s=[i];s.lengthc&&(c=s[u].est.L,l=u);if(c=d||p.i1<=d)p.est.L=0;else{var h={i0:p.i0,i1:d,bst:null,est:null,tdst:0,left:null,right:null};h.bst=UPNG.quantize.stats(e,h.i0,h.i1),h.est=UPNG.quantize.estats(h.bst);var y={i0:d,i1:p.i1,bst:null,est:null,tdst:0,left:null,right:null};y.bst={R:[],m:[],N:p.bst.N-h.bst.N};for(u=0;u<16;u++)y.bst.R[u]=p.bst.R[u]-h.bst.R[u];for(u=0;u<4;u++)y.bst.m[u]=p.bst.m[u]-h.bst.m[u];y.est=UPNG.quantize.estats(y.bst),p.left=h,p.right=y,s[l]=h,s.push(y)}}s.sort((function(e,r){return r.bst.N-e.bst.N}));for(u=0;u0&&(c=e.right,l=e.left);var u=UPNG.quantize.getNearest(c,r,t,a,i);if(u.tdst<=s*s)return u;var p=UPNG.quantize.getNearest(l,r,t,a,i);return p.tdsts;)a-=4;if(t>=a)break;var l=r[t>>2];r[t>>2]=r[a>>2],r[a>>2]=l,t+=4,a-=4}for(;c(e,t,i)>s;)t-=4;return t+4},UPNG.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},UPNG.quantize.stats=function(e,r,t){for(var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],s=t-r>>2,c=r;c>>0}},UPNG.M4={multVec:function multVec(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function dot(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function sml(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},UPNG.encode.concatRGBA=function(e){for(var r=0,t=0;t2&&void 0!==arguments[2]?arguments[2]:Date.now();return new Promise((function(a){for(var i=e.split(","),s=i[0].match(/:(.*?);/)[1],c=globalThis.atob(i[1]),l=c.length,u=new Uint8Array(l);l--;)u[l]=c.charCodeAt(l);var p=new Blob([u],{type:s});p.name=r,p.lastModified=t,a(p)}))}function getDataUrlFromFile(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(){return r(a.result)},a.onerror=function(e){return t(e)},a.readAsDataURL(e)}))}function loadImage(e){return new Promise((function(r,t){var a=new Image;a.onload=function(){return r(a)},a.onerror=function(e){return t(e)},a.src=e}))}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;var e=BROWSER_NAME.ETC,r=navigator.userAgent;return/Chrom(e|ium)/i.test(r)?e=BROWSER_NAME.CHROME:/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(r)?e=BROWSER_NAME.MOBILE_SAFARI:/Safari/i.test(r)?e=BROWSER_NAME.DESKTOP_SAFARI:/Firefox/i.test(r)?e=BROWSER_NAME.FIREFOX:(/MSIE/i.test(r)||!0==!!document.documentMode)&&(e=BROWSER_NAME.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,r){for(var t=getBrowserName(),a=MAX_CANVAS_SIZE[t],i=e,s=r,c=i*s,l=i>s?s/i:i/s;c>a*a;){var u=(a+i)/2,p=(a+s)/2;u1&&void 0!==arguments[1]?arguments[1]:void 0,t=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),a=t.width,i=t.height,s=getNewCanvasAndCtx(a,i),c=_slicedToArray(s,2),l=c[0],u=c[1];return r&&/jpe?g/.test(r)&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height)),u.drawImage(e,0,0,l.width,l.height),l}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(t,a){var i,s,c=function $Try_2_Post(){try{return s=drawImageInCanvas(i,r.fileType||e.type),t([i,s])}catch(e){return a(e)}},l=function $Try_2_Catch(r){try{0;var t=function $Try_3_Catch(e){try{throw e}catch(e){return a(e)}};try{return getDataUrlFromFile(e).then((function(e){try{return loadImage(e).then((function(e){try{return i=e,function $Try_3_Post(){try{return c()}catch(e){return a(e)}}()}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){t(e)}}catch(e){return a(e)}};try{if(isIOS()||[BROWSER_NAME.DESKTOP_SAFARI,BROWSER_NAME.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then((function(e){try{return i=e,c()}catch(e){return l()}}),l)}catch(e){l()}}))}function canvasToFile(e,r,t,a){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return new Promise((function(s,c){var l,u,p;if("image/png"===r)return u=e.getContext("2d").getImageData(0,0,e.width,e.height).data,p=UPNG.encode([u],e.width,e.height,256*i),(l=new Blob([p],{type:r})).name=t,l.lastModified=a,$If_4.call(this);{return"function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?e.convertToBlob({type:r,quality:i}).then(function(e){try{return(l=e).name=t,l.lastModified=a,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c):getFilefromDataUrl(e.toDataURL(r,i),t,a).then(function(e){try{return l=e,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c);function $If_5(){return $If_4.call(this)}}function $If_4(){return s(l)}}))}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise((function(e,r){var t,a,i,s;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(c){try{return drawFileInCanvas(t=c).then((function(c){try{return canvasToFile(a=c[1],t.type,t.name,t.lastModified).then((function(t){try{return i=t,cleanupCanvasMemory(a),drawFileInCanvas(i).then((function(t){try{return s=t[0],isAutoOrientationInBrowser.cachedResult=1===s.width&&2===s.height,e(isAutoOrientationInBrowser.cachedResult)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r))}))}function getExifOrientation(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(e){var t=new DataView(e.target.result);if(65496!=t.getUint16(0,!1))return r(-2);for(var a=t.byteLength,i=2;is||i>s)){var l=_slicedToArray(getNewCanvasAndCtx(a,i),2);c=l[0],t=l[1],a>i?(c.width=s,c.height=i/a*s):(c.width=a/i*s,c.height=s),t.drawImage(e,0,0,c.width,c.height),cleanupCanvasMemory(e)}return c}function followExifOrientation(e,r){var t=e.width,a=e.height,i=_slicedToArray(getNewCanvasAndCtx(t,a),2),s=i[0],c=i[1];switch(r>4&&r<9?(s.width=a,s.height=t):(s.width=t,s.height=a),r){case 2:c.transform(-1,0,0,1,t,0);break;case 3:c.transform(-1,0,0,-1,t,a);break;case 4:c.transform(1,0,0,-1,0,a);break;case 5:c.transform(0,1,1,0,0,0);break;case 6:c.transform(0,1,-1,0,a,0);break;case 7:c.transform(0,-1,-1,0,a,t);break;case 8:c.transform(0,-1,1,0,0,t)}return c.drawImage(e,0,0,t,a),cleanupCanvasMemory(e),s}function compress(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(a,i){var s,c,l,u,p,d,h,y,A,g,E,v,m,I,R,P,S,b;function incProgress(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;s+=e,r.onProgress(Math.min(s,100))}function setProgress(e){s=Math.min(Math.max(e,s),100),r.onProgress(s)}return s=t,c=r.maxIteration||10,l=1024*r.maxSizeMB*1024,incProgress(),drawFileInCanvas(e,r).then(function(t){try{var s=_slicedToArray(t,2);return u=s[1],incProgress(),p=handleMaxWidthOrHeight(u,r),incProgress(),new Promise((function(t,a){var i;if(!(i=r.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,$If_2.call(this)}catch(e){return a(e)}}.bind(this),a);function $If_2(){return t(i)}return $If_2.call(this)})).then(function(t){try{return d=t,incProgress(),isAutoOrientationInBrowser().then(function(t){try{return h=t?p:followExifOrientation(p,d),incProgress(),y=r.initialQuality||1,A=r.fileType||e.type,canvasToFile(h,A,e.name,e.lastModified,y).then(function(r){try{{if(g=r,incProgress(),E=g.size>l,v=g.size>e.size,!E&&!v)return setProgress(100),a(g);var t;function $Loop_3(){if(c--&&(R>l||R>m)){var r,t,a=_slicedToArray(getNewCanvasAndCtx(r=E?.95*b.width:b.width,t=E?.95*b.height:b.height),2);return S=a[0],a[1].drawImage(b,0,0,r,t),y*=.95,canvasToFile(S,A,e.name,e.lastModified,y).then((function(e){try{return P=e,cleanupCanvasMemory(b),b=S,R=P.size,setProgress(Math.min(99,Math.floor((I-R)/(I-l)*100))),$Loop_3}catch(e){return i(e)}}),i)}return[1]}return m=e.size,I=g.size,R=I,b=h,(t=function(e){for(;e;){if(e.then)return void e.then(t,i);try{if(e.pop){if(e.length)return e.pop()?$Loop_3_exit.call(this):e;e=$Loop_3}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))($Loop_3);function $Loop_3_exit(){return cleanupCanvasMemory(b),cleanupCanvasMemory(S),cleanupCanvasMemory(p),cleanupCanvasMemory(h),cleanupCanvasMemory(u),setProgress(100),a(P)}}}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}))}var charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:toString(e),index:0})}),(function next(){var e,r=getInternalState(this),t=r.string,a=r.index;return a>=t.length?{value:void 0,done:!0}:(e=charAt(t,a),r.index+=e.length,{value:e,done:!1})}));var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},classList=documentCreateElement("span").classList,DOMTokenListPrototype=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype===Object.prototype?void 0:DOMTokenListPrototype,ITERATOR$2=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values,handlePrototype$1=function(e,r){if(e){if(e[ITERATOR$2]!==ArrayValues)try{createNonEnumerableProperty(e,ITERATOR$2,ArrayValues)}catch(r){e[ITERATOR$2]=ArrayValues}if(e[TO_STRING_TAG]||createNonEnumerableProperty(e,TO_STRING_TAG,r),domIterables[r])for(var t in es_array_iterator)if(e[t]!==es_array_iterator[t])try{createNonEnumerableProperty(e,t,es_array_iterator[t])}catch(r){e[t]=es_array_iterator[t]}}};for(var COLLECTION_NAME$1 in domIterables)handlePrototype$1(global$1[COLLECTION_NAME$1]&&global$1[COLLECTION_NAME$1].prototype,COLLECTION_NAME$1);handlePrototype$1(domTokenListPrototype,"DOMTokenList");var ITERATOR$1=wellKnownSymbol("iterator"),nativeUrl=!fails((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),r=e.searchParams,t="";return e.pathname="c%20d",r.forEach((function(e,a){r.delete("b"),t+=a+e})),isPure&&!e.toJSON||!r.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[ITERATOR$1]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==t||"x"!==new URL("http://x",void 0).host})),callWithSafeIterationClosing=function(e,r,t,a){try{return a?r(anObject(t)[0],t[1]):r(t)}catch(r){iteratorClose(e,"throw",r)}},arrayFrom=function from(e){var r=toObject(e),t=isConstructor(this),a=arguments.length,i=a>1?arguments[1]:void 0,s=void 0!==i;s&&(i=functionBindContext(i,a>2?arguments[2]:void 0,2));var c,l,u,p,d,h,y=getIteratorMethod(r),A=0;if(!y||this==Array&&isArrayIteratorMethod(y))for(c=toLength(r.length),l=t?new this(c):Array(c);c>A;A++)h=s?i(r[A],A):r[A],createProperty(l,A,h);else for(d=(p=getIterator(r,y)).next,l=t?new this:[];!(u=d.call(p)).done;A++)h=s?callWithSafeIterationClosing(p,i,[u.value,A],!0):u.value,createProperty(l,A,h);return l.length=A,l},maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,floor$2=Math.floor,stringFromCharCode=String.fromCharCode,ucs2decode=function(e){for(var r=[],t=0,a=e.length;t=55296&&i<=56319&&t>1,e+=floor$2(e/r);e>baseMinusTMin*tMax>>1;a+=base)e=floor$2(e/baseMinusTMin);return floor$2(a+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var r,t,a=[],i=(e=ucs2decode(e)).length,s=initialN,c=0,l=initialBias;for(r=0;r=s&&tfloor$2((maxInt-c)/h))throw RangeError(OVERFLOW_ERROR);for(c+=(d-s)*h,s=d,r=0;rmaxInt)throw RangeError(OVERFLOW_ERROR);if(t==s){for(var y=c,A=base;;A+=base){var g=A<=l?tMin:A>=l+tMax?tMax:A-l;if(y0?arguments[0]:void 0,d=this,h=[];if(setInternalState$1(d,{type:URL_SEARCH_PARAMS,entries:h,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==p)if(isObject(p))if(e=getIteratorMethod(p))for(t=(r=getIterator(p,e)).next;!(a=t.call(r)).done;){if((c=(s=(i=getIterator(anObject(a.value))).next).call(i)).done||(l=s.call(i)).done||!s.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:toString(c.value),value:toString(l.value)})}else for(u in p)has$1(p,u)&&h.push({key:u,value:toString(p[u])});else parseSearchParams(h,"string"==typeof p?"?"===p.charAt(0)?p.slice(1):p:toString(p))},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(redefineAll(URLSearchParamsPrototype,{append:function append(e,r){validateArgumentsLength(arguments.length,2);var t=getInternalParamsState(this);t.entries.push({key:toString(e),value:toString(r)}),t.updateURL()},delete:function(e){validateArgumentsLength(arguments.length,1);for(var r=getInternalParamsState(this),t=r.entries,a=toString(e),i=0;ie.key){i.splice(r,0,e);break}r===t&&i.push(e)}a.updateURL()},forEach:function forEach(e){for(var r,t=getInternalParamsState(this).entries,a=functionBindContext(e,arguments.length>1?arguments[1]:void 0,3),i=0;i1?wrapRequestOptions(arguments[1]):{})}}),isCallable(NativeRequest)){var RequestConstructor=function Request(e){return anInstance(this,RequestConstructor,"Request"),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,_export({global:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},codeAt=stringMultibyte.codeAt,NativeURL=global$1.URL,URLSearchParams$1=web_urlSearchParams.URLSearchParams,getInternalSearchParamsState=web_urlSearchParams.getState,setInternalState=internalState.set,getInternalURLState=internalState.getterFor("URL"),floor$1=Math.floor,pow=Math.pow,INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[A-Za-z]/,ALPHANUMERIC=/[\d+-.A-Za-z]/,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\dA-Fa-f]+$/,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseHost=function(e,r){var t,a,i;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return INVALID_HOST;if(!(t=parseIPv6(r.slice(1,-1))))return INVALID_HOST;e.host=t}else if(isSpecial(e)){if(r=stringPunycodeToAscii(r),FORBIDDEN_HOST_CODE_POINT.test(r))return INVALID_HOST;if(null===(t=parseIPv4(r)))return INVALID_HOST;e.host=t}else{if(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(r))return INVALID_HOST;for(t="",a=arrayFrom(r),i=0;i4)return e;for(t=[],a=0;a1&&"0"==i.charAt(0)&&(s=HEX_START.test(i)?16:8,i=i.slice(8==s?1:2)),""===i)c=0;else{if(!(10==s?DEC:8==s?OCT:HEX).test(i))return e;c=parseInt(i,s)}t.push(c)}for(a=0;a=pow(256,5-r))return null}else if(c>255)return null;for(l=t.pop(),a=0;a6)return;for(a=0;chr();){if(i=null,a>0){if(!("."==chr()&&a<4))return;h++}if(!DIGIT.test(chr()))return;for(;DIGIT.test(chr());){if(s=parseInt(chr(),10),null===i)i=s;else{if(0==i)return;i=10*i+s}if(i>255)return;h++}u[p]=256*u[p]+i,2!=++a&&4!=a||p++}if(4!=a)return;break}if(":"==chr()){if(h++,!chr())return}else if(chr())return;u[p++]=r}else{if(null!==d)return;h++,d=++p}}if(null!==d)for(c=p-d,p=7;0!=p&&c>0;)l=u[p],u[p--]=u[d+c-1],u[d+--c]=l;else if(8!=p)return;return u},findLongestZeroSequence=function(e){for(var r=null,t=1,a=null,i=0,s=0;s<8;s++)0!==e[s]?(i>t&&(r=a,t=i),a=null,i=0):(null===a&&(a=s),++i);return i>t&&(r=a,t=i),r},serializeHost=function(e){var r,t,a,i;if("number"==typeof e){for(r=[],t=0;t<4;t++)r.unshift(e%256),e=floor$1(e/256);return r.join(".")}if("object"==typeof e){for(r="",a=findLongestZeroSequence(e),t=0;t<8;t++)i&&0===e[t]||(i&&(i=!1),a===t?(r+=t?":":"::",i=!0):(r+=e[t].toString(16),t<7&&(r+=":")));return"["+r+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=objectAssign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=objectAssign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=objectAssign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,r){var t=codeAt(e,0);return t>32&&t<127&&!has$1(r,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(e){return has$1(specialSchemes,e.scheme)},includesCredentials=function(e){return""!=e.username||""!=e.password},cannotHaveUsernamePasswordPort=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},isWindowsDriveLetter=function(e,r){var t;return 2==e.length&&ALPHA.test(e.charAt(0))&&(":"==(t=e.charAt(1))||!r&&"|"==t)},startsWithWindowsDriveLetter=function(e){var r;return e.length>1&&isWindowsDriveLetter(e.slice(0,2))&&(2==e.length||"/"===(r=e.charAt(2))||"\\"===r||"?"===r||"#"===r)},shortenURLsPath=function(e){var r=e.path,t=r.length;!t||"file"==e.scheme&&1==t&&isWindowsDriveLetter(r[0],!0)||r.pop()},isSingleDot=function(e){return"."===e||"%2e"===e.toLowerCase()},isDoubleDot=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},parseURL=function(e,r,t,a){var i,s,c,l,u=t||SCHEME_START,p=0,d="",h=!1,y=!1,A=!1;for(t||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,r=r.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),r=r.replace(TAB_AND_NEW_LINE,""),i=arrayFrom(r);p<=i.length;){switch(s=i[p],u){case SCHEME_START:if(!s||!ALPHA.test(s)){if(t)return INVALID_SCHEME;u=NO_SCHEME;continue}d+=s.toLowerCase(),u=SCHEME;break;case SCHEME:if(s&&(ALPHANUMERIC.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(t)return INVALID_SCHEME;d="",u=NO_SCHEME,p=0;continue}if(t&&(isSpecial(e)!=has$1(specialSchemes,d)||"file"==d&&(includesCredentials(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,t)return void(isSpecial(e)&&specialSchemes[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?u=FILE:isSpecial(e)&&a&&a.scheme==e.scheme?u=SPECIAL_RELATIVE_OR_AUTHORITY:isSpecial(e)?u=SPECIAL_AUTHORITY_SLASHES:"/"==i[p+1]?(u=PATH_OR_AUTHORITY,p++):(e.cannotBeABaseURL=!0,e.path.push(""),u=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!a||a.cannotBeABaseURL&&"#"!=s)return INVALID_SCHEME;if(a.cannotBeABaseURL&&"#"==s){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=FRAGMENT;break}u="file"==a.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=s||"/"!=i[p+1]){u=RELATIVE;continue}u=SPECIAL_AUTHORITY_IGNORE_SLASHES,p++;break;case PATH_OR_AUTHORITY:if("/"==s){u=AUTHORITY;break}u=PATH;continue;case RELATIVE:if(e.scheme=a.scheme,s==EOF)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==s||"\\"==s&&isSpecial(e))u=RELATIVE_SLASH;else if("?"==s)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=PATH;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}break;case RELATIVE_SLASH:if(!isSpecial(e)||"/"!=s&&"\\"!=s){if("/"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=PATH;continue}u=AUTHORITY}else u=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(u=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=s||"/"!=d.charAt(p+1))continue;p++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=s&&"\\"!=s){u=AUTHORITY;continue}break;case AUTHORITY:if("@"==s){h&&(d="%40"+d),h=!0,c=arrayFrom(d);for(var g=0;g65535)return INVALID_PORT;e.port=isSpecial(e)&&m===specialSchemes[e.scheme]?null:m,d=""}if(t)return;u=PATH_START;continue}return INVALID_PORT}d+=s;break;case FILE:if(e.scheme="file","/"==s||"\\"==s)u=FILE_SLASH;else{if(!a||"file"!=a.scheme){u=PATH;continue}if(s==EOF)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==s)e.host=a.host,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){startsWithWindowsDriveLetter(i.slice(p).join(""))||(e.host=a.host,e.path=a.path.slice(),shortenURLsPath(e)),u=PATH;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}}break;case FILE_SLASH:if("/"==s||"\\"==s){u=FILE_HOST;break}a&&"file"==a.scheme&&!startsWithWindowsDriveLetter(i.slice(p).join(""))&&(isWindowsDriveLetter(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=PATH;continue;case FILE_HOST:if(s==EOF||"/"==s||"\\"==s||"?"==s||"#"==s){if(!t&&isWindowsDriveLetter(d))u=PATH;else if(""==d){if(e.host="",t)return;u=PATH_START}else{if(l=parseHost(e,d))return l;if("localhost"==e.host&&(e.host=""),t)return;d="",u=PATH_START}continue}d+=s;break;case PATH_START:if(isSpecial(e)){if(u=PATH,"/"!=s&&"\\"!=s)continue}else if(t||"?"!=s)if(t||"#"!=s){if(s!=EOF&&(u=PATH,"/"!=s))continue}else e.fragment="",u=FRAGMENT;else e.query="",u=QUERY;break;case PATH:if(s==EOF||"/"==s||"\\"==s&&isSpecial(e)||!t&&("?"==s||"#"==s)){if(isDoubleDot(d)?(shortenURLsPath(e),"/"==s||"\\"==s&&isSpecial(e)||e.path.push("")):isSingleDot(d)?"/"==s||"\\"==s&&isSpecial(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&isWindowsDriveLetter(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(s==EOF||"?"==s||"#"==s))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==s?(e.query="",u=QUERY):"#"==s&&(e.fragment="",u=FRAGMENT)}else d+=percentEncode(s,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==s?(e.query="",u=QUERY):"#"==s?(e.fragment="",u=FRAGMENT):s!=EOF&&(e.path[0]+=percentEncode(s,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=s?s!=EOF&&("'"==s&&isSpecial(e)?e.query+="%27":e.query+="#"==s?"%23":percentEncode(s,C0ControlPercentEncodeSet)):(e.fragment="",u=FRAGMENT);break;case FRAGMENT:s!=EOF&&(e.fragment+=percentEncode(s,fragmentPercentEncodeSet))}p++}},URLConstructor=function URL(e){var r,t,a=anInstance(this,URLConstructor,"URL"),i=arguments.length>1?arguments[1]:void 0,s=toString(e),c=setInternalState(a,{type:"URL"});if(void 0!==i)if(i instanceof URLConstructor)r=getInternalURLState(i);else if(t=parseURL(r={},toString(i)))throw TypeError(t);if(t=parseURL(c,s,null,r))throw TypeError(t);var l=c.searchParams=new URLSearchParams$1,u=getInternalSearchParamsState(l);u.updateSearchParams(c.query),u.updateURL=function(){c.query=String(l)||null},descriptors||(a.href=serializeURL.call(a),a.origin=getOrigin.call(a),a.protocol=getProtocol.call(a),a.username=getUsername.call(a),a.password=getPassword.call(a),a.host=getHost.call(a),a.hostname=getHostname.call(a),a.port=getPort.call(a),a.pathname=getPathname.call(a),a.search=getSearch.call(a),a.searchParams=getSearchParams.call(a),a.hash=getHash.call(a))},URLPrototype=URLConstructor.prototype,serializeURL=function(){var e=getInternalURLState(this),r=e.scheme,t=e.username,a=e.password,i=e.host,s=e.port,c=e.path,l=e.query,u=e.fragment,p=r+":";return null!==i?(p+="//",includesCredentials(e)&&(p+=t+(a?":"+a:"")+"@"),p+=serializeHost(i),null!==s&&(p+=":"+s)):"file"==r&&(p+="//"),p+=e.cannotBeABaseURL?c[0]:c.length?"/"+c.join("/"):"",null!==l&&(p+="?"+l),null!==u&&(p+="#"+u),p},getOrigin=function(){var e=getInternalURLState(this),r=e.scheme,t=e.port;if("blob"==r)try{return new URLConstructor(r.path[0]).origin}catch(e){return"null"}return"file"!=r&&isSpecial(e)?r+"://"+serializeHost(e.host)+(null!==t?":"+t:""):"null"},getProtocol=function(){return getInternalURLState(this).scheme+":"},getUsername=function(){return getInternalURLState(this).username},getPassword=function(){return getInternalURLState(this).password},getHost=function(){var e=getInternalURLState(this),r=e.host,t=e.port;return null===r?"":null===t?serializeHost(r):serializeHost(r)+":"+t},getHostname=function(){var e=getInternalURLState(this).host;return null===e?"":serializeHost(e)},getPort=function(){var e=getInternalURLState(this).port;return null===e?"":String(e)},getPathname=function(){var e=getInternalURLState(this),r=e.path;return e.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},getSearch=function(){var e=getInternalURLState(this).query;return e?"?"+e:""},getSearchParams=function(){return getInternalURLState(this).searchParams},getHash=function(){var e=getInternalURLState(this).fragment;return e?"#"+e:""},accessorDescriptor=function(e,r){return{get:e,set:r,configurable:!0,enumerable:!0}};if(descriptors&&objectDefineProperties(URLPrototype,{href:accessorDescriptor(serializeURL,(function(e){var r=getInternalURLState(this),t=toString(e),a=parseURL(r,t);if(a)throw TypeError(a);getInternalSearchParamsState(r.searchParams).updateSearchParams(r.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(e){var r=getInternalURLState(this);parseURL(r,toString(e)+":",SCHEME_START)})),username:accessorDescriptor(getUsername,(function(e){var r=getInternalURLState(this),t=arrayFrom(toString(e));if(!cannotHaveUsernamePasswordPort(r)){r.username="";for(var a=0;a1?arguments[1]:void 0)},handlePrototype=function(e){if(e&&e.forEach!==arrayForEach)try{createNonEnumerableProperty(e,"forEach",arrayForEach)}catch(r){e.forEach=arrayForEach}};for(var COLLECTION_NAME in domIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype);handlePrototype(domTokenListPrototype);var propertyIsEnumerable=objectPropertyIsEnumerable.f,createMethod=function(e){return function(r){for(var t,a=toIndexedObject(r),i=objectKeys(a),s=i.length,c=0,l=[];s>c;)t=i[c++],descriptors&&!propertyIsEnumerable.call(a,t)||l.push(e?[t,a[t]]:a[t]);return l}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$entries=objectToArray.entries;_export({target:"Object",stat:!0},{entries:function entries(e){return $entries(e)}});var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,$startsWith="".startsWith,min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegexpLogic("startsWith"),MDN_POLYFILL_BUG=!(CORRECT_IS_REGEXP_LOGIC||(descriptor=getOwnPropertyDescriptor(String.prototype,"startsWith"),!descriptor||descriptor.writable)),descriptor;_export({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function startsWith(e){var r=toString(requireObjectCoercible(this));notARegexp(e);var t=toLength(min$1(arguments.length>1?arguments[1]:void 0,r.length)),a=toString(e);return $startsWith?$startsWith.call(r,a,t):r.slice(t,t+a.length)===a}});var floor=Math.floor,replace="".replace,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(e,r,t,a,i,s){var c=t+e.length,l=a.length,u=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==i&&(i=toObject(i),u=SUBSTITUTION_SYMBOLS),replace.call(s,u,(function(s,u){var p;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,t);case"'":return r.slice(c);case"<":p=i[u.slice(1,-1)];break;default:var d=+u;if(0===d)return s;if(d>l){var h=floor(d/10);return 0===h?s:h<=l?void 0===a[h-1]?u.charAt(1):a[h-1]+u.charAt(1):s}p=a[d-1]}return void 0===p?"":p}))},REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}));fixRegexpWellKnownSymbolLogic("replace",(function(e,r,t){var a=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function replace(e,t){var a=requireObjectCoercible(this),i=null==e?void 0:getMethod(e,REPLACE);return i?i.call(e,a,t):r.call(toString(a),e,t)},function(e,i){var s=anObject(this),c=toString(e);if("string"==typeof i&&-1===i.indexOf(a)&&-1===i.indexOf("$<")){var l=t(r,s,c,i);if(l.done)return l.value}var u=isCallable(i);u||(i=toString(i));var p=s.global;if(p){var d=s.unicode;s.lastIndex=0}for(var h=[];;){var y=regexpExecAbstract(s,c);if(null===y)break;if(h.push(y),!p)break;""===toString(y[0])&&(s.lastIndex=advanceStringIndex(c,toLength(s.lastIndex),d))}for(var A="",g=0,E=0;E=g&&(A+=c.slice(g,m)+b,g=m+v.length)}return A+c.slice(g)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=engineV8Version>=51||!fails((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var r=e[IS_CONCAT_SPREADABLE];return void 0!==r?!!r:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function concat(e){var r,t,a,i,s,c=toObject(this),l=arraySpeciesCreate(c,0),u=0;for(r=-1,a=arguments.length;rMAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(t=0;t=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(l,u++,s)}return l.length=u,l}});var cnt=0,imageCompressionLibUrl,worker;function createWorker(e){var r=[];return"function"==typeof e?r.push("(".concat(e,")()")):r.push(e),new Worker(URL.createObjectURL(new Blob(r)))}function createSourceObject(e){return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}function stringify(e){return JSON.stringify(e,(function(e,r){return"function"==typeof r?"BIC_FN:::(function () { return ".concat(r.toString()," })()"):r}))}function parse(o){if("string"==typeof o)return o;var result={};return Object.entries(o).forEach((function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];if("string"==typeof value&&value.startsWith("BIC_FN:::"))try{result[key]=eval(value.replace(/^BIC_FN:::/,""))}catch(e){throw e}else result[key]=parse(value)})),result}function generateLib(){return createSourceObject("\n // reconstruct library\n function imageCompression (){return (".concat(imageCompression,").apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ").concat(imageCompression.getDataUrlFromFile,"\n imageCompression.getFilefromDataUrl = ").concat(imageCompression.getFilefromDataUrl,"\n imageCompression.loadImage = ").concat(imageCompression.loadImage,"\n imageCompression.drawImageInCanvas = ").concat(imageCompression.drawImageInCanvas,"\n imageCompression.drawFileInCanvas = ").concat(imageCompression.drawFileInCanvas,"\n imageCompression.canvasToFile = ").concat(imageCompression.canvasToFile,"\n imageCompression.getExifOrientation = ").concat(imageCompression.getExifOrientation,"\n imageCompression.handleMaxWidthOrHeight = ").concat(imageCompression.handleMaxWidthOrHeight,"\n imageCompression.followExifOrientation = ").concat(imageCompression.followExifOrientation,"\n imageCompression.cleanupCanvasMemory = ").concat(imageCompression.cleanupCanvasMemory,"\n imageCompression.isAutoOrientationInBrowser = ").concat(imageCompression.isAutoOrientationInBrowser,"\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ").concat(imageCompression.approximateBelowMaximumCanvasSizeOfBrowser,"\n imageCompression.getBrowserName = ").concat(imageCompression.getBrowserName,"\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ").concat(isIOS,"\n \n getNewCanvasAndCtx = ").concat(getNewCanvasAndCtx,"\n CustomFileReader = FileReader\n CustomFile = File\n MAX_CANVAS_SIZE = ").concat(JSON.stringify(MAX_CANVAS_SIZE),"\n BROWSER_NAME = ").concat(JSON.stringify(BROWSER_NAME),"\n function compress (){return (").concat(compress,").apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ").concat(parse,"\n const UPNG = {}\n UPNG.toRGBA8 = ").concat(UPNG.toRGBA8,"\n UPNG.toRGBA8.decodeImage = ").concat(UPNG.toRGBA8.decodeImage,"\n UPNG.decode = ").concat(UPNG.decode,"\n UPNG.decode._decompress = ").concat(UPNG.decode._decompress,"\n UPNG.decode._inflate = ").concat(UPNG.decode._inflate,"\n UPNG.decode._readInterlace = ").concat(UPNG.decode._readInterlace,"\n UPNG.decode._getBPP = ").concat(UPNG.decode._getBPP," \n UPNG.decode._filterZero = ").concat(UPNG.decode._filterZero,"\n UPNG.decode._paeth = ").concat(UPNG.decode._paeth,"\n UPNG.decode._IHDR = ").concat(UPNG.decode._IHDR,"\n UPNG._bin = parse(").concat(stringify(UPNG._bin),")\n UPNG._copyTile = ").concat(UPNG._copyTile,"\n UPNG.encode = ").concat(UPNG.encode,"\n UPNG.encodeLL = ").concat(UPNG.encodeLL," \n UPNG.encode._main = ").concat(UPNG.encode._main,"\n UPNG.encode.compressPNG = ").concat(UPNG.encode.compressPNG," \n UPNG.encode.compress = ").concat(UPNG.encode.compress,"\n UPNG.encode.framize = ").concat(UPNG.encode.framize," \n UPNG.encode._updateFrame = ").concat(UPNG.encode._updateFrame," \n UPNG.encode._prepareDiff = ").concat(UPNG.encode._prepareDiff," \n UPNG.encode._filterZero = ").concat(UPNG.encode._filterZero," \n UPNG.encode._filterLine = ").concat(UPNG.encode._filterLine,"\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,"\n UPNG.crc = parse(").concat(stringify(UPNG.crc),")\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ").concat(UPNG.quantize," \n UPNG.quantize.getKDtree = ").concat(UPNG.quantize.getKDtree," \n UPNG.quantize.getNearest = ").concat(UPNG.quantize.getNearest," \n UPNG.quantize.planeDst = ").concat(UPNG.quantize.planeDst," \n UPNG.quantize.dist = ").concat(UPNG.quantize.dist," \n UPNG.quantize.splitPixels = ").concat(UPNG.quantize.splitPixels," \n UPNG.quantize.vecDot = ").concat(UPNG.quantize.vecDot," \n UPNG.quantize.stats = ").concat(UPNG.quantize.stats," \n UPNG.quantize.estats = ").concat(UPNG.quantize.estats,"\n UPNG.M4 = parse(").concat(stringify(UPNG.M4),")\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,'\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP["parse"] = ').concat(UZIP_1.parse,"\n UZIP._readLocal = ").concat(UZIP_1._readLocal,"\n UZIP.inflateRaw = ").concat(UZIP_1.inflateRaw,"\n UZIP.inflate = ").concat(UZIP_1.inflate,"\n UZIP.deflate = ").concat(UZIP_1.deflate,"\n UZIP.deflateRaw = ").concat(UZIP_1.deflateRaw,"\n UZIP.encode = ").concat(UZIP_1.encode,"\n UZIP._noNeed = ").concat(UZIP_1._noNeed,"\n UZIP._writeHeader = ").concat(UZIP_1._writeHeader,"\n UZIP.crc = parse(").concat(stringify(UZIP_1.crc),")\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ").concat(UZIP_1.adler,"\n UZIP.bin = parse(").concat(stringify(UZIP_1.bin),")\n UZIP.F = {}\n UZIP.F.deflateRaw = ").concat(UZIP_1.F.deflateRaw,"\n UZIP.F._bestMatch = ").concat(UZIP_1.F._bestMatch,"\n UZIP.F._howLong = ").concat(UZIP_1.F._howLong,"\n UZIP.F._hash = ").concat(UZIP_1.F._hash,"\n UZIP.saved = ").concat(UZIP_1.saved,"\n UZIP.F._writeBlock = ").concat(UZIP_1.F._writeBlock,"\n UZIP.F._copyExact = ").concat(UZIP_1.F._copyExact,"\n UZIP.F.getTrees = ").concat(UZIP_1.F.getTrees,"\n UZIP.F.getSecond = ").concat(UZIP_1.F.getSecond,"\n UZIP.F.nonZero = ").concat(UZIP_1.F.nonZero,"\n UZIP.F.contSize = ").concat(UZIP_1.F.contSize,"\n UZIP.F._codeTiny = ").concat(UZIP_1.F._codeTiny," \n UZIP.F._lenCodes = ").concat(UZIP_1.F._lenCodes," \n UZIP.F._hufTree = ").concat(UZIP_1.F._hufTree," \n UZIP.F.setDepth = ").concat(UZIP_1.F.setDepth," \n UZIP.F.restrictDepth = ").concat(UZIP_1.F.restrictDepth,"\n UZIP.F._goodIndex = ").concat(UZIP_1.F._goodIndex," \n UZIP.F._writeLit = ").concat(UZIP_1.F._writeLit," \n UZIP.F.inflate = ").concat(UZIP_1.F.inflate," \n UZIP.F._check = ").concat(UZIP_1.F._check," \n UZIP.F._decodeTiny = ").concat(UZIP_1.F._decodeTiny," \n UZIP.F._copyOut = ").concat(UZIP_1.F._copyOut," \n UZIP.F.makeCodes = ").concat(UZIP_1.F.makeCodes," \n UZIP.F.codes2map = ").concat(UZIP_1.F.codes2map," \n UZIP.F.revCodes = ").concat(UZIP_1.F.revCodes," \n\n // used only in deflate\n UZIP.F._putsE = ").concat(UZIP_1.F._putsE,"\n UZIP.F._putsF = ").concat(UZIP_1.F._putsF,"\n \n UZIP.F._bitsE = ").concat(UZIP_1.F._bitsE,"\n UZIP.F._bitsF = ").concat(UZIP_1.F._bitsF,"\n\n UZIP.F._get17 = ").concat(UZIP_1.F._get17,"\n UZIP.F._get25 = ").concat(UZIP_1.F._get25,"\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n "))}function generateWorkerScript(){return createWorker("\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n })\n ")}function compressOnWebWorker(e,r){return new Promise((function(t,a){var i=cnt+=1;imageCompressionLibUrl||(imageCompressionLibUrl=generateLib()),worker||(worker=generateWorkerScript()),worker.addEventListener("message",(function handler(e){if(e.data.id===i){if(void 0!==e.data.progress)return void r.onProgress(e.data.progress);worker.removeEventListener("message",handler),e.data.error&&a(new Error(e.data.error)),t(e.data.file)}})),worker.addEventListener("error",a),worker.postMessage({file:e,id:i,imageCompressionLibUrl:imageCompressionLibUrl,options:_objectSpread2(_objectSpread2({},r),{},{onProgress:void 0})})}))}function imageCompression(e,r){return new Promise((function(t,a){var i,s,c,l,u,p;if(i=_objectSpread2({},r),c=0,l=i.onProgress,i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,u="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=function(e){c=e,"function"==typeof l&&l(c)},!(e instanceof Blob||e instanceof CustomFile))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(p="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!u||"function"!=typeof Worker||p)return compress(e,i).then(function(e){try{return s=e,$If_3.call(this)}catch(e){return a(e)}}.bind(this),a);var d=function(){try{return $If_3.call(this)}catch(e){return a(e)}}.bind(this),h=function $Try_1_Catch(r){try{return compress(e,i).then((function(e){try{return s=e,d()}catch(e){return a(e)}}),a)}catch(e){return a(e)}};try{return compressOnWebWorker(e,i).then((function(e){try{return s=e,d()}catch(e){return h()}}),h)}catch(e){h()}function $If_3(){try{s.name=e.name,s.lastModified=e.lastModified}catch(e){}return t(s)}}))}return imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.getBrowserName=getBrowserName,imageCompression.version="1.0.17",imageCompression})); //# sourceMappingURL=browser-image-compression.js.map diff --git a/dist/browser-image-compression.js.map b/dist/browser-image-compression.js.map index 241e534..4467d92 100644 --- a/dist/browser-image-compression.js.map +++ b/dist/browser-image-compression.js.map @@ -1 +1 @@ -{"version":3,"file":"browser-image-compression.js","sources":["../node_modules/core-js/internals/global.js","../node_modules/core-js/internals/is-pure.js","../node_modules/core-js/internals/to-object.js","../node_modules/core-js/internals/has.js","../node_modules/core-js/internals/uid.js","../node_modules/core-js/internals/is-callable.js","../node_modules/core-js/internals/get-built-in.js","../node_modules/core-js/internals/engine-v8-version.js","../node_modules/core-js/internals/fails.js","../node_modules/core-js/internals/well-known-symbol.js","../node_modules/core-js/internals/to-string-tag-support.js","../node_modules/core-js/internals/document-create-element.js","../node_modules/core-js/internals/an-object.js","../node_modules/core-js/internals/is-symbol.js","../node_modules/core-js/internals/try-to-string.js","../node_modules/core-js/internals/a-callable.js","../node_modules/core-js/internals/get-method.js","../node_modules/core-js/internals/ordinary-to-primitive.js","../node_modules/core-js/internals/to-primitive.js","../node_modules/core-js/internals/to-property-key.js","../node_modules/core-js/internals/create-property-descriptor.js","../node_modules/core-js/internals/create-non-enumerable-property.js","../node_modules/core-js/internals/inspect-source.js","../node_modules/core-js/internals/hidden-keys.js","../node_modules/core-js/internals/internal-state.js","../node_modules/core-js/internals/function-name.js","../node_modules/core-js/internals/redefine.js","../node_modules/core-js/internals/classof-raw.js","../node_modules/core-js/internals/classof.js","../node_modules/core-js/internals/object-property-is-enumerable.js","../node_modules/core-js/internals/indexed-object.js","../node_modules/core-js/internals/to-integer.js","../node_modules/core-js/internals/to-absolute-index.js","../node_modules/core-js/internals/array-includes.js","../node_modules/core-js/internals/object-keys-internal.js","../node_modules/core-js/internals/object-get-own-property-symbols.js","../node_modules/core-js/internals/copy-constructor-properties.js","../node_modules/core-js/internals/is-forced.js","../node_modules/core-js/internals/export.js","../node_modules/core-js/internals/redefine-all.js","../node_modules/core-js/internals/a-possible-prototype.js","../node_modules/core-js/internals/object-set-prototype-of.js","../node_modules/core-js/internals/set-to-string-tag.js","../node_modules/core-js/internals/set-species.js","../node_modules/core-js/internals/an-instance.js","../node_modules/core-js/internals/iterators.js","../node_modules/core-js/internals/is-array-iterator-method.js","../node_modules/core-js/internals/function-bind-context.js","../node_modules/core-js/internals/get-iterator.js","../node_modules/core-js/internals/iterator-close.js","../node_modules/core-js/internals/iterate.js","../node_modules/core-js/internals/check-correctness-of-iteration.js","../node_modules/core-js/internals/is-constructor.js","../node_modules/core-js/internals/a-constructor.js","../node_modules/core-js/internals/species-constructor.js","../node_modules/core-js/internals/task.js","../node_modules/core-js/internals/microtask.js","../node_modules/core-js/internals/new-promise-capability.js","../node_modules/core-js/internals/host-report-errors.js","../node_modules/core-js/internals/perform.js","../node_modules/core-js/internals/engine-is-browser.js","../node_modules/core-js/modules/es.promise.js","../node_modules/core-js/internals/object-create.js","../node_modules/core-js/internals/to-string.js","../node_modules/core-js/internals/whitespaces.js","../node_modules/core-js/internals/string-trim.js","../node_modules/core-js/modules/es.number.constructor.js","../node_modules/core-js/modules/es.function.name.js","../node_modules/core-js/internals/object-assign.js","../node_modules/core-js/internals/regexp-sticky-helpers.js","../node_modules/core-js/internals/regexp-unsupported-dot-all.js","../node_modules/core-js/internals/regexp-unsupported-ncg.js","../node_modules/core-js/internals/regexp-exec.js","../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../node_modules/core-js/internals/is-regexp.js","../node_modules/core-js/internals/string-multibyte.js","../node_modules/core-js/internals/advance-string-index.js","../node_modules/core-js/internals/regexp-exec-abstract.js","../node_modules/core-js/modules/es.string.split.js","../node_modules/core-js/modules/es.string.match.js","../node_modules/core-js/internals/add-to-unscopables.js","../node_modules/core-js/internals/object-get-prototype-of.js","../node_modules/core-js/internals/iterators-core.js","../node_modules/core-js/internals/define-iterator.js","../node_modules/core-js/internals/array-buffer-native.js","../node_modules/core-js/internals/array-buffer-view-core.js","../node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","../node_modules/core-js/internals/to-index.js","../node_modules/core-js/internals/ieee754.js","../node_modules/core-js/internals/array-buffer.js","../node_modules/core-js/internals/typed-array-from.js","../node_modules/core-js/internals/array-species-constructor.js","../node_modules/core-js/internals/array-species-create.js","../node_modules/core-js/internals/array-iteration.js","../node_modules/core-js/internals/typed-array-constructor.js","../node_modules/core-js/modules/es.typed-array.uint8-array.js","../node_modules/core-js/internals/array-copy-within.js","../node_modules/core-js/internals/array-from-constructor-and-list.js","../node_modules/core-js/internals/typed-array-species-constructor.js","../node_modules/core-js/modules/es.typed-array.filter.js","../node_modules/core-js/modules/es.typed-array.iterator.js","../node_modules/core-js/modules/es.typed-array.join.js","../node_modules/core-js/internals/array-method-is-strict.js","../node_modules/core-js/internals/array-last-index-of.js","../node_modules/core-js/modules/es.typed-array.map.js","../node_modules/core-js/internals/array-reduce.js","../node_modules/core-js/modules/es.typed-array.reverse.js","../node_modules/core-js/modules/es.typed-array.set.js","../node_modules/core-js/modules/es.typed-array.slice.js","../node_modules/core-js/internals/array-sort.js","../node_modules/core-js/modules/es.typed-array.sort.js","../node_modules/core-js/modules/es.typed-array.to-locale-string.js","../node_modules/core-js/modules/es.typed-array.to-string.js","../node_modules/core-js/modules/es.array.includes.js","../node_modules/core-js/internals/not-a-regexp.js","../node_modules/core-js/internals/correct-is-regexp-logic.js","../node_modules/core-js/internals/array-method-has-species-support.js","../node_modules/core-js/modules/es.typed-array.uint32-array.js","../node_modules/core-js/modules/es.typed-array.uint16-array.js","../node_modules/core-js/modules/es.regexp.to-string.js","../node_modules/core-js/modules/es.array.sort.js","../node_modules/uzip/UZIP.js","../lib/UPNG.js","../lib/utils.js","../lib/image-compression.js","../node_modules/core-js/modules/es.string.iterator.js","../node_modules/core-js/internals/dom-token-list-prototype.js","../node_modules/core-js/modules/web.dom-collections.iterator.js","../node_modules/core-js/internals/native-url.js","../node_modules/core-js/internals/array-from.js","../node_modules/core-js/internals/string-punycode-to-ascii.js","../node_modules/core-js/modules/web.url-search-params.js","../node_modules/core-js/modules/web.url.js","../node_modules/core-js/internals/array-for-each.js","../node_modules/core-js/modules/web.dom-collections.for-each.js","../node_modules/core-js/internals/object-to-array.js","../node_modules/core-js/modules/es.object.entries.js","../node_modules/core-js/modules/es.string.starts-with.js","../node_modules/core-js/internals/get-substitution.js","../node_modules/core-js/modules/es.string.replace.js","../node_modules/core-js/modules/es.array.concat.js","../lib/web-worker.js","../lib/index.js"],"sourcesContent":["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","module.exports = false;\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","// `isCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument === 'function';\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","module.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","module.exports = {};\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar has = require('../internals/has');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = has(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar has = require('../internals/has');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!has(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (argument) {\n if (typeof argument === 'object' || isCallable(argument)) return argument;\n throw TypeError(\"Can't set \" + String(argument) + ' as a prototype');\n};\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","module.exports = function (it, Constructor, name) {\n if (it instanceof Constructor) return it;\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n};\n","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var aCallable = require('../internals/a-callable');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aCallable(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(iteratorMethod.call(argument));\n throw TypeError(String(argument) + ' is not iterable');\n};\n","var anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = innerResult.call(iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw TypeError(String(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = constructorRegExp.exec;\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(function () { /* empty */ });\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(Object, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a constructor');\n};\n","var anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var argumentsLength = arguments.length;\n var i = 1;\n while (argumentsLength > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (isCallable(fn) ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","module.exports = typeof window == 'object';\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aCallable(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromiseConstructorPrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var classof = require('../internals/classof');\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a number');\n var it = toPrimitive(argument, 'number');\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nexports.UNSUPPORTED_Y = fails(function () {\n var re = $RegExp('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = $RegExp('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('.', 's');\n return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('(?b)', 'g');\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$c') !== 'bc';\n});\n","'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n // eslint-disable-next-line max-statements -- TODO\n patchedExec = function exec(string) {\n var re = this;\n var state = getInternalState(re);\n var str = toString(string);\n var raw = state.raw;\n var result, reCopy, lastIndex, match, i, object, group;\n\n if (raw) {\n raw.lastIndex = re.lastIndex;\n result = patchedExec.call(raw, str);\n re.lastIndex = raw.lastIndex;\n return result;\n }\n\n var groups = state.groups;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = str.slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str.charAt(re.lastIndex - 1) !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (match && groups) {\n match.groups = object = create(null);\n for (i = 0; i < groups.length; i++) {\n group = groups[i];\n object[group[0]] = match[group[1]];\n }\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n redefine(String.prototype, KEY, methods[0]);\n redefine(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var toInteger = require('../internals/to-integer');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.codePointAt` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (isCallable(exec)) {\n var result = exec.call(R, S);\n if (result !== null) anObject(result);\n return result;\n }\n if (classof(R) === 'RegExp') return regexpExec.call(R, S);\n throw TypeError('RegExp#exec called on incompatible receiver');\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = toString(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? splitter.call(separator, O, limit)\n : internalSplit.call(toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n if (res.done) return res.value;\n\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);\n return matcher ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var has = require('../internals/has');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (has(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n redefine(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n redefine(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;\n throw TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n redefine(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n redefine(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","/* eslint-disable no-new -- required for testing */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar FunctionName = require('../internals/function-name');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","var aConstructor = require('../internals/a-constructor');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar bind = require('../internals/function-bind-context');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var C = aConstructor(this);\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, step, iterator, next;\n if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n O = [];\n while (!(step = next.call(iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2], 2);\n }\n length = toLength(O.length);\n result = new (aTypedArrayConstructor(C))(length);\n for (i = 0; length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n};\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_REJECT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isInteger = require('../internals/is-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPropertyKey = require('../internals/to-property-key');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && !isSymbol(key)\n && key in target\n && isInteger(+key)\n && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n key = toPropertyKey(key);\n return isTypedArrayIndex(target, key)\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n key = toPropertyKey(key);\n if (isTypedArrayIndex(target, key)\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor);\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","module.exports = function (Constructor, list) {\n var index = 0;\n var length = list.length;\n var result = new Constructor(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n","var ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\n\n// a part of `TypedArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#typedarray-species-create\nmodule.exports = function (originalArray) {\n return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR]));\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values';\n\nvar typedArrayValues = function values() {\n return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('join', function join(separator) {\n return $join.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (typedArraySpeciesConstructor(O))(length);\n });\n});\n","var aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aCallable(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toOffset = require('../internals/to-offset');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = $slice.call(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","// TODO: use something more complex like timsort?\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n mergeSort(array.slice(0, middle), comparefn),\n mergeSort(array.slice(middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n var result = [];\n\n while (lindex < llength || rindex < rlength) {\n if (lindex < llength && rindex < rlength) {\n result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);\n } else {\n result.push(lindex < llength ? left[lindex++] : right[rindex++]);\n }\n } return result;\n};\n\nmodule.exports = mergeSort;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar toLength = require('../internals/to-length');\nvar internalSort = require('../internals/array-sort');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && Uint16Array.prototype.sort;\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !fails(function () {\n var array = new Uint16Array(2);\n array.sort(null);\n array.sort({});\n});\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n array.sort(function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n var array = this;\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort.call(array, comparefn);\n\n aTypedArray(array);\n var arrayLength = toLength(array.length);\n var items = Array(arrayLength);\n var index;\n\n for (index = 0; index < arrayLength; index++) {\n items[index] = array[index];\n }\n\n items = internalSort(array, getSortCompare(comparefn));\n\n for (index = 0; index < arrayLength; index++) {\n array[index] = items[index];\n }\n\n return array;\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint32', function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint16', function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = $toString(R.source);\n var rf = R.flags;\n var f = $toString(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn);\n\n var items = [];\n var arrayLength = toLength(array.length);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) items.push(array[index]);\n }\n\n items = internalSort(items, getSortCompare(comparefn));\n itemsLength = items.length;\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) delete array[index++];\n\n return array;\n }\n});\n","\r\n\r\nvar UZIP = {};\r\nif(typeof module == \"object\") module.exports = UZIP;\r\n\r\n\r\nUZIP[\"parse\"] = function(buf, onlyNames)\t// ArrayBuffer\r\n{\r\n\tvar rUs = UZIP.bin.readUshort, rUi = UZIP.bin.readUint, o = 0, out = {};\r\n\tvar data = new Uint8Array(buf);\r\n\tvar eocd = data.length-4;\r\n\t\r\n\twhile(rUi(data, eocd)!=0x06054b50) eocd--;\r\n\t\r\n\tvar o = eocd;\r\n\to+=4;\t// sign = 0x06054b50\r\n\to+=4; // disks = 0;\r\n\tvar cnu = rUs(data, o); o+=2;\r\n\tvar cnt = rUs(data, o); o+=2;\r\n\t\t\t\r\n\tvar csize = rUi(data, o); o+=4;\r\n\tvar coffs = rUi(data, o); o+=4;\r\n\t\r\n\to = coffs;\r\n\tfor(var i=0; i8514000) {\r\n\t\t\t//console.log(PUtils.readASCII(buf , 8514500, 500));\r\n\t\t\t//console.log(PUtils.readASCII(nbuf, 8514500, 500));\r\n\t\t}\r\n\t\tfor(var i=0; i>>4);\r\n\t//console.log(CM, CINFO,CMF,FLG);\r\n\treturn UZIP.inflateRaw(new Uint8Array(file.buffer, file.byteOffset+2, file.length-6), buf); \r\n}\r\nUZIP.deflate = function(data, opts/*, buf, off*/) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar off=0, buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tbuf[off]=120; buf[off+1]=156; off+=2;\r\n\toff = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\tvar crc = UZIP.adler(data, 0, data.length);\r\n\tbuf[off+0]=((crc>>>24)&255); \r\n\tbuf[off+1]=((crc>>>16)&255); \r\n\tbuf[off+2]=((crc>>> 8)&255); \r\n\tbuf[off+3]=((crc>>> 0)&255); \t\r\n\treturn new Uint8Array(buf.buffer, 0, off+4);\r\n}\r\nUZIP.deflateRaw = function(data, opts) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tvar off = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\treturn new Uint8Array(buf.buffer, 0, off);\r\n}\r\n\r\n\r\nUZIP.encode = function(obj, noCmpr) {\r\n\tif(noCmpr==null) noCmpr=false;\r\n\tvar tot = 0, wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar zpd = {};\r\n\tfor(var p in obj) { var cpr = !UZIP._noNeed(p) && !noCmpr, buf = obj[p], crc = UZIP.crc.crc(buf,0,buf.length); \r\n\t\tzpd[p] = { cpr:cpr, usize:buf.length, crc:crc, file: (cpr ? UZIP.deflateRaw(buf) : buf) }; }\r\n\t\r\n\tfor(var p in zpd) tot += zpd[p].file.length + 30 + 46 + 2*UZIP.bin.sizeUTF8(p);\r\n\ttot += 22;\r\n\t\r\n\tvar data = new Uint8Array(tot), o = 0;\r\n\tvar fof = []\r\n\t\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 0);\r\n\t}\r\n\tvar i=0, ioff = o;\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 1, fof[i++]);\t\t\r\n\t}\r\n\tvar csize = o-ioff;\r\n\t\r\n\twUi(data, o, 0x06054b50); o+=4;\r\n\to += 4; // disks\r\n\twUs(data, o, i); o += 2;\r\n\twUs(data, o, i); o += 2;\t// number of c d records\r\n\twUi(data, o, csize); o += 4;\r\n\twUi(data, o, ioff ); o += 4;\r\n\to += 2;\r\n\treturn data.buffer;\r\n}\r\n// no need to compress .PNG, .ZIP, .JPEG ....\r\nUZIP._noNeed = function(fn) { var ext = fn.split(\".\").pop().toLowerCase(); return \"png,jpg,jpeg,zip\".indexOf(ext)!=-1; }\r\n\r\nUZIP._writeHeader = function(data, o, p, obj, t, roff)\r\n{\r\n\tvar wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar file = obj.file;\r\n\t\r\n\twUi(data, o, t==0 ? 0x04034b50 : 0x02014b50); o+=4; // sign\r\n\tif(t==1) o+=2; // ver made by\r\n\twUs(data, o, 20); o+=2;\t// ver\r\n\twUs(data, o, 0); o+=2; // gflip\r\n\twUs(data, o, obj.cpr?8:0); o+=2;\t// cmpr\r\n\t\t\r\n\twUi(data, o, 0); o+=4;\t// time\t\t\r\n\twUi(data, o, obj.crc); o+=4;\t// crc32\r\n\twUi(data, o, file.length); o+=4;\t// csize\r\n\twUi(data, o, obj.usize); o+=4;\t// usize\r\n\t\t\r\n\twUs(data, o, UZIP.bin.sizeUTF8(p)); o+=2;\t// nlen\r\n\twUs(data, o, 0); o+=2;\t// elen\r\n\t\r\n\tif(t==1) {\r\n\t\to += 2; // comment length\r\n\t\to += 2; // disk number\r\n\t\to += 6; // attributes\r\n\t\twUi(data, o, roff); o+=4;\t// usize\r\n\t}\r\n\tvar nlen = UZIP.bin.writeUTF8(data, o, p); o+= nlen;\t\r\n\tif(t==0) { data.set(file, o); o += file.length; }\r\n\treturn o;\r\n}\r\n\r\n\r\n\r\n\r\n\r\nUZIP.crc = {\r\n\ttable : ( function() {\r\n\t var tab = new Uint32Array(256);\r\n\t for (var n=0; n<256; n++) {\r\n\t\t\tvar c = n;\r\n\t\t\tfor (var k=0; k<8; k++) {\r\n\t\t\t\tif (c & 1) c = 0xedb88320 ^ (c >>> 1);\r\n\t\t\t\telse c = c >>> 1;\r\n\t\t\t}\r\n\t\t\ttab[n] = c; } \r\n\t\treturn tab; })(),\r\n\tupdate : function(c, buf, off, len) {\r\n\t\tfor (var i=0; i>> 8);\r\n\t\treturn c;\r\n\t},\r\n\tcrc : function(b,o,l) { return UZIP.crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\r\n}\r\nUZIP.adler = function(data,o,len) {\r\n\tvar a = 1, b = 0;\r\n\tvar off = o, end=o+len;\r\n\twhile(off>8)&255; },\r\n\treadUint : function(buff,p) { return (buff[p+3]*(256*256*256)) + ((buff[p+2]<<16) | (buff[p+1]<< 8) | buff[p]); },\r\n\twriteUint : function(buff,p,n){ buff[p]=n&255; buff[p+1]=(n>>8)&255; buff[p+2]=(n>>16)&255; buff[p+3]=(n>>24)&255; },\r\n\treadASCII : function(buff,p,l){ var s = \"\"; for(var i=0; i> 6)); buff[p+i+1] = (128|((code>> 0)&63)); i+=2; }\r\n\t\t\telse if((code&(0xffffffff-(1<<16)+1))==0) { buff[p+i] = (224|(code>>12)); buff[p+i+1] = (128|((code>> 6)&63)); buff[p+i+2] = (128|((code>>0)&63)); i+=3; }\r\n\t\t\telse if((code&(0xffffffff-(1<<21)+1))==0) { buff[p+i] = (240|(code>>18)); buff[p+i+1] = (128|((code>>12)&63)); buff[p+i+2] = (128|((code>>6)&63)); buff[p+i+3] = (128|((code>>0)&63)); i+=4; }\r\n\t\t\telse throw \"e\";\r\n\t\t}\r\n\t\treturn i;\r\n\t},\r\n\tsizeUTF8 : function(str) {\r\n\t\tvar strl = str.length, i=0;\r\n\t\tfor(var ci=0; ci>>3;\r\n\t}\r\n\r\n\tvar lits = U.lits, strt=U.strt, prev=U.prev, li=0, lc=0, bs=0, ebits=0, c=0, nc=0; // last_item, literal_count, block_start\r\n\tif(dlen>2) { nc=UZIP.F._hash(data,0); strt[nc]=0; }\r\n\tvar nmch=0,nmci=0;\r\n\t\r\n\tfor(i=0; i14000 || lc>26697) && (dlen-i)>100) {\r\n\t\t\t\tif(cvrd>>16)>>16)>(mch>>>16)) mch=0;\r\n\t\t\t}//*/\r\n\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\tif(mch!=0) { \r\n\t\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\t\tvar lgi = goodIndex(len, U.of0); U.lhst[257+lgi]++; \r\n\t\t\t\tvar dgi = goodIndex(dst, U.df0); U.dhst[ dgi]++; ebits += U.exb[lgi] + U.dxb[dgi]; \r\n\t\t\t\tlits[li] = (len<<23)|(i-cvrd); lits[li+1] = (dst<<16)|(lgi<<8)|dgi; li+=2;\r\n\t\t\t\tcvrd = i + len; \r\n\t\t\t}\r\n\t\t\telse {\tU.lhst[data[i]]++; }\r\n\t\t\tlc++;\r\n\t\t}\r\n\t}\r\n\tif(bs!=i || data.length==0) {\r\n\t\tif(cvrd>>3;\r\n}\r\nUZIP.F._bestMatch = function(data, i, prev, c, nice, chain) {\r\n\tvar ci = (i&0x7fff), pi=prev[ci]; \r\n\t//console.log(\"----\", i);\r\n\tvar dif = ((ci-pi + (1<<15)) & 0x7fff); if(pi==ci || c!=UZIP.F._hash(data,i-dif)) return 0;\r\n\tvar tl=0, td=0; // top length, top distance\r\n\tvar dlim = Math.min(0x7fff, i);\r\n\twhile(dif<=dlim && --chain!=0 && pi!=ci /*&& c==UZIP.F._hash(data,i-dif)*/) {\r\n\t\tif(tl==0 || (data[i+tl]==data[i+tl-dif])) {\r\n\t\t\tvar cl = UZIP.F._howLong(data, i, dif);\r\n\t\t\tif(cl>tl) { \r\n\t\t\t\ttl=cl; td=dif; if(tl>=nice) break; //* \r\n\t\t\t\tif(dif+2maxd) { maxd=curd; pi = ei; }\r\n\t\t\t\t} //*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tci=pi; pi = prev[ci];\r\n\t\tdif += ((ci-pi + (1<<15)) & 0x7fff);\r\n\t}\r\n\treturn (tl<<16)|td;\r\n}\r\nUZIP.F._howLong = function(data, i, dif) {\r\n\tif(data[i]!=data[i-dif] || data[i+1]!=data[i+1-dif] || data[i+2]!=data[i+2-dif]) return 0;\r\n\tvar oi=i, l = Math.min(data.length, i+258); i+=3;\r\n\t//while(i+4>>23), end = off+(qb&((1<<23)-1));\r\n\t\t\twhile(off>16), lgi=(qc>>8)&255, dgi=(qc&255);\r\n\t\t\t\tpos = UZIP.F._writeLit(257+lgi, ltree, out, pos);\r\n\t\t\t\tputsE(out, pos, len-U.of0[lgi]); pos+=U.exb[lgi];\r\n\t\t\t\t\r\n\t\t\t\tpos = UZIP.F._writeLit(dgi, dtree, out, pos);\r\n\t\t\t\tputsF(out, pos, dst-U.df0[dgi]); pos+=U.dxb[dgi]; off+=len;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpos = UZIP.F._writeLit(256, ltree, out, pos);\r\n\t}\r\n\t//console.log(pos-opos, fxdSize, dynSize, cstSize);\r\n\treturn pos;\r\n}\r\nUZIP.F._copyExact = function(data,off,len,out,pos) {\r\n\tvar p8 = (pos>>>3);\r\n\tout[p8]=(len); out[p8+1]=(len>>>8); out[p8+2]=255-out[p8]; out[p8+3]=255-out[p8+1]; p8+=4;\r\n\tout.set(new Uint8Array(data.buffer, off, len), p8);\r\n\t//for(var i=0; i4 && U.itree[(U.ordr[numh-1]<<1)+1]==0) numh--;\r\n\treturn [ML, MD, MH, numl, numd, numh, lset, dset];\r\n}\r\nUZIP.F.getSecond= function(a) { var b=[]; for(var i=0; i>1)+\",\"; return b; }\r\nUZIP.F.contSize = function(tree, hst) { var s=0; for(var i=0; i15) { UZIP.F._putsE(out, pos, rst, rsl); pos+=rsl; }\r\n\t}\r\n\treturn pos;\r\n}\r\nUZIP.F._lenCodes = function(tree, set) {\r\n\tvar len=tree.length; while(len!=2 && tree[len-1]==0) len-=2; // when no distances, keep one code with length 0\r\n\tfor(var i=0; i>>1, 138);\r\n\t\t\tif(zc<11) set.push(17, zc-3);\r\n\t\t\telse set.push(18, zc-11);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse if(l==prv && nxt==l && nnxt==l) {\r\n\t\t\tvar lz = i+5;\r\n\t\t\twhile(lz+2>>1, 6);\r\n\t\t\tset.push(16, zc-3);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse set.push(l, 0);\r\n\t}\r\n\treturn len>>>1;\r\n}\r\nUZIP.F._hufTree = function(hst, tree, MAXL) {\r\n\tvar list=[], hl = hst.length, tl=tree.length, i=0;\r\n\tfor(i=0; iMAXL) { UZIP.F.restrictDepth(l2, MAXL, maxl); maxl = MAXL; }\r\n\tfor(i=0; iMD) { var od=dps[i].d; dps[i].d=MD; dbt+=bCost-(1<<(maxl-od)); } else break;\r\n\tdbt = dbt>>>(maxl-MD);\r\n\twhile(dbt>0) { var od=dps[i].d; if(od=0; i--) if(dps[i].d==MD && dbt<0) { dps[i].d--; dbt++; } if(dbt!=0) console.log(\"debt left\");\r\n}\r\n\r\nUZIP.F._goodIndex = function(v, arr) {\r\n\tvar i=0; if(arr[i|16]<=v) i|=16; if(arr[i|8]<=v) i|=8; if(arr[i|4]<=v) i|=4; if(arr[i|2]<=v) i|=2; if(arr[i|1]<=v) i|=1; return i;\r\n}\r\nUZIP.F._writeLit = function(ch, ltree, out, pos) {\r\n\tUZIP.F._putsF(out, pos, ltree[ch<<1]);\r\n\treturn pos+ltree[(ch<<1)+1];\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nUZIP.F.inflate = function(data, buf) {\r\n\tvar u8=Uint8Array;\r\n\tif(data[0]==3 && data[1]==0) return (buf ? buf : new u8(0));\r\n\tvar F=UZIP.F, bitsF = F._bitsF, bitsE = F._bitsE, decodeTiny = F._decodeTiny, makeCodes = F.makeCodes, codes2map=F.codes2map, get17 = F._get17;\r\n\tvar U = F.U;\r\n\t\r\n\tvar noBuf = (buf==null);\r\n\tif(noBuf) buf = new u8((data.length>>>2)<<3);\r\n\t\r\n\tvar BFINAL=0, BTYPE=0, HLIT=0, HDIST=0, HCLEN=0, ML=0, MD=0; \t\r\n\tvar off = 0, pos = 0;\r\n\tvar lmap, dmap;\r\n\t\r\n\twhile(BFINAL==0) {\t\t\r\n\t\tBFINAL = bitsF(data, pos , 1);\r\n\t\tBTYPE = bitsF(data, pos+1, 2); pos+=3;\r\n\t\t//console.log(BFINAL, BTYPE);\r\n\t\t\r\n\t\tif(BTYPE==0) {\r\n\t\t\tif((pos&7)!=0) pos+=8-(pos&7);\r\n\t\t\tvar p8 = (pos>>>3)+4, len = data[p8-4]|(data[p8-3]<<8); //console.log(len);//bitsF(data, pos, 16), \r\n\t\t\tif(noBuf) buf=UZIP.F._check(buf, off+len);\r\n\t\t\tbuf.set(new u8(data.buffer, data.byteOffset+p8, len), off);\r\n\t\t\t//for(var i=0; itl)tl=l; } pos+=3*HCLEN; //console.log(itree);\r\n\t\t\tmakeCodes(U.itree, tl);\r\n\t\t\tcodes2map(U.itree, tl, U.imap);\r\n\t\t\t\r\n\t\t\tlmap = U.lmap; dmap = U.dmap;\r\n\t\t\t\r\n\t\t\tpos = decodeTiny(U.imap, (1<>>24))-1; pos+=(ml&0xffffff);\r\n\t\t\tmakeCodes(U.ltree, mx0);\r\n\t\t\tcodes2map(U.ltree, mx0, lmap);\r\n\t\t\t\r\n\t\t\t//var md = decodeTiny(U.imap, (1<>>24))-1; pos+=(md&0xffffff);\r\n\t\t\tmakeCodes(U.dtree, mx1);\r\n\t\t\tcodes2map(U.dtree, mx1, dmap);\r\n\t\t}\r\n\t\t//var ooff=off, opos=pos;\r\n\t\twhile(true) {\r\n\t\t\tvar code = lmap[get17(data, pos) & ML]; pos += code&15;\r\n\t\t\tvar lit = code>>>4; //U.lhst[lit]++; \r\n\t\t\tif((lit>>>8)==0) { buf[off++] = lit; }\r\n\t\t\telse if(lit==256) { break; }\r\n\t\t\telse {\r\n\t\t\t\tvar end = off+lit-254;\r\n\t\t\t\tif(lit>264) { var ebs = U.ldef[lit-257]; end = off + (ebs>>>3) + bitsE(data, pos, ebs&7); pos += ebs&7; }\r\n\t\t\t\t//UZIP.F.dst[end-off]++;\r\n\t\t\t\t\r\n\t\t\t\tvar dcode = dmap[get17(data, pos) & MD]; pos += dcode&15;\r\n\t\t\t\tvar dlit = dcode>>>4;\r\n\t\t\t\tvar dbs = U.ddef[dlit], dst = (dbs>>>4) + bitsF(data, pos, dbs&15); pos += dbs&15;\r\n\t\t\t\t\r\n\t\t\t\t//var o0 = off-dst, stp = Math.min(end-off, dst);\r\n\t\t\t\t//if(stp>20) while(off>>3);\r\n\t}\r\n\t//console.log(UZIP.F.dst);\r\n\t//console.log(tlen, dlen, off-tlen+tcnt);\r\n\treturn buf.length==off ? buf : buf.slice(0,off);\r\n}\r\nUZIP.F._check=function(buf, len) {\r\n\tvar bl=buf.length; if(len<=bl) return buf;\r\n\tvar nbuf = new Uint8Array(Math.max(bl<<1,len)); nbuf.set(buf,0);\r\n\t//for(var i=0; i>>4; \r\n\t\tif(lit<=15) { tree[i]=lit; i++; }\r\n\t\telse {\r\n\t\t\tvar ll = 0, n = 0;\r\n\t\t\tif(lit==16) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 2)); pos += 2; ll = tree[i-1];\r\n\t\t\t}\r\n\t\t\telse if(lit==17) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 3)); pos += 3;\r\n\t\t\t}\r\n\t\t\telse if(lit==18) {\r\n\t\t\t\tn = (11 + bitsE(data, pos, 7)); pos += 7;\r\n\t\t\t}\r\n\t\t\tvar ni = i+n;\r\n\t\t\twhile(i>>1;\r\n\twhile(imx)mx=v; i++; }\r\n\twhile(i>1;\r\n\t\tvar cl = tree[i+1], val = (lit<<4)|cl; // : (0x8000 | (U.of0[lit-257]<<7) | (U.exb[lit-257]<<4) | cl);\r\n\t\tvar rest = (MAX_BITS-cl), i0 = tree[i]<>>(15-MAX_BITS);\r\n\t\twhile(i0!=i1) {\r\n\t\t\tvar p0 = r15[i0]>>>(15-MAX_BITS);\r\n\t\t\tmap[p0]=val; i0++;\r\n\t\t}\r\n\t}\r\n}\r\nUZIP.F.revCodes = function(tree, MAX_BITS) {\r\n\tvar r15 = UZIP.F.U.rev15, imb = 15-MAX_BITS;\r\n\tfor(var i=0; i>>imb; }\r\n}\r\n\r\n// used only in deflate\r\nUZIP.F._putsE= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); }\r\nUZIP.F._putsF= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); dt[o+2]|=(val>>>16); }\r\n\r\nUZIP.F._bitsE= function(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) )>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16))>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8))>>>(pos&7))&511;\r\n} */\r\nUZIP.F._get17= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) )>>>(pos&7);\r\n}\r\nUZIP.F._get25= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) | (dt[(pos>>>3)+3]<<24) )>>>(pos&7);\r\n}\r\nUZIP.F.U = function(){\r\n\tvar u16=Uint16Array, u32=Uint32Array;\r\n\treturn {\r\n\t\tnext_code : new u16(16),\r\n\t\tbl_count : new u16(16),\r\n\t\tordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\r\n\t\tof0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\r\n\t\texb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\r\n\t\tldef : new u16(32),\r\n\t\tdf0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\r\n\t\tdxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\r\n\t\tddef : new u32(32),\r\n\t\tflmap: new u16( 512), fltree: [],\r\n\t\tfdmap: new u16( 32), fdtree: [],\r\n\t\tlmap : new u16(32768), ltree : [], ttree:[],\r\n\t\tdmap : new u16(32768), dtree : [],\r\n\t\timap : new u16( 512), itree : [],\r\n\t\t//rev9 : new u16( 512)\r\n\t\trev15: new u16(1<<15),\r\n\t\tlhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\r\n\t\tlits : new u32(15000),\r\n\t\tstrt : new u16(1<<16),\r\n\t\tprev : new u16(1<<15)\r\n\t}; \r\n} ();\r\n\r\n(function(){\t\r\n\tvar U = UZIP.F.U;\r\n\tvar len = 1<<15;\r\n\tfor(var i=0; i>> 1) | ((x & 0x55555555) << 1));\r\n\t\tx = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\r\n\t\tx = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\r\n\t\tx = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\r\n\t\tU.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\r\n\t}\r\n\t\r\n\tfunction pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\r\n\t\r\n\tfor(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\r\n\t\r\n\tpushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\r\n\t/*\r\n\tvar i = 0;\r\n\tfor(; i<=143; i++) U.fltree.push(0,8);\r\n\tfor(; i<=255; i++) U.fltree.push(0,9);\r\n\tfor(; i<=279; i++) U.fltree.push(0,7);\r\n\tfor(; i<=287; i++) U.fltree.push(0,8);\r\n\t*/\r\n\tUZIP.F.makeCodes(U.fltree, 9);\r\n\tUZIP.F.codes2map(U.fltree, 9, U.flmap);\r\n\tUZIP.F.revCodes (U.fltree, 9)\r\n\t\r\n\tpushV(U.fdtree,32,5);\r\n\t//for(i=0;i<32; i++) U.fdtree.push(0,5);\r\n\tUZIP.F.makeCodes(U.fdtree, 5);\r\n\tUZIP.F.codes2map(U.fdtree, 5, U.fdmap);\r\n\tUZIP.F.revCodes (U.fdtree, 5)\r\n\t\r\n\tpushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\r\n\t/*\r\n\tfor(var i=0; i< 19; i++) U.itree.push(0,0);\r\n\tfor(var i=0; i<286; i++) U.ltree.push(0,0);\r\n\tfor(var i=0; i< 30; i++) U.dtree.push(0,0);\r\n\tfor(var i=0; i<320; i++) U.ttree.push(0,0);\r\n\t*/\r\n})()\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","// https://github.com/photopea/UPNG.js/blob/c976240e62b0497167f8aafabd7889625f8b2016/UPNG.js\n\n// import * as pako from 'pako'\nimport * as UZIP from 'uzip';\n\nconst UPNG = {};\n\nUPNG.toRGBA8 = function (out) {\n const w = out.width; const\n h = out.height;\n if (out.tabs.acTL == null) return [UPNG.toRGBA8.decodeImage(out.data, w, h, out).buffer];\n\n const frms = [];\n if (out.frames[0].data == null) out.frames[0].data = out.data;\n\n const len = w * h * 4; const img = new Uint8Array(len); const empty = new Uint8Array(len); const\n prev = new Uint8Array(len);\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i];\n const fx = frm.rect.x; const fy = frm.rect.y; const fw = frm.rect.width; const\n fh = frm.rect.height;\n const fdata = UPNG.toRGBA8.decodeImage(frm.data, fw, fh, out);\n\n if (i != 0) for (var j = 0; j < len; j++) prev[j] = img[j];\n\n if (frm.blend == 0) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.blend == 1) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 1);\n\n frms.push(img.buffer.slice(0));\n\n if (frm.dispose == 0) {} else if (frm.dispose == 1) UPNG._copyTile(empty, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.dispose == 2) for (var j = 0; j < len; j++) img[j] = prev[j];\n }\n return frms;\n};\nUPNG.toRGBA8.decodeImage = function (data, w, h, out) {\n const area = w * h; const\n bpp = UPNG.decode._getBPP(out);\n const bpl = Math.ceil(w * bpp / 8);\t// bytes per line\n\n const bf = new Uint8Array(area * 4); const\n bf32 = new Uint32Array(bf.buffer);\n const { ctype } = out;\n const { depth } = out;\n const rs = UPNG._bin.readUshort;\n\n // console.log(ctype, depth);\n const time = Date.now();\n\n if (ctype == 6) { // RGB + alpha\n const qarea = area << 2;\n if (depth == 8) for (var i = 0; i < qarea; i += 4) { bf[i] = data[i]; bf[i + 1] = data[i + 1]; bf[i + 2] = data[i + 2]; bf[i + 3] = data[i + 3]; }\n if (depth == 16) for (var i = 0; i < qarea; i++) { bf[i] = data[i << 1]; }\n } else if (ctype == 2) {\t// RGB\n const ts = out.tabs.tRNS;\n if (ts == null) {\n if (depth == 8) for (var i = 0; i < area; i++) { var ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti]; }\n if (depth == 16) for (var i = 0; i < area; i++) { var ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti]; }\n } else {\n var tr = ts[0]; const tg = ts[1]; const\n tb = ts[2];\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti];\n if (data[ti] == tr && data[ti + 1] == tg && data[ti + 2] == tb) bf[qi + 3] = 0;\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti];\n if (rs(data, ti) == tr && rs(data, ti + 2) == tg && rs(data, ti + 4) == tb) bf[qi + 3] = 0;\n }\n }\n }\n } else if (ctype == 3) {\t// palette\n const p = out.tabs.PLTE;\n const ap = out.tabs.tRNS;\n const tl = ap ? ap.length : 0;\n // console.log(p, ap);\n if (depth == 1) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 3)] >> (7 - ((i & 7) << 0))) & 1); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 2) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 2)] >> (6 - ((i & 3) << 1))) & 3); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 4) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 1)] >> (4 - ((i & 1) << 2))) & 15); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var j = data[i]; var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n } else if (ctype == 4) {\t// gray + alpha\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 1; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 1];\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 2; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 2];\n }\n }\n } else if (ctype == 0) {\t// gray\n var tr = out.tabs.tRNS ? out.tabs.tRNS : -1;\n for (var y = 0; y < h; y++) {\n const off = y * bpl; const\n to = y * w;\n if (depth == 1) {\n for (var x = 0; x < w; x++) {\n var gr = 255 * ((data[off + (x >>> 3)] >>> (7 - ((x & 7)))) & 1); var\n al = (gr == tr * 255) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 2) {\n for (var x = 0; x < w; x++) {\n var gr = 85 * ((data[off + (x >>> 2)] >>> (6 - ((x & 3) << 1))) & 3); var\n al = (gr == tr * 85) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 4) {\n for (var x = 0; x < w; x++) {\n var gr = 17 * ((data[off + (x >>> 1)] >>> (4 - ((x & 1) << 2))) & 15); var\n al = (gr == tr * 17) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 8) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + x]; var\n al = (gr == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 16) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + (x << 1)]; var\n al = (rs(data, off + (x << i)) == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n }\n }\n }\n // console.log(Date.now()-time);\n return bf;\n};\n\nUPNG.decode = function (buff) {\n const data = new Uint8Array(buff); let offset = 8; const bin = UPNG._bin; const rUs = bin.readUshort; const\n rUi = bin.readUint;\n const out = { tabs: {}, frames: [] };\n const dd = new Uint8Array(data.length); let\n doff = 0;\t // put all IDAT data into it\n let fd; let\n foff = 0;\t// frames\n\n const mgck = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) if (data[i] != mgck[i]) throw 'The input is not a PNG file!';\n\n while (offset < data.length) {\n const len = bin.readUint(data, offset); offset += 4;\n const type = bin.readASCII(data, offset, 4); offset += 4;\n // console.log(type,len);\n\n if (type == 'IHDR') { UPNG.decode._IHDR(data, offset, out); } else if (type == 'CgBI') { out.tabs[type] = data.slice(offset, offset + 4); } else if (type == 'IDAT') {\n for (var i = 0; i < len; i++) dd[doff + i] = data[offset + i];\n doff += len;\n } else if (type == 'acTL') {\n out.tabs[type] = { num_frames: rUi(data, offset), num_plays: rUi(data, offset + 4) };\n fd = new Uint8Array(data.length);\n } else if (type == 'fcTL') {\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n const rct = {\n x: rUi(data, offset + 12), y: rUi(data, offset + 16), width: rUi(data, offset + 4), height: rUi(data, offset + 8),\n };\n let del = rUs(data, offset + 22); del = rUs(data, offset + 20) / (del == 0 ? 100 : del);\n const frm = {\n rect: rct, delay: Math.round(del * 1000), dispose: data[offset + 24], blend: data[offset + 25],\n };\n // console.log(frm);\n out.frames.push(frm);\n } else if (type == 'fdAT') {\n for (var i = 0; i < len - 4; i++) fd[foff + i] = data[offset + i + 4];\n foff += len - 4;\n } else if (type == 'pHYs') {\n out.tabs[type] = [bin.readUint(data, offset), bin.readUint(data, offset + 4), data[offset + 8]];\n } else if (type == 'cHRM') {\n out.tabs[type] = [];\n for (var i = 0; i < 8; i++) out.tabs[type].push(bin.readUint(data, offset + i * 4));\n } else if (type == 'tEXt' || type == 'zTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = bin.nextZero(data, offset);\n var keyw = bin.readASCII(data, offset, nz - offset);\n var text; var\n tl = offset + len - nz - 1;\n if (type == 'tEXt') text = bin.readASCII(data, nz + 1, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(nz + 2, nz + 2 + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'iTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = 0; let\n off = offset;\n nz = bin.nextZero(data, off);\n var keyw = bin.readASCII(data, off, nz - off); off = nz + 1;\n const cflag = data[off]; const\n cmeth = data[off + 1]; off += 2;\n nz = bin.nextZero(data, off);\n const ltag = bin.readASCII(data, off, nz - off); off = nz + 1;\n nz = bin.nextZero(data, off);\n const tkeyw = bin.readUTF8(data, off, nz - off); off = nz + 1;\n var text; var\n tl = len - (off - offset);\n if (cflag == 0) text = bin.readUTF8(data, off, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(off, off + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'PLTE') {\n out.tabs[type] = bin.readBytes(data, offset, len);\n } else if (type == 'hIST') {\n const pl = out.tabs.PLTE.length / 3;\n out.tabs[type] = []; for (var i = 0; i < pl; i++) out.tabs[type].push(rUs(data, offset + i * 2));\n } else if (type == 'tRNS') {\n if (out.ctype == 3) out.tabs[type] = bin.readBytes(data, offset, len);\n else if (out.ctype == 0) out.tabs[type] = rUs(data, offset);\n else if (out.ctype == 2) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n // else console.log(\"tRNS for unsupported color type\",out.ctype, len);\n } else if (type == 'gAMA') out.tabs[type] = bin.readUint(data, offset) / 100000;\n else if (type == 'sRGB') out.tabs[type] = data[offset];\n else if (type == 'bKGD') {\n if (out.ctype == 0 || out.ctype == 4) out.tabs[type] = [rUs(data, offset)];\n else if (out.ctype == 2 || out.ctype == 6) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n else if (out.ctype == 3) out.tabs[type] = data[offset];\n } else if (type == 'IEND') {\n break;\n }\n // else { log(\"unknown chunk type\", type, len); }\n offset += len;\n const crc = bin.readUint(data, offset); offset += 4;\n }\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n out.data = UPNG.decode._decompress(out, dd, out.width, out.height);\n\n delete out.compress; delete out.interlace; delete out.filter;\n return out;\n};\n\nUPNG.decode._decompress = function (out, dd, w, h) {\n var time = Date.now();\n const bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n buff = new Uint8Array((bpl + 1 + out.interlace) * h);\n if (out.tabs.CgBI) dd = UPNG.inflateRaw(dd, buff);\n else dd = UPNG.decode._inflate(dd, buff);\n // console.log(dd.length, buff.length);\n // console.log(Date.now()-time);\n\n var time = Date.now();\n if (out.interlace == 0) dd = UPNG.decode._filterZero(dd, out, 0, w, h);\n else if (out.interlace == 1) dd = UPNG.decode._readInterlace(dd, out);\n // console.log(Date.now()-time);\n return dd;\n};\n\nUPNG.decode._inflate = function (data, buff) { const out = UPNG.inflateRaw(new Uint8Array(data.buffer, 2, data.length - 6), buff); return out; };\nUPNG.inflateRaw = (function () {\n const H = {}; H.H = {}; H.H.N = function (N, W) {\n const R = Uint8Array; let i = 0; let m = 0; let J = 0; let h = 0; let Q = 0; let X = 0; let u = 0; let w = 0; let d = 0; let v; let C;\n if (N[0] == 3 && N[1] == 0) return W || new R(0); const V = H.H; const n = V.b; const A = V.e; const l = V.R; const M = V.n; const I = V.A; const e = V.Z; const b = V.m; const Z = W == null;\n if (Z)W = new R(N.length >>> 2 << 5); while (i == 0) {\n i = n(N, d, 1); m = n(N, d + 1, 2); d += 3; if (m == 0) {\n if ((d & 7) != 0)d += 8 - (d & 7);\n const D = (d >>> 3) + 4; const q = N[D - 4] | N[D - 3] << 8; if (Z)W = H.H.W(W, w + q); W.set(new R(N.buffer, N.byteOffset + D, q), w); d = D + q << 3;\n w += q; continue;\n } if (Z)W = H.H.W(W, w + (1 << 17)); if (m == 1) { v = b.J; C = b.h; X = (1 << 9) - 1; u = (1 << 5) - 1; } if (m == 2) {\n J = A(N, d, 5) + 257;\n h = A(N, d + 5, 5) + 1; Q = A(N, d + 10, 4) + 4; d += 14; const E = d; let j = 1; for (var c = 0; c < 38; c += 2) { b.Q[c] = 0; b.Q[c + 1] = 0; } for (var c = 0;\n c < Q; c++) { const K = A(N, d + c * 3, 3); b.Q[(b.X[c] << 1) + 1] = K; if (K > j)j = K; }d += 3 * Q; M(b.Q, j); I(b.Q, j, b.u); v = b.w; C = b.d;\n d = l(b.u, (1 << j) - 1, J + h, N, d, b.v); const r = V.V(b.v, 0, J, b.C); X = (1 << r) - 1; const S = V.V(b.v, J, h, b.D); u = (1 << S) - 1; M(b.C, r);\n I(b.C, r, v); M(b.D, S); I(b.D, S, C);\n } while (!0) {\n const T = v[e(N, d) & X]; d += T & 15; const p = T >>> 4; if (p >>> 8 == 0) { W[w++] = p; } else if (p == 256) { break; } else {\n let z = w + p - 254;\n if (p > 264) { const _ = b.q[p - 257]; z = w + (_ >>> 3) + A(N, d, _ & 7); d += _ & 7; } const $ = C[e(N, d) & u]; d += $ & 15; const s = $ >>> 4; const Y = b.c[s]; const a = (Y >>> 4) + n(N, d, Y & 15);\n d += Y & 15; while (w < z) { W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; }w = z;\n }\n }\n } return W.length == w ? W : W.slice(0, w);\n };\n H.H.W = function (N, W) { const R = N.length; if (W <= R) return N; const V = new Uint8Array(R << 1); V.set(N, 0); return V; };\n H.H.R = function (N, W, R, V, n, A) {\n const l = H.H.e; const M = H.H.Z; let I = 0; while (I < R) {\n const e = N[M(V, n) & W]; n += e & 15; const b = e >>> 4;\n if (b <= 15) { A[I] = b; I++; } else {\n let Z = 0; let m = 0; if (b == 16) { m = 3 + l(V, n, 2); n += 2; Z = A[I - 1]; } else if (b == 17) {\n m = 3 + l(V, n, 3);\n n += 3;\n } else if (b == 18) { m = 11 + l(V, n, 7); n += 7; } const J = I + m; while (I < J) { A[I] = Z; I++; }\n }\n } return n;\n }; H.H.V = function (N, W, R, V) {\n let n = 0; let A = 0; const l = V.length >>> 1;\n while (A < R) { const M = N[A + W]; V[A << 1] = 0; V[(A << 1) + 1] = M; if (M > n)n = M; A++; } while (A < l) { V[A << 1] = 0; V[(A << 1) + 1] = 0; A++; } return n;\n };\n H.H.n = function (N, W) {\n const R = H.H.m; const V = N.length; let n; let A; let l; var M; let I; const e = R.j; for (var M = 0; M <= W; M++)e[M] = 0; for (M = 1; M < V; M += 2)e[N[M]]++;\n const b = R.K; n = 0; e[0] = 0; for (A = 1; A <= W; A++) { n = n + e[A - 1] << 1; b[A] = n; } for (l = 0; l < V; l += 2) {\n I = N[l + 1]; if (I != 0) {\n N[l] = b[I];\n b[I]++;\n }\n }\n }; H.H.A = function (N, W, R) {\n const V = N.length; const n = H.H.m; const A = n.r; for (let l = 0; l < V; l += 2) {\n if (N[l + 1] != 0) {\n const M = l >> 1; const I = N[l + 1]; const e = M << 4 | I; const b = W - I; let Z = N[l] << b; const m = Z + (1 << b);\n while (Z != m) { const J = A[Z] >>> 15 - W; R[J] = e; Z++; }\n }\n }\n }; H.H.l = function (N, W) {\n const R = H.H.m.r; const V = 15 - W; for (let n = 0; n < N.length;\n n += 2) { const A = N[n] << W - N[n + 1]; N[n] = R[A] >>> V; }\n }; H.H.M = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; };\n H.H.I = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; N[V + 2] |= R >>> 16; }; H.H.e = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8) >>> (W & 7) & (1 << R) - 1; };\n H.H.b = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7) & (1 << R) - 1; }; H.H.Z = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7); };\n H.H.i = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16 | N[(W >>> 3) + 3] << 24) >>> (W & 7); }; H.H.m = (function () {\n const N = Uint16Array; const W = Uint32Array;\n return {\n K: new N(16), j: new N(16), X: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], S: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], T: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], q: new N(32), p: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], z: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], c: new W(32), J: new N(512), _: [], h: new N(32), $: [], w: new N(32768), C: [], v: [], d: new N(32768), D: [], u: new N(512), Q: [], r: new N(1 << 15), s: new W(286), Y: new W(30), a: new W(19), t: new W(15e3), k: new N(1 << 16), g: new N(1 << 15),\n };\n }());\n (function () {\n const N = H.H.m; const W = 1 << 15; for (var R = 0; R < W; R++) {\n let V = R; V = (V & 2863311530) >>> 1 | (V & 1431655765) << 1;\n V = (V & 3435973836) >>> 2 | (V & 858993459) << 2; V = (V & 4042322160) >>> 4 | (V & 252645135) << 4; V = (V & 4278255360) >>> 8 | (V & 16711935) << 8;\n N.r[R] = (V >>> 16 | V << 16) >>> 17;\n } function n(A, l, M) { while (l-- != 0)A.push(0, M); } for (var R = 0; R < 32; R++) {\n N.q[R] = N.S[R] << 3 | N.T[R];\n N.c[R] = N.p[R] << 4 | N.z[R];\n }n(N._, 144, 8); n(N._, 255 - 143, 9); n(N._, 279 - 255, 7); n(N._, 287 - 279, 8); H.H.n(N._, 9);\n H.H.A(N._, 9, N.J); H.H.l(N._, 9); n(N.$, 32, 5); H.H.n(N.$, 5); H.H.A(N.$, 5, N.h); H.H.l(N.$, 5); n(N.Q, 19, 0); n(N.C, 286, 0);\n n(N.D, 30, 0); n(N.v, 320, 0);\n }()); return H.H.N;\n}());\n\nUPNG.decode._readInterlace = function (data, out) {\n const w = out.width; const\n h = out.height;\n const bpp = UPNG.decode._getBPP(out); const cbpp = bpp >> 3; const\n bpl = Math.ceil(w * bpp / 8);\n const img = new Uint8Array(h * bpl);\n let di = 0;\n\n const starting_row = [0, 0, 4, 0, 2, 0, 1];\n const starting_col = [0, 4, 0, 2, 0, 1, 0];\n const row_increment = [8, 8, 8, 4, 4, 2, 2];\n const col_increment = [8, 8, 4, 4, 2, 2, 1];\n\n let pass = 0;\n while (pass < 7) {\n const ri = row_increment[pass]; const\n ci = col_increment[pass];\n let sw = 0; let\n sh = 0;\n let cr = starting_row[pass]; while (cr < h) { cr += ri; sh++; }\n let cc = starting_col[pass]; while (cc < w) { cc += ci; sw++; }\n const bpll = Math.ceil(sw * bpp / 8);\n UPNG.decode._filterZero(data, out, di, sw, sh);\n\n let y = 0; let\n row = starting_row[pass];\n while (row < h) {\n let col = starting_col[pass];\n let cdi = (di + y * bpll) << 3;\n\n while (col < w) {\n if (bpp == 1) {\n var val = data[cdi >> 3]; val = (val >> (7 - (cdi & 7))) & 1;\n img[row * bpl + (col >> 3)] |= (val << (7 - ((col & 7) << 0)));\n }\n if (bpp == 2) {\n var val = data[cdi >> 3]; val = (val >> (6 - (cdi & 7))) & 3;\n img[row * bpl + (col >> 2)] |= (val << (6 - ((col & 3) << 1)));\n }\n if (bpp == 4) {\n var val = data[cdi >> 3]; val = (val >> (4 - (cdi & 7))) & 15;\n img[row * bpl + (col >> 1)] |= (val << (4 - ((col & 1) << 2)));\n }\n if (bpp >= 8) {\n const ii = row * bpl + col * cbpp;\n for (let j = 0; j < cbpp; j++) img[ii + j] = data[(cdi >> 3) + j];\n }\n cdi += bpp; col += ci;\n }\n y++; row += ri;\n }\n if (sw * sh != 0) di += sh * (1 + bpll);\n pass += 1;\n }\n return img;\n};\n\nUPNG.decode._getBPP = function (out) {\n const noc = [1, null, 3, 1, 2, null, 4][out.ctype];\n return noc * out.depth;\n};\n\nUPNG.decode._filterZero = function (data, out, off, w, h) {\n let bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n paeth = UPNG.decode._paeth;\n bpp = Math.ceil(bpp / 8);\n\n let i = 0; let di = 1; let type = data[off]; let\n x = 0;\n\n if (type > 1) data[off] = [0, 0, 1][type - 2];\n if (type == 3) for (x = bpp; x < bpl; x++) data[x + 1] = (data[x + 1] + (data[x + 1 - bpp] >>> 1)) & 255;\n\n for (let y = 0; y < h; y++) {\n i = off + y * bpl; di = i + y + 1;\n type = data[di - 1]; x = 0;\n\n if (type == 0) for (; x < bpl; x++) data[i + x] = data[di + x];\n else if (type == 1) {\n for (; x < bpp; x++) data[i + x] = data[di + x];\n for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpp]);\n } else if (type == 2) { for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpl]); } else if (type == 3) {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + (data[i + x - bpl] >>> 1));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + ((data[i + x - bpl] + data[i + x - bpp]) >>> 1));\n } else {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + paeth(0, data[i + x - bpl], 0));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + paeth(data[i + x - bpp], data[i + x - bpl], data[i + x - bpp - bpl]));\n }\n }\n return data;\n};\n\nUPNG.decode._paeth = function (a, b, c) {\n const p = a + b - c; const pa = (p - a); const pb = (p - b); const\n pc = (p - c);\n if (pa * pa <= pb * pb && pa * pa <= pc * pc) return a;\n if (pb * pb <= pc * pc) return b;\n return c;\n};\n\nUPNG.decode._IHDR = function (data, offset, out) {\n const bin = UPNG._bin;\n out.width = bin.readUint(data, offset); offset += 4;\n out.height = bin.readUint(data, offset); offset += 4;\n out.depth = data[offset]; offset++;\n out.ctype = data[offset]; offset++;\n out.compress = data[offset]; offset++;\n out.filter = data[offset]; offset++;\n out.interlace = data[offset]; offset++;\n};\n\nUPNG._bin = {\n nextZero(data, p) { while (data[p] != 0) p++; return p; },\n readUshort(buff, p) { return (buff[p] << 8) | buff[p + 1]; },\n writeUshort(buff, p, n) { buff[p] = (n >> 8) & 255; buff[p + 1] = n & 255; },\n readUint(buff, p) { return (buff[p] * (256 * 256 * 256)) + ((buff[p + 1] << 16) | (buff[p + 2] << 8) | buff[p + 3]); },\n writeUint(buff, p, n) { buff[p] = (n >> 24) & 255; buff[p + 1] = (n >> 16) & 255; buff[p + 2] = (n >> 8) & 255; buff[p + 3] = n & 255; },\n readASCII(buff, p, l) { let s = ''; for (let i = 0; i < l; i++) s += String.fromCharCode(buff[p + i]); return s; },\n writeASCII(data, p, s) { for (let i = 0; i < s.length; i++) data[p + i] = s.charCodeAt(i); },\n readBytes(buff, p, l) { const arr = []; for (let i = 0; i < l; i++) arr.push(buff[p + i]); return arr; },\n pad(n) { return n.length < 2 ? `0${n}` : n; },\n readUTF8(buff, p, l) {\n let s = '';\n let ns;\n for (let i = 0; i < l; i++) s += `%${UPNG._bin.pad(buff[p + i].toString(16))}`;\n try { ns = decodeURIComponent(s); } catch (e) { return UPNG._bin.readASCII(buff, p, l); }\n return ns;\n },\n};\nUPNG._copyTile = function (sb, sw, sh, tb, tw, th, xoff, yoff, mode) {\n const w = Math.min(sw, tw); const\n h = Math.min(sh, th);\n let si = 0; let\n ti = 0;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n if (xoff >= 0 && yoff >= 0) { si = (y * sw + x) << 2; ti = ((yoff + y) * tw + xoff + x) << 2; } else { si = ((-yoff + y) * sw - xoff + x) << 2; ti = (y * tw + x) << 2; }\n\n if (mode == 0) { tb[ti] = sb[si]; tb[ti + 1] = sb[si + 1]; tb[ti + 2] = sb[si + 2]; tb[ti + 3] = sb[si + 3]; } else if (mode == 1) {\n var fa = sb[si + 3] * (1 / 255); var fr = sb[si] * fa; var fg = sb[si + 1] * fa; var\n fb = sb[si + 2] * fa;\n var ba = tb[ti + 3] * (1 / 255); var br = tb[ti] * ba; var bg = tb[ti + 1] * ba; var\n bb = tb[ti + 2] * ba;\n\n const ifa = 1 - fa; const oa = fa + ba * ifa; const\n ioa = (oa == 0 ? 0 : 1 / oa);\n tb[ti + 3] = 255 * oa;\n tb[ti + 0] = (fr + br * ifa) * ioa;\n tb[ti + 1] = (fg + bg * ifa) * ioa;\n tb[ti + 2] = (fb + bb * ifa) * ioa;\n } else if (mode == 2) {\t// copy only differences, otherwise zero\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) { tb[ti] = 0; tb[ti + 1] = 0; tb[ti + 2] = 0; tb[ti + 3] = 0; } else { tb[ti] = fr; tb[ti + 1] = fg; tb[ti + 2] = fb; tb[ti + 3] = fa; }\n } else if (mode == 3) {\t// check if can be blended\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) continue;\n // if(fa!=255 && ba!=0) return false;\n if (fa < 220 && ba > 20) return false;\n }\n }\n }\n return true;\n};\n\nUPNG.encode = function (bufs, w, h, ps, dels, tabs, forbidPlte) {\n if (ps == null) ps = 0;\n if (forbidPlte == null) forbidPlte = false;\n\n const nimg = UPNG.encode.compress(bufs, w, h, ps, [false, false, false, 0, forbidPlte]);\n UPNG.encode.compressPNG(nimg, -1);\n\n return UPNG.encode._main(nimg, w, h, dels, tabs);\n};\n\nUPNG.encodeLL = function (bufs, w, h, cc, ac, depth, dels, tabs) {\n const nimg = { ctype: 0 + (cc == 1 ? 0 : 2) + (ac == 0 ? 0 : 4), depth, frames: [] };\n\n const time = Date.now();\n const bipp = (cc + ac) * depth; const\n bipl = bipp * w;\n for (let i = 0; i < bufs.length; i++) {\n nimg.frames.push({\n rect: {\n x: 0, y: 0, width: w, height: h,\n },\n img: new Uint8Array(bufs[i]),\n blend: 0,\n dispose: 1,\n bpp: Math.ceil(bipp / 8),\n bpl: Math.ceil(bipl / 8),\n });\n }\n\n UPNG.encode.compressPNG(nimg, 0, true);\n\n const out = UPNG.encode._main(nimg, w, h, dels, tabs);\n return out;\n};\n\nUPNG.encode._main = function (nimg, w, h, dels, tabs) {\n if (tabs == null) tabs = {};\n const { crc } = UPNG.crc;\n const wUi = UPNG._bin.writeUint;\n const wUs = UPNG._bin.writeUshort;\n const wAs = UPNG._bin.writeASCII;\n let offset = 8; const anim = nimg.frames.length > 1; let\n pltAlpha = false;\n\n let leng = 8 + (16 + 5 + 4) /* + (9+4) */ + (anim ? 20 : 0);\n if (tabs.sRGB != null) leng += 8 + 1 + 4;\n if (tabs.pHYs != null) leng += 8 + 9 + 4;\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n for (var i = 0; i < dl; i++) if ((nimg.plte[i] >>> 24) != 255) pltAlpha = true;\n leng += (8 + dl * 3 + 4) + (pltAlpha ? (8 + dl * 1 + 4) : 0);\n }\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) leng += 38;\n leng += fr.cimg.length + 12;\n if (j != 0) leng += 4;\n }\n leng += 12;\n\n const data = new Uint8Array(leng);\n const wr = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) data[i] = wr[i];\n\n wUi(data, offset, 13); offset += 4;\n wAs(data, offset, 'IHDR'); offset += 4;\n wUi(data, offset, w); offset += 4;\n wUi(data, offset, h); offset += 4;\n data[offset] = nimg.depth; offset++; // depth\n data[offset] = nimg.ctype; offset++; // ctype\n data[offset] = 0; offset++; // compress\n data[offset] = 0; offset++; // filter\n data[offset] = 0; offset++; // interlace\n wUi(data, offset, crc(data, offset - 17, 17)); offset += 4; // crc\n\n // 13 bytes to say, that it is sRGB\n if (tabs.sRGB != null) {\n wUi(data, offset, 1); offset += 4;\n wAs(data, offset, 'sRGB'); offset += 4;\n data[offset] = tabs.sRGB; offset++;\n wUi(data, offset, crc(data, offset - 5, 5)); offset += 4; // crc\n }\n if (tabs.pHYs != null) {\n wUi(data, offset, 9); offset += 4;\n wAs(data, offset, 'pHYs'); offset += 4;\n wUi(data, offset, tabs.pHYs[0]); offset += 4;\n wUi(data, offset, tabs.pHYs[1]); offset += 4;\n data[offset] = tabs.pHYs[2];\t\t\toffset++;\n wUi(data, offset, crc(data, offset - 13, 13)); offset += 4; // crc\n }\n\n if (anim) {\n wUi(data, offset, 8); offset += 4;\n wAs(data, offset, 'acTL'); offset += 4;\n wUi(data, offset, nimg.frames.length); offset += 4;\n wUi(data, offset, tabs.loop != null ? tabs.loop : 0); offset += 4;\n wUi(data, offset, crc(data, offset - 12, 12)); offset += 4; // crc\n }\n\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n wUi(data, offset, dl * 3); offset += 4;\n wAs(data, offset, 'PLTE'); offset += 4;\n for (var i = 0; i < dl; i++) {\n const ti = i * 3; const c = nimg.plte[i]; const r = (c) & 255; const g = (c >>> 8) & 255; const\n b = (c >>> 16) & 255;\n data[offset + ti + 0] = r; data[offset + ti + 1] = g; data[offset + ti + 2] = b;\n }\n offset += dl * 3;\n wUi(data, offset, crc(data, offset - dl * 3 - 4, dl * 3 + 4)); offset += 4; // crc\n\n if (pltAlpha) {\n wUi(data, offset, dl); offset += 4;\n wAs(data, offset, 'tRNS'); offset += 4;\n for (var i = 0; i < dl; i++) data[offset + i] = (nimg.plte[i] >>> 24) & 255;\n offset += dl;\n wUi(data, offset, crc(data, offset - dl - 4, dl + 4)); offset += 4; // crc\n }\n }\n\n let fi = 0;\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) {\n wUi(data, offset, 26); offset += 4;\n wAs(data, offset, 'fcTL'); offset += 4;\n wUi(data, offset, fi++); offset += 4;\n wUi(data, offset, fr.rect.width); offset += 4;\n wUi(data, offset, fr.rect.height); offset += 4;\n wUi(data, offset, fr.rect.x); offset += 4;\n wUi(data, offset, fr.rect.y); offset += 4;\n wUs(data, offset, dels[j]); offset += 2;\n wUs(data, offset, 1000); offset += 2;\n data[offset] = fr.dispose; offset++;\t// dispose\n data[offset] = fr.blend; offset++;\t// blend\n wUi(data, offset, crc(data, offset - 30, 30)); offset += 4; // crc\n }\n\n const imgd = fr.cimg; var\n dl = imgd.length;\n wUi(data, offset, dl + (j == 0 ? 0 : 4)); offset += 4;\n const ioff = offset;\n wAs(data, offset, (j == 0) ? 'IDAT' : 'fdAT'); offset += 4;\n if (j != 0) { wUi(data, offset, fi++); offset += 4; }\n data.set(imgd, offset);\n offset += dl;\n wUi(data, offset, crc(data, ioff, offset - ioff)); offset += 4; // crc\n }\n\n wUi(data, offset, 0); offset += 4;\n wAs(data, offset, 'IEND'); offset += 4;\n wUi(data, offset, crc(data, offset - 4, 4)); offset += 4; // crc\n\n return data.buffer;\n};\n\nUPNG.encode.compressPNG = function (out, filter, levelZero) {\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i]; const nw = frm.rect.width; const\n nh = frm.rect.height;\n const fdata = new Uint8Array(nh * frm.bpl + nh);\n frm.cimg = UPNG.encode._filterZero(frm.img, nh, frm.bpp, frm.bpl, fdata, filter, levelZero);\n }\n};\n\nUPNG.encode.compress = function (bufs, w, h, ps, prms) // prms: onlyBlend, minBits, forbidPlte\n{\n // var time = Date.now();\n const onlyBlend = prms[0]; const evenCrd = prms[1]; const forbidPrev = prms[2]; const minBits = prms[3]; const\n forbidPlte = prms[4];\n\n let ctype = 6; let depth = 8; let\n alphaAnd = 255;\n\n for (var j = 0; j < bufs.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n const img = new Uint8Array(bufs[j]); var\n ilen = img.length;\n for (var i = 0; i < ilen; i += 4) alphaAnd &= img[i + 3];\n }\n const gotAlpha = (alphaAnd != 255);\n\n // console.log(\"alpha check\", Date.now()-time); time = Date.now();\n\n // var brute = gotAlpha && forGIF;\t\t// brute : frames can only be copied, not \"blended\"\n const frms = UPNG.encode.framize(bufs, w, h, onlyBlend, evenCrd, forbidPrev);\n // console.log(\"framize\", Date.now()-time); time = Date.now();\n\n const cmap = {}; const plte = []; const\n inds = [];\n\n if (ps != 0) {\n const nbufs = []; for (var i = 0; i < frms.length; i++) nbufs.push(frms[i].img.buffer);\n\n const abuf = UPNG.encode.concatRGBA(nbufs); const\n qres = UPNG.quantize(abuf, ps); // console.log(qres);\n let cof = 0; const\n bb = new Uint8Array(qres.abuf);\n for (var i = 0; i < frms.length; i++) {\n var ti = frms[i].img; const\n bln = ti.length; inds.push(new Uint8Array(qres.inds.buffer, cof >> 2, bln >> 2));\n for (var j = 0; j < bln; j += 4) { ti[j] = bb[cof + j]; ti[j + 1] = bb[cof + j + 1]; ti[j + 2] = bb[cof + j + 2]; ti[j + 3] = bb[cof + j + 3]; } cof += bln;\n }\n\n for (var i = 0; i < qres.plte.length; i++) plte.push(qres.plte[i].est.rgba);\n // console.log(\"quantize\", Date.now()-time); time = Date.now();\n } else {\n // what if ps==0, but there are <=256 colors? we still need to detect, if the palette could be used\n for (var j = 0; j < frms.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n var frm = frms[j]; const img32 = new Uint32Array(frm.img.buffer); var nw = frm.rect.width; var\n ilen = img32.length;\n const ind = new Uint8Array(ilen); inds.push(ind);\n for (var i = 0; i < ilen; i++) {\n const c = img32[i];\n if (i != 0 && c == img32[i - 1]) ind[i] = ind[i - 1];\n else if (i > nw && c == img32[i - nw]) ind[i] = ind[i - nw];\n else {\n let cmc = cmap[c];\n if (cmc == null) { cmap[c] = cmc = plte.length; plte.push(c); if (plte.length >= 300) break; }\n ind[i] = cmc;\n }\n }\n }\n // console.log(\"make palette\", Date.now()-time); time = Date.now();\n }\n\n const cc = plte.length; // console.log(\"colors:\",cc);\n if (cc <= 256 && forbidPlte == false) {\n if (cc <= 2) depth = 1; else if (cc <= 4) depth = 2; else if (cc <= 16) depth = 4; else depth = 8;\n depth = Math.max(depth, minBits);\n }\n\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; const nx = frm.rect.x; const ny = frm.rect.y; var nw = frm.rect.width; const\n nh = frm.rect.height;\n let cimg = frm.img; const\n cimg32 = new Uint32Array(cimg.buffer);\n let bpl = 4 * nw; let\n bpp = 4;\n if (cc <= 256 && forbidPlte == false) {\n bpl = Math.ceil(depth * nw / 8);\n var nimg = new Uint8Array(bpl * nh);\n const inj = inds[j];\n for (let y = 0; y < nh; y++) {\n var i = y * bpl; const\n ii = y * nw;\n if (depth == 8) for (var x = 0; x < nw; x++) nimg[i + (x)] = (inj[ii + x]);\n else if (depth == 4) for (var x = 0; x < nw; x++) nimg[i + (x >> 1)] |= (inj[ii + x] << (4 - (x & 1) * 4));\n else if (depth == 2) for (var x = 0; x < nw; x++) nimg[i + (x >> 2)] |= (inj[ii + x] << (6 - (x & 3) * 2));\n else if (depth == 1) for (var x = 0; x < nw; x++) nimg[i + (x >> 3)] |= (inj[ii + x] << (7 - (x & 7) * 1));\n }\n cimg = nimg; ctype = 3; bpp = 1;\n } else if (gotAlpha == false && frms.length == 1) {\t// some next \"reduced\" frames may contain alpha for blending\n var nimg = new Uint8Array(nw * nh * 3); const\n area = nw * nh;\n for (var i = 0; i < area; i++) {\n var ti = i * 3; const\n qi = i * 4; nimg[ti] = cimg[qi]; nimg[ti + 1] = cimg[qi + 1]; nimg[ti + 2] = cimg[qi + 2];\n }\n cimg = nimg; ctype = 2; bpp = 3; bpl = 3 * nw;\n }\n frm.img = cimg; frm.bpl = bpl; frm.bpp = bpp;\n }\n // console.log(\"colors => palette indices\", Date.now()-time); time = Date.now();\n\n return {\n ctype, depth, plte, frames: frms,\n };\n};\nUPNG.encode.framize = function (bufs, w, h, alwaysBlend, evenCrd, forbidPrev) {\n /* DISPOSE\n - 0 : no change\n - 1 : clear to transparent\n - 2 : retstore to content before rendering (previous frame disposed)\n BLEND\n - 0 : replace\n - 1 : blend\n */\n const frms = [];\n for (var j = 0; j < bufs.length; j++) {\n const cimg = new Uint8Array(bufs[j]); const\n cimg32 = new Uint32Array(cimg.buffer);\n var nimg;\n\n let nx = 0; let ny = 0; let nw = w; let nh = h; let\n blend = alwaysBlend ? 1 : 0;\n if (j != 0) {\n const tlim = (forbidPrev || alwaysBlend || j == 1 || frms[j - 2].dispose != 0) ? 1 : 2; let tstp = 0; let\n tarea = 1e9;\n for (let it = 0; it < tlim; it++) {\n var pimg = new Uint8Array(bufs[j - 1 - it]); const\n p32 = new Uint32Array(bufs[j - 1 - it]);\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n var i = y * w + x;\n if (cimg32[i] != p32[i]) {\n if (x < mix) mix = x; if (x > max) max = x;\n if (y < miy) miy = y; if (y > may) may = y;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n const sarea = (max - mix + 1) * (may - miy + 1);\n if (sarea < tarea) {\n tarea = sarea; tstp = it;\n nx = mix; ny = miy; nw = max - mix + 1; nh = may - miy + 1;\n }\n }\n\n // alwaysBlend: pokud zjistím, že blendit nelze, nastavím předchozímu snímku dispose=1. Zajistím, aby obsahoval můj obdélník.\n var pimg = new Uint8Array(bufs[j - 1 - tstp]);\n if (tstp == 1) frms[j - 1].dispose = 2;\n\n nimg = new Uint8Array(nw * nh * 4);\n UPNG._copyTile(pimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n\n blend = UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 3) ? 1 : 0;\n if (blend == 1) {\n UPNG.encode._prepareDiff(cimg, w, h, nimg, {\n x: nx, y: ny, width: nw, height: nh,\n });\n } else UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n // UPNG._copyTile(cimg,w,h, nimg,nw,nh, -nx,-ny, blend==1?2:0);\n } else nimg = cimg.slice(0);\t// img may be rewritten further ... don't rewrite input\n\n frms.push({\n rect: {\n x: nx, y: ny, width: nw, height: nh,\n },\n img: nimg,\n blend,\n dispose: 0,\n });\n }\n\n if (alwaysBlend) {\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; if (frm.blend == 1) continue;\n const r0 = frm.rect; const\n r1 = frms[j - 1].rect;\n const miX = Math.min(r0.x, r1.x); const\n miY = Math.min(r0.y, r1.y);\n const maX = Math.max(r0.x + r0.width, r1.x + r1.width); const\n maY = Math.max(r0.y + r0.height, r1.y + r1.height);\n const r = {\n x: miX, y: miY, width: maX - miX, height: maY - miY,\n };\n\n frms[j - 1].dispose = 1;\n if (j - 1 != 0) { UPNG.encode._updateFrame(bufs, w, h, frms, j - 1, r, evenCrd); }\n UPNG.encode._updateFrame(bufs, w, h, frms, j, r, evenCrd);\n }\n }\n let area = 0;\n if (bufs.length != 1) {\n for (var i = 0; i < frms.length; i++) {\n var frm = frms[i];\n area += frm.rect.width * frm.rect.height;\n // if(i==0 || frm.blend!=1) continue;\n // var ob = new Uint8Array(\n // console.log(frm.blend, frm.dispose, frm.rect);\n }\n }\n // if(area!=0) console.log(area);\n return frms;\n};\nUPNG.encode._updateFrame = function (bufs, w, h, frms, i, r, evenCrd) {\n const U8 = Uint8Array; const\n U32 = Uint32Array;\n const pimg = new U8(bufs[i - 1]); const pimg32 = new U32(bufs[i - 1]); const\n nimg = i + 1 < bufs.length ? new U8(bufs[i + 1]) : null;\n const cimg = new U8(bufs[i]); const\n cimg32 = new U32(cimg.buffer);\n\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < r.height; y++) {\n for (let x = 0; x < r.width; x++) {\n const cx = r.x + x; const\n cy = r.y + y;\n const j = cy * w + cx; const\n cc = cimg32[j];\n // no need to draw transparency, or to dispose it. Or, if writing the same color and the next one does not need transparency.\n if (cc == 0 || (frms[i - 1].dispose == 0 && pimg32[j] == cc && (nimg == null || nimg[j * 4 + 3] != 0))/**/) {} else {\n if (cx < mix) mix = cx; if (cx > max) max = cx;\n if (cy < miy) miy = cy; if (cy > may) may = cy;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n r = {\n x: mix, y: miy, width: max - mix + 1, height: may - miy + 1,\n };\n\n const fr = frms[i]; fr.rect = r; fr.blend = 1; fr.img = new Uint8Array(r.width * r.height * 4);\n if (frms[i - 1].dispose == 0) {\n UPNG._copyTile(pimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0);\n UPNG.encode._prepareDiff(cimg, w, h, fr.img, r);\n // UPNG._copyTile(cimg,w,h, fr.img,r.width,r.height, -r.x,-r.y, 2);\n } else { UPNG._copyTile(cimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0); }\n};\nUPNG.encode._prepareDiff = function (cimg, w, h, nimg, rec) {\n UPNG._copyTile(cimg, w, h, nimg, rec.width, rec.height, -rec.x, -rec.y, 2);\n /*\n var n32 = new Uint32Array(nimg.buffer);\n var og = new Uint8Array(rec.width*rec.height*4), o32 = new Uint32Array(og.buffer);\n UPNG._copyTile(cimg,w,h, og,rec.width,rec.height, -rec.x,-rec.y, 0);\n for(var i=4; i>>2]==o32[(i>>>2)-1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n }\n for(var i=nimg.length-8; i>0; i-=4) {\n if(nimg[i+7]!=0 && nimg[i+3]==0 && o32[i>>>2]==o32[(i>>>2)+1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n } */\n};\n\nUPNG.encode._filterZero = function (img, h, bpp, bpl, data, filter, levelZero) {\n const fls = []; let\n ftry = [0, 1, 2, 3, 4];\n if (filter != -1) ftry = [filter];\n else if (h * bpl > 500000 || bpp == 1) ftry = [0];\n let opts; if (levelZero) opts = { level: 0 };\n\n // var CMPR = (data.length>10e6 && typeof UZIP !== 'undefined') ? UZIP : pako;\n const CMPR = UZIP;\n\n const time = Date.now();\n for (var i = 0; i < ftry.length; i++) {\n for (let y = 0; y < h; y++) UPNG.encode._filterLine(data, img, y, bpl, bpp, ftry[i]);\n // var nimg = new Uint8Array(data.length);\n // var sz = UZIP.F.deflate(data, nimg); fls.push(nimg.slice(0,sz));\n // var dfl = pako[\"deflate\"](data), dl=dfl.length-4;\n // var crc = (dfl[dl+3]<<24)|(dfl[dl+2]<<16)|(dfl[dl+1]<<8)|(dfl[dl+0]<<0);\n // console.log(crc, UZIP.adler(data,2,data.length-6));\n fls.push(CMPR.deflate(data, opts));\n }\n\n let ti; let\n tsize = 1e9;\n for (var i = 0; i < fls.length; i++) if (fls[i].length < tsize) { ti = i; tsize = fls[i].length; }\n return fls[ti];\n};\nUPNG.encode._filterLine = function (data, img, y, bpl, bpp, type) {\n const i = y * bpl; let di = i + y; const\n paeth = UPNG.decode._paeth;\n data[di] = type; di++;\n\n if (type == 0) {\n if (bpl < 500) for (var x = 0; x < bpl; x++) data[di + x] = img[i + x];\n else data.set(new Uint8Array(img.buffer, i, bpl), di);\n } else if (type == 1) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - img[i + x - bpp] + 256) & 255;\n } else if (y == 0) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n\n if (type == 2) for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x];\n if (type == 3) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - (img[i + x - bpp] >> 1) + 256) & 255;\n if (type == 4) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - paeth(img[i + x - bpp], 0, 0) + 256) & 255;\n } else {\n if (type == 2) { for (var x = 0; x < bpl; x++) data[di + x] = (img[i + x] + 256 - img[i + x - bpl]) & 255; }\n if (type == 3) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - (img[i + x - bpl] >> 1)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - ((img[i + x - bpl] + img[i + x - bpp]) >> 1)) & 255;\n }\n if (type == 4) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - paeth(0, img[i + x - bpl], 0)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - paeth(img[i + x - bpp], img[i + x - bpl], img[i + x - bpp - bpl])) & 255;\n }\n }\n};\n\nUPNG.crc = {\n table: (function () {\n const tab = new Uint32Array(256);\n for (let n = 0; n < 256; n++) {\n let c = n;\n for (let k = 0; k < 8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c >>>= 1;\n }\n tab[n] = c;\n }\n return tab;\n }()),\n update(c, buf, off, len) {\n for (let i = 0; i < len; i++) c = UPNG.crc.table[(c ^ buf[off + i]) & 0xff] ^ (c >>> 8);\n return c;\n },\n crc(b, o, l) { return UPNG.crc.update(0xffffffff, b, o, l) ^ 0xffffffff; },\n};\n\nUPNG.quantize = function (abuf, ps) {\n const oimg = new Uint8Array(abuf); const nimg = oimg.slice(0); const\n nimg32 = new Uint32Array(nimg.buffer);\n\n const KD = UPNG.quantize.getKDtree(nimg, ps);\n const root = KD[0]; const\n leafs = KD[1];\n\n const { planeDst } = UPNG.quantize;\n const sb = oimg; const tb = nimg32; const\n len = sb.length;\n\n const inds = new Uint8Array(oimg.length >> 2); let\n nd;\n if (oimg.length < 20e6) // precise, but slow :(\n {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = UPNG.quantize.getNearest(root, r, g, b, a);\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n } else {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = root; while (nd.left) nd = (planeDst(nd.est, r, g, b, a) <= 0) ? nd.left : nd.right;\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n }\n return { abuf: nimg.buffer, inds, plte: leafs };\n};\n\nUPNG.quantize.getKDtree = function (nimg, ps, err) {\n if (err == null) err = 0.0001;\n const nimg32 = new Uint32Array(nimg.buffer);\n\n const root = {\n i0: 0, i1: nimg.length, bst: null, est: null, tdst: 0, left: null, right: null,\n }; // basic statistic, extra statistic\n root.bst = UPNG.quantize.stats(nimg, root.i0, root.i1); root.est = UPNG.quantize.estats(root.bst);\n const leafs = [root];\n\n while (leafs.length < ps) {\n let maxL = 0; let\n mi = 0;\n for (var i = 0; i < leafs.length; i++) if (leafs[i].est.L > maxL) { maxL = leafs[i].est.L; mi = i; }\n if (maxL < err) break;\n const node = leafs[mi];\n\n const s0 = UPNG.quantize.splitPixels(nimg, nimg32, node.i0, node.i1, node.est.e, node.est.eMq255);\n const s0wrong = (node.i0 >= s0 || node.i1 <= s0);\n // console.log(maxL, leafs.length, mi);\n if (s0wrong) { node.est.L = 0; continue; }\n\n const ln = {\n i0: node.i0, i1: s0, bst: null, est: null, tdst: 0, left: null, right: null,\n }; ln.bst = UPNG.quantize.stats(nimg, ln.i0, ln.i1);\n ln.est = UPNG.quantize.estats(ln.bst);\n const rn = {\n i0: s0, i1: node.i1, bst: null, est: null, tdst: 0, left: null, right: null,\n }; rn.bst = { R: [], m: [], N: node.bst.N - ln.bst.N };\n for (var i = 0; i < 16; i++) rn.bst.R[i] = node.bst.R[i] - ln.bst.R[i];\n for (var i = 0; i < 4; i++) rn.bst.m[i] = node.bst.m[i] - ln.bst.m[i];\n rn.est = UPNG.quantize.estats(rn.bst);\n\n node.left = ln; node.right = rn;\n leafs[mi] = ln; leafs.push(rn);\n }\n leafs.sort((a, b) => b.bst.N - a.bst.N);\n for (var i = 0; i < leafs.length; i++) leafs[i].ind = i;\n return [root, leafs];\n};\n\nUPNG.quantize.getNearest = function (nd, r, g, b, a) {\n if (nd.left == null) { nd.tdst = UPNG.quantize.dist(nd.est.q, r, g, b, a); return nd; }\n const planeDst = UPNG.quantize.planeDst(nd.est, r, g, b, a);\n\n let node0 = nd.left; let\n node1 = nd.right;\n if (planeDst > 0) { node0 = nd.right; node1 = nd.left; }\n\n const ln = UPNG.quantize.getNearest(node0, r, g, b, a);\n if (ln.tdst <= planeDst * planeDst) return ln;\n const rn = UPNG.quantize.getNearest(node1, r, g, b, a);\n return rn.tdst < ln.tdst ? rn : ln;\n};\nUPNG.quantize.planeDst = function (est, r, g, b, a) { const { e } = est; return e[0] * r + e[1] * g + e[2] * b + e[3] * a - est.eMq; };\nUPNG.quantize.dist = function (q, r, g, b, a) {\n const d0 = r - q[0]; const d1 = g - q[1]; const d2 = b - q[2]; const\n d3 = a - q[3]; return d0 * d0 + d1 * d1 + d2 * d2 + d3 * d3;\n};\n\nUPNG.quantize.splitPixels = function (nimg, nimg32, i0, i1, e, eMq) {\n const { vecDot } = UPNG.quantize;\n i1 -= 4;\n const shfs = 0;\n while (i0 < i1) {\n while (vecDot(nimg, i0, e) <= eMq) i0 += 4;\n while (vecDot(nimg, i1, e) > eMq) i1 -= 4;\n if (i0 >= i1) break;\n\n const t = nimg32[i0 >> 2]; nimg32[i0 >> 2] = nimg32[i1 >> 2]; nimg32[i1 >> 2] = t;\n\n i0 += 4; i1 -= 4;\n }\n while (vecDot(nimg, i0, e) > eMq) i0 -= 4;\n return i0 + 4;\n};\nUPNG.quantize.vecDot = function (nimg, i, e) {\n return nimg[i] * e[0] + nimg[i + 1] * e[1] + nimg[i + 2] * e[2] + nimg[i + 3] * e[3];\n};\nUPNG.quantize.stats = function (nimg, i0, i1) {\n const R = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n const m = [0, 0, 0, 0];\n const N = (i1 - i0) >> 2;\n for (let i = i0; i < i1; i += 4) {\n const r = nimg[i] * (1 / 255); const g = nimg[i + 1] * (1 / 255); const b = nimg[i + 2] * (1 / 255); const\n a = nimg[i + 3] * (1 / 255);\n // var r = nimg[i], g = nimg[i+1], b = nimg[i+2], a = nimg[i+3];\n m[0] += r; m[1] += g; m[2] += b; m[3] += a;\n\n R[0] += r * r; R[1] += r * g; R[2] += r * b; R[3] += r * a;\n R[5] += g * g; R[6] += g * b; R[7] += g * a;\n R[10] += b * b; R[11] += b * a;\n R[15] += a * a;\n }\n R[4] = R[1]; R[8] = R[2]; R[9] = R[6]; R[12] = R[3]; R[13] = R[7]; R[14] = R[11];\n\n return { R, m, N };\n};\nUPNG.quantize.estats = function (stats) {\n const { R } = stats;\n const { m } = stats;\n const { N } = stats;\n\n // when all samples are equal, but N is large (millions), the Rj can be non-zero ( 0.0003.... - precission error)\n const m0 = m[0]; const m1 = m[1]; const m2 = m[2]; const m3 = m[3]; const\n iN = (N == 0 ? 0 : 1 / N);\n const Rj = [\n R[0] - m0 * m0 * iN, R[1] - m0 * m1 * iN, R[2] - m0 * m2 * iN, R[3] - m0 * m3 * iN,\n R[4] - m1 * m0 * iN, R[5] - m1 * m1 * iN, R[6] - m1 * m2 * iN, R[7] - m1 * m3 * iN,\n R[8] - m2 * m0 * iN, R[9] - m2 * m1 * iN, R[10] - m2 * m2 * iN, R[11] - m2 * m3 * iN,\n R[12] - m3 * m0 * iN, R[13] - m3 * m1 * iN, R[14] - m3 * m2 * iN, R[15] - m3 * m3 * iN,\n ];\n\n const A = Rj; const\n M = UPNG.M4;\n let b = [Math.random(), Math.random(), Math.random(), Math.random()]; let mi = 0; let\n tmi = 0;\n\n if (N != 0) {\n for (let i = 0; i < 16; i++) {\n b = M.multVec(A, b); tmi = Math.sqrt(M.dot(b, b)); b = M.sml(1 / tmi, b);\n if (i != 0 && Math.abs(tmi - mi) < 1e-9) break; mi = tmi;\n }\n }\n // b = [0,0,1,0]; mi=N;\n const q = [m0 * iN, m1 * iN, m2 * iN, m3 * iN];\n const eMq255 = M.dot(M.sml(255, q), b);\n\n return {\n Cov: Rj,\n q,\n e: b,\n L: mi,\n eMq255,\n eMq: M.dot(b, q),\n rgba: (((Math.round(255 * q[3]) << 24) | (Math.round(255 * q[2]) << 16) | (Math.round(255 * q[1]) << 8) | (Math.round(255 * q[0]) << 0)) >>> 0),\n };\n};\nUPNG.M4 = {\n multVec(m, v) {\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * v[3],\n m[4] * v[0] + m[5] * v[1] + m[6] * v[2] + m[7] * v[3],\n m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11] * v[3],\n m[12] * v[0] + m[13] * v[1] + m[14] * v[2] + m[15] * v[3],\n ];\n },\n dot(x, y) { return x[0] * y[0] + x[1] * y[1] + x[2] * y[2] + x[3] * y[3]; },\n sml(a, y) { return [a * y[0], a * y[1], a * y[2], a * y[3]]; },\n};\n\nUPNG.encode.concatRGBA = function (bufs) {\n let tlen = 0;\n for (var i = 0; i < bufs.length; i++) tlen += bufs[i].byteLength;\n const nimg = new Uint8Array(tlen); let\n noff = 0;\n for (var i = 0; i < bufs.length; i++) {\n const img = new Uint8Array(bufs[i]); const\n il = img.length;\n for (let j = 0; j < il; j += 4) {\n let r = img[j]; let g = img[j + 1]; let b = img[j + 2]; const\n a = img[j + 3];\n if (a == 0) r = g = b = 0;\n nimg[noff + j] = r; nimg[noff + j + 1] = g; nimg[noff + j + 2] = b; nimg[noff + j + 3] = a;\n }\n noff += il;\n }\n return nimg.buffer;\n};\n\nexport default UPNG;\n","import UPNG from './UPNG';\nimport MaxCanvasSize from './config/max-canvas-size';\n\nconst isBrowser = typeof window !== 'undefined'; // change browser environment to support SSR\n\n// add support for cordova-plugin-file\nconst moduleMapper = isBrowser && window.cordova && window.cordova.require && window.cordova.require('cordova/modulemapper');\nexport const CustomFile = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'File')) || (typeof window.File !== 'undefined' && File));\nexport const CustomFileReader = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'FileReader')) || (typeof window.FileReader !== 'undefined' && FileReader));\n\n/**\n * getFilefromDataUrl\n *\n * @param {string} dataUrl\n * @param {string} filename\n * @param {number} [lastModified=Date.now()]\n * @returns {Promise}\n */\nexport function getFilefromDataUrl(dataUrl, filename, lastModified = Date.now()) {\n return new Promise((resolve) => {\n const arr = dataUrl.split(',');\n const mime = arr[0].match(/:(.*?);/)[1];\n const bstr = globalThis.atob(arr[1]);\n let n = bstr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n const file = new Blob([u8arr], { type: mime });\n file.name = filename;\n file.lastModified = lastModified;\n resolve(file);\n\n // Safari has issue with File constructor not being able to POST in FormData\n // https://github.com/Donaldcwl/browser-image-compression/issues/8\n // https://bugs.webkit.org/show_bug.cgi?id=165081\n // let file\n // try {\n // file = new File([u8arr], filename, { type: mime }) // Edge do not support File constructor\n // } catch (e) {\n // file = new Blob([u8arr], { type: mime })\n // file.name = filename\n // file.lastModified = lastModified\n // }\n // resolve(file)\n });\n}\n\n/**\n * getDataUrlFromFile\n *\n * @param {File | Blob} file\n * @returns {Promise}\n */\nexport function getDataUrlFromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = () => resolve(reader.result);\n reader.onerror = (e) => reject(e);\n reader.readAsDataURL(file);\n });\n}\n\n/**\n * loadImage\n *\n * @param {string} src\n * @returns {Promise}\n */\nexport function loadImage(src) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => resolve(img);\n img.onerror = (e) => reject(e);\n img.src = src;\n });\n}\n\n/**\n * getBrowserName\n *\n * Extracts the browser name from the useragent.\n *\n * ref: https://stackoverflow.com/a/26358856\n *\n * @returns {string}\n */\nexport function getBrowserName() {\n let browserName = 'etc';\n const { userAgent } = navigator;\n if (/Chrom(e|ium)/i.test(userAgent)) {\n browserName = 'chrome';\n } else if (/iP(ad|od|hone)/i.test(userAgent) && /WebKit/i.test(userAgent) && !(/(CriOS|FxiOS|OPiOS|mercury)/i.test(userAgent))) {\n // see: https://stackoverflow.com/a/35813965\n browserName = 'mobile safari';\n } else if (/Safari/i.test(userAgent)) {\n browserName = 'desktop safari';\n } else if (/Firefox/i.test(userAgent)) {\n browserName = 'firefox';\n } else if (/MSIE/i.test(userAgent) || (!!document.documentMode) === true) { // IF IE > 10\n browserName = 'internet explorer';\n }\n return browserName;\n}\n\n/**\n * approximateBelowCanvasMaximumSizeOfBrowser\n *\n * it uses binary search to converge below the browser's maximum Canvas size.\n *\n * @param {number} initWidth\n * @param {number} initHeight\n * @returns {object}\n */\nexport function approximateBelowMaximumCanvasSizeOfBrowser(initWidth, initHeight) {\n const browserName = getBrowserName();\n const maximumCanvasSize = MaxCanvasSize[browserName];\n\n let width = initWidth;\n let height = initHeight;\n let size = width * height;\n const ratio = width > height ? height / width : width / height;\n\n while (size > maximumCanvasSize * maximumCanvasSize) {\n const halfSizeWidth = (maximumCanvasSize + width) / 2;\n const halfSizeHeight = (maximumCanvasSize + height) / 2;\n if (halfSizeWidth < halfSizeHeight) {\n height = halfSizeHeight;\n width = halfSizeHeight * ratio;\n } else {\n height = halfSizeWidth * ratio;\n width = halfSizeWidth;\n }\n\n size = width * height;\n }\n\n return {\n width, height,\n };\n}\n\n/**\n * get new Canvas and it's context\n * @param width\n * @param height\n * @returns {[HTMLCanvasElement | OffscreenCanvas, CanvasRenderingContext2D]}\n */\nexport function getNewCanvasAndCtx(width, height) {\n let canvas;\n let ctx;\n try {\n canvas = new OffscreenCanvas(width, height);\n ctx = canvas.getContext('2d');\n if (ctx === null) {\n throw new Error('getContext of OffscreenCanvas returns null');\n }\n } catch (e) {\n canvas = document.createElement('canvas');\n ctx = canvas.getContext('2d');\n }\n canvas.width = width;\n canvas.height = height;\n // ctx.fillStyle = '#fff'\n // ctx.fillRect(0, 0, width, height)\n return [canvas, ctx];\n}\n\n/**\n * drawImageInCanvas\n *\n * @param {HTMLImageElement} img\n * @param {string} [fileType=undefined]\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function drawImageInCanvas(img, fileType = undefined) {\n const { width, height } = approximateBelowMaximumCanvasSizeOfBrowser(img.width, img.height);\n const [canvas, ctx] = getNewCanvasAndCtx(width, height);\n if (fileType && /jpe?g/.test(fileType)) {\n ctx.fillStyle = 'white'; // to fill the transparent background with white color for png file in jpeg extension\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n return canvas;\n}\n\n/**\n * Detect IOS device\n * see: https://stackoverflow.com/a/9039885\n * @returns {boolean} isIOS device\n */\nexport function isIOS() {\n if (isIOS.cachedResult !== undefined) {\n return isIOS.cachedResult;\n }\n isIOS.cachedResult = [\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod',\n ].includes(navigator.platform)\n // iPad on iOS 13 detection\n || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);\n return isIOS.cachedResult;\n}\n\n/**\n * drawFileInCanvas\n *\n * @param {File | Blob} file\n * @returns {Promise<[ImageBitmap | HTMLImageElement, HTMLCanvasElement | OffscreenCanvas]>}\n */\nexport async function drawFileInCanvas(file) {\n let img;\n try {\n if (isIOS()) {\n throw new Error('Skip createImageBitmap on IOS device'); // see https://github.com/Donaldcwl/browser-image-compression/issues/118\n }\n img = await createImageBitmap(file);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n try {\n const dataUrl = await getDataUrlFromFile(file);\n img = await loadImage(dataUrl);\n } catch (e2) {\n if (process.env.BUILD === 'development') {\n console.error(e2);\n }\n throw e2;\n }\n }\n const canvas = drawImageInCanvas(img, file.type);\n return [img, canvas];\n}\n\n/**\n * canvasToFile\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {string} fileType\n * @param {string} fileName\n * @param {number} fileLastModified\n * @param {number} [quality]\n * @returns {Promise}\n */\nexport async function canvasToFile(canvas, fileType, fileName, fileLastModified, quality = 1) {\n let file;\n if (fileType === 'image/png') {\n const ctx = canvas.getContext('2d');\n const { data } = ctx.getImageData(0, 0, canvas.width, canvas.height);\n const png = UPNG.encode([data], canvas.width, canvas.height, 256 * quality);\n file = new Blob([png], { type: fileType });\n file.name = fileName;\n file.lastModified = fileLastModified;\n } else if (typeof OffscreenCanvas === 'function' && canvas instanceof OffscreenCanvas) { // checked on Win Chrome 83, MacOS Chrome 83\n file = await canvas.convertToBlob({ type: fileType, quality });\n file.name = fileName;\n file.lastModified = fileLastModified;\n // some browser do not support quality parameter, see: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob\n // } else if (typeof canvas.toBlob === 'function') {\n // file = await new Promise(resolve => canvas.toBlob(resolve, fileType, quality))\n } else { // checked on Win Edge 44, Win IE 11, Win Firefox 76, MacOS Firefox 77, MacOS Safari 13.1\n const dataUrl = canvas.toDataURL(fileType, quality);\n file = await getFilefromDataUrl(dataUrl, fileName, fileLastModified);\n }\n return file;\n}\n\n/**\n * clear Canvas memory\n * @param canvas\n * @returns null\n */\nexport function cleanupCanvasMemory(canvas) {\n // garbage clean canvas for safari\n // ref: https://bugs.webkit.org/show_bug.cgi?id=195325\n // eslint-disable-next-line no-param-reassign\n canvas.width = 0;\n // eslint-disable-next-line no-param-reassign\n canvas.height = 0;\n}\n\n// Check if browser supports automatic image orientation\n// see https://github.com/blueimp/JavaScript-Load-Image/blob/1e4df707821a0afcc11ea0720ee403b8759f3881/js/load-image-orientation.js#L37-L53\nexport async function isAutoOrientationInBrowser() {\n if (isAutoOrientationInBrowser.result !== undefined) return isAutoOrientationInBrowser.result;\n\n // black 2x1 JPEG, with the following meta information set:\n // EXIF Orientation: 6 (Rotated 90° CCW)\n const testImageURL = 'data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAA'\n + 'AAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA'\n + 'QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE'\n + 'BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/x'\n + 'ABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAA'\n + 'AAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==';\n const testImageFile = await getFilefromDataUrl(testImageURL, 'test.jpg', Date.now());\n\n const testImageCanvas = (await drawFileInCanvas(testImageFile))[1];\n const testImageFile2 = await canvasToFile(testImageCanvas, testImageFile.type, testImageFile.name, testImageFile.lastModified);\n cleanupCanvasMemory(testImageCanvas);\n const img = (await drawFileInCanvas(testImageFile2))[0];\n // console.log('img', img.width, img.height)\n\n isAutoOrientationInBrowser.result = img.width === 1 && img.height === 2;\n return isAutoOrientationInBrowser.result;\n}\n\n/**\n * getExifOrientation\n * get image exif orientation info\n * source: https://stackoverflow.com/a/32490603/10395024\n *\n * @param {File | Blob} file\n * @returns {Promise} - orientation id, see https://i.stack.imgur.com/VGsAj.gif\n */\nexport function getExifOrientation(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = (e) => {\n const view = new DataView(e.target.result);\n if (view.getUint16(0, false) != 0xFFD8) {\n return resolve(-2);\n }\n const length = view.byteLength;\n let offset = 2;\n while (offset < length) {\n if (view.getUint16(offset + 2, false) <= 8) return resolve(-1);\n const marker = view.getUint16(offset, false);\n offset += 2;\n if (marker == 0xFFE1) {\n if (view.getUint32(offset += 2, false) != 0x45786966) {\n return resolve(-1);\n }\n\n const little = view.getUint16(offset += 6, false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n for (let i = 0; i < tags; i++) {\n if (view.getUint16(offset + (i * 12), little) == 0x0112) {\n return resolve(view.getUint16(offset + (i * 12) + 8, little));\n }\n }\n } else if ((marker & 0xFF00) != 0xFF00) {\n break;\n } else {\n offset += view.getUint16(offset, false);\n }\n }\n return resolve(-1);\n };\n reader.onerror = (e) => reject(e);\n reader.readAsArrayBuffer(file);\n });\n}\n\n/**\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param options\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function handleMaxWidthOrHeight(canvas, options) {\n const { width } = canvas;\n const { height } = canvas;\n const { maxWidthOrHeight } = options;\n\n const needToHandle = isFinite(maxWidthOrHeight) && (width > maxWidthOrHeight || height > maxWidthOrHeight);\n\n let newCanvas = canvas;\n let ctx;\n\n if (needToHandle) {\n [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n if (width > height) {\n newCanvas.width = maxWidthOrHeight;\n newCanvas.height = (height / width) * maxWidthOrHeight;\n } else {\n newCanvas.width = (width / height) * maxWidthOrHeight;\n newCanvas.height = maxWidthOrHeight;\n }\n ctx.drawImage(canvas, 0, 0, newCanvas.width, newCanvas.height);\n\n cleanupCanvasMemory(canvas);\n }\n\n return newCanvas;\n}\n\n/**\n * followExifOrientation\n * source: https://stackoverflow.com/a/40867559/10395024\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {number} exifOrientation\n * @returns {HTMLCanvasElement | OffscreenCanvas} canvas\n */\nexport function followExifOrientation(canvas, exifOrientation) {\n const { width } = canvas;\n const { height } = canvas;\n\n const [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n\n // set proper canvas dimensions before transform & export\n if (exifOrientation > 4 && exifOrientation < 9) {\n newCanvas.width = height;\n newCanvas.height = width;\n } else {\n newCanvas.width = width;\n newCanvas.height = height;\n }\n\n // transform context before drawing image\n switch (exifOrientation) {\n case 2:\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n break;\n }\n\n ctx.drawImage(canvas, 0, 0, width, height);\n\n cleanupCanvasMemory(canvas);\n\n return newCanvas;\n}\n","import {\n canvasToFile,\n cleanupCanvasMemory,\n drawFileInCanvas,\n followExifOrientation,\n getExifOrientation,\n getNewCanvasAndCtx,\n handleMaxWidthOrHeight,\n isAutoOrientationInBrowser,\n} from './utils';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} options\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @param {number} [options.initialQuality=1.0]\n * @param {number} previousProgress - for internal try catch rerunning start from previous progress\n * @returns {Promise}\n */\nexport default async function compress(file, options, previousProgress = 0) {\n let progress = previousProgress;\n\n function incProgress(inc = 5) {\n progress += inc;\n options.onProgress(Math.min(progress, 100));\n }\n\n function setProgress(p) {\n progress = Math.min(Math.max(p, progress), 100);\n options.onProgress(progress);\n }\n\n let remainingTrials = options.maxIteration || 10;\n\n const maxSizeByte = options.maxSizeMB * 1024 * 1024;\n\n incProgress();\n\n // drawFileInCanvas\n const [, origCanvas] = await drawFileInCanvas(file);\n\n incProgress();\n\n // handleMaxWidthOrHeight\n const maxWidthOrHeightFixedCanvas = handleMaxWidthOrHeight(origCanvas, options);\n\n incProgress();\n\n // exifOrientation\n const exifOrientation = options.exifOrientation || await getExifOrientation(file);\n incProgress();\n const orientationFixedCanvas = (await isAutoOrientationInBrowser()) ? maxWidthOrHeightFixedCanvas : followExifOrientation(maxWidthOrHeightFixedCanvas, exifOrientation);\n incProgress();\n\n let quality = options.initialQuality || 1.0;\n\n const outputFileType = options.fileType || file.type;\n\n const tempFile = await canvasToFile(orientationFixedCanvas, outputFileType, file.name, file.lastModified, quality);\n incProgress();\n\n const origExceedMaxSize = tempFile.size > maxSizeByte;\n const sizeBecomeLarger = tempFile.size > file.size;\n if (process.env.BUILD === 'development') {\n console.log('original file size', file.size);\n console.log('current file size', tempFile.size);\n }\n\n // check if we need to compress or resize\n if (!origExceedMaxSize && !sizeBecomeLarger) {\n // no need to compress\n if (process.env.BUILD === 'development') {\n console.log('no need to compress');\n }\n setProgress(100);\n return tempFile;\n }\n\n const sourceSize = file.size;\n const renderedSize = tempFile.size;\n let currentSize = renderedSize;\n let compressedFile;\n let newCanvas; let\n ctx;\n let canvas = orientationFixedCanvas;\n while (remainingTrials-- && (currentSize > maxSizeByte || currentSize > sourceSize)) {\n const newWidth = origExceedMaxSize ? canvas.width * 0.95 : canvas.width;\n const newHeight = origExceedMaxSize ? canvas.height * 0.95 : canvas.height;\n if (process.env.BUILD === 'development') {\n console.log('current width', newWidth);\n console.log('current height', newHeight);\n }\n [newCanvas, ctx] = getNewCanvasAndCtx(newWidth, newHeight);\n\n ctx.drawImage(canvas, 0, 0, newWidth, newHeight);\n\n quality *= 0.95;\n // eslint-disable-next-line no-await-in-loop\n compressedFile = await canvasToFile(newCanvas, outputFileType, file.name, file.lastModified, quality);\n\n cleanupCanvasMemory(canvas);\n\n canvas = newCanvas;\n\n currentSize = compressedFile.size;\n // console.log('currentSize', currentSize)\n setProgress(Math.min(99, Math.floor(((renderedSize - currentSize) / (renderedSize - maxSizeByte)) * 100)));\n }\n\n cleanupCanvasMemory(canvas);\n cleanupCanvasMemory(newCanvas);\n cleanupCanvasMemory(maxWidthOrHeightFixedCanvas);\n cleanupCanvasMemory(orientationFixedCanvas);\n cleanupCanvasMemory(origCanvas);\n\n setProgress(100);\n return compressedFile;\n}\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = IS_CONSTRUCTOR ? new this(length) : Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements -- TODO\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to , but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar $toString = require('../internals/to-string');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar nativeFetch = getBuiltIn('fetch');\nvar NativeRequest = getBuiltIn('Request');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (iteratorMethod) {\n iterator = getIterator(init, iteratorMethod);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: $toString(first.value), value: $toString(second.value) });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: $toString(init[key]) });\n } else {\n parseSearchParams(\n entries,\n typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : $toString(init)\n );\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: $toString(name), value: $toString(value) });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n } return init;\n };\n\n if (isCallable(nativeFetch)) {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestConstructor, 'Request');\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n\n $({ global: true, forced: true }, {\n Request: RequestConstructor\n });\n }\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar $toString = require('../internals/to-string');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\n// eslint-disable-next-line regexp/no-obscure-range -- safe\nvar ALPHANUMERIC = /[\\d+-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^0x/i;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n/* eslint-disable no-control-regex -- safe */\nvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/;\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/;\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g;\nvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\n/* eslint-enable no-control-regex -- safe */\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var chr = function () {\n return input.charAt(pointer);\n };\n\n if (chr() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (chr()) {\n if (pieceIndex == 8) return;\n if (chr() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(chr())) {\n value = value * 16 + parseInt(chr(), 16);\n pointer++;\n length++;\n }\n if (chr() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (chr()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (chr() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(chr())) return;\n while (DIGIT.test(chr())) {\n number = parseInt(chr(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (chr() == ':') {\n pointer++;\n if (!chr()) return;\n } else if (chr()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (chr, set) {\n var code = codeAt(chr, 0);\n return code > 0x20 && code < 0x7F && !has(set, chr) ? chr : encodeURIComponent(chr);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, chr, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n chr = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (chr && ALPHA.test(chr)) {\n buffer += chr.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (chr && (ALPHANUMERIC.test(chr) || chr == '+' || chr == '-' || chr == '.')) {\n buffer += chr.toLowerCase();\n } else if (chr == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && chr == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (chr == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (chr == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (chr == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '/' || (chr == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (chr == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (chr == '/' || chr == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (chr == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (chr != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (chr != '/' && chr != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (chr == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += chr;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (chr == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (chr == '[') seenBracket = true;\n else if (chr == ']') seenBracket = false;\n buffer += chr;\n } break;\n\n case PORT:\n if (DIGIT.test(chr)) {\n buffer += chr;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (chr == '/' || chr == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (chr == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (chr == '/' || chr == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (chr == EOF || chr == '/' || chr == '\\\\' || chr == '?' || chr == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += chr;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (chr != '/' && chr != '\\\\') continue;\n } else if (!stateOverride && chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n state = PATH;\n if (chr != '/') continue;\n } break;\n\n case PATH:\n if (\n chr == EOF || chr == '/' ||\n (chr == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (chr == '?' || chr == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(chr, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n if (chr == \"'\" && isSpecial(url)) url.query += '%27';\n else if (chr == '#') url.query += '%23';\n else url.query += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = $toString(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, $toString(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URLConstructor(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = $toString(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, $toString(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = $toString(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, $toString(pathname), PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = $toString(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = $toString(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n}\n\nhandlePrototype(DOMTokenListPrototype);\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar $startsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n return ''.replace(re, '$') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);\n return replacer\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(toString(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (string, replaceValue) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (\n typeof replaceValue === 'string' &&\n replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1 &&\n replaceValue.indexOf('$<') === -1\n ) {\n var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n if (res.done) return res.value;\n }\n\n var functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = toString(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = toString(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = toString(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","import * as UZIP from 'uzip';\n// eslint-disable-next-line import/no-cycle\nimport lib from './index';\nimport compress from './image-compression';\nimport { getNewCanvasAndCtx, isIOS } from './utils';\nimport UPNG from './UPNG';\nimport MaxCanvasSize from './config/max-canvas-size';\n\nlet cnt = 0;\nlet imageCompressionLibUrl;\nlet worker;\n\nfunction createWorker(script) {\n const blobArgs = [];\n if (typeof script === 'function') {\n blobArgs.push(`(${script})()`);\n } else {\n blobArgs.push(script);\n }\n return new Worker(URL.createObjectURL(new Blob(blobArgs)));\n}\n\nfunction createSourceObject(str) {\n // console.log('createSourceObject', str)\n return URL.createObjectURL(new Blob([str], { type: 'application/javascript' }));\n}\n\nfunction stringify(o) {\n return JSON.stringify(o, (key, value) => ((typeof value === 'function') ? `BIC_FN:::(function () { return ${value.toString()} })()` : value));\n}\n\nfunction parse(o) {\n if (typeof o === 'string') return o;\n const result = {};\n Object.entries(o).forEach(([key, value]) => {\n if (typeof value === 'string' && value.startsWith('BIC_FN:::')) {\n try {\n // eslint-disable-next-line no-eval\n result[key] = eval(value.replace(/^BIC_FN:::/, ''));\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(key, e);\n }\n throw e;\n }\n } else {\n result[key] = parse(value);\n }\n });\n return result;\n}\n\nfunction generateLib() {\n // prepare the lib to be used inside WebWorker\n return createSourceObject(`\n // reconstruct library\n function imageCompression (){return (${lib}).apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ${lib.getDataUrlFromFile}\n imageCompression.getFilefromDataUrl = ${lib.getFilefromDataUrl}\n imageCompression.loadImage = ${lib.loadImage}\n imageCompression.drawImageInCanvas = ${lib.drawImageInCanvas}\n imageCompression.drawFileInCanvas = ${lib.drawFileInCanvas}\n imageCompression.canvasToFile = ${lib.canvasToFile}\n imageCompression.getExifOrientation = ${lib.getExifOrientation}\n imageCompression.handleMaxWidthOrHeight = ${lib.handleMaxWidthOrHeight}\n imageCompression.followExifOrientation = ${lib.followExifOrientation}\n imageCompression.cleanupCanvasMemory = ${lib.cleanupCanvasMemory}\n imageCompression.isAutoOrientationInBrowser = ${lib.isAutoOrientationInBrowser}\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ${lib.approximateBelowMaximumCanvasSizeOfBrowser}\n imageCompression.getBrowserName = ${lib.getBrowserName}\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ${isIOS}\n \n getNewCanvasAndCtx = ${getNewCanvasAndCtx}\n CustomFileReader = FileReader\n CustomFile = File\n MaxCanvasSize = ${JSON.stringify(MaxCanvasSize)}\n function compress (){return (${compress}).apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ${parse}\n const UPNG = {}\n UPNG.toRGBA8 = ${UPNG.toRGBA8}\n UPNG.toRGBA8.decodeImage = ${UPNG.toRGBA8.decodeImage}\n UPNG.decode = ${UPNG.decode}\n UPNG.decode._decompress = ${UPNG.decode._decompress}\n UPNG.decode._inflate = ${UPNG.decode._inflate}\n UPNG.decode._readInterlace = ${UPNG.decode._readInterlace}\n UPNG.decode._getBPP = ${UPNG.decode._getBPP} \n UPNG.decode._filterZero = ${UPNG.decode._filterZero}\n UPNG.decode._paeth = ${UPNG.decode._paeth}\n UPNG.decode._IHDR = ${UPNG.decode._IHDR}\n UPNG._bin = parse(${stringify(UPNG._bin)})\n UPNG._copyTile = ${UPNG._copyTile}\n UPNG.encode = ${UPNG.encode}\n UPNG.encodeLL = ${UPNG.encodeLL} \n UPNG.encode._main = ${UPNG.encode._main}\n UPNG.encode.compressPNG = ${UPNG.encode.compressPNG} \n UPNG.encode.compress = ${UPNG.encode.compress}\n UPNG.encode.framize = ${UPNG.encode.framize} \n UPNG.encode._updateFrame = ${UPNG.encode._updateFrame} \n UPNG.encode._prepareDiff = ${UPNG.encode._prepareDiff} \n UPNG.encode._filterZero = ${UPNG.encode._filterZero} \n UPNG.encode._filterLine = ${UPNG.encode._filterLine}\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.crc = parse(${stringify(UPNG.crc)})\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ${UPNG.quantize} \n UPNG.quantize.getKDtree = ${UPNG.quantize.getKDtree} \n UPNG.quantize.getNearest = ${UPNG.quantize.getNearest} \n UPNG.quantize.planeDst = ${UPNG.quantize.planeDst} \n UPNG.quantize.dist = ${UPNG.quantize.dist} \n UPNG.quantize.splitPixels = ${UPNG.quantize.splitPixels} \n UPNG.quantize.vecDot = ${UPNG.quantize.vecDot} \n UPNG.quantize.stats = ${UPNG.quantize.stats} \n UPNG.quantize.estats = ${UPNG.quantize.estats}\n UPNG.M4 = parse(${stringify(UPNG.M4)})\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP[\"parse\"] = ${UZIP.parse}\n UZIP._readLocal = ${UZIP._readLocal}\n UZIP.inflateRaw = ${UZIP.inflateRaw}\n UZIP.inflate = ${UZIP.inflate}\n UZIP.deflate = ${UZIP.deflate}\n UZIP.deflateRaw = ${UZIP.deflateRaw}\n UZIP.encode = ${UZIP.encode}\n UZIP._noNeed = ${UZIP._noNeed}\n UZIP._writeHeader = ${UZIP._writeHeader}\n UZIP.crc = parse(${stringify(UZIP.crc)})\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ${UZIP.adler}\n UZIP.bin = parse(${stringify(UZIP.bin)})\n UZIP.F = {}\n UZIP.F.deflateRaw = ${UZIP.F.deflateRaw}\n UZIP.F._bestMatch = ${UZIP.F._bestMatch}\n UZIP.F._howLong = ${UZIP.F._howLong}\n UZIP.F._hash = ${UZIP.F._hash}\n UZIP.saved = ${UZIP.saved}\n UZIP.F._writeBlock = ${UZIP.F._writeBlock}\n UZIP.F._copyExact = ${UZIP.F._copyExact}\n UZIP.F.getTrees = ${UZIP.F.getTrees}\n UZIP.F.getSecond = ${UZIP.F.getSecond}\n UZIP.F.nonZero = ${UZIP.F.nonZero}\n UZIP.F.contSize = ${UZIP.F.contSize}\n UZIP.F._codeTiny = ${UZIP.F._codeTiny} \n UZIP.F._lenCodes = ${UZIP.F._lenCodes} \n UZIP.F._hufTree = ${UZIP.F._hufTree} \n UZIP.F.setDepth = ${UZIP.F.setDepth} \n UZIP.F.restrictDepth = ${UZIP.F.restrictDepth}\n UZIP.F._goodIndex = ${UZIP.F._goodIndex} \n UZIP.F._writeLit = ${UZIP.F._writeLit} \n UZIP.F.inflate = ${UZIP.F.inflate} \n UZIP.F._check = ${UZIP.F._check} \n UZIP.F._decodeTiny = ${UZIP.F._decodeTiny} \n UZIP.F._copyOut = ${UZIP.F._copyOut} \n UZIP.F.makeCodes = ${UZIP.F.makeCodes} \n UZIP.F.codes2map = ${UZIP.F.codes2map} \n UZIP.F.revCodes = ${UZIP.F.revCodes} \n\n // used only in deflate\n UZIP.F._putsE = ${UZIP.F._putsE}\n UZIP.F._putsF = ${UZIP.F._putsF}\n \n UZIP.F._bitsE = ${UZIP.F._bitsE}\n UZIP.F._bitsF = ${UZIP.F._bitsF}\n\n UZIP.F._get17 = ${UZIP.F._get17}\n UZIP.F._get25 = ${UZIP.F._get25}\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n `);\n}\n\nfunction generateWorkerScript() {\n // code to be run in the WebWorker\n return createWorker(`\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\\\n' + e.stack, id })\n }\n })\n `);\n}\n\nexport default function compressOnWebWorker(file, options) {\n return new Promise((resolve, reject) => {\n cnt += 1;\n const id = cnt;\n\n if (!imageCompressionLibUrl) {\n imageCompressionLibUrl = generateLib();\n }\n\n if (!worker) {\n worker = generateWorkerScript();\n }\n\n function handler(e) {\n if (e.data.id === id) {\n if (e.data.progress !== undefined) {\n options.onProgress(e.data.progress);\n return;\n }\n worker.removeEventListener('message', handler);\n if (e.data.error) {\n reject(new Error(e.data.error));\n }\n resolve(e.data.file);\n }\n }\n\n worker.addEventListener('message', handler);\n worker.addEventListener('error', reject);\n\n worker.postMessage({\n file,\n id,\n imageCompressionLibUrl,\n options: { ...options, onProgress: undefined },\n });\n });\n}\n","import './polyfill';\n\nimport compress from './image-compression';\nimport {\n canvasToFile,\n drawFileInCanvas,\n drawImageInCanvas,\n getDataUrlFromFile,\n getFilefromDataUrl,\n loadImage,\n getExifOrientation,\n handleMaxWidthOrHeight,\n followExifOrientation,\n CustomFile,\n cleanupCanvasMemory,\n isAutoOrientationInBrowser,\n approximateBelowMaximumCanvasSizeOfBrowser,\n getBrowserName,\n} from './utils';\n// eslint-disable-next-line import/no-cycle\nimport compressOnWebWorker from './web-worker';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} opts - { maxSizeMB=Number.POSITIVE_INFINITY, maxWidthOrHeight, useWebWorker=false, maxIteration = 10, exifOrientation, fileType }\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @returns {Promise}\n */\nasync function imageCompression(file, options) {\n const opts = { ...options };\n\n let compressedFile;\n let progress = 0;\n const { onProgress } = opts;\n\n opts.maxSizeMB = opts.maxSizeMB || Number.POSITIVE_INFINITY;\n const useWebWorker = typeof opts.useWebWorker === 'boolean' ? opts.useWebWorker : true;\n delete opts.useWebWorker;\n opts.onProgress = (aProgress) => {\n progress = aProgress;\n if (typeof onProgress === 'function') {\n onProgress(progress);\n }\n };\n\n if (!(file instanceof Blob || file instanceof CustomFile)) {\n throw new Error('The file given is not an instance of Blob or File');\n } else if (!/^image/.test(file.type)) {\n throw new Error('The file given is not an image');\n }\n\n // try run in web worker, fall back to run in main thread\n // eslint-disable-next-line no-undef, no-restricted-globals\n const inWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n\n if (process.env.BUILD === 'development') {\n if ((useWebWorker && typeof Worker === 'function') || inWebWorker) {\n console.log('run compression in web worker');\n } else {\n console.log('run compression in main thread');\n }\n }\n\n if (useWebWorker && typeof Worker === 'function' && !inWebWorker) {\n try {\n // \"compressOnWebWorker\" is kind of like a recursion to call \"imageCompression\" again inside web worker\n compressedFile = await compressOnWebWorker(file, opts);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.warn('Run compression in web worker failed:', e, ', fall back to main thread');\n }\n compressedFile = await compress(file, opts);\n }\n } else {\n compressedFile = await compress(file, opts);\n }\n\n try {\n compressedFile.name = file.name;\n compressedFile.lastModified = file.lastModified;\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n }\n\n return compressedFile;\n}\n\nimageCompression.getDataUrlFromFile = getDataUrlFromFile;\nimageCompression.getFilefromDataUrl = getFilefromDataUrl;\nimageCompression.loadImage = loadImage;\nimageCompression.drawImageInCanvas = drawImageInCanvas;\nimageCompression.drawFileInCanvas = drawFileInCanvas;\nimageCompression.canvasToFile = canvasToFile;\nimageCompression.getExifOrientation = getExifOrientation;\n\nimageCompression.handleMaxWidthOrHeight = handleMaxWidthOrHeight;\nimageCompression.followExifOrientation = followExifOrientation;\nimageCompression.cleanupCanvasMemory = cleanupCanvasMemory;\nimageCompression.isAutoOrientationInBrowser = isAutoOrientationInBrowser;\nimageCompression.approximateBelowMaximumCanvasSizeOfBrowser = approximateBelowMaximumCanvasSizeOfBrowser;\nimageCompression.getBrowserName = getBrowserName;\nimageCompression.version = __buildVersion__;\n\nexport default imageCompression;\n"],"names":["check","it","Math","isPure","toObject","argument","has","Object","hasOwn","key","id","postfix","random","isCallable","aFunction","process","Deno","versions","match","userAgent","version","fails","WellKnownSymbolsStore","name","NATIVE_SYMBOL","TO_STRING_TAG","wellKnownSymbol","test","EXISTS","isObject","document","createElement","tryToString","func","V","P","val","toPrimitive","input","exoticToPrim","getMethod","isSymbol","toPropertyKey","createPropertyDescriptor","definePropertyModule","f","object","value","store","inspectSource","functionToString","hiddenKeys","OBJECT_ALREADY_INITIALIZED","set","get","NATIVE_WEAK_MAP","wmhas","call","STATE","FunctionPrototype","prototype","DESCRIPTORS","redefine","getInternalState","InternalStateModule","unsafe","simple","CONFIGURABLE_FUNCTION_NAME","toString","arguments","tryGet","$propertyIsEnumerable","getOwnPropertyDescriptor","NASHORN_BUG","split","ceil","floor","toInteger","max","IS_INCLUDES","$this","el","fromIndex","O","toIndexedObject","length","i","copyConstructorProperties","keys","descriptor","target","src","setPrototypeOf","proto","setToStringTag","TAG","STATIC","anInstance","Constructor","TypeError","iterators","ArrayPrototype","Array","a","usingIterator","innerResult","innerError","anObject","iterate","iterable","unboundFunction","options","AS_ENTRIES","bind","INTERRUPTED","fn","IS_ITERATOR","ITERATOR","constructorRegExp","INCORRECT_TO_STRING","isConstructorLegacy","speciesConstructor","defaultConstructor","global","setImmediate","MessageChannel","counter","ONREADYSTATECHANGE","queue","hasOwnProperty","event","location","protocol","host","args","now","runner","macrotask","promise","then","flush","PromiseCapability","C","resolve","console","perform","engineIsBrowser","SPECIES","PROMISE","NativePromisePrototype","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","SUBCLASSING","GLOBAL_CORE_JS_PROMISE","IS_BROWSER","INCORRECT_ITERATION","notify","state","reaction","DISPATCH_EVENT","rejection","IS_NODE","isUnhandled","UNHANDLED","HANDLED","onHandleUnhandled","REJECTED","internalReject","type","NativePromise","PromiseConstructorPrototype","forced","Promise","GT","LT","iframe","style","display","String","iframeDocument","write","scriptTag","F","activeXDocument","whitespaces","ltrim","RegExp","first","third","radix","maxCode","digits","index","code","FUNCTION_NAME_EXISTS","FunctionPrototypeToString","assign","B","symbol","chr","getOwnPropertySymbols","getOwnPropertySymbolsModule","re","$RegExp","exec","regexpUnsupportedDotAll","regexpUnsupportedNcg","nativeExec","nativeReplace","patchedExec","this","raw","strCopy","str","flags","replace","indexOf","lastIndex","UPDATES_LAST_INDEX_WRONG","MATCH","S","requireObjectCoercible","CONVERT_TO_STRING","undefined","charAt","require$$0","R","SPLIT","nativeSplit","maybeCallNative","lastLastIndex","arrayPush","string","internalSplit","unicodeMatching","rx","unicode","ignoreCase","multiline","UNSUPPORTED_Y","regexp","matcher","UNSCOPABLES","configurable","objectGetPrototypeOf","PrototypeOfArrayIteratorPrototype","CurrentIteratorPrototype","returnThis","arrayBufferNative","Int8Array","Uint8ClampedArrayPrototype","Uint8ClampedArray","TypedArray","TYPED_ARRAY_CONSTRUCTOR","Prototype","Int32Array","BigIntArrayConstructorsList","BigInt64Array","klass","isTypedArray","aTypedArray","isPrototypeOf","TypedArrayPrototype","KEY","createNonEnumerableProperty","NAME","number","abs","pow","log","LN2","pack","exponentLength","exponent","c","unpack","buffer","nBits","eMax","mantissa","sign","mantissaLength","getOwnPropertyNames","defineProperty","require$$1","PROPER_FUNCTION_NAME","FunctionName","PROPER","setInternalState","$DataViewPrototype","$DataView","PROTOTYPE","intIndex","toIndex","count","byteLength","WRONG_INDEX","bytes","isLittleEndian","conversion","DataView","DATA_VIEW","byteOffset","packFloat32","aTypedArrayConstructor","typedArrayFrom","aConstructor","constructor","arraySpeciesCreate","originalArray","IS_SOME","IS_EVERY","IS_FIND_INDEX","TYPE","self","toLength","push","typedArrayConstructor","commonjsHelpers.createCommonjsModule","module","forEach","nativeGetOwnPropertyDescriptor","getOwnPropertyDescriptorModule","ArrayBufferModule","fromList","result","isArrayBuffer","isTypedArrayIndex","wrappedDefineProperty","wrapper","CLAMPED","CONSTRUCTOR_NAME","offset","BYTES","$len","Uint8Array","data","init","len","to","toAbsoluteIndex","end","from","arrayFromConstructorAndList","ArrayBufferViewCore","$filter","filter","arrayKeys","ArrayIterators","arrayEntries","exportTypedArrayMethod","nativeTypedArrayIterator","PROPER_ARRAY_VALUES_NAME","arrayMethodIsStrict","STRICT_METHOD","$map","map","IS_RIGHT","that","callbackfn","mergeSort","comparefn","array","j","right","Uint16Array","nativeSort","sort","STABLE_SORT","FF","WEBKIT","mod","$toLocaleString","FORCED","Uint8ArrayPrototype","arrayToString","arrayJoin","join","$includes","notARegexp","METHOD_NAME","Uint32Array","TO_STRING","RegExpPrototype","nativeToString","NOT_GENERIC","k","FAILS_ON_UNDEFINED","x","u32","UZIP","eocd","rUi","_readLocal","roff","out","csize","usize","onlyNames","rUs","nlen","buf","adler","crc","level","deflateRaw","p","cpr","zpd","file","bin","sizeUTF8","tot","o","_writeHeader","ioff","wUi","ext","obj","n","off","table","buff","charCodeAt","_goodIndex","_hash","putsE","_putsE","dlen","li","mch","lits","dst","lgi","dgi","lc","cvrd","ci","cl","U","pos","l0","BTYPE","o0","makeCodes","dtree","itree","si","dxb","p8","dset","b","tree","lz","l","_hufTree","list","hl","hst","l2","slice","maxl","MAXL","lit","bCost","MD","dbt","arr","v","ch","ltree","u8","noBuf","HLIT","HDIST","HCLEN","ML","bitsE","ttree","mx1","dmap","ebs","ldef","_check","lmap","LL","_bitsE","_copyOut","bl_count","MAX_BITS","dt","flmap","u16","fdmap","strt","rev15","sv","exb","w","height","h","img","frames","fh","frm","dispose","bpp","area","bf32","ctype","depth","tabs","tRNS","ts","ti","ap","y","bf","qi","cj","t0","di","gr","al","tr","readASCII","doff","num_frames","num_plays","del","fd","readUint","text","keyw","readUTF8","pl","PLTE","foff","bpl","interlace","CgBI","UPNG","inflateRaw","decode","_inflate","dd","_filterZero","_readInterlace","H","N","m","Z","W","A","u","r","D","X","Y","e","I","M","starting_row","row_increment","pass","cr","cc","row","starting_col","bpll","col","cbpp","sh","_paeth","pa","pc","s","fb","ifa","tb","fr","fg","mode","fa","sb","ba","bufs","nimg","encode","_main","ac","_bin","wUs","wAs","dl","anim","leng","sRGB","pHYs","loop","cimg","imgd","nh","onlyBlend","inds","nbufs","cof","bln","ind","ilen","img32","inj","gotAlpha","frms","nx","tlim","forbidPrev","alwaysBlend","pimg","mix","evenCrd","sarea","min","miY","r0","miX","_updateFrame","rect","width","U8","pimg32","cx","miy","blend","rec","ftry","opts","paeth","oimg","nimg32","KD","quantize","getKDtree","root","nd","err","i0","maxL","splitPixels","i1","node","left","planeDst","ln","rn","getNearest","q","d0","d1","d2","g","stats","m0","Rj","m1","iN","m3","Cov","round","M4","noff","isBrowser","window","cordova","CustomFileReader","reject","reader","onload","browserName","approximateBelowMaximumCanvasSizeOfBrowser","maximumCanvasSize","drawImageInCanvas","canvas","png","Blob","fileLastModified","$await_11","testImageCanvas","$await_13","view","getUint32","little","maxWidthOrHeight","maxSizeByte","classList","documentCreateElement","CollectionPrototype","searchParams","IS_CONSTRUCTOR","argumentsLength","mapfn","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexNonASCII","regexSeparators","OVERFLOW_ERROR","baseMinusTMin","stringFromCharCode","extra","digitToBasic","adapt","delta","numPoints","nativeFetch","getBuiltIn","NativeRequest","percentSequence","sequences","attribute","entries","query","URLSearchParamsIterator","createIteratorConstructor","Iterator","params","kind","entry","URLSearchParams","URLSearchParamsConstructor","URL_SEARCH_PARAMS","parseSearchParams","getInternalParamsState","entriesIndex","boundFunction","codeAt","NativeURL","getInternalSearchParamsState","getInternalURLState","getterFor","INVALID_AUTHORITY","INVALID_SCHEME","INVALID_PORT","ALPHA","DIGIT","HEX_START","OCT","DEC","LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE","INVALID_HOST","url","codePoints","C0ControlPercentEncodeSet","parseIPv4","parts","numbers","pieceIndex","ipv4Piece","maxLength","currLength","percentEncode","specialSchemes","https","ws","wss","isSpecial","includesCredentials","username","password","cannotHaveUsernamePasswordPort","isWindowsDriveLetter","second","path","segment","toLowerCase","SCHEME_START","PATH_OR_AUTHORITY","AUTHORITY","CANNOT_BE_A_BASE_URL_PATH","stateOverride","TAB_AND_NEW_LINE","arrayFrom","pointer","scheme","failure","fragment","searchParamsState","getPathname","URLPrototype","output","getProtocol","port","updateSearchParams","$toString","search","$forEach","propertyIsEnumerable","objectKeys","$startsWith","namedCaptures","position","maybeToString","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","REPLACE","searchValue","res","replaceValue","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","cnt","worker","script","blobArgs","Worker","createSourceObject","imageCompression","getDataUrlFromFile","getFilefromDataUrl","loadImage","drawFileInCanvas","canvasToFile","getExifOrientation","handleMaxWidthOrHeight","followExifOrientation","cleanupCanvasMemory","isAutoOrientationInBrowser","getBrowserName"],"mappings":"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"} \ No newline at end of file +{"version":3,"file":"browser-image-compression.js","sources":["../node_modules/core-js/internals/global.js","../node_modules/core-js/internals/is-pure.js","../node_modules/core-js/internals/to-object.js","../node_modules/core-js/internals/has.js","../node_modules/core-js/internals/uid.js","../node_modules/core-js/internals/is-callable.js","../node_modules/core-js/internals/get-built-in.js","../node_modules/core-js/internals/engine-v8-version.js","../node_modules/core-js/internals/fails.js","../node_modules/core-js/internals/well-known-symbol.js","../node_modules/core-js/internals/to-string-tag-support.js","../node_modules/core-js/internals/document-create-element.js","../node_modules/core-js/internals/an-object.js","../node_modules/core-js/internals/is-symbol.js","../node_modules/core-js/internals/try-to-string.js","../node_modules/core-js/internals/a-callable.js","../node_modules/core-js/internals/get-method.js","../node_modules/core-js/internals/ordinary-to-primitive.js","../node_modules/core-js/internals/to-primitive.js","../node_modules/core-js/internals/to-property-key.js","../node_modules/core-js/internals/create-property-descriptor.js","../node_modules/core-js/internals/create-non-enumerable-property.js","../node_modules/core-js/internals/inspect-source.js","../node_modules/core-js/internals/hidden-keys.js","../node_modules/core-js/internals/internal-state.js","../node_modules/core-js/internals/function-name.js","../node_modules/core-js/internals/redefine.js","../node_modules/core-js/internals/classof-raw.js","../node_modules/core-js/internals/classof.js","../node_modules/core-js/internals/object-property-is-enumerable.js","../node_modules/core-js/internals/indexed-object.js","../node_modules/core-js/internals/to-integer.js","../node_modules/core-js/internals/to-absolute-index.js","../node_modules/core-js/internals/array-includes.js","../node_modules/core-js/internals/object-keys-internal.js","../node_modules/core-js/internals/object-get-own-property-symbols.js","../node_modules/core-js/internals/copy-constructor-properties.js","../node_modules/core-js/internals/is-forced.js","../node_modules/core-js/internals/export.js","../node_modules/core-js/internals/redefine-all.js","../node_modules/core-js/internals/a-possible-prototype.js","../node_modules/core-js/internals/object-set-prototype-of.js","../node_modules/core-js/internals/set-to-string-tag.js","../node_modules/core-js/internals/set-species.js","../node_modules/core-js/internals/an-instance.js","../node_modules/core-js/internals/iterators.js","../node_modules/core-js/internals/is-array-iterator-method.js","../node_modules/core-js/internals/function-bind-context.js","../node_modules/core-js/internals/get-iterator.js","../node_modules/core-js/internals/iterator-close.js","../node_modules/core-js/internals/iterate.js","../node_modules/core-js/internals/check-correctness-of-iteration.js","../node_modules/core-js/internals/is-constructor.js","../node_modules/core-js/internals/a-constructor.js","../node_modules/core-js/internals/species-constructor.js","../node_modules/core-js/internals/task.js","../node_modules/core-js/internals/microtask.js","../node_modules/core-js/internals/new-promise-capability.js","../node_modules/core-js/internals/host-report-errors.js","../node_modules/core-js/internals/perform.js","../node_modules/core-js/internals/engine-is-browser.js","../node_modules/core-js/modules/es.promise.js","../node_modules/core-js/internals/object-create.js","../node_modules/core-js/internals/to-string.js","../node_modules/core-js/internals/whitespaces.js","../node_modules/core-js/internals/string-trim.js","../node_modules/core-js/modules/es.number.constructor.js","../node_modules/core-js/modules/es.function.name.js","../node_modules/core-js/internals/object-assign.js","../node_modules/core-js/internals/regexp-sticky-helpers.js","../node_modules/core-js/internals/regexp-unsupported-dot-all.js","../node_modules/core-js/internals/regexp-unsupported-ncg.js","../node_modules/core-js/internals/regexp-exec.js","../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../node_modules/core-js/internals/is-regexp.js","../node_modules/core-js/internals/string-multibyte.js","../node_modules/core-js/internals/advance-string-index.js","../node_modules/core-js/internals/regexp-exec-abstract.js","../node_modules/core-js/modules/es.string.split.js","../node_modules/core-js/modules/es.string.match.js","../node_modules/core-js/internals/add-to-unscopables.js","../node_modules/core-js/internals/object-get-prototype-of.js","../node_modules/core-js/internals/iterators-core.js","../node_modules/core-js/internals/define-iterator.js","../node_modules/core-js/internals/array-buffer-native.js","../node_modules/core-js/internals/array-buffer-view-core.js","../node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","../node_modules/core-js/internals/to-index.js","../node_modules/core-js/internals/ieee754.js","../node_modules/core-js/internals/array-buffer.js","../node_modules/core-js/internals/typed-array-from.js","../node_modules/core-js/internals/array-species-constructor.js","../node_modules/core-js/internals/array-species-create.js","../node_modules/core-js/internals/array-iteration.js","../node_modules/core-js/internals/typed-array-constructor.js","../node_modules/core-js/modules/es.typed-array.uint8-array.js","../node_modules/core-js/internals/array-copy-within.js","../node_modules/core-js/internals/array-from-constructor-and-list.js","../node_modules/core-js/internals/typed-array-species-constructor.js","../node_modules/core-js/modules/es.typed-array.filter.js","../node_modules/core-js/modules/es.typed-array.iterator.js","../node_modules/core-js/modules/es.typed-array.join.js","../node_modules/core-js/internals/array-method-is-strict.js","../node_modules/core-js/internals/array-last-index-of.js","../node_modules/core-js/modules/es.typed-array.map.js","../node_modules/core-js/internals/array-reduce.js","../node_modules/core-js/modules/es.typed-array.reverse.js","../node_modules/core-js/modules/es.typed-array.set.js","../node_modules/core-js/modules/es.typed-array.slice.js","../node_modules/core-js/internals/array-sort.js","../node_modules/core-js/modules/es.typed-array.sort.js","../node_modules/core-js/modules/es.typed-array.to-locale-string.js","../node_modules/core-js/modules/es.typed-array.to-string.js","../node_modules/core-js/modules/es.array.includes.js","../node_modules/core-js/internals/not-a-regexp.js","../node_modules/core-js/internals/correct-is-regexp-logic.js","../node_modules/core-js/internals/array-method-has-species-support.js","../node_modules/core-js/modules/es.typed-array.uint32-array.js","../node_modules/core-js/modules/es.typed-array.uint16-array.js","../node_modules/core-js/modules/es.regexp.to-string.js","../node_modules/core-js/modules/es.array.sort.js","../node_modules/uzip/UZIP.js","../lib/UPNG.js","../lib/config/browser-name.js","../lib/utils.js","../lib/image-compression.js","../node_modules/core-js/modules/es.string.iterator.js","../node_modules/core-js/internals/dom-token-list-prototype.js","../node_modules/core-js/modules/web.dom-collections.iterator.js","../node_modules/core-js/internals/native-url.js","../node_modules/core-js/internals/array-from.js","../node_modules/core-js/internals/string-punycode-to-ascii.js","../node_modules/core-js/modules/web.url-search-params.js","../node_modules/core-js/modules/web.url.js","../node_modules/core-js/internals/array-for-each.js","../node_modules/core-js/modules/web.dom-collections.for-each.js","../node_modules/core-js/internals/object-to-array.js","../node_modules/core-js/modules/es.object.entries.js","../node_modules/core-js/modules/es.string.starts-with.js","../node_modules/core-js/internals/get-substitution.js","../node_modules/core-js/modules/es.string.replace.js","../node_modules/core-js/modules/es.array.concat.js","../lib/web-worker.js","../lib/index.js"],"sourcesContent":["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","module.exports = false;\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","// `isCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument === 'function';\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","module.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","module.exports = {};\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar has = require('../internals/has');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = has(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar has = require('../internals/has');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!has(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (argument) {\n if (typeof argument === 'object' || isCallable(argument)) return argument;\n throw TypeError(\"Can't set \" + String(argument) + ' as a prototype');\n};\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","module.exports = function (it, Constructor, name) {\n if (it instanceof Constructor) return it;\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n};\n","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var aCallable = require('../internals/a-callable');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aCallable(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(iteratorMethod.call(argument));\n throw TypeError(String(argument) + ' is not iterable');\n};\n","var anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = innerResult.call(iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw TypeError(String(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = constructorRegExp.exec;\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(function () { /* empty */ });\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(Object, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a constructor');\n};\n","var anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var argumentsLength = arguments.length;\n var i = 1;\n while (argumentsLength > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (isCallable(fn) ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","module.exports = typeof window == 'object';\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aCallable(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromiseConstructorPrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var classof = require('../internals/classof');\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a number');\n var it = toPrimitive(argument, 'number');\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nexports.UNSUPPORTED_Y = fails(function () {\n var re = $RegExp('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = $RegExp('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('.', 's');\n return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('(?b)', 'g');\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$c') !== 'bc';\n});\n","'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n // eslint-disable-next-line max-statements -- TODO\n patchedExec = function exec(string) {\n var re = this;\n var state = getInternalState(re);\n var str = toString(string);\n var raw = state.raw;\n var result, reCopy, lastIndex, match, i, object, group;\n\n if (raw) {\n raw.lastIndex = re.lastIndex;\n result = patchedExec.call(raw, str);\n re.lastIndex = raw.lastIndex;\n return result;\n }\n\n var groups = state.groups;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = str.slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str.charAt(re.lastIndex - 1) !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (match && groups) {\n match.groups = object = create(null);\n for (i = 0; i < groups.length; i++) {\n group = groups[i];\n object[group[0]] = match[group[1]];\n }\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n redefine(String.prototype, KEY, methods[0]);\n redefine(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var toInteger = require('../internals/to-integer');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.codePointAt` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (isCallable(exec)) {\n var result = exec.call(R, S);\n if (result !== null) anObject(result);\n return result;\n }\n if (classof(R) === 'RegExp') return regexpExec.call(R, S);\n throw TypeError('RegExp#exec called on incompatible receiver');\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = toString(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? splitter.call(separator, O, limit)\n : internalSplit.call(toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n if (res.done) return res.value;\n\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);\n return matcher ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var has = require('../internals/has');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (has(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n redefine(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n redefine(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;\n throw TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n redefine(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n redefine(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","/* eslint-disable no-new -- required for testing */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar FunctionName = require('../internals/function-name');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","var aConstructor = require('../internals/a-constructor');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar bind = require('../internals/function-bind-context');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var C = aConstructor(this);\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, step, iterator, next;\n if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n O = [];\n while (!(step = next.call(iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2], 2);\n }\n length = toLength(O.length);\n result = new (aTypedArrayConstructor(C))(length);\n for (i = 0; length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n};\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_REJECT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isInteger = require('../internals/is-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPropertyKey = require('../internals/to-property-key');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && !isSymbol(key)\n && key in target\n && isInteger(+key)\n && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n key = toPropertyKey(key);\n return isTypedArrayIndex(target, key)\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n key = toPropertyKey(key);\n if (isTypedArrayIndex(target, key)\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor);\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","module.exports = function (Constructor, list) {\n var index = 0;\n var length = list.length;\n var result = new Constructor(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n","var ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\n\n// a part of `TypedArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#typedarray-species-create\nmodule.exports = function (originalArray) {\n return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR]));\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values';\n\nvar typedArrayValues = function values() {\n return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('join', function join(separator) {\n return $join.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (typedArraySpeciesConstructor(O))(length);\n });\n});\n","var aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aCallable(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toOffset = require('../internals/to-offset');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = $slice.call(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","// TODO: use something more complex like timsort?\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n mergeSort(array.slice(0, middle), comparefn),\n mergeSort(array.slice(middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n var result = [];\n\n while (lindex < llength || rindex < rlength) {\n if (lindex < llength && rindex < rlength) {\n result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);\n } else {\n result.push(lindex < llength ? left[lindex++] : right[rindex++]);\n }\n } return result;\n};\n\nmodule.exports = mergeSort;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar toLength = require('../internals/to-length');\nvar internalSort = require('../internals/array-sort');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && Uint16Array.prototype.sort;\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !fails(function () {\n var array = new Uint16Array(2);\n array.sort(null);\n array.sort({});\n});\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n array.sort(function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n var array = this;\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort.call(array, comparefn);\n\n aTypedArray(array);\n var arrayLength = toLength(array.length);\n var items = Array(arrayLength);\n var index;\n\n for (index = 0; index < arrayLength; index++) {\n items[index] = array[index];\n }\n\n items = internalSort(array, getSortCompare(comparefn));\n\n for (index = 0; index < arrayLength; index++) {\n array[index] = items[index];\n }\n\n return array;\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint32', function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint16', function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = $toString(R.source);\n var rf = R.flags;\n var f = $toString(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn);\n\n var items = [];\n var arrayLength = toLength(array.length);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) items.push(array[index]);\n }\n\n items = internalSort(items, getSortCompare(comparefn));\n itemsLength = items.length;\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) delete array[index++];\n\n return array;\n }\n});\n","\r\n\r\nvar UZIP = {};\r\nif(typeof module == \"object\") module.exports = UZIP;\r\n\r\n\r\nUZIP[\"parse\"] = function(buf, onlyNames)\t// ArrayBuffer\r\n{\r\n\tvar rUs = UZIP.bin.readUshort, rUi = UZIP.bin.readUint, o = 0, out = {};\r\n\tvar data = new Uint8Array(buf);\r\n\tvar eocd = data.length-4;\r\n\t\r\n\twhile(rUi(data, eocd)!=0x06054b50) eocd--;\r\n\t\r\n\tvar o = eocd;\r\n\to+=4;\t// sign = 0x06054b50\r\n\to+=4; // disks = 0;\r\n\tvar cnu = rUs(data, o); o+=2;\r\n\tvar cnt = rUs(data, o); o+=2;\r\n\t\t\t\r\n\tvar csize = rUi(data, o); o+=4;\r\n\tvar coffs = rUi(data, o); o+=4;\r\n\t\r\n\to = coffs;\r\n\tfor(var i=0; i8514000) {\r\n\t\t\t//console.log(PUtils.readASCII(buf , 8514500, 500));\r\n\t\t\t//console.log(PUtils.readASCII(nbuf, 8514500, 500));\r\n\t\t}\r\n\t\tfor(var i=0; i>>4);\r\n\t//console.log(CM, CINFO,CMF,FLG);\r\n\treturn UZIP.inflateRaw(new Uint8Array(file.buffer, file.byteOffset+2, file.length-6), buf); \r\n}\r\nUZIP.deflate = function(data, opts/*, buf, off*/) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar off=0, buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tbuf[off]=120; buf[off+1]=156; off+=2;\r\n\toff = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\tvar crc = UZIP.adler(data, 0, data.length);\r\n\tbuf[off+0]=((crc>>>24)&255); \r\n\tbuf[off+1]=((crc>>>16)&255); \r\n\tbuf[off+2]=((crc>>> 8)&255); \r\n\tbuf[off+3]=((crc>>> 0)&255); \t\r\n\treturn new Uint8Array(buf.buffer, 0, off+4);\r\n}\r\nUZIP.deflateRaw = function(data, opts) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tvar off = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\treturn new Uint8Array(buf.buffer, 0, off);\r\n}\r\n\r\n\r\nUZIP.encode = function(obj, noCmpr) {\r\n\tif(noCmpr==null) noCmpr=false;\r\n\tvar tot = 0, wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar zpd = {};\r\n\tfor(var p in obj) { var cpr = !UZIP._noNeed(p) && !noCmpr, buf = obj[p], crc = UZIP.crc.crc(buf,0,buf.length); \r\n\t\tzpd[p] = { cpr:cpr, usize:buf.length, crc:crc, file: (cpr ? UZIP.deflateRaw(buf) : buf) }; }\r\n\t\r\n\tfor(var p in zpd) tot += zpd[p].file.length + 30 + 46 + 2*UZIP.bin.sizeUTF8(p);\r\n\ttot += 22;\r\n\t\r\n\tvar data = new Uint8Array(tot), o = 0;\r\n\tvar fof = []\r\n\t\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 0);\r\n\t}\r\n\tvar i=0, ioff = o;\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 1, fof[i++]);\t\t\r\n\t}\r\n\tvar csize = o-ioff;\r\n\t\r\n\twUi(data, o, 0x06054b50); o+=4;\r\n\to += 4; // disks\r\n\twUs(data, o, i); o += 2;\r\n\twUs(data, o, i); o += 2;\t// number of c d records\r\n\twUi(data, o, csize); o += 4;\r\n\twUi(data, o, ioff ); o += 4;\r\n\to += 2;\r\n\treturn data.buffer;\r\n}\r\n// no need to compress .PNG, .ZIP, .JPEG ....\r\nUZIP._noNeed = function(fn) { var ext = fn.split(\".\").pop().toLowerCase(); return \"png,jpg,jpeg,zip\".indexOf(ext)!=-1; }\r\n\r\nUZIP._writeHeader = function(data, o, p, obj, t, roff)\r\n{\r\n\tvar wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar file = obj.file;\r\n\t\r\n\twUi(data, o, t==0 ? 0x04034b50 : 0x02014b50); o+=4; // sign\r\n\tif(t==1) o+=2; // ver made by\r\n\twUs(data, o, 20); o+=2;\t// ver\r\n\twUs(data, o, 0); o+=2; // gflip\r\n\twUs(data, o, obj.cpr?8:0); o+=2;\t// cmpr\r\n\t\t\r\n\twUi(data, o, 0); o+=4;\t// time\t\t\r\n\twUi(data, o, obj.crc); o+=4;\t// crc32\r\n\twUi(data, o, file.length); o+=4;\t// csize\r\n\twUi(data, o, obj.usize); o+=4;\t// usize\r\n\t\t\r\n\twUs(data, o, UZIP.bin.sizeUTF8(p)); o+=2;\t// nlen\r\n\twUs(data, o, 0); o+=2;\t// elen\r\n\t\r\n\tif(t==1) {\r\n\t\to += 2; // comment length\r\n\t\to += 2; // disk number\r\n\t\to += 6; // attributes\r\n\t\twUi(data, o, roff); o+=4;\t// usize\r\n\t}\r\n\tvar nlen = UZIP.bin.writeUTF8(data, o, p); o+= nlen;\t\r\n\tif(t==0) { data.set(file, o); o += file.length; }\r\n\treturn o;\r\n}\r\n\r\n\r\n\r\n\r\n\r\nUZIP.crc = {\r\n\ttable : ( function() {\r\n\t var tab = new Uint32Array(256);\r\n\t for (var n=0; n<256; n++) {\r\n\t\t\tvar c = n;\r\n\t\t\tfor (var k=0; k<8; k++) {\r\n\t\t\t\tif (c & 1) c = 0xedb88320 ^ (c >>> 1);\r\n\t\t\t\telse c = c >>> 1;\r\n\t\t\t}\r\n\t\t\ttab[n] = c; } \r\n\t\treturn tab; })(),\r\n\tupdate : function(c, buf, off, len) {\r\n\t\tfor (var i=0; i>> 8);\r\n\t\treturn c;\r\n\t},\r\n\tcrc : function(b,o,l) { return UZIP.crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\r\n}\r\nUZIP.adler = function(data,o,len) {\r\n\tvar a = 1, b = 0;\r\n\tvar off = o, end=o+len;\r\n\twhile(off>8)&255; },\r\n\treadUint : function(buff,p) { return (buff[p+3]*(256*256*256)) + ((buff[p+2]<<16) | (buff[p+1]<< 8) | buff[p]); },\r\n\twriteUint : function(buff,p,n){ buff[p]=n&255; buff[p+1]=(n>>8)&255; buff[p+2]=(n>>16)&255; buff[p+3]=(n>>24)&255; },\r\n\treadASCII : function(buff,p,l){ var s = \"\"; for(var i=0; i> 6)); buff[p+i+1] = (128|((code>> 0)&63)); i+=2; }\r\n\t\t\telse if((code&(0xffffffff-(1<<16)+1))==0) { buff[p+i] = (224|(code>>12)); buff[p+i+1] = (128|((code>> 6)&63)); buff[p+i+2] = (128|((code>>0)&63)); i+=3; }\r\n\t\t\telse if((code&(0xffffffff-(1<<21)+1))==0) { buff[p+i] = (240|(code>>18)); buff[p+i+1] = (128|((code>>12)&63)); buff[p+i+2] = (128|((code>>6)&63)); buff[p+i+3] = (128|((code>>0)&63)); i+=4; }\r\n\t\t\telse throw \"e\";\r\n\t\t}\r\n\t\treturn i;\r\n\t},\r\n\tsizeUTF8 : function(str) {\r\n\t\tvar strl = str.length, i=0;\r\n\t\tfor(var ci=0; ci>>3;\r\n\t}\r\n\r\n\tvar lits = U.lits, strt=U.strt, prev=U.prev, li=0, lc=0, bs=0, ebits=0, c=0, nc=0; // last_item, literal_count, block_start\r\n\tif(dlen>2) { nc=UZIP.F._hash(data,0); strt[nc]=0; }\r\n\tvar nmch=0,nmci=0;\r\n\t\r\n\tfor(i=0; i14000 || lc>26697) && (dlen-i)>100) {\r\n\t\t\t\tif(cvrd>>16)>>16)>(mch>>>16)) mch=0;\r\n\t\t\t}//*/\r\n\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\tif(mch!=0) { \r\n\t\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\t\tvar lgi = goodIndex(len, U.of0); U.lhst[257+lgi]++; \r\n\t\t\t\tvar dgi = goodIndex(dst, U.df0); U.dhst[ dgi]++; ebits += U.exb[lgi] + U.dxb[dgi]; \r\n\t\t\t\tlits[li] = (len<<23)|(i-cvrd); lits[li+1] = (dst<<16)|(lgi<<8)|dgi; li+=2;\r\n\t\t\t\tcvrd = i + len; \r\n\t\t\t}\r\n\t\t\telse {\tU.lhst[data[i]]++; }\r\n\t\t\tlc++;\r\n\t\t}\r\n\t}\r\n\tif(bs!=i || data.length==0) {\r\n\t\tif(cvrd>>3;\r\n}\r\nUZIP.F._bestMatch = function(data, i, prev, c, nice, chain) {\r\n\tvar ci = (i&0x7fff), pi=prev[ci]; \r\n\t//console.log(\"----\", i);\r\n\tvar dif = ((ci-pi + (1<<15)) & 0x7fff); if(pi==ci || c!=UZIP.F._hash(data,i-dif)) return 0;\r\n\tvar tl=0, td=0; // top length, top distance\r\n\tvar dlim = Math.min(0x7fff, i);\r\n\twhile(dif<=dlim && --chain!=0 && pi!=ci /*&& c==UZIP.F._hash(data,i-dif)*/) {\r\n\t\tif(tl==0 || (data[i+tl]==data[i+tl-dif])) {\r\n\t\t\tvar cl = UZIP.F._howLong(data, i, dif);\r\n\t\t\tif(cl>tl) { \r\n\t\t\t\ttl=cl; td=dif; if(tl>=nice) break; //* \r\n\t\t\t\tif(dif+2maxd) { maxd=curd; pi = ei; }\r\n\t\t\t\t} //*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tci=pi; pi = prev[ci];\r\n\t\tdif += ((ci-pi + (1<<15)) & 0x7fff);\r\n\t}\r\n\treturn (tl<<16)|td;\r\n}\r\nUZIP.F._howLong = function(data, i, dif) {\r\n\tif(data[i]!=data[i-dif] || data[i+1]!=data[i+1-dif] || data[i+2]!=data[i+2-dif]) return 0;\r\n\tvar oi=i, l = Math.min(data.length, i+258); i+=3;\r\n\t//while(i+4>>23), end = off+(qb&((1<<23)-1));\r\n\t\t\twhile(off>16), lgi=(qc>>8)&255, dgi=(qc&255);\r\n\t\t\t\tpos = UZIP.F._writeLit(257+lgi, ltree, out, pos);\r\n\t\t\t\tputsE(out, pos, len-U.of0[lgi]); pos+=U.exb[lgi];\r\n\t\t\t\t\r\n\t\t\t\tpos = UZIP.F._writeLit(dgi, dtree, out, pos);\r\n\t\t\t\tputsF(out, pos, dst-U.df0[dgi]); pos+=U.dxb[dgi]; off+=len;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpos = UZIP.F._writeLit(256, ltree, out, pos);\r\n\t}\r\n\t//console.log(pos-opos, fxdSize, dynSize, cstSize);\r\n\treturn pos;\r\n}\r\nUZIP.F._copyExact = function(data,off,len,out,pos) {\r\n\tvar p8 = (pos>>>3);\r\n\tout[p8]=(len); out[p8+1]=(len>>>8); out[p8+2]=255-out[p8]; out[p8+3]=255-out[p8+1]; p8+=4;\r\n\tout.set(new Uint8Array(data.buffer, off, len), p8);\r\n\t//for(var i=0; i4 && U.itree[(U.ordr[numh-1]<<1)+1]==0) numh--;\r\n\treturn [ML, MD, MH, numl, numd, numh, lset, dset];\r\n}\r\nUZIP.F.getSecond= function(a) { var b=[]; for(var i=0; i>1)+\",\"; return b; }\r\nUZIP.F.contSize = function(tree, hst) { var s=0; for(var i=0; i15) { UZIP.F._putsE(out, pos, rst, rsl); pos+=rsl; }\r\n\t}\r\n\treturn pos;\r\n}\r\nUZIP.F._lenCodes = function(tree, set) {\r\n\tvar len=tree.length; while(len!=2 && tree[len-1]==0) len-=2; // when no distances, keep one code with length 0\r\n\tfor(var i=0; i>>1, 138);\r\n\t\t\tif(zc<11) set.push(17, zc-3);\r\n\t\t\telse set.push(18, zc-11);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse if(l==prv && nxt==l && nnxt==l) {\r\n\t\t\tvar lz = i+5;\r\n\t\t\twhile(lz+2>>1, 6);\r\n\t\t\tset.push(16, zc-3);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse set.push(l, 0);\r\n\t}\r\n\treturn len>>>1;\r\n}\r\nUZIP.F._hufTree = function(hst, tree, MAXL) {\r\n\tvar list=[], hl = hst.length, tl=tree.length, i=0;\r\n\tfor(i=0; iMAXL) { UZIP.F.restrictDepth(l2, MAXL, maxl); maxl = MAXL; }\r\n\tfor(i=0; iMD) { var od=dps[i].d; dps[i].d=MD; dbt+=bCost-(1<<(maxl-od)); } else break;\r\n\tdbt = dbt>>>(maxl-MD);\r\n\twhile(dbt>0) { var od=dps[i].d; if(od=0; i--) if(dps[i].d==MD && dbt<0) { dps[i].d--; dbt++; } if(dbt!=0) console.log(\"debt left\");\r\n}\r\n\r\nUZIP.F._goodIndex = function(v, arr) {\r\n\tvar i=0; if(arr[i|16]<=v) i|=16; if(arr[i|8]<=v) i|=8; if(arr[i|4]<=v) i|=4; if(arr[i|2]<=v) i|=2; if(arr[i|1]<=v) i|=1; return i;\r\n}\r\nUZIP.F._writeLit = function(ch, ltree, out, pos) {\r\n\tUZIP.F._putsF(out, pos, ltree[ch<<1]);\r\n\treturn pos+ltree[(ch<<1)+1];\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nUZIP.F.inflate = function(data, buf) {\r\n\tvar u8=Uint8Array;\r\n\tif(data[0]==3 && data[1]==0) return (buf ? buf : new u8(0));\r\n\tvar F=UZIP.F, bitsF = F._bitsF, bitsE = F._bitsE, decodeTiny = F._decodeTiny, makeCodes = F.makeCodes, codes2map=F.codes2map, get17 = F._get17;\r\n\tvar U = F.U;\r\n\t\r\n\tvar noBuf = (buf==null);\r\n\tif(noBuf) buf = new u8((data.length>>>2)<<3);\r\n\t\r\n\tvar BFINAL=0, BTYPE=0, HLIT=0, HDIST=0, HCLEN=0, ML=0, MD=0; \t\r\n\tvar off = 0, pos = 0;\r\n\tvar lmap, dmap;\r\n\t\r\n\twhile(BFINAL==0) {\t\t\r\n\t\tBFINAL = bitsF(data, pos , 1);\r\n\t\tBTYPE = bitsF(data, pos+1, 2); pos+=3;\r\n\t\t//console.log(BFINAL, BTYPE);\r\n\t\t\r\n\t\tif(BTYPE==0) {\r\n\t\t\tif((pos&7)!=0) pos+=8-(pos&7);\r\n\t\t\tvar p8 = (pos>>>3)+4, len = data[p8-4]|(data[p8-3]<<8); //console.log(len);//bitsF(data, pos, 16), \r\n\t\t\tif(noBuf) buf=UZIP.F._check(buf, off+len);\r\n\t\t\tbuf.set(new u8(data.buffer, data.byteOffset+p8, len), off);\r\n\t\t\t//for(var i=0; itl)tl=l; } pos+=3*HCLEN; //console.log(itree);\r\n\t\t\tmakeCodes(U.itree, tl);\r\n\t\t\tcodes2map(U.itree, tl, U.imap);\r\n\t\t\t\r\n\t\t\tlmap = U.lmap; dmap = U.dmap;\r\n\t\t\t\r\n\t\t\tpos = decodeTiny(U.imap, (1<>>24))-1; pos+=(ml&0xffffff);\r\n\t\t\tmakeCodes(U.ltree, mx0);\r\n\t\t\tcodes2map(U.ltree, mx0, lmap);\r\n\t\t\t\r\n\t\t\t//var md = decodeTiny(U.imap, (1<>>24))-1; pos+=(md&0xffffff);\r\n\t\t\tmakeCodes(U.dtree, mx1);\r\n\t\t\tcodes2map(U.dtree, mx1, dmap);\r\n\t\t}\r\n\t\t//var ooff=off, opos=pos;\r\n\t\twhile(true) {\r\n\t\t\tvar code = lmap[get17(data, pos) & ML]; pos += code&15;\r\n\t\t\tvar lit = code>>>4; //U.lhst[lit]++; \r\n\t\t\tif((lit>>>8)==0) { buf[off++] = lit; }\r\n\t\t\telse if(lit==256) { break; }\r\n\t\t\telse {\r\n\t\t\t\tvar end = off+lit-254;\r\n\t\t\t\tif(lit>264) { var ebs = U.ldef[lit-257]; end = off + (ebs>>>3) + bitsE(data, pos, ebs&7); pos += ebs&7; }\r\n\t\t\t\t//UZIP.F.dst[end-off]++;\r\n\t\t\t\t\r\n\t\t\t\tvar dcode = dmap[get17(data, pos) & MD]; pos += dcode&15;\r\n\t\t\t\tvar dlit = dcode>>>4;\r\n\t\t\t\tvar dbs = U.ddef[dlit], dst = (dbs>>>4) + bitsF(data, pos, dbs&15); pos += dbs&15;\r\n\t\t\t\t\r\n\t\t\t\t//var o0 = off-dst, stp = Math.min(end-off, dst);\r\n\t\t\t\t//if(stp>20) while(off>>3);\r\n\t}\r\n\t//console.log(UZIP.F.dst);\r\n\t//console.log(tlen, dlen, off-tlen+tcnt);\r\n\treturn buf.length==off ? buf : buf.slice(0,off);\r\n}\r\nUZIP.F._check=function(buf, len) {\r\n\tvar bl=buf.length; if(len<=bl) return buf;\r\n\tvar nbuf = new Uint8Array(Math.max(bl<<1,len)); nbuf.set(buf,0);\r\n\t//for(var i=0; i>>4; \r\n\t\tif(lit<=15) { tree[i]=lit; i++; }\r\n\t\telse {\r\n\t\t\tvar ll = 0, n = 0;\r\n\t\t\tif(lit==16) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 2)); pos += 2; ll = tree[i-1];\r\n\t\t\t}\r\n\t\t\telse if(lit==17) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 3)); pos += 3;\r\n\t\t\t}\r\n\t\t\telse if(lit==18) {\r\n\t\t\t\tn = (11 + bitsE(data, pos, 7)); pos += 7;\r\n\t\t\t}\r\n\t\t\tvar ni = i+n;\r\n\t\t\twhile(i>>1;\r\n\twhile(imx)mx=v; i++; }\r\n\twhile(i>1;\r\n\t\tvar cl = tree[i+1], val = (lit<<4)|cl; // : (0x8000 | (U.of0[lit-257]<<7) | (U.exb[lit-257]<<4) | cl);\r\n\t\tvar rest = (MAX_BITS-cl), i0 = tree[i]<>>(15-MAX_BITS);\r\n\t\twhile(i0!=i1) {\r\n\t\t\tvar p0 = r15[i0]>>>(15-MAX_BITS);\r\n\t\t\tmap[p0]=val; i0++;\r\n\t\t}\r\n\t}\r\n}\r\nUZIP.F.revCodes = function(tree, MAX_BITS) {\r\n\tvar r15 = UZIP.F.U.rev15, imb = 15-MAX_BITS;\r\n\tfor(var i=0; i>>imb; }\r\n}\r\n\r\n// used only in deflate\r\nUZIP.F._putsE= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); }\r\nUZIP.F._putsF= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); dt[o+2]|=(val>>>16); }\r\n\r\nUZIP.F._bitsE= function(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) )>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16))>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8))>>>(pos&7))&511;\r\n} */\r\nUZIP.F._get17= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) )>>>(pos&7);\r\n}\r\nUZIP.F._get25= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) | (dt[(pos>>>3)+3]<<24) )>>>(pos&7);\r\n}\r\nUZIP.F.U = function(){\r\n\tvar u16=Uint16Array, u32=Uint32Array;\r\n\treturn {\r\n\t\tnext_code : new u16(16),\r\n\t\tbl_count : new u16(16),\r\n\t\tordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\r\n\t\tof0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\r\n\t\texb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\r\n\t\tldef : new u16(32),\r\n\t\tdf0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\r\n\t\tdxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\r\n\t\tddef : new u32(32),\r\n\t\tflmap: new u16( 512), fltree: [],\r\n\t\tfdmap: new u16( 32), fdtree: [],\r\n\t\tlmap : new u16(32768), ltree : [], ttree:[],\r\n\t\tdmap : new u16(32768), dtree : [],\r\n\t\timap : new u16( 512), itree : [],\r\n\t\t//rev9 : new u16( 512)\r\n\t\trev15: new u16(1<<15),\r\n\t\tlhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\r\n\t\tlits : new u32(15000),\r\n\t\tstrt : new u16(1<<16),\r\n\t\tprev : new u16(1<<15)\r\n\t}; \r\n} ();\r\n\r\n(function(){\t\r\n\tvar U = UZIP.F.U;\r\n\tvar len = 1<<15;\r\n\tfor(var i=0; i>> 1) | ((x & 0x55555555) << 1));\r\n\t\tx = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\r\n\t\tx = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\r\n\t\tx = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\r\n\t\tU.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\r\n\t}\r\n\t\r\n\tfunction pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\r\n\t\r\n\tfor(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\r\n\t\r\n\tpushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\r\n\t/*\r\n\tvar i = 0;\r\n\tfor(; i<=143; i++) U.fltree.push(0,8);\r\n\tfor(; i<=255; i++) U.fltree.push(0,9);\r\n\tfor(; i<=279; i++) U.fltree.push(0,7);\r\n\tfor(; i<=287; i++) U.fltree.push(0,8);\r\n\t*/\r\n\tUZIP.F.makeCodes(U.fltree, 9);\r\n\tUZIP.F.codes2map(U.fltree, 9, U.flmap);\r\n\tUZIP.F.revCodes (U.fltree, 9)\r\n\t\r\n\tpushV(U.fdtree,32,5);\r\n\t//for(i=0;i<32; i++) U.fdtree.push(0,5);\r\n\tUZIP.F.makeCodes(U.fdtree, 5);\r\n\tUZIP.F.codes2map(U.fdtree, 5, U.fdmap);\r\n\tUZIP.F.revCodes (U.fdtree, 5)\r\n\t\r\n\tpushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\r\n\t/*\r\n\tfor(var i=0; i< 19; i++) U.itree.push(0,0);\r\n\tfor(var i=0; i<286; i++) U.ltree.push(0,0);\r\n\tfor(var i=0; i< 30; i++) U.dtree.push(0,0);\r\n\tfor(var i=0; i<320; i++) U.ttree.push(0,0);\r\n\t*/\r\n})()\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","// https://github.com/photopea/UPNG.js/blob/c976240e62b0497167f8aafabd7889625f8b2016/UPNG.js\n\n// import * as pako from 'pako'\nimport * as UZIP from 'uzip';\n\nconst UPNG = {};\n\nUPNG.toRGBA8 = function (out) {\n const w = out.width; const\n h = out.height;\n if (out.tabs.acTL == null) return [UPNG.toRGBA8.decodeImage(out.data, w, h, out).buffer];\n\n const frms = [];\n if (out.frames[0].data == null) out.frames[0].data = out.data;\n\n const len = w * h * 4; const img = new Uint8Array(len); const empty = new Uint8Array(len); const\n prev = new Uint8Array(len);\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i];\n const fx = frm.rect.x; const fy = frm.rect.y; const fw = frm.rect.width; const\n fh = frm.rect.height;\n const fdata = UPNG.toRGBA8.decodeImage(frm.data, fw, fh, out);\n\n if (i != 0) for (var j = 0; j < len; j++) prev[j] = img[j];\n\n if (frm.blend == 0) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.blend == 1) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 1);\n\n frms.push(img.buffer.slice(0));\n\n if (frm.dispose == 0) {} else if (frm.dispose == 1) UPNG._copyTile(empty, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.dispose == 2) for (var j = 0; j < len; j++) img[j] = prev[j];\n }\n return frms;\n};\nUPNG.toRGBA8.decodeImage = function (data, w, h, out) {\n const area = w * h; const\n bpp = UPNG.decode._getBPP(out);\n const bpl = Math.ceil(w * bpp / 8);\t// bytes per line\n\n const bf = new Uint8Array(area * 4); const\n bf32 = new Uint32Array(bf.buffer);\n const { ctype } = out;\n const { depth } = out;\n const rs = UPNG._bin.readUshort;\n\n // console.log(ctype, depth);\n const time = Date.now();\n\n if (ctype == 6) { // RGB + alpha\n const qarea = area << 2;\n if (depth == 8) for (var i = 0; i < qarea; i += 4) { bf[i] = data[i]; bf[i + 1] = data[i + 1]; bf[i + 2] = data[i + 2]; bf[i + 3] = data[i + 3]; }\n if (depth == 16) for (var i = 0; i < qarea; i++) { bf[i] = data[i << 1]; }\n } else if (ctype == 2) {\t// RGB\n const ts = out.tabs.tRNS;\n if (ts == null) {\n if (depth == 8) for (var i = 0; i < area; i++) { var ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti]; }\n if (depth == 16) for (var i = 0; i < area; i++) { var ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti]; }\n } else {\n var tr = ts[0]; const tg = ts[1]; const\n tb = ts[2];\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti];\n if (data[ti] == tr && data[ti + 1] == tg && data[ti + 2] == tb) bf[qi + 3] = 0;\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti];\n if (rs(data, ti) == tr && rs(data, ti + 2) == tg && rs(data, ti + 4) == tb) bf[qi + 3] = 0;\n }\n }\n }\n } else if (ctype == 3) {\t// palette\n const p = out.tabs.PLTE;\n const ap = out.tabs.tRNS;\n const tl = ap ? ap.length : 0;\n // console.log(p, ap);\n if (depth == 1) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 3)] >> (7 - ((i & 7) << 0))) & 1); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 2) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 2)] >> (6 - ((i & 3) << 1))) & 3); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 4) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 1)] >> (4 - ((i & 1) << 2))) & 15); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var j = data[i]; var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n } else if (ctype == 4) {\t// gray + alpha\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 1; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 1];\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 2; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 2];\n }\n }\n } else if (ctype == 0) {\t// gray\n var tr = out.tabs.tRNS ? out.tabs.tRNS : -1;\n for (var y = 0; y < h; y++) {\n const off = y * bpl; const\n to = y * w;\n if (depth == 1) {\n for (var x = 0; x < w; x++) {\n var gr = 255 * ((data[off + (x >>> 3)] >>> (7 - ((x & 7)))) & 1); var\n al = (gr == tr * 255) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 2) {\n for (var x = 0; x < w; x++) {\n var gr = 85 * ((data[off + (x >>> 2)] >>> (6 - ((x & 3) << 1))) & 3); var\n al = (gr == tr * 85) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 4) {\n for (var x = 0; x < w; x++) {\n var gr = 17 * ((data[off + (x >>> 1)] >>> (4 - ((x & 1) << 2))) & 15); var\n al = (gr == tr * 17) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 8) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + x]; var\n al = (gr == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 16) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + (x << 1)]; var\n al = (rs(data, off + (x << i)) == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n }\n }\n }\n // console.log(Date.now()-time);\n return bf;\n};\n\nUPNG.decode = function (buff) {\n const data = new Uint8Array(buff); let offset = 8; const bin = UPNG._bin; const rUs = bin.readUshort; const\n rUi = bin.readUint;\n const out = { tabs: {}, frames: [] };\n const dd = new Uint8Array(data.length); let\n doff = 0;\t // put all IDAT data into it\n let fd; let\n foff = 0;\t// frames\n\n const mgck = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) if (data[i] != mgck[i]) throw 'The input is not a PNG file!';\n\n while (offset < data.length) {\n const len = bin.readUint(data, offset); offset += 4;\n const type = bin.readASCII(data, offset, 4); offset += 4;\n // console.log(type,len);\n\n if (type == 'IHDR') { UPNG.decode._IHDR(data, offset, out); } else if (type == 'CgBI') { out.tabs[type] = data.slice(offset, offset + 4); } else if (type == 'IDAT') {\n for (var i = 0; i < len; i++) dd[doff + i] = data[offset + i];\n doff += len;\n } else if (type == 'acTL') {\n out.tabs[type] = { num_frames: rUi(data, offset), num_plays: rUi(data, offset + 4) };\n fd = new Uint8Array(data.length);\n } else if (type == 'fcTL') {\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n const rct = {\n x: rUi(data, offset + 12), y: rUi(data, offset + 16), width: rUi(data, offset + 4), height: rUi(data, offset + 8),\n };\n let del = rUs(data, offset + 22); del = rUs(data, offset + 20) / (del == 0 ? 100 : del);\n const frm = {\n rect: rct, delay: Math.round(del * 1000), dispose: data[offset + 24], blend: data[offset + 25],\n };\n // console.log(frm);\n out.frames.push(frm);\n } else if (type == 'fdAT') {\n for (var i = 0; i < len - 4; i++) fd[foff + i] = data[offset + i + 4];\n foff += len - 4;\n } else if (type == 'pHYs') {\n out.tabs[type] = [bin.readUint(data, offset), bin.readUint(data, offset + 4), data[offset + 8]];\n } else if (type == 'cHRM') {\n out.tabs[type] = [];\n for (var i = 0; i < 8; i++) out.tabs[type].push(bin.readUint(data, offset + i * 4));\n } else if (type == 'tEXt' || type == 'zTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = bin.nextZero(data, offset);\n var keyw = bin.readASCII(data, offset, nz - offset);\n var text; var\n tl = offset + len - nz - 1;\n if (type == 'tEXt') text = bin.readASCII(data, nz + 1, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(nz + 2, nz + 2 + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'iTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = 0; let\n off = offset;\n nz = bin.nextZero(data, off);\n var keyw = bin.readASCII(data, off, nz - off); off = nz + 1;\n const cflag = data[off]; const\n cmeth = data[off + 1]; off += 2;\n nz = bin.nextZero(data, off);\n const ltag = bin.readASCII(data, off, nz - off); off = nz + 1;\n nz = bin.nextZero(data, off);\n const tkeyw = bin.readUTF8(data, off, nz - off); off = nz + 1;\n var text; var\n tl = len - (off - offset);\n if (cflag == 0) text = bin.readUTF8(data, off, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(off, off + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'PLTE') {\n out.tabs[type] = bin.readBytes(data, offset, len);\n } else if (type == 'hIST') {\n const pl = out.tabs.PLTE.length / 3;\n out.tabs[type] = []; for (var i = 0; i < pl; i++) out.tabs[type].push(rUs(data, offset + i * 2));\n } else if (type == 'tRNS') {\n if (out.ctype == 3) out.tabs[type] = bin.readBytes(data, offset, len);\n else if (out.ctype == 0) out.tabs[type] = rUs(data, offset);\n else if (out.ctype == 2) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n // else console.log(\"tRNS for unsupported color type\",out.ctype, len);\n } else if (type == 'gAMA') out.tabs[type] = bin.readUint(data, offset) / 100000;\n else if (type == 'sRGB') out.tabs[type] = data[offset];\n else if (type == 'bKGD') {\n if (out.ctype == 0 || out.ctype == 4) out.tabs[type] = [rUs(data, offset)];\n else if (out.ctype == 2 || out.ctype == 6) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n else if (out.ctype == 3) out.tabs[type] = data[offset];\n } else if (type == 'IEND') {\n break;\n }\n // else { log(\"unknown chunk type\", type, len); }\n offset += len;\n const crc = bin.readUint(data, offset); offset += 4;\n }\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n out.data = UPNG.decode._decompress(out, dd, out.width, out.height);\n\n delete out.compress; delete out.interlace; delete out.filter;\n return out;\n};\n\nUPNG.decode._decompress = function (out, dd, w, h) {\n var time = Date.now();\n const bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n buff = new Uint8Array((bpl + 1 + out.interlace) * h);\n if (out.tabs.CgBI) dd = UPNG.inflateRaw(dd, buff);\n else dd = UPNG.decode._inflate(dd, buff);\n // console.log(dd.length, buff.length);\n // console.log(Date.now()-time);\n\n var time = Date.now();\n if (out.interlace == 0) dd = UPNG.decode._filterZero(dd, out, 0, w, h);\n else if (out.interlace == 1) dd = UPNG.decode._readInterlace(dd, out);\n // console.log(Date.now()-time);\n return dd;\n};\n\nUPNG.decode._inflate = function (data, buff) { const out = UPNG.inflateRaw(new Uint8Array(data.buffer, 2, data.length - 6), buff); return out; };\nUPNG.inflateRaw = (function () {\n const H = {}; H.H = {}; H.H.N = function (N, W) {\n const R = Uint8Array; let i = 0; let m = 0; let J = 0; let h = 0; let Q = 0; let X = 0; let u = 0; let w = 0; let d = 0; let v; let C;\n if (N[0] == 3 && N[1] == 0) return W || new R(0); const V = H.H; const n = V.b; const A = V.e; const l = V.R; const M = V.n; const I = V.A; const e = V.Z; const b = V.m; const Z = W == null;\n if (Z)W = new R(N.length >>> 2 << 5); while (i == 0) {\n i = n(N, d, 1); m = n(N, d + 1, 2); d += 3; if (m == 0) {\n if ((d & 7) != 0)d += 8 - (d & 7);\n const D = (d >>> 3) + 4; const q = N[D - 4] | N[D - 3] << 8; if (Z)W = H.H.W(W, w + q); W.set(new R(N.buffer, N.byteOffset + D, q), w); d = D + q << 3;\n w += q; continue;\n } if (Z)W = H.H.W(W, w + (1 << 17)); if (m == 1) { v = b.J; C = b.h; X = (1 << 9) - 1; u = (1 << 5) - 1; } if (m == 2) {\n J = A(N, d, 5) + 257;\n h = A(N, d + 5, 5) + 1; Q = A(N, d + 10, 4) + 4; d += 14; const E = d; let j = 1; for (var c = 0; c < 38; c += 2) { b.Q[c] = 0; b.Q[c + 1] = 0; } for (var c = 0;\n c < Q; c++) { const K = A(N, d + c * 3, 3); b.Q[(b.X[c] << 1) + 1] = K; if (K > j)j = K; }d += 3 * Q; M(b.Q, j); I(b.Q, j, b.u); v = b.w; C = b.d;\n d = l(b.u, (1 << j) - 1, J + h, N, d, b.v); const r = V.V(b.v, 0, J, b.C); X = (1 << r) - 1; const S = V.V(b.v, J, h, b.D); u = (1 << S) - 1; M(b.C, r);\n I(b.C, r, v); M(b.D, S); I(b.D, S, C);\n } while (!0) {\n const T = v[e(N, d) & X]; d += T & 15; const p = T >>> 4; if (p >>> 8 == 0) { W[w++] = p; } else if (p == 256) { break; } else {\n let z = w + p - 254;\n if (p > 264) { const _ = b.q[p - 257]; z = w + (_ >>> 3) + A(N, d, _ & 7); d += _ & 7; } const $ = C[e(N, d) & u]; d += $ & 15; const s = $ >>> 4; const Y = b.c[s]; const a = (Y >>> 4) + n(N, d, Y & 15);\n d += Y & 15; while (w < z) { W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; }w = z;\n }\n }\n } return W.length == w ? W : W.slice(0, w);\n };\n H.H.W = function (N, W) { const R = N.length; if (W <= R) return N; const V = new Uint8Array(R << 1); V.set(N, 0); return V; };\n H.H.R = function (N, W, R, V, n, A) {\n const l = H.H.e; const M = H.H.Z; let I = 0; while (I < R) {\n const e = N[M(V, n) & W]; n += e & 15; const b = e >>> 4;\n if (b <= 15) { A[I] = b; I++; } else {\n let Z = 0; let m = 0; if (b == 16) { m = 3 + l(V, n, 2); n += 2; Z = A[I - 1]; } else if (b == 17) {\n m = 3 + l(V, n, 3);\n n += 3;\n } else if (b == 18) { m = 11 + l(V, n, 7); n += 7; } const J = I + m; while (I < J) { A[I] = Z; I++; }\n }\n } return n;\n }; H.H.V = function (N, W, R, V) {\n let n = 0; let A = 0; const l = V.length >>> 1;\n while (A < R) { const M = N[A + W]; V[A << 1] = 0; V[(A << 1) + 1] = M; if (M > n)n = M; A++; } while (A < l) { V[A << 1] = 0; V[(A << 1) + 1] = 0; A++; } return n;\n };\n H.H.n = function (N, W) {\n const R = H.H.m; const V = N.length; let n; let A; let l; var M; let I; const e = R.j; for (var M = 0; M <= W; M++)e[M] = 0; for (M = 1; M < V; M += 2)e[N[M]]++;\n const b = R.K; n = 0; e[0] = 0; for (A = 1; A <= W; A++) { n = n + e[A - 1] << 1; b[A] = n; } for (l = 0; l < V; l += 2) {\n I = N[l + 1]; if (I != 0) {\n N[l] = b[I];\n b[I]++;\n }\n }\n }; H.H.A = function (N, W, R) {\n const V = N.length; const n = H.H.m; const A = n.r; for (let l = 0; l < V; l += 2) {\n if (N[l + 1] != 0) {\n const M = l >> 1; const I = N[l + 1]; const e = M << 4 | I; const b = W - I; let Z = N[l] << b; const m = Z + (1 << b);\n while (Z != m) { const J = A[Z] >>> 15 - W; R[J] = e; Z++; }\n }\n }\n }; H.H.l = function (N, W) {\n const R = H.H.m.r; const V = 15 - W; for (let n = 0; n < N.length;\n n += 2) { const A = N[n] << W - N[n + 1]; N[n] = R[A] >>> V; }\n }; H.H.M = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; };\n H.H.I = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; N[V + 2] |= R >>> 16; }; H.H.e = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8) >>> (W & 7) & (1 << R) - 1; };\n H.H.b = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7) & (1 << R) - 1; }; H.H.Z = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7); };\n H.H.i = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16 | N[(W >>> 3) + 3] << 24) >>> (W & 7); }; H.H.m = (function () {\n const N = Uint16Array; const W = Uint32Array;\n return {\n K: new N(16), j: new N(16), X: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], S: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], T: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], q: new N(32), p: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], z: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], c: new W(32), J: new N(512), _: [], h: new N(32), $: [], w: new N(32768), C: [], v: [], d: new N(32768), D: [], u: new N(512), Q: [], r: new N(1 << 15), s: new W(286), Y: new W(30), a: new W(19), t: new W(15e3), k: new N(1 << 16), g: new N(1 << 15),\n };\n }());\n (function () {\n const N = H.H.m; const W = 1 << 15; for (var R = 0; R < W; R++) {\n let V = R; V = (V & 2863311530) >>> 1 | (V & 1431655765) << 1;\n V = (V & 3435973836) >>> 2 | (V & 858993459) << 2; V = (V & 4042322160) >>> 4 | (V & 252645135) << 4; V = (V & 4278255360) >>> 8 | (V & 16711935) << 8;\n N.r[R] = (V >>> 16 | V << 16) >>> 17;\n } function n(A, l, M) { while (l-- != 0)A.push(0, M); } for (var R = 0; R < 32; R++) {\n N.q[R] = N.S[R] << 3 | N.T[R];\n N.c[R] = N.p[R] << 4 | N.z[R];\n }n(N._, 144, 8); n(N._, 255 - 143, 9); n(N._, 279 - 255, 7); n(N._, 287 - 279, 8); H.H.n(N._, 9);\n H.H.A(N._, 9, N.J); H.H.l(N._, 9); n(N.$, 32, 5); H.H.n(N.$, 5); H.H.A(N.$, 5, N.h); H.H.l(N.$, 5); n(N.Q, 19, 0); n(N.C, 286, 0);\n n(N.D, 30, 0); n(N.v, 320, 0);\n }()); return H.H.N;\n}());\n\nUPNG.decode._readInterlace = function (data, out) {\n const w = out.width; const\n h = out.height;\n const bpp = UPNG.decode._getBPP(out); const cbpp = bpp >> 3; const\n bpl = Math.ceil(w * bpp / 8);\n const img = new Uint8Array(h * bpl);\n let di = 0;\n\n const starting_row = [0, 0, 4, 0, 2, 0, 1];\n const starting_col = [0, 4, 0, 2, 0, 1, 0];\n const row_increment = [8, 8, 8, 4, 4, 2, 2];\n const col_increment = [8, 8, 4, 4, 2, 2, 1];\n\n let pass = 0;\n while (pass < 7) {\n const ri = row_increment[pass]; const\n ci = col_increment[pass];\n let sw = 0; let\n sh = 0;\n let cr = starting_row[pass]; while (cr < h) { cr += ri; sh++; }\n let cc = starting_col[pass]; while (cc < w) { cc += ci; sw++; }\n const bpll = Math.ceil(sw * bpp / 8);\n UPNG.decode._filterZero(data, out, di, sw, sh);\n\n let y = 0; let\n row = starting_row[pass];\n while (row < h) {\n let col = starting_col[pass];\n let cdi = (di + y * bpll) << 3;\n\n while (col < w) {\n if (bpp == 1) {\n var val = data[cdi >> 3]; val = (val >> (7 - (cdi & 7))) & 1;\n img[row * bpl + (col >> 3)] |= (val << (7 - ((col & 7) << 0)));\n }\n if (bpp == 2) {\n var val = data[cdi >> 3]; val = (val >> (6 - (cdi & 7))) & 3;\n img[row * bpl + (col >> 2)] |= (val << (6 - ((col & 3) << 1)));\n }\n if (bpp == 4) {\n var val = data[cdi >> 3]; val = (val >> (4 - (cdi & 7))) & 15;\n img[row * bpl + (col >> 1)] |= (val << (4 - ((col & 1) << 2)));\n }\n if (bpp >= 8) {\n const ii = row * bpl + col * cbpp;\n for (let j = 0; j < cbpp; j++) img[ii + j] = data[(cdi >> 3) + j];\n }\n cdi += bpp; col += ci;\n }\n y++; row += ri;\n }\n if (sw * sh != 0) di += sh * (1 + bpll);\n pass += 1;\n }\n return img;\n};\n\nUPNG.decode._getBPP = function (out) {\n const noc = [1, null, 3, 1, 2, null, 4][out.ctype];\n return noc * out.depth;\n};\n\nUPNG.decode._filterZero = function (data, out, off, w, h) {\n let bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n paeth = UPNG.decode._paeth;\n bpp = Math.ceil(bpp / 8);\n\n let i = 0; let di = 1; let type = data[off]; let\n x = 0;\n\n if (type > 1) data[off] = [0, 0, 1][type - 2];\n if (type == 3) for (x = bpp; x < bpl; x++) data[x + 1] = (data[x + 1] + (data[x + 1 - bpp] >>> 1)) & 255;\n\n for (let y = 0; y < h; y++) {\n i = off + y * bpl; di = i + y + 1;\n type = data[di - 1]; x = 0;\n\n if (type == 0) for (; x < bpl; x++) data[i + x] = data[di + x];\n else if (type == 1) {\n for (; x < bpp; x++) data[i + x] = data[di + x];\n for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpp]);\n } else if (type == 2) { for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpl]); } else if (type == 3) {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + (data[i + x - bpl] >>> 1));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + ((data[i + x - bpl] + data[i + x - bpp]) >>> 1));\n } else {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + paeth(0, data[i + x - bpl], 0));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + paeth(data[i + x - bpp], data[i + x - bpl], data[i + x - bpp - bpl]));\n }\n }\n return data;\n};\n\nUPNG.decode._paeth = function (a, b, c) {\n const p = a + b - c; const pa = (p - a); const pb = (p - b); const\n pc = (p - c);\n if (pa * pa <= pb * pb && pa * pa <= pc * pc) return a;\n if (pb * pb <= pc * pc) return b;\n return c;\n};\n\nUPNG.decode._IHDR = function (data, offset, out) {\n const bin = UPNG._bin;\n out.width = bin.readUint(data, offset); offset += 4;\n out.height = bin.readUint(data, offset); offset += 4;\n out.depth = data[offset]; offset++;\n out.ctype = data[offset]; offset++;\n out.compress = data[offset]; offset++;\n out.filter = data[offset]; offset++;\n out.interlace = data[offset]; offset++;\n};\n\nUPNG._bin = {\n nextZero(data, p) { while (data[p] != 0) p++; return p; },\n readUshort(buff, p) { return (buff[p] << 8) | buff[p + 1]; },\n writeUshort(buff, p, n) { buff[p] = (n >> 8) & 255; buff[p + 1] = n & 255; },\n readUint(buff, p) { return (buff[p] * (256 * 256 * 256)) + ((buff[p + 1] << 16) | (buff[p + 2] << 8) | buff[p + 3]); },\n writeUint(buff, p, n) { buff[p] = (n >> 24) & 255; buff[p + 1] = (n >> 16) & 255; buff[p + 2] = (n >> 8) & 255; buff[p + 3] = n & 255; },\n readASCII(buff, p, l) { let s = ''; for (let i = 0; i < l; i++) s += String.fromCharCode(buff[p + i]); return s; },\n writeASCII(data, p, s) { for (let i = 0; i < s.length; i++) data[p + i] = s.charCodeAt(i); },\n readBytes(buff, p, l) { const arr = []; for (let i = 0; i < l; i++) arr.push(buff[p + i]); return arr; },\n pad(n) { return n.length < 2 ? `0${n}` : n; },\n readUTF8(buff, p, l) {\n let s = '';\n let ns;\n for (let i = 0; i < l; i++) s += `%${UPNG._bin.pad(buff[p + i].toString(16))}`;\n try { ns = decodeURIComponent(s); } catch (e) { return UPNG._bin.readASCII(buff, p, l); }\n return ns;\n },\n};\nUPNG._copyTile = function (sb, sw, sh, tb, tw, th, xoff, yoff, mode) {\n const w = Math.min(sw, tw); const\n h = Math.min(sh, th);\n let si = 0; let\n ti = 0;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n if (xoff >= 0 && yoff >= 0) { si = (y * sw + x) << 2; ti = ((yoff + y) * tw + xoff + x) << 2; } else { si = ((-yoff + y) * sw - xoff + x) << 2; ti = (y * tw + x) << 2; }\n\n if (mode == 0) { tb[ti] = sb[si]; tb[ti + 1] = sb[si + 1]; tb[ti + 2] = sb[si + 2]; tb[ti + 3] = sb[si + 3]; } else if (mode == 1) {\n var fa = sb[si + 3] * (1 / 255); var fr = sb[si] * fa; var fg = sb[si + 1] * fa; var\n fb = sb[si + 2] * fa;\n var ba = tb[ti + 3] * (1 / 255); var br = tb[ti] * ba; var bg = tb[ti + 1] * ba; var\n bb = tb[ti + 2] * ba;\n\n const ifa = 1 - fa; const oa = fa + ba * ifa; const\n ioa = (oa == 0 ? 0 : 1 / oa);\n tb[ti + 3] = 255 * oa;\n tb[ti + 0] = (fr + br * ifa) * ioa;\n tb[ti + 1] = (fg + bg * ifa) * ioa;\n tb[ti + 2] = (fb + bb * ifa) * ioa;\n } else if (mode == 2) {\t// copy only differences, otherwise zero\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) { tb[ti] = 0; tb[ti + 1] = 0; tb[ti + 2] = 0; tb[ti + 3] = 0; } else { tb[ti] = fr; tb[ti + 1] = fg; tb[ti + 2] = fb; tb[ti + 3] = fa; }\n } else if (mode == 3) {\t// check if can be blended\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) continue;\n // if(fa!=255 && ba!=0) return false;\n if (fa < 220 && ba > 20) return false;\n }\n }\n }\n return true;\n};\n\nUPNG.encode = function (bufs, w, h, ps, dels, tabs, forbidPlte) {\n if (ps == null) ps = 0;\n if (forbidPlte == null) forbidPlte = false;\n\n const nimg = UPNG.encode.compress(bufs, w, h, ps, [false, false, false, 0, forbidPlte]);\n UPNG.encode.compressPNG(nimg, -1);\n\n return UPNG.encode._main(nimg, w, h, dels, tabs);\n};\n\nUPNG.encodeLL = function (bufs, w, h, cc, ac, depth, dels, tabs) {\n const nimg = { ctype: 0 + (cc == 1 ? 0 : 2) + (ac == 0 ? 0 : 4), depth, frames: [] };\n\n const time = Date.now();\n const bipp = (cc + ac) * depth; const\n bipl = bipp * w;\n for (let i = 0; i < bufs.length; i++) {\n nimg.frames.push({\n rect: {\n x: 0, y: 0, width: w, height: h,\n },\n img: new Uint8Array(bufs[i]),\n blend: 0,\n dispose: 1,\n bpp: Math.ceil(bipp / 8),\n bpl: Math.ceil(bipl / 8),\n });\n }\n\n UPNG.encode.compressPNG(nimg, 0, true);\n\n const out = UPNG.encode._main(nimg, w, h, dels, tabs);\n return out;\n};\n\nUPNG.encode._main = function (nimg, w, h, dels, tabs) {\n if (tabs == null) tabs = {};\n const { crc } = UPNG.crc;\n const wUi = UPNG._bin.writeUint;\n const wUs = UPNG._bin.writeUshort;\n const wAs = UPNG._bin.writeASCII;\n let offset = 8; const anim = nimg.frames.length > 1; let\n pltAlpha = false;\n\n let leng = 8 + (16 + 5 + 4) /* + (9+4) */ + (anim ? 20 : 0);\n if (tabs.sRGB != null) leng += 8 + 1 + 4;\n if (tabs.pHYs != null) leng += 8 + 9 + 4;\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n for (var i = 0; i < dl; i++) if ((nimg.plte[i] >>> 24) != 255) pltAlpha = true;\n leng += (8 + dl * 3 + 4) + (pltAlpha ? (8 + dl * 1 + 4) : 0);\n }\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) leng += 38;\n leng += fr.cimg.length + 12;\n if (j != 0) leng += 4;\n }\n leng += 12;\n\n const data = new Uint8Array(leng);\n const wr = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) data[i] = wr[i];\n\n wUi(data, offset, 13); offset += 4;\n wAs(data, offset, 'IHDR'); offset += 4;\n wUi(data, offset, w); offset += 4;\n wUi(data, offset, h); offset += 4;\n data[offset] = nimg.depth; offset++; // depth\n data[offset] = nimg.ctype; offset++; // ctype\n data[offset] = 0; offset++; // compress\n data[offset] = 0; offset++; // filter\n data[offset] = 0; offset++; // interlace\n wUi(data, offset, crc(data, offset - 17, 17)); offset += 4; // crc\n\n // 13 bytes to say, that it is sRGB\n if (tabs.sRGB != null) {\n wUi(data, offset, 1); offset += 4;\n wAs(data, offset, 'sRGB'); offset += 4;\n data[offset] = tabs.sRGB; offset++;\n wUi(data, offset, crc(data, offset - 5, 5)); offset += 4; // crc\n }\n if (tabs.pHYs != null) {\n wUi(data, offset, 9); offset += 4;\n wAs(data, offset, 'pHYs'); offset += 4;\n wUi(data, offset, tabs.pHYs[0]); offset += 4;\n wUi(data, offset, tabs.pHYs[1]); offset += 4;\n data[offset] = tabs.pHYs[2];\t\t\toffset++;\n wUi(data, offset, crc(data, offset - 13, 13)); offset += 4; // crc\n }\n\n if (anim) {\n wUi(data, offset, 8); offset += 4;\n wAs(data, offset, 'acTL'); offset += 4;\n wUi(data, offset, nimg.frames.length); offset += 4;\n wUi(data, offset, tabs.loop != null ? tabs.loop : 0); offset += 4;\n wUi(data, offset, crc(data, offset - 12, 12)); offset += 4; // crc\n }\n\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n wUi(data, offset, dl * 3); offset += 4;\n wAs(data, offset, 'PLTE'); offset += 4;\n for (var i = 0; i < dl; i++) {\n const ti = i * 3; const c = nimg.plte[i]; const r = (c) & 255; const g = (c >>> 8) & 255; const\n b = (c >>> 16) & 255;\n data[offset + ti + 0] = r; data[offset + ti + 1] = g; data[offset + ti + 2] = b;\n }\n offset += dl * 3;\n wUi(data, offset, crc(data, offset - dl * 3 - 4, dl * 3 + 4)); offset += 4; // crc\n\n if (pltAlpha) {\n wUi(data, offset, dl); offset += 4;\n wAs(data, offset, 'tRNS'); offset += 4;\n for (var i = 0; i < dl; i++) data[offset + i] = (nimg.plte[i] >>> 24) & 255;\n offset += dl;\n wUi(data, offset, crc(data, offset - dl - 4, dl + 4)); offset += 4; // crc\n }\n }\n\n let fi = 0;\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) {\n wUi(data, offset, 26); offset += 4;\n wAs(data, offset, 'fcTL'); offset += 4;\n wUi(data, offset, fi++); offset += 4;\n wUi(data, offset, fr.rect.width); offset += 4;\n wUi(data, offset, fr.rect.height); offset += 4;\n wUi(data, offset, fr.rect.x); offset += 4;\n wUi(data, offset, fr.rect.y); offset += 4;\n wUs(data, offset, dels[j]); offset += 2;\n wUs(data, offset, 1000); offset += 2;\n data[offset] = fr.dispose; offset++;\t// dispose\n data[offset] = fr.blend; offset++;\t// blend\n wUi(data, offset, crc(data, offset - 30, 30)); offset += 4; // crc\n }\n\n const imgd = fr.cimg; var\n dl = imgd.length;\n wUi(data, offset, dl + (j == 0 ? 0 : 4)); offset += 4;\n const ioff = offset;\n wAs(data, offset, (j == 0) ? 'IDAT' : 'fdAT'); offset += 4;\n if (j != 0) { wUi(data, offset, fi++); offset += 4; }\n data.set(imgd, offset);\n offset += dl;\n wUi(data, offset, crc(data, ioff, offset - ioff)); offset += 4; // crc\n }\n\n wUi(data, offset, 0); offset += 4;\n wAs(data, offset, 'IEND'); offset += 4;\n wUi(data, offset, crc(data, offset - 4, 4)); offset += 4; // crc\n\n return data.buffer;\n};\n\nUPNG.encode.compressPNG = function (out, filter, levelZero) {\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i]; const nw = frm.rect.width; const\n nh = frm.rect.height;\n const fdata = new Uint8Array(nh * frm.bpl + nh);\n frm.cimg = UPNG.encode._filterZero(frm.img, nh, frm.bpp, frm.bpl, fdata, filter, levelZero);\n }\n};\n\nUPNG.encode.compress = function (bufs, w, h, ps, prms) // prms: onlyBlend, minBits, forbidPlte\n{\n // var time = Date.now();\n const onlyBlend = prms[0]; const evenCrd = prms[1]; const forbidPrev = prms[2]; const minBits = prms[3]; const\n forbidPlte = prms[4];\n\n let ctype = 6; let depth = 8; let\n alphaAnd = 255;\n\n for (var j = 0; j < bufs.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n const img = new Uint8Array(bufs[j]); var\n ilen = img.length;\n for (var i = 0; i < ilen; i += 4) alphaAnd &= img[i + 3];\n }\n const gotAlpha = (alphaAnd != 255);\n\n // console.log(\"alpha check\", Date.now()-time); time = Date.now();\n\n // var brute = gotAlpha && forGIF;\t\t// brute : frames can only be copied, not \"blended\"\n const frms = UPNG.encode.framize(bufs, w, h, onlyBlend, evenCrd, forbidPrev);\n // console.log(\"framize\", Date.now()-time); time = Date.now();\n\n const cmap = {}; const plte = []; const\n inds = [];\n\n if (ps != 0) {\n const nbufs = []; for (var i = 0; i < frms.length; i++) nbufs.push(frms[i].img.buffer);\n\n const abuf = UPNG.encode.concatRGBA(nbufs); const\n qres = UPNG.quantize(abuf, ps); // console.log(qres);\n let cof = 0; const\n bb = new Uint8Array(qres.abuf);\n for (var i = 0; i < frms.length; i++) {\n var ti = frms[i].img; const\n bln = ti.length; inds.push(new Uint8Array(qres.inds.buffer, cof >> 2, bln >> 2));\n for (var j = 0; j < bln; j += 4) { ti[j] = bb[cof + j]; ti[j + 1] = bb[cof + j + 1]; ti[j + 2] = bb[cof + j + 2]; ti[j + 3] = bb[cof + j + 3]; } cof += bln;\n }\n\n for (var i = 0; i < qres.plte.length; i++) plte.push(qres.plte[i].est.rgba);\n // console.log(\"quantize\", Date.now()-time); time = Date.now();\n } else {\n // what if ps==0, but there are <=256 colors? we still need to detect, if the palette could be used\n for (var j = 0; j < frms.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n var frm = frms[j]; const img32 = new Uint32Array(frm.img.buffer); var nw = frm.rect.width; var\n ilen = img32.length;\n const ind = new Uint8Array(ilen); inds.push(ind);\n for (var i = 0; i < ilen; i++) {\n const c = img32[i];\n if (i != 0 && c == img32[i - 1]) ind[i] = ind[i - 1];\n else if (i > nw && c == img32[i - nw]) ind[i] = ind[i - nw];\n else {\n let cmc = cmap[c];\n if (cmc == null) { cmap[c] = cmc = plte.length; plte.push(c); if (plte.length >= 300) break; }\n ind[i] = cmc;\n }\n }\n }\n // console.log(\"make palette\", Date.now()-time); time = Date.now();\n }\n\n const cc = plte.length; // console.log(\"colors:\",cc);\n if (cc <= 256 && forbidPlte == false) {\n if (cc <= 2) depth = 1; else if (cc <= 4) depth = 2; else if (cc <= 16) depth = 4; else depth = 8;\n depth = Math.max(depth, minBits);\n }\n\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; const nx = frm.rect.x; const ny = frm.rect.y; var nw = frm.rect.width; const\n nh = frm.rect.height;\n let cimg = frm.img; const\n cimg32 = new Uint32Array(cimg.buffer);\n let bpl = 4 * nw; let\n bpp = 4;\n if (cc <= 256 && forbidPlte == false) {\n bpl = Math.ceil(depth * nw / 8);\n var nimg = new Uint8Array(bpl * nh);\n const inj = inds[j];\n for (let y = 0; y < nh; y++) {\n var i = y * bpl; const\n ii = y * nw;\n if (depth == 8) for (var x = 0; x < nw; x++) nimg[i + (x)] = (inj[ii + x]);\n else if (depth == 4) for (var x = 0; x < nw; x++) nimg[i + (x >> 1)] |= (inj[ii + x] << (4 - (x & 1) * 4));\n else if (depth == 2) for (var x = 0; x < nw; x++) nimg[i + (x >> 2)] |= (inj[ii + x] << (6 - (x & 3) * 2));\n else if (depth == 1) for (var x = 0; x < nw; x++) nimg[i + (x >> 3)] |= (inj[ii + x] << (7 - (x & 7) * 1));\n }\n cimg = nimg; ctype = 3; bpp = 1;\n } else if (gotAlpha == false && frms.length == 1) {\t// some next \"reduced\" frames may contain alpha for blending\n var nimg = new Uint8Array(nw * nh * 3); const\n area = nw * nh;\n for (var i = 0; i < area; i++) {\n var ti = i * 3; const\n qi = i * 4; nimg[ti] = cimg[qi]; nimg[ti + 1] = cimg[qi + 1]; nimg[ti + 2] = cimg[qi + 2];\n }\n cimg = nimg; ctype = 2; bpp = 3; bpl = 3 * nw;\n }\n frm.img = cimg; frm.bpl = bpl; frm.bpp = bpp;\n }\n // console.log(\"colors => palette indices\", Date.now()-time); time = Date.now();\n\n return {\n ctype, depth, plte, frames: frms,\n };\n};\nUPNG.encode.framize = function (bufs, w, h, alwaysBlend, evenCrd, forbidPrev) {\n /* DISPOSE\n - 0 : no change\n - 1 : clear to transparent\n - 2 : retstore to content before rendering (previous frame disposed)\n BLEND\n - 0 : replace\n - 1 : blend\n */\n const frms = [];\n for (var j = 0; j < bufs.length; j++) {\n const cimg = new Uint8Array(bufs[j]); const\n cimg32 = new Uint32Array(cimg.buffer);\n var nimg;\n\n let nx = 0; let ny = 0; let nw = w; let nh = h; let\n blend = alwaysBlend ? 1 : 0;\n if (j != 0) {\n const tlim = (forbidPrev || alwaysBlend || j == 1 || frms[j - 2].dispose != 0) ? 1 : 2; let tstp = 0; let\n tarea = 1e9;\n for (let it = 0; it < tlim; it++) {\n var pimg = new Uint8Array(bufs[j - 1 - it]); const\n p32 = new Uint32Array(bufs[j - 1 - it]);\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n var i = y * w + x;\n if (cimg32[i] != p32[i]) {\n if (x < mix) mix = x; if (x > max) max = x;\n if (y < miy) miy = y; if (y > may) may = y;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n const sarea = (max - mix + 1) * (may - miy + 1);\n if (sarea < tarea) {\n tarea = sarea; tstp = it;\n nx = mix; ny = miy; nw = max - mix + 1; nh = may - miy + 1;\n }\n }\n\n // alwaysBlend: pokud zjistím, že blendit nelze, nastavím předchozímu snímku dispose=1. Zajistím, aby obsahoval můj obdélník.\n var pimg = new Uint8Array(bufs[j - 1 - tstp]);\n if (tstp == 1) frms[j - 1].dispose = 2;\n\n nimg = new Uint8Array(nw * nh * 4);\n UPNG._copyTile(pimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n\n blend = UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 3) ? 1 : 0;\n if (blend == 1) {\n UPNG.encode._prepareDiff(cimg, w, h, nimg, {\n x: nx, y: ny, width: nw, height: nh,\n });\n } else UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n // UPNG._copyTile(cimg,w,h, nimg,nw,nh, -nx,-ny, blend==1?2:0);\n } else nimg = cimg.slice(0);\t// img may be rewritten further ... don't rewrite input\n\n frms.push({\n rect: {\n x: nx, y: ny, width: nw, height: nh,\n },\n img: nimg,\n blend,\n dispose: 0,\n });\n }\n\n if (alwaysBlend) {\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; if (frm.blend == 1) continue;\n const r0 = frm.rect; const\n r1 = frms[j - 1].rect;\n const miX = Math.min(r0.x, r1.x); const\n miY = Math.min(r0.y, r1.y);\n const maX = Math.max(r0.x + r0.width, r1.x + r1.width); const\n maY = Math.max(r0.y + r0.height, r1.y + r1.height);\n const r = {\n x: miX, y: miY, width: maX - miX, height: maY - miY,\n };\n\n frms[j - 1].dispose = 1;\n if (j - 1 != 0) { UPNG.encode._updateFrame(bufs, w, h, frms, j - 1, r, evenCrd); }\n UPNG.encode._updateFrame(bufs, w, h, frms, j, r, evenCrd);\n }\n }\n let area = 0;\n if (bufs.length != 1) {\n for (var i = 0; i < frms.length; i++) {\n var frm = frms[i];\n area += frm.rect.width * frm.rect.height;\n // if(i==0 || frm.blend!=1) continue;\n // var ob = new Uint8Array(\n // console.log(frm.blend, frm.dispose, frm.rect);\n }\n }\n // if(area!=0) console.log(area);\n return frms;\n};\nUPNG.encode._updateFrame = function (bufs, w, h, frms, i, r, evenCrd) {\n const U8 = Uint8Array; const\n U32 = Uint32Array;\n const pimg = new U8(bufs[i - 1]); const pimg32 = new U32(bufs[i - 1]); const\n nimg = i + 1 < bufs.length ? new U8(bufs[i + 1]) : null;\n const cimg = new U8(bufs[i]); const\n cimg32 = new U32(cimg.buffer);\n\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < r.height; y++) {\n for (let x = 0; x < r.width; x++) {\n const cx = r.x + x; const\n cy = r.y + y;\n const j = cy * w + cx; const\n cc = cimg32[j];\n // no need to draw transparency, or to dispose it. Or, if writing the same color and the next one does not need transparency.\n if (cc == 0 || (frms[i - 1].dispose == 0 && pimg32[j] == cc && (nimg == null || nimg[j * 4 + 3] != 0))/**/) {} else {\n if (cx < mix) mix = cx; if (cx > max) max = cx;\n if (cy < miy) miy = cy; if (cy > may) may = cy;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n r = {\n x: mix, y: miy, width: max - mix + 1, height: may - miy + 1,\n };\n\n const fr = frms[i]; fr.rect = r; fr.blend = 1; fr.img = new Uint8Array(r.width * r.height * 4);\n if (frms[i - 1].dispose == 0) {\n UPNG._copyTile(pimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0);\n UPNG.encode._prepareDiff(cimg, w, h, fr.img, r);\n // UPNG._copyTile(cimg,w,h, fr.img,r.width,r.height, -r.x,-r.y, 2);\n } else { UPNG._copyTile(cimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0); }\n};\nUPNG.encode._prepareDiff = function (cimg, w, h, nimg, rec) {\n UPNG._copyTile(cimg, w, h, nimg, rec.width, rec.height, -rec.x, -rec.y, 2);\n /*\n var n32 = new Uint32Array(nimg.buffer);\n var og = new Uint8Array(rec.width*rec.height*4), o32 = new Uint32Array(og.buffer);\n UPNG._copyTile(cimg,w,h, og,rec.width,rec.height, -rec.x,-rec.y, 0);\n for(var i=4; i>>2]==o32[(i>>>2)-1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n }\n for(var i=nimg.length-8; i>0; i-=4) {\n if(nimg[i+7]!=0 && nimg[i+3]==0 && o32[i>>>2]==o32[(i>>>2)+1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n } */\n};\n\nUPNG.encode._filterZero = function (img, h, bpp, bpl, data, filter, levelZero) {\n const fls = []; let\n ftry = [0, 1, 2, 3, 4];\n if (filter != -1) ftry = [filter];\n else if (h * bpl > 500000 || bpp == 1) ftry = [0];\n let opts; if (levelZero) opts = { level: 0 };\n\n // var CMPR = (data.length>10e6 && typeof UZIP !== 'undefined') ? UZIP : pako;\n const CMPR = UZIP;\n\n const time = Date.now();\n for (var i = 0; i < ftry.length; i++) {\n for (let y = 0; y < h; y++) UPNG.encode._filterLine(data, img, y, bpl, bpp, ftry[i]);\n // var nimg = new Uint8Array(data.length);\n // var sz = UZIP.F.deflate(data, nimg); fls.push(nimg.slice(0,sz));\n // var dfl = pako[\"deflate\"](data), dl=dfl.length-4;\n // var crc = (dfl[dl+3]<<24)|(dfl[dl+2]<<16)|(dfl[dl+1]<<8)|(dfl[dl+0]<<0);\n // console.log(crc, UZIP.adler(data,2,data.length-6));\n fls.push(CMPR.deflate(data, opts));\n }\n\n let ti; let\n tsize = 1e9;\n for (var i = 0; i < fls.length; i++) if (fls[i].length < tsize) { ti = i; tsize = fls[i].length; }\n return fls[ti];\n};\nUPNG.encode._filterLine = function (data, img, y, bpl, bpp, type) {\n const i = y * bpl; let di = i + y; const\n paeth = UPNG.decode._paeth;\n data[di] = type; di++;\n\n if (type == 0) {\n if (bpl < 500) for (var x = 0; x < bpl; x++) data[di + x] = img[i + x];\n else data.set(new Uint8Array(img.buffer, i, bpl), di);\n } else if (type == 1) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - img[i + x - bpp] + 256) & 255;\n } else if (y == 0) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n\n if (type == 2) for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x];\n if (type == 3) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - (img[i + x - bpp] >> 1) + 256) & 255;\n if (type == 4) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - paeth(img[i + x - bpp], 0, 0) + 256) & 255;\n } else {\n if (type == 2) { for (var x = 0; x < bpl; x++) data[di + x] = (img[i + x] + 256 - img[i + x - bpl]) & 255; }\n if (type == 3) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - (img[i + x - bpl] >> 1)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - ((img[i + x - bpl] + img[i + x - bpp]) >> 1)) & 255;\n }\n if (type == 4) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - paeth(0, img[i + x - bpl], 0)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - paeth(img[i + x - bpp], img[i + x - bpl], img[i + x - bpp - bpl])) & 255;\n }\n }\n};\n\nUPNG.crc = {\n table: (function () {\n const tab = new Uint32Array(256);\n for (let n = 0; n < 256; n++) {\n let c = n;\n for (let k = 0; k < 8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c >>>= 1;\n }\n tab[n] = c;\n }\n return tab;\n }()),\n update(c, buf, off, len) {\n for (let i = 0; i < len; i++) c = UPNG.crc.table[(c ^ buf[off + i]) & 0xff] ^ (c >>> 8);\n return c;\n },\n crc(b, o, l) { return UPNG.crc.update(0xffffffff, b, o, l) ^ 0xffffffff; },\n};\n\nUPNG.quantize = function (abuf, ps) {\n const oimg = new Uint8Array(abuf); const nimg = oimg.slice(0); const\n nimg32 = new Uint32Array(nimg.buffer);\n\n const KD = UPNG.quantize.getKDtree(nimg, ps);\n const root = KD[0]; const\n leafs = KD[1];\n\n const { planeDst } = UPNG.quantize;\n const sb = oimg; const tb = nimg32; const\n len = sb.length;\n\n const inds = new Uint8Array(oimg.length >> 2); let\n nd;\n if (oimg.length < 20e6) // precise, but slow :(\n {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = UPNG.quantize.getNearest(root, r, g, b, a);\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n } else {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = root; while (nd.left) nd = (planeDst(nd.est, r, g, b, a) <= 0) ? nd.left : nd.right;\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n }\n return { abuf: nimg.buffer, inds, plte: leafs };\n};\n\nUPNG.quantize.getKDtree = function (nimg, ps, err) {\n if (err == null) err = 0.0001;\n const nimg32 = new Uint32Array(nimg.buffer);\n\n const root = {\n i0: 0, i1: nimg.length, bst: null, est: null, tdst: 0, left: null, right: null,\n }; // basic statistic, extra statistic\n root.bst = UPNG.quantize.stats(nimg, root.i0, root.i1); root.est = UPNG.quantize.estats(root.bst);\n const leafs = [root];\n\n while (leafs.length < ps) {\n let maxL = 0; let\n mi = 0;\n for (var i = 0; i < leafs.length; i++) if (leafs[i].est.L > maxL) { maxL = leafs[i].est.L; mi = i; }\n if (maxL < err) break;\n const node = leafs[mi];\n\n const s0 = UPNG.quantize.splitPixels(nimg, nimg32, node.i0, node.i1, node.est.e, node.est.eMq255);\n const s0wrong = (node.i0 >= s0 || node.i1 <= s0);\n // console.log(maxL, leafs.length, mi);\n if (s0wrong) { node.est.L = 0; continue; }\n\n const ln = {\n i0: node.i0, i1: s0, bst: null, est: null, tdst: 0, left: null, right: null,\n }; ln.bst = UPNG.quantize.stats(nimg, ln.i0, ln.i1);\n ln.est = UPNG.quantize.estats(ln.bst);\n const rn = {\n i0: s0, i1: node.i1, bst: null, est: null, tdst: 0, left: null, right: null,\n }; rn.bst = { R: [], m: [], N: node.bst.N - ln.bst.N };\n for (var i = 0; i < 16; i++) rn.bst.R[i] = node.bst.R[i] - ln.bst.R[i];\n for (var i = 0; i < 4; i++) rn.bst.m[i] = node.bst.m[i] - ln.bst.m[i];\n rn.est = UPNG.quantize.estats(rn.bst);\n\n node.left = ln; node.right = rn;\n leafs[mi] = ln; leafs.push(rn);\n }\n leafs.sort((a, b) => b.bst.N - a.bst.N);\n for (var i = 0; i < leafs.length; i++) leafs[i].ind = i;\n return [root, leafs];\n};\n\nUPNG.quantize.getNearest = function (nd, r, g, b, a) {\n if (nd.left == null) { nd.tdst = UPNG.quantize.dist(nd.est.q, r, g, b, a); return nd; }\n const planeDst = UPNG.quantize.planeDst(nd.est, r, g, b, a);\n\n let node0 = nd.left; let\n node1 = nd.right;\n if (planeDst > 0) { node0 = nd.right; node1 = nd.left; }\n\n const ln = UPNG.quantize.getNearest(node0, r, g, b, a);\n if (ln.tdst <= planeDst * planeDst) return ln;\n const rn = UPNG.quantize.getNearest(node1, r, g, b, a);\n return rn.tdst < ln.tdst ? rn : ln;\n};\nUPNG.quantize.planeDst = function (est, r, g, b, a) { const { e } = est; return e[0] * r + e[1] * g + e[2] * b + e[3] * a - est.eMq; };\nUPNG.quantize.dist = function (q, r, g, b, a) {\n const d0 = r - q[0]; const d1 = g - q[1]; const d2 = b - q[2]; const\n d3 = a - q[3]; return d0 * d0 + d1 * d1 + d2 * d2 + d3 * d3;\n};\n\nUPNG.quantize.splitPixels = function (nimg, nimg32, i0, i1, e, eMq) {\n const { vecDot } = UPNG.quantize;\n i1 -= 4;\n const shfs = 0;\n while (i0 < i1) {\n while (vecDot(nimg, i0, e) <= eMq) i0 += 4;\n while (vecDot(nimg, i1, e) > eMq) i1 -= 4;\n if (i0 >= i1) break;\n\n const t = nimg32[i0 >> 2]; nimg32[i0 >> 2] = nimg32[i1 >> 2]; nimg32[i1 >> 2] = t;\n\n i0 += 4; i1 -= 4;\n }\n while (vecDot(nimg, i0, e) > eMq) i0 -= 4;\n return i0 + 4;\n};\nUPNG.quantize.vecDot = function (nimg, i, e) {\n return nimg[i] * e[0] + nimg[i + 1] * e[1] + nimg[i + 2] * e[2] + nimg[i + 3] * e[3];\n};\nUPNG.quantize.stats = function (nimg, i0, i1) {\n const R = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n const m = [0, 0, 0, 0];\n const N = (i1 - i0) >> 2;\n for (let i = i0; i < i1; i += 4) {\n const r = nimg[i] * (1 / 255); const g = nimg[i + 1] * (1 / 255); const b = nimg[i + 2] * (1 / 255); const\n a = nimg[i + 3] * (1 / 255);\n // var r = nimg[i], g = nimg[i+1], b = nimg[i+2], a = nimg[i+3];\n m[0] += r; m[1] += g; m[2] += b; m[3] += a;\n\n R[0] += r * r; R[1] += r * g; R[2] += r * b; R[3] += r * a;\n R[5] += g * g; R[6] += g * b; R[7] += g * a;\n R[10] += b * b; R[11] += b * a;\n R[15] += a * a;\n }\n R[4] = R[1]; R[8] = R[2]; R[9] = R[6]; R[12] = R[3]; R[13] = R[7]; R[14] = R[11];\n\n return { R, m, N };\n};\nUPNG.quantize.estats = function (stats) {\n const { R } = stats;\n const { m } = stats;\n const { N } = stats;\n\n // when all samples are equal, but N is large (millions), the Rj can be non-zero ( 0.0003.... - precission error)\n const m0 = m[0]; const m1 = m[1]; const m2 = m[2]; const m3 = m[3]; const\n iN = (N == 0 ? 0 : 1 / N);\n const Rj = [\n R[0] - m0 * m0 * iN, R[1] - m0 * m1 * iN, R[2] - m0 * m2 * iN, R[3] - m0 * m3 * iN,\n R[4] - m1 * m0 * iN, R[5] - m1 * m1 * iN, R[6] - m1 * m2 * iN, R[7] - m1 * m3 * iN,\n R[8] - m2 * m0 * iN, R[9] - m2 * m1 * iN, R[10] - m2 * m2 * iN, R[11] - m2 * m3 * iN,\n R[12] - m3 * m0 * iN, R[13] - m3 * m1 * iN, R[14] - m3 * m2 * iN, R[15] - m3 * m3 * iN,\n ];\n\n const A = Rj; const\n M = UPNG.M4;\n let b = [Math.random(), Math.random(), Math.random(), Math.random()]; let mi = 0; let\n tmi = 0;\n\n if (N != 0) {\n for (let i = 0; i < 16; i++) {\n b = M.multVec(A, b); tmi = Math.sqrt(M.dot(b, b)); b = M.sml(1 / tmi, b);\n if (i != 0 && Math.abs(tmi - mi) < 1e-9) break; mi = tmi;\n }\n }\n // b = [0,0,1,0]; mi=N;\n const q = [m0 * iN, m1 * iN, m2 * iN, m3 * iN];\n const eMq255 = M.dot(M.sml(255, q), b);\n\n return {\n Cov: Rj,\n q,\n e: b,\n L: mi,\n eMq255,\n eMq: M.dot(b, q),\n rgba: (((Math.round(255 * q[3]) << 24) | (Math.round(255 * q[2]) << 16) | (Math.round(255 * q[1]) << 8) | (Math.round(255 * q[0]) << 0)) >>> 0),\n };\n};\nUPNG.M4 = {\n multVec(m, v) {\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * v[3],\n m[4] * v[0] + m[5] * v[1] + m[6] * v[2] + m[7] * v[3],\n m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11] * v[3],\n m[12] * v[0] + m[13] * v[1] + m[14] * v[2] + m[15] * v[3],\n ];\n },\n dot(x, y) { return x[0] * y[0] + x[1] * y[1] + x[2] * y[2] + x[3] * y[3]; },\n sml(a, y) { return [a * y[0], a * y[1], a * y[2], a * y[3]]; },\n};\n\nUPNG.encode.concatRGBA = function (bufs) {\n let tlen = 0;\n for (var i = 0; i < bufs.length; i++) tlen += bufs[i].byteLength;\n const nimg = new Uint8Array(tlen); let\n noff = 0;\n for (var i = 0; i < bufs.length; i++) {\n const img = new Uint8Array(bufs[i]); const\n il = img.length;\n for (let j = 0; j < il; j += 4) {\n let r = img[j]; let g = img[j + 1]; let b = img[j + 2]; const\n a = img[j + 3];\n if (a == 0) r = g = b = 0;\n nimg[noff + j] = r; nimg[noff + j + 1] = g; nimg[noff + j + 2] = b; nimg[noff + j + 3] = a;\n }\n noff += il;\n }\n return nimg.buffer;\n};\n\nexport default UPNG;\n","export default {\n CHROME: 'CHROME',\n FIREFOX: 'FIREFOX',\n DESKTOP_SAFARI: 'DESKTOP_SAFARI',\n IE: 'IE',\n MOBILE_SAFARI: 'MOBILE_SAFARI',\n ETC: 'ETC',\n};\n","import UPNG from './UPNG';\nimport MAX_CANVAS_SIZE from './config/max-canvas-size';\nimport BROWSER_NAME from './config/browser-name';\n\nconst isBrowser = typeof window !== 'undefined'; // change browser environment to support SSR\n\n// add support for cordova-plugin-file\nconst moduleMapper = isBrowser && window.cordova && window.cordova.require && window.cordova.require('cordova/modulemapper');\nexport const CustomFile = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'File')) || (typeof window.File !== 'undefined' && File));\nexport const CustomFileReader = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'FileReader')) || (typeof window.FileReader !== 'undefined' && FileReader));\n\n/**\n * getFilefromDataUrl\n *\n * @param {string} dataUrl\n * @param {string} filename\n * @param {number} [lastModified=Date.now()]\n * @returns {Promise}\n */\nexport function getFilefromDataUrl(dataUrl, filename, lastModified = Date.now()) {\n return new Promise((resolve) => {\n const arr = dataUrl.split(',');\n const mime = arr[0].match(/:(.*?);/)[1];\n const bstr = globalThis.atob(arr[1]);\n let n = bstr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n const file = new Blob([u8arr], { type: mime });\n file.name = filename;\n file.lastModified = lastModified;\n resolve(file);\n\n // Safari has issue with File constructor not being able to POST in FormData\n // https://github.com/Donaldcwl/browser-image-compression/issues/8\n // https://bugs.webkit.org/show_bug.cgi?id=165081\n // let file\n // try {\n // file = new File([u8arr], filename, { type: mime }) // Edge do not support File constructor\n // } catch (e) {\n // file = new Blob([u8arr], { type: mime })\n // file.name = filename\n // file.lastModified = lastModified\n // }\n // resolve(file)\n });\n}\n\n/**\n * getDataUrlFromFile\n *\n * @param {File | Blob} file\n * @returns {Promise}\n */\nexport function getDataUrlFromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = () => resolve(reader.result);\n reader.onerror = (e) => reject(e);\n reader.readAsDataURL(file);\n });\n}\n\n/**\n * loadImage\n *\n * @param {string} src\n * @returns {Promise}\n */\nexport function loadImage(src) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => resolve(img);\n img.onerror = (e) => reject(e);\n img.src = src;\n });\n}\n\n/**\n * getBrowserName\n *\n * Extracts the browser name from the useragent.\n *\n * ref: https://stackoverflow.com/a/26358856\n *\n * @returns {string}\n */\nexport function getBrowserName() {\n if (getBrowserName.cachedResult !== undefined) {\n return getBrowserName.cachedResult;\n }\n let browserName = BROWSER_NAME.ETC;\n const { userAgent } = navigator;\n if (/Chrom(e|ium)/i.test(userAgent)) {\n browserName = BROWSER_NAME.CHROME;\n } else if (/iP(ad|od|hone)/i.test(userAgent) && /WebKit/i.test(userAgent) && !(/(CriOS|FxiOS|OPiOS|mercury)/i.test(userAgent))) {\n // see: https://stackoverflow.com/a/35813965\n browserName = BROWSER_NAME.MOBILE_SAFARI;\n } else if (/Safari/i.test(userAgent)) {\n browserName = BROWSER_NAME.DESKTOP_SAFARI;\n } else if (/Firefox/i.test(userAgent)) {\n browserName = BROWSER_NAME.FIREFOX;\n } else if (/MSIE/i.test(userAgent) || (!!document.documentMode) === true) { // IF IE > 10\n browserName = BROWSER_NAME.IE;\n }\n getBrowserName.cachedResult = browserName;\n return getBrowserName.cachedResult;\n}\n\n/**\n * approximateBelowCanvasMaximumSizeOfBrowser\n *\n * it uses binary search to converge below the browser's maximum Canvas size.\n *\n * @param {number} initWidth\n * @param {number} initHeight\n * @returns {object}\n */\nexport function approximateBelowMaximumCanvasSizeOfBrowser(initWidth, initHeight) {\n const browserName = getBrowserName();\n const maximumCanvasSize = MAX_CANVAS_SIZE[browserName];\n\n let width = initWidth;\n let height = initHeight;\n let size = width * height;\n const ratio = width > height ? height / width : width / height;\n\n while (size > maximumCanvasSize * maximumCanvasSize) {\n const halfSizeWidth = (maximumCanvasSize + width) / 2;\n const halfSizeHeight = (maximumCanvasSize + height) / 2;\n if (halfSizeWidth < halfSizeHeight) {\n height = halfSizeHeight;\n width = halfSizeHeight * ratio;\n } else {\n height = halfSizeWidth * ratio;\n width = halfSizeWidth;\n }\n\n size = width * height;\n }\n\n return {\n width, height,\n };\n}\n\n/**\n * get new Canvas and it's context\n * @param width\n * @param height\n * @returns {[HTMLCanvasElement | OffscreenCanvas, CanvasRenderingContext2D]}\n */\nexport function getNewCanvasAndCtx(width, height) {\n let canvas;\n let ctx;\n try {\n canvas = new OffscreenCanvas(width, height);\n ctx = canvas.getContext('2d');\n if (ctx === null) {\n throw new Error('getContext of OffscreenCanvas returns null');\n }\n } catch (e) {\n canvas = document.createElement('canvas');\n ctx = canvas.getContext('2d');\n }\n canvas.width = width;\n canvas.height = height;\n // ctx.fillStyle = '#fff'\n // ctx.fillRect(0, 0, width, height)\n return [canvas, ctx];\n}\n\n/**\n * drawImageInCanvas\n *\n * @param {HTMLImageElement} img\n * @param {string} [fileType=undefined]\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function drawImageInCanvas(img, fileType = undefined) {\n const { width, height } = approximateBelowMaximumCanvasSizeOfBrowser(img.width, img.height);\n const [canvas, ctx] = getNewCanvasAndCtx(width, height);\n if (fileType && /jpe?g/.test(fileType)) {\n ctx.fillStyle = 'white'; // to fill the transparent background with white color for png file in jpeg extension\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n return canvas;\n}\n\n/**\n * Detect IOS device\n * see: https://stackoverflow.com/a/9039885\n * @returns {boolean} isIOS device\n */\nexport function isIOS() {\n if (isIOS.cachedResult !== undefined) {\n return isIOS.cachedResult;\n }\n isIOS.cachedResult = [\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod',\n ].includes(navigator.platform)\n // iPad on iOS 13 detection\n || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);\n return isIOS.cachedResult;\n}\n\n/**\n * drawFileInCanvas\n *\n * @param {File | Blob} file\n * @returns {Promise<[ImageBitmap | HTMLImageElement, HTMLCanvasElement | OffscreenCanvas]>}\n */\nexport async function drawFileInCanvas(file, options = {}) {\n let img;\n try {\n if (isIOS() || [BROWSER_NAME.DESKTOP_SAFARI, BROWSER_NAME.MOBILE_SAFARI].includes(getBrowserName())) {\n throw new Error('Skip createImageBitmap on IOS and Safari'); // see https://github.com/Donaldcwl/browser-image-compression/issues/118\n }\n img = await createImageBitmap(file);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n try {\n const dataUrl = await getDataUrlFromFile(file);\n img = await loadImage(dataUrl);\n } catch (e2) {\n if (process.env.BUILD === 'development') {\n console.error(e2);\n }\n throw e2;\n }\n }\n const canvas = drawImageInCanvas(img, options.fileType || file.type);\n return [img, canvas];\n}\n\n/**\n * canvasToFile\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {string} fileType\n * @param {string} fileName\n * @param {number} fileLastModified\n * @param {number} [quality]\n * @returns {Promise}\n */\nexport async function canvasToFile(canvas, fileType, fileName, fileLastModified, quality = 1) {\n let file;\n if (fileType === 'image/png') {\n const ctx = canvas.getContext('2d');\n const { data } = ctx.getImageData(0, 0, canvas.width, canvas.height);\n const png = UPNG.encode([data], canvas.width, canvas.height, 256 * quality);\n file = new Blob([png], { type: fileType });\n file.name = fileName;\n file.lastModified = fileLastModified;\n } else if (typeof OffscreenCanvas === 'function' && canvas instanceof OffscreenCanvas) { // checked on Win Chrome 83, MacOS Chrome 83\n file = await canvas.convertToBlob({ type: fileType, quality });\n file.name = fileName;\n file.lastModified = fileLastModified;\n // some browser do not support quality parameter, see: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob\n // } else if (typeof canvas.toBlob === 'function') {\n // file = await new Promise(resolve => canvas.toBlob(resolve, fileType, quality))\n } else { // checked on Win Edge 44, Win IE 11, Win Firefox 76, MacOS Firefox 77, MacOS Safari 13.1\n const dataUrl = canvas.toDataURL(fileType, quality);\n file = await getFilefromDataUrl(dataUrl, fileName, fileLastModified);\n }\n return file;\n}\n\n/**\n * clear Canvas memory\n * @param canvas\n * @returns null\n */\nexport function cleanupCanvasMemory(canvas) {\n // garbage clean canvas for safari\n // ref: https://bugs.webkit.org/show_bug.cgi?id=195325\n // eslint-disable-next-line no-param-reassign\n canvas.width = 0;\n // eslint-disable-next-line no-param-reassign\n canvas.height = 0;\n}\n\n// Check if browser supports automatic image orientation\n// see https://github.com/blueimp/JavaScript-Load-Image/blob/1e4df707821a0afcc11ea0720ee403b8759f3881/js/load-image-orientation.js#L37-L53\nexport async function isAutoOrientationInBrowser() {\n if (isAutoOrientationInBrowser.cachedResult !== undefined) return isAutoOrientationInBrowser.cachedResult;\n\n // black 2x1 JPEG, with the following meta information set:\n // EXIF Orientation: 6 (Rotated 90° CCW)\n const testImageURL = 'data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAA'\n + 'AAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA'\n + 'QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE'\n + 'BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/x'\n + 'ABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAA'\n + 'AAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==';\n const testImageFile = await getFilefromDataUrl(testImageURL, 'test.jpg', Date.now());\n\n const testImageCanvas = (await drawFileInCanvas(testImageFile))[1];\n const testImageFile2 = await canvasToFile(testImageCanvas, testImageFile.type, testImageFile.name, testImageFile.lastModified);\n cleanupCanvasMemory(testImageCanvas);\n const img = (await drawFileInCanvas(testImageFile2))[0];\n // console.log('img', img.width, img.height)\n\n isAutoOrientationInBrowser.cachedResult = img.width === 1 && img.height === 2;\n return isAutoOrientationInBrowser.cachedResult;\n}\n\n/**\n * getExifOrientation\n * get image exif orientation info\n * source: https://stackoverflow.com/a/32490603/10395024\n *\n * @param {File | Blob} file\n * @returns {Promise} - orientation id, see https://i.stack.imgur.com/VGsAj.gif\n */\nexport function getExifOrientation(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = (e) => {\n const view = new DataView(e.target.result);\n if (view.getUint16(0, false) != 0xFFD8) {\n return resolve(-2);\n }\n const length = view.byteLength;\n let offset = 2;\n while (offset < length) {\n if (view.getUint16(offset + 2, false) <= 8) return resolve(-1);\n const marker = view.getUint16(offset, false);\n offset += 2;\n if (marker == 0xFFE1) {\n if (view.getUint32(offset += 2, false) != 0x45786966) {\n return resolve(-1);\n }\n\n const little = view.getUint16(offset += 6, false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n for (let i = 0; i < tags; i++) {\n if (view.getUint16(offset + (i * 12), little) == 0x0112) {\n return resolve(view.getUint16(offset + (i * 12) + 8, little));\n }\n }\n } else if ((marker & 0xFF00) != 0xFF00) {\n break;\n } else {\n offset += view.getUint16(offset, false);\n }\n }\n return resolve(-1);\n };\n reader.onerror = (e) => reject(e);\n reader.readAsArrayBuffer(file);\n });\n}\n\n/**\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param options\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function handleMaxWidthOrHeight(canvas, options) {\n const { width } = canvas;\n const { height } = canvas;\n const { maxWidthOrHeight } = options;\n\n const needToHandle = isFinite(maxWidthOrHeight) && (width > maxWidthOrHeight || height > maxWidthOrHeight);\n\n let newCanvas = canvas;\n let ctx;\n\n if (needToHandle) {\n [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n if (width > height) {\n newCanvas.width = maxWidthOrHeight;\n newCanvas.height = (height / width) * maxWidthOrHeight;\n } else {\n newCanvas.width = (width / height) * maxWidthOrHeight;\n newCanvas.height = maxWidthOrHeight;\n }\n ctx.drawImage(canvas, 0, 0, newCanvas.width, newCanvas.height);\n\n cleanupCanvasMemory(canvas);\n }\n\n return newCanvas;\n}\n\n/**\n * followExifOrientation\n * source: https://stackoverflow.com/a/40867559/10395024\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {number} exifOrientation\n * @returns {HTMLCanvasElement | OffscreenCanvas} canvas\n */\nexport function followExifOrientation(canvas, exifOrientation) {\n const { width } = canvas;\n const { height } = canvas;\n\n const [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n\n // set proper canvas dimensions before transform & export\n if (exifOrientation > 4 && exifOrientation < 9) {\n newCanvas.width = height;\n newCanvas.height = width;\n } else {\n newCanvas.width = width;\n newCanvas.height = height;\n }\n\n // transform context before drawing image\n switch (exifOrientation) {\n case 2:\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n break;\n }\n\n ctx.drawImage(canvas, 0, 0, width, height);\n\n cleanupCanvasMemory(canvas);\n\n return newCanvas;\n}\n","import {\n canvasToFile,\n cleanupCanvasMemory,\n drawFileInCanvas,\n followExifOrientation,\n getExifOrientation,\n getNewCanvasAndCtx,\n handleMaxWidthOrHeight,\n isAutoOrientationInBrowser,\n} from './utils';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} options\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @param {number} [options.initialQuality=1.0]\n * @param {number} previousProgress - for internal try catch rerunning start from previous progress\n * @returns {Promise}\n */\nexport default async function compress(file, options, previousProgress = 0) {\n let progress = previousProgress;\n\n function incProgress(inc = 5) {\n progress += inc;\n options.onProgress(Math.min(progress, 100));\n }\n\n function setProgress(p) {\n progress = Math.min(Math.max(p, progress), 100);\n options.onProgress(progress);\n }\n\n let remainingTrials = options.maxIteration || 10;\n\n const maxSizeByte = options.maxSizeMB * 1024 * 1024;\n\n incProgress();\n\n // drawFileInCanvas\n const [, origCanvas] = await drawFileInCanvas(file, options);\n\n incProgress();\n\n // handleMaxWidthOrHeight\n const maxWidthOrHeightFixedCanvas = handleMaxWidthOrHeight(origCanvas, options);\n\n incProgress();\n\n // exifOrientation\n const exifOrientation = options.exifOrientation || await getExifOrientation(file);\n incProgress();\n const orientationFixedCanvas = (await isAutoOrientationInBrowser()) ? maxWidthOrHeightFixedCanvas : followExifOrientation(maxWidthOrHeightFixedCanvas, exifOrientation);\n incProgress();\n\n let quality = options.initialQuality || 1.0;\n\n const outputFileType = options.fileType || file.type;\n\n const tempFile = await canvasToFile(orientationFixedCanvas, outputFileType, file.name, file.lastModified, quality);\n incProgress();\n\n const origExceedMaxSize = tempFile.size > maxSizeByte;\n const sizeBecomeLarger = tempFile.size > file.size;\n if (process.env.BUILD === 'development') {\n console.log('original file size', file.size);\n console.log('current file size', tempFile.size);\n }\n\n // check if we need to compress or resize\n if (!origExceedMaxSize && !sizeBecomeLarger) {\n // no need to compress\n if (process.env.BUILD === 'development') {\n console.log('no need to compress');\n }\n setProgress(100);\n return tempFile;\n }\n\n const sourceSize = file.size;\n const renderedSize = tempFile.size;\n let currentSize = renderedSize;\n let compressedFile;\n let newCanvas; let\n ctx;\n let canvas = orientationFixedCanvas;\n while (remainingTrials-- && (currentSize > maxSizeByte || currentSize > sourceSize)) {\n const newWidth = origExceedMaxSize ? canvas.width * 0.95 : canvas.width;\n const newHeight = origExceedMaxSize ? canvas.height * 0.95 : canvas.height;\n if (process.env.BUILD === 'development') {\n console.log('current width', newWidth);\n console.log('current height', newHeight);\n }\n [newCanvas, ctx] = getNewCanvasAndCtx(newWidth, newHeight);\n\n ctx.drawImage(canvas, 0, 0, newWidth, newHeight);\n\n quality *= 0.95;\n // eslint-disable-next-line no-await-in-loop\n compressedFile = await canvasToFile(newCanvas, outputFileType, file.name, file.lastModified, quality);\n\n cleanupCanvasMemory(canvas);\n\n canvas = newCanvas;\n\n currentSize = compressedFile.size;\n // console.log('currentSize', currentSize)\n setProgress(Math.min(99, Math.floor(((renderedSize - currentSize) / (renderedSize - maxSizeByte)) * 100)));\n }\n\n cleanupCanvasMemory(canvas);\n cleanupCanvasMemory(newCanvas);\n cleanupCanvasMemory(maxWidthOrHeightFixedCanvas);\n cleanupCanvasMemory(orientationFixedCanvas);\n cleanupCanvasMemory(origCanvas);\n\n setProgress(100);\n return compressedFile;\n}\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = IS_CONSTRUCTOR ? new this(length) : Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements -- TODO\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to , but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar $toString = require('../internals/to-string');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar nativeFetch = getBuiltIn('fetch');\nvar NativeRequest = getBuiltIn('Request');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (iteratorMethod) {\n iterator = getIterator(init, iteratorMethod);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: $toString(first.value), value: $toString(second.value) });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: $toString(init[key]) });\n } else {\n parseSearchParams(\n entries,\n typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : $toString(init)\n );\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: $toString(name), value: $toString(value) });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n } return init;\n };\n\n if (isCallable(nativeFetch)) {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestConstructor, 'Request');\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n\n $({ global: true, forced: true }, {\n Request: RequestConstructor\n });\n }\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar $toString = require('../internals/to-string');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\n// eslint-disable-next-line regexp/no-obscure-range -- safe\nvar ALPHANUMERIC = /[\\d+-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^0x/i;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n/* eslint-disable no-control-regex -- safe */\nvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/;\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/;\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g;\nvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\n/* eslint-enable no-control-regex -- safe */\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var chr = function () {\n return input.charAt(pointer);\n };\n\n if (chr() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (chr()) {\n if (pieceIndex == 8) return;\n if (chr() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(chr())) {\n value = value * 16 + parseInt(chr(), 16);\n pointer++;\n length++;\n }\n if (chr() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (chr()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (chr() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(chr())) return;\n while (DIGIT.test(chr())) {\n number = parseInt(chr(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (chr() == ':') {\n pointer++;\n if (!chr()) return;\n } else if (chr()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (chr, set) {\n var code = codeAt(chr, 0);\n return code > 0x20 && code < 0x7F && !has(set, chr) ? chr : encodeURIComponent(chr);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, chr, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n chr = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (chr && ALPHA.test(chr)) {\n buffer += chr.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (chr && (ALPHANUMERIC.test(chr) || chr == '+' || chr == '-' || chr == '.')) {\n buffer += chr.toLowerCase();\n } else if (chr == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && chr == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (chr == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (chr == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (chr == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '/' || (chr == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (chr == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (chr == '/' || chr == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (chr == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (chr != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (chr != '/' && chr != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (chr == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += chr;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (chr == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (chr == '[') seenBracket = true;\n else if (chr == ']') seenBracket = false;\n buffer += chr;\n } break;\n\n case PORT:\n if (DIGIT.test(chr)) {\n buffer += chr;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (chr == '/' || chr == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (chr == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (chr == '/' || chr == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (chr == EOF || chr == '/' || chr == '\\\\' || chr == '?' || chr == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += chr;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (chr != '/' && chr != '\\\\') continue;\n } else if (!stateOverride && chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n state = PATH;\n if (chr != '/') continue;\n } break;\n\n case PATH:\n if (\n chr == EOF || chr == '/' ||\n (chr == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (chr == '?' || chr == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(chr, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n if (chr == \"'\" && isSpecial(url)) url.query += '%27';\n else if (chr == '#') url.query += '%23';\n else url.query += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = $toString(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, $toString(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URLConstructor(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = $toString(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, $toString(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = $toString(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, $toString(pathname), PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = $toString(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = $toString(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n}\n\nhandlePrototype(DOMTokenListPrototype);\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar $startsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n return ''.replace(re, '$') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);\n return replacer\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(toString(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (string, replaceValue) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (\n typeof replaceValue === 'string' &&\n replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1 &&\n replaceValue.indexOf('$<') === -1\n ) {\n var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n if (res.done) return res.value;\n }\n\n var functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = toString(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = toString(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = toString(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","import * as UZIP from 'uzip';\n// eslint-disable-next-line import/no-cycle\nimport lib from './index';\nimport compress from './image-compression';\nimport { getNewCanvasAndCtx, isIOS } from './utils';\nimport UPNG from './UPNG';\nimport MAX_CANVAS_SIZE from './config/max-canvas-size';\nimport BROWSER_NAME from './config/browser-name';\n\nlet cnt = 0;\nlet imageCompressionLibUrl;\nlet worker;\n\nfunction createWorker(script) {\n const blobArgs = [];\n if (typeof script === 'function') {\n blobArgs.push(`(${script})()`);\n } else {\n blobArgs.push(script);\n }\n return new Worker(URL.createObjectURL(new Blob(blobArgs)));\n}\n\nfunction createSourceObject(str) {\n // console.log('createSourceObject', str)\n return URL.createObjectURL(new Blob([str], { type: 'application/javascript' }));\n}\n\nfunction stringify(o) {\n return JSON.stringify(o, (key, value) => ((typeof value === 'function') ? `BIC_FN:::(function () { return ${value.toString()} })()` : value));\n}\n\nfunction parse(o) {\n if (typeof o === 'string') return o;\n const result = {};\n Object.entries(o).forEach(([key, value]) => {\n if (typeof value === 'string' && value.startsWith('BIC_FN:::')) {\n try {\n // eslint-disable-next-line no-eval\n result[key] = eval(value.replace(/^BIC_FN:::/, ''));\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(key, e);\n }\n throw e;\n }\n } else {\n result[key] = parse(value);\n }\n });\n return result;\n}\n\nfunction generateLib() {\n // prepare the lib to be used inside WebWorker\n return createSourceObject(`\n // reconstruct library\n function imageCompression (){return (${lib}).apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ${lib.getDataUrlFromFile}\n imageCompression.getFilefromDataUrl = ${lib.getFilefromDataUrl}\n imageCompression.loadImage = ${lib.loadImage}\n imageCompression.drawImageInCanvas = ${lib.drawImageInCanvas}\n imageCompression.drawFileInCanvas = ${lib.drawFileInCanvas}\n imageCompression.canvasToFile = ${lib.canvasToFile}\n imageCompression.getExifOrientation = ${lib.getExifOrientation}\n imageCompression.handleMaxWidthOrHeight = ${lib.handleMaxWidthOrHeight}\n imageCompression.followExifOrientation = ${lib.followExifOrientation}\n imageCompression.cleanupCanvasMemory = ${lib.cleanupCanvasMemory}\n imageCompression.isAutoOrientationInBrowser = ${lib.isAutoOrientationInBrowser}\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ${lib.approximateBelowMaximumCanvasSizeOfBrowser}\n imageCompression.getBrowserName = ${lib.getBrowserName}\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ${isIOS}\n \n getNewCanvasAndCtx = ${getNewCanvasAndCtx}\n CustomFileReader = FileReader\n CustomFile = File\n MAX_CANVAS_SIZE = ${JSON.stringify(MAX_CANVAS_SIZE)}\n BROWSER_NAME = ${JSON.stringify(BROWSER_NAME)}\n function compress (){return (${compress}).apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ${parse}\n const UPNG = {}\n UPNG.toRGBA8 = ${UPNG.toRGBA8}\n UPNG.toRGBA8.decodeImage = ${UPNG.toRGBA8.decodeImage}\n UPNG.decode = ${UPNG.decode}\n UPNG.decode._decompress = ${UPNG.decode._decompress}\n UPNG.decode._inflate = ${UPNG.decode._inflate}\n UPNG.decode._readInterlace = ${UPNG.decode._readInterlace}\n UPNG.decode._getBPP = ${UPNG.decode._getBPP} \n UPNG.decode._filterZero = ${UPNG.decode._filterZero}\n UPNG.decode._paeth = ${UPNG.decode._paeth}\n UPNG.decode._IHDR = ${UPNG.decode._IHDR}\n UPNG._bin = parse(${stringify(UPNG._bin)})\n UPNG._copyTile = ${UPNG._copyTile}\n UPNG.encode = ${UPNG.encode}\n UPNG.encodeLL = ${UPNG.encodeLL} \n UPNG.encode._main = ${UPNG.encode._main}\n UPNG.encode.compressPNG = ${UPNG.encode.compressPNG} \n UPNG.encode.compress = ${UPNG.encode.compress}\n UPNG.encode.framize = ${UPNG.encode.framize} \n UPNG.encode._updateFrame = ${UPNG.encode._updateFrame} \n UPNG.encode._prepareDiff = ${UPNG.encode._prepareDiff} \n UPNG.encode._filterZero = ${UPNG.encode._filterZero} \n UPNG.encode._filterLine = ${UPNG.encode._filterLine}\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.crc = parse(${stringify(UPNG.crc)})\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ${UPNG.quantize} \n UPNG.quantize.getKDtree = ${UPNG.quantize.getKDtree} \n UPNG.quantize.getNearest = ${UPNG.quantize.getNearest} \n UPNG.quantize.planeDst = ${UPNG.quantize.planeDst} \n UPNG.quantize.dist = ${UPNG.quantize.dist} \n UPNG.quantize.splitPixels = ${UPNG.quantize.splitPixels} \n UPNG.quantize.vecDot = ${UPNG.quantize.vecDot} \n UPNG.quantize.stats = ${UPNG.quantize.stats} \n UPNG.quantize.estats = ${UPNG.quantize.estats}\n UPNG.M4 = parse(${stringify(UPNG.M4)})\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP[\"parse\"] = ${UZIP.parse}\n UZIP._readLocal = ${UZIP._readLocal}\n UZIP.inflateRaw = ${UZIP.inflateRaw}\n UZIP.inflate = ${UZIP.inflate}\n UZIP.deflate = ${UZIP.deflate}\n UZIP.deflateRaw = ${UZIP.deflateRaw}\n UZIP.encode = ${UZIP.encode}\n UZIP._noNeed = ${UZIP._noNeed}\n UZIP._writeHeader = ${UZIP._writeHeader}\n UZIP.crc = parse(${stringify(UZIP.crc)})\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ${UZIP.adler}\n UZIP.bin = parse(${stringify(UZIP.bin)})\n UZIP.F = {}\n UZIP.F.deflateRaw = ${UZIP.F.deflateRaw}\n UZIP.F._bestMatch = ${UZIP.F._bestMatch}\n UZIP.F._howLong = ${UZIP.F._howLong}\n UZIP.F._hash = ${UZIP.F._hash}\n UZIP.saved = ${UZIP.saved}\n UZIP.F._writeBlock = ${UZIP.F._writeBlock}\n UZIP.F._copyExact = ${UZIP.F._copyExact}\n UZIP.F.getTrees = ${UZIP.F.getTrees}\n UZIP.F.getSecond = ${UZIP.F.getSecond}\n UZIP.F.nonZero = ${UZIP.F.nonZero}\n UZIP.F.contSize = ${UZIP.F.contSize}\n UZIP.F._codeTiny = ${UZIP.F._codeTiny} \n UZIP.F._lenCodes = ${UZIP.F._lenCodes} \n UZIP.F._hufTree = ${UZIP.F._hufTree} \n UZIP.F.setDepth = ${UZIP.F.setDepth} \n UZIP.F.restrictDepth = ${UZIP.F.restrictDepth}\n UZIP.F._goodIndex = ${UZIP.F._goodIndex} \n UZIP.F._writeLit = ${UZIP.F._writeLit} \n UZIP.F.inflate = ${UZIP.F.inflate} \n UZIP.F._check = ${UZIP.F._check} \n UZIP.F._decodeTiny = ${UZIP.F._decodeTiny} \n UZIP.F._copyOut = ${UZIP.F._copyOut} \n UZIP.F.makeCodes = ${UZIP.F.makeCodes} \n UZIP.F.codes2map = ${UZIP.F.codes2map} \n UZIP.F.revCodes = ${UZIP.F.revCodes} \n\n // used only in deflate\n UZIP.F._putsE = ${UZIP.F._putsE}\n UZIP.F._putsF = ${UZIP.F._putsF}\n \n UZIP.F._bitsE = ${UZIP.F._bitsE}\n UZIP.F._bitsF = ${UZIP.F._bitsF}\n\n UZIP.F._get17 = ${UZIP.F._get17}\n UZIP.F._get25 = ${UZIP.F._get25}\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n `);\n}\n\nfunction generateWorkerScript() {\n // code to be run in the WebWorker\n return createWorker(`\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\\\n' + e.stack, id })\n }\n })\n `);\n}\n\nexport default function compressOnWebWorker(file, options) {\n return new Promise((resolve, reject) => {\n cnt += 1;\n const id = cnt;\n\n if (!imageCompressionLibUrl) {\n imageCompressionLibUrl = generateLib();\n }\n\n if (!worker) {\n worker = generateWorkerScript();\n }\n\n function handler(e) {\n if (e.data.id === id) {\n if (e.data.progress !== undefined) {\n options.onProgress(e.data.progress);\n return;\n }\n worker.removeEventListener('message', handler);\n if (e.data.error) {\n reject(new Error(e.data.error));\n }\n resolve(e.data.file);\n }\n }\n\n worker.addEventListener('message', handler);\n worker.addEventListener('error', reject);\n\n worker.postMessage({\n file,\n id,\n imageCompressionLibUrl,\n options: { ...options, onProgress: undefined },\n });\n });\n}\n","import './polyfill';\n\nimport compress from './image-compression';\nimport {\n canvasToFile,\n drawFileInCanvas,\n drawImageInCanvas,\n getDataUrlFromFile,\n getFilefromDataUrl,\n loadImage,\n getExifOrientation,\n handleMaxWidthOrHeight,\n followExifOrientation,\n CustomFile,\n cleanupCanvasMemory,\n isAutoOrientationInBrowser,\n approximateBelowMaximumCanvasSizeOfBrowser,\n getBrowserName,\n} from './utils';\n// eslint-disable-next-line import/no-cycle\nimport compressOnWebWorker from './web-worker';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} opts - { maxSizeMB=Number.POSITIVE_INFINITY, maxWidthOrHeight, useWebWorker=false, maxIteration = 10, exifOrientation, fileType }\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @returns {Promise}\n */\nasync function imageCompression(file, options) {\n const opts = { ...options };\n\n let compressedFile;\n let progress = 0;\n const { onProgress } = opts;\n\n opts.maxSizeMB = opts.maxSizeMB || Number.POSITIVE_INFINITY;\n const useWebWorker = typeof opts.useWebWorker === 'boolean' ? opts.useWebWorker : true;\n delete opts.useWebWorker;\n opts.onProgress = (aProgress) => {\n progress = aProgress;\n if (typeof onProgress === 'function') {\n onProgress(progress);\n }\n };\n\n if (!(file instanceof Blob || file instanceof CustomFile)) {\n throw new Error('The file given is not an instance of Blob or File');\n } else if (!/^image/.test(file.type)) {\n throw new Error('The file given is not an image');\n }\n\n // try run in web worker, fall back to run in main thread\n // eslint-disable-next-line no-undef, no-restricted-globals\n const inWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n\n if (process.env.BUILD === 'development') {\n if ((useWebWorker && typeof Worker === 'function') || inWebWorker) {\n console.log('run compression in web worker');\n } else {\n console.log('run compression in main thread');\n }\n }\n\n if (useWebWorker && typeof Worker === 'function' && !inWebWorker) {\n try {\n // \"compressOnWebWorker\" is kind of like a recursion to call \"imageCompression\" again inside web worker\n compressedFile = await compressOnWebWorker(file, opts);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.warn('Run compression in web worker failed:', e, ', fall back to main thread');\n }\n compressedFile = await compress(file, opts);\n }\n } else {\n compressedFile = await compress(file, opts);\n }\n\n try {\n compressedFile.name = file.name;\n compressedFile.lastModified = file.lastModified;\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n }\n\n return compressedFile;\n}\n\nimageCompression.getDataUrlFromFile = getDataUrlFromFile;\nimageCompression.getFilefromDataUrl = getFilefromDataUrl;\nimageCompression.loadImage = loadImage;\nimageCompression.drawImageInCanvas = drawImageInCanvas;\nimageCompression.drawFileInCanvas = drawFileInCanvas;\nimageCompression.canvasToFile = canvasToFile;\nimageCompression.getExifOrientation = getExifOrientation;\n\nimageCompression.handleMaxWidthOrHeight = handleMaxWidthOrHeight;\nimageCompression.followExifOrientation = followExifOrientation;\nimageCompression.cleanupCanvasMemory = cleanupCanvasMemory;\nimageCompression.isAutoOrientationInBrowser = isAutoOrientationInBrowser;\nimageCompression.approximateBelowMaximumCanvasSizeOfBrowser = approximateBelowMaximumCanvasSizeOfBrowser;\nimageCompression.getBrowserName = getBrowserName;\nimageCompression.version = __buildVersion__;\n\nexport default imageCompression;\n"],"names":["check","it","Math","isPure","toObject","argument","has","Object","hasOwn","key","id","postfix","random","isCallable","aFunction","process","Deno","versions","match","userAgent","version","fails","WellKnownSymbolsStore","name","NATIVE_SYMBOL","TO_STRING_TAG","wellKnownSymbol","test","EXISTS","isObject","document","createElement","tryToString","func","V","P","val","toPrimitive","input","exoticToPrim","getMethod","isSymbol","toPropertyKey","createPropertyDescriptor","definePropertyModule","f","object","value","store","inspectSource","functionToString","hiddenKeys","OBJECT_ALREADY_INITIALIZED","set","get","NATIVE_WEAK_MAP","wmhas","call","STATE","FunctionPrototype","prototype","DESCRIPTORS","redefine","getInternalState","InternalStateModule","unsafe","simple","CONFIGURABLE_FUNCTION_NAME","toString","arguments","tryGet","$propertyIsEnumerable","getOwnPropertyDescriptor","NASHORN_BUG","split","ceil","floor","toInteger","max","IS_INCLUDES","$this","el","fromIndex","O","toIndexedObject","length","i","copyConstructorProperties","keys","descriptor","target","src","setPrototypeOf","proto","setToStringTag","TAG","STATIC","anInstance","Constructor","TypeError","iterators","ArrayPrototype","Array","a","usingIterator","innerResult","innerError","anObject","iterate","iterable","unboundFunction","options","AS_ENTRIES","bind","INTERRUPTED","fn","IS_ITERATOR","ITERATOR","constructorRegExp","INCORRECT_TO_STRING","isConstructorLegacy","speciesConstructor","defaultConstructor","global","setImmediate","MessageChannel","counter","ONREADYSTATECHANGE","queue","hasOwnProperty","event","location","protocol","host","args","now","runner","macrotask","promise","then","flush","PromiseCapability","C","resolve","console","perform","engineIsBrowser","SPECIES","PROMISE","NativePromisePrototype","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","SUBCLASSING","GLOBAL_CORE_JS_PROMISE","IS_BROWSER","INCORRECT_ITERATION","notify","state","reaction","DISPATCH_EVENT","rejection","IS_NODE","isUnhandled","UNHANDLED","HANDLED","onHandleUnhandled","REJECTED","internalReject","type","NativePromise","PromiseConstructorPrototype","forced","Promise","GT","LT","iframe","style","display","String","iframeDocument","write","scriptTag","F","activeXDocument","whitespaces","ltrim","RegExp","first","third","radix","maxCode","digits","index","code","FUNCTION_NAME_EXISTS","FunctionPrototypeToString","assign","B","symbol","chr","getOwnPropertySymbols","getOwnPropertySymbolsModule","re","$RegExp","exec","regexpUnsupportedDotAll","regexpUnsupportedNcg","nativeExec","nativeReplace","patchedExec","this","raw","strCopy","str","flags","replace","indexOf","lastIndex","UPDATES_LAST_INDEX_WRONG","MATCH","S","requireObjectCoercible","CONVERT_TO_STRING","undefined","charAt","require$$0","R","SPLIT","nativeSplit","maybeCallNative","lastLastIndex","arrayPush","string","internalSplit","unicodeMatching","rx","unicode","ignoreCase","multiline","UNSUPPORTED_Y","regexp","matcher","UNSCOPABLES","configurable","objectGetPrototypeOf","PrototypeOfArrayIteratorPrototype","CurrentIteratorPrototype","returnThis","arrayBufferNative","Int8Array","Uint8ClampedArrayPrototype","Uint8ClampedArray","TypedArray","TYPED_ARRAY_CONSTRUCTOR","Prototype","Int32Array","BigIntArrayConstructorsList","BigInt64Array","klass","isTypedArray","aTypedArray","isPrototypeOf","TypedArrayPrototype","KEY","createNonEnumerableProperty","NAME","number","abs","pow","log","LN2","pack","exponentLength","exponent","c","unpack","buffer","nBits","eMax","mantissa","sign","mantissaLength","getOwnPropertyNames","defineProperty","require$$1","PROPER_FUNCTION_NAME","FunctionName","PROPER","setInternalState","$DataViewPrototype","$DataView","PROTOTYPE","intIndex","toIndex","count","byteLength","WRONG_INDEX","bytes","isLittleEndian","conversion","DataView","DATA_VIEW","byteOffset","packFloat32","aTypedArrayConstructor","typedArrayFrom","aConstructor","constructor","arraySpeciesCreate","originalArray","IS_SOME","IS_EVERY","IS_FIND_INDEX","TYPE","self","toLength","push","typedArrayConstructor","commonjsHelpers.createCommonjsModule","module","forEach","nativeGetOwnPropertyDescriptor","getOwnPropertyDescriptorModule","ArrayBufferModule","fromList","result","isArrayBuffer","isTypedArrayIndex","wrappedDefineProperty","wrapper","CLAMPED","CONSTRUCTOR_NAME","offset","BYTES","$len","Uint8Array","data","init","len","to","toAbsoluteIndex","end","from","arrayFromConstructorAndList","ArrayBufferViewCore","$filter","filter","arrayKeys","ArrayIterators","arrayEntries","exportTypedArrayMethod","nativeTypedArrayIterator","PROPER_ARRAY_VALUES_NAME","arrayMethodIsStrict","STRICT_METHOD","$map","map","IS_RIGHT","that","callbackfn","mergeSort","comparefn","array","j","right","Uint16Array","nativeSort","sort","STABLE_SORT","FF","WEBKIT","mod","$toLocaleString","FORCED","Uint8ArrayPrototype","arrayToString","arrayJoin","join","$includes","notARegexp","METHOD_NAME","Uint32Array","TO_STRING","RegExpPrototype","nativeToString","NOT_GENERIC","k","FAILS_ON_UNDEFINED","x","u32","UZIP","eocd","rUi","_readLocal","roff","out","csize","usize","onlyNames","rUs","nlen","buf","adler","crc","level","deflateRaw","p","cpr","zpd","file","bin","sizeUTF8","tot","o","_writeHeader","ioff","wUi","ext","obj","n","off","table","buff","charCodeAt","_goodIndex","_hash","putsE","_putsE","dlen","li","mch","lits","dst","lgi","dgi","lc","cvrd","ci","cl","U","pos","l0","BTYPE","o0","makeCodes","dtree","itree","si","dxb","p8","dset","b","tree","lz","l","_hufTree","list","hl","hst","l2","slice","maxl","MAXL","lit","bCost","MD","dbt","arr","v","ch","ltree","u8","noBuf","HLIT","HDIST","HCLEN","ML","bitsE","ttree","mx1","dmap","ebs","ldef","_check","lmap","LL","_bitsE","_copyOut","bl_count","MAX_BITS","dt","flmap","u16","fdmap","strt","rev15","sv","exb","w","height","h","img","frames","fh","frm","dispose","bpp","area","bf32","ctype","depth","tabs","tRNS","ts","ti","ap","y","bf","qi","cj","t0","di","gr","al","tr","readASCII","doff","num_frames","num_plays","del","fd","readUint","text","keyw","readUTF8","pl","PLTE","foff","bpl","interlace","CgBI","UPNG","inflateRaw","decode","_inflate","dd","_filterZero","_readInterlace","H","N","m","Z","W","A","u","r","D","X","Y","e","I","M","starting_row","row_increment","pass","cr","cc","row","starting_col","bpll","col","cbpp","sh","_paeth","pa","pc","s","fb","ifa","tb","fr","fg","mode","fa","sb","ba","bufs","nimg","encode","_main","ac","_bin","wUs","wAs","dl","anim","leng","sRGB","pHYs","loop","cimg","imgd","nh","onlyBlend","inds","nbufs","cof","bln","ind","ilen","img32","inj","gotAlpha","frms","nx","tlim","forbidPrev","alwaysBlend","pimg","mix","evenCrd","sarea","min","miY","r0","miX","_updateFrame","rect","width","U8","pimg32","cx","miy","blend","rec","ftry","opts","paeth","oimg","nimg32","KD","quantize","getKDtree","root","nd","err","i0","maxL","splitPixels","i1","node","left","planeDst","ln","rn","getNearest","q","d0","d1","d2","g","stats","m0","Rj","m1","iN","m3","Cov","round","M4","noff","isBrowser","window","cordova","CustomFileReader","reader","onload","readAsDataURL","Image","CHROME","browserName","BROWSER_NAME","approximateBelowMaximumCanvasSizeOfBrowser","maximumCanvasSize","drawImageInCanvas","canvas","png","Blob","fileLastModified","$await_11","testImageCanvas","$await_13","cachedResult","view","getUint32","little","maxWidthOrHeight","maxSizeByte","classList","documentCreateElement","CollectionPrototype","searchParams","IS_CONSTRUCTOR","argumentsLength","mapfn","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexNonASCII","regexSeparators","OVERFLOW_ERROR","baseMinusTMin","stringFromCharCode","extra","digitToBasic","adapt","delta","numPoints","nativeFetch","getBuiltIn","NativeRequest","percentSequence","sequences","attribute","entries","query","URLSearchParamsIterator","createIteratorConstructor","Iterator","params","kind","entry","URLSearchParams","URLSearchParamsConstructor","URL_SEARCH_PARAMS","parseSearchParams","getInternalParamsState","entriesIndex","boundFunction","codeAt","NativeURL","getInternalSearchParamsState","getInternalURLState","getterFor","INVALID_AUTHORITY","INVALID_SCHEME","INVALID_PORT","ALPHA","DIGIT","HEX_START","OCT","DEC","LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE","INVALID_HOST","url","codePoints","C0ControlPercentEncodeSet","parseIPv4","parts","numbers","pieceIndex","ipv4Piece","maxLength","currLength","percentEncode","specialSchemes","https","ws","wss","isSpecial","includesCredentials","username","password","cannotHaveUsernamePasswordPort","isWindowsDriveLetter","second","path","segment","toLowerCase","SCHEME_START","PATH_OR_AUTHORITY","AUTHORITY","CANNOT_BE_A_BASE_URL_PATH","stateOverride","TAB_AND_NEW_LINE","arrayFrom","pointer","scheme","failure","fragment","searchParamsState","getPathname","URLPrototype","output","getProtocol","port","updateSearchParams","$toString","search","$forEach","propertyIsEnumerable","objectKeys","$startsWith","namedCaptures","position","maybeToString","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","REPLACE","searchValue","res","replaceValue","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","cnt","worker","script","blobArgs","Worker","createSourceObject","imageCompression","getDataUrlFromFile","getFilefromDataUrl","loadImage","drawFileInCanvas","canvasToFile","getExifOrientation","handleMaxWidthOrHeight","followExifOrientation","cleanupCanvasMemory","isAutoOrientationInBrowser","getBrowserName"],"mappings":"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"} \ No newline at end of file diff --git a/dist/browser-image-compression.mjs b/dist/browser-image-compression.mjs index 729f164..eb7e075 100644 --- a/dist/browser-image-compression.mjs +++ b/dist/browser-image-compression.mjs @@ -1,9 +1,9 @@ /** * Browser Image Compression - * v1.0.16 + * v1.0.17 * by Donald * https://github.com/Donaldcwl/browser-image-compression */ -function _mergeNamespaces(e,r){return r.forEach((function(r){Object.keys(r).forEach((function(t){if("default"!==t&&!(t in e)){var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:function(){return r[t]}})}}))})),Object.freeze(e)}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function _objectSpread2(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,a=new Array(r);t=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=match[1])));var engineV8Version=version&&+version,fails=function(e){try{return!!e()}catch(e){return!0}},nativeSymbol=!!Object.getOwnPropertySymbols&&!fails((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,WellKnownSymbolsStore=shared("wks"),Symbol$1=global$1.Symbol,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(e){return has$1(WellKnownSymbolsStore,e)&&(nativeSymbol||"string"==typeof WellKnownSymbolsStore[e])||(nativeSymbol&&has$1(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},TO_STRING_TAG$4=wellKnownSymbol("toStringTag"),test$1={};test$1[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$1),descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),isObject=function(e){return"object"==typeof e?null!==e:isCallable(e)},document$3=global$1.document,EXISTS$1=isObject(document$3)&&isObject(document$3.createElement),documentCreateElement=function(e){return EXISTS$1?document$3.createElement(e):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(e){if(isObject(e))return e;throw TypeError(String(e)+" is not an object")},isSymbol=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var r=getBuiltIn("Symbol");return isCallable(r)&&Object(e)instanceof r},tryToString=function(e){try{return String(e)}catch(e){return"Object"}},aCallable=function(e){if(isCallable(e))return e;throw TypeError(tryToString(e)+" is not a function")},getMethod=function(e,r){var t=e[r];return null==t?void 0:aCallable(t)},ordinaryToPrimitive=function(e,r){var t,a;if("string"===r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;if(isCallable(t=e.valueOf)&&!isObject(a=t.call(e)))return a;if("string"!==r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;throw TypeError("Can't convert object to primitive value")},TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),toPrimitive=function(e,r){if(!isObject(e)||isSymbol(e))return e;var t,a=getMethod(e,TO_PRIMITIVE);if(a){if(void 0===r&&(r="default"),t=a.call(e,r),!isObject(t)||isSymbol(t))return t;throw TypeError("Can't convert object to primitive value")}return void 0===r&&(r="number"),ordinaryToPrimitive(e,r)},toPropertyKey=function(e){var r=toPrimitive(e,"string");return isSymbol(r)?r:String(r)},$defineProperty=Object.defineProperty,f$5=descriptors?$defineProperty:function defineProperty(e,r,t){if(anObject(e),r=toPropertyKey(r),anObject(t),ie8DomDefine)try{return $defineProperty(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported");return"value"in t&&(e[r]=t.value),e},objectDefineProperty={f:f$5},createPropertyDescriptor=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}},createNonEnumerableProperty=descriptors?function(e,r,t){return objectDefineProperty.f(e,r,createPropertyDescriptor(1,t))}:function(e,r,t){return e[r]=t,e},functionToString=Function.toString;isCallable(sharedStore.inspectSource)||(sharedStore.inspectSource=function(e){return functionToString.call(e)});var inspectSource=sharedStore.inspectSource,WeakMap$1=global$1.WeakMap,nativeWeakMap=isCallable(WeakMap$1)&&/native code/.test(inspectSource(WeakMap$1)),keys$2=shared("keys"),sharedKey=function(e){return keys$2[e]||(keys$2[e]=uid(e))},hiddenKeys$1={},OBJECT_ALREADY_INITIALIZED="Object already initialized",WeakMap=global$1.WeakMap,set$2,get$1,has,enforce=function(e){return has(e)?get$1(e):set$2(e,{})},getterFor=function(e){return function(r){var t;if(!isObject(r)||(t=get$1(r)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}};if(nativeWeakMap||sharedStore.state){var store=sharedStore.state||(sharedStore.state=new WeakMap),wmget=store.get,wmhas=store.has,wmset=store.set;set$2=function(e,r){if(wmhas.call(store,e))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,wmset.call(store,e,r),r},get$1=function(e){return wmget.call(store,e)||{}},has=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys$1[STATE]=!0,set$2=function(e,r){if(has$1(e,STATE))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,createNonEnumerableProperty(e,STATE,r),r},get$1=function(e){return has$1(e,STATE)?e[STATE]:{}},has=function(e){return has$1(e,STATE)}}var internalState={set:set$2,get:get$1,has:has,enforce:enforce,getterFor:getterFor},FunctionPrototype$1=Function.prototype,getDescriptor=descriptors&&Object.getOwnPropertyDescriptor,EXISTS=has$1(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function something(){}.name,CONFIGURABLE=EXISTS&&(!descriptors||descriptors&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},redefine=createCommonjsModule((function(e){var r=functionName.CONFIGURABLE,t=internalState.get,a=internalState.enforce,i=String(String).split("String");(e.exports=function(e,t,s,c){var l,u=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet,h=c&&void 0!==c.name?c.name:t;isCallable(s)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!has$1(s,"name")||r&&s.name!==h)&&createNonEnumerableProperty(s,"name",h),(l=a(s)).source||(l.source=i.join("string"==typeof h?h:""))),e!==global$1?(u?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=s:createNonEnumerableProperty(e,t,s)):p?e[t]=s:setGlobal(t,s)})(Function.prototype,"toString",(function toString(){return isCallable(this)&&t(this).source||inspectSource(this)}))})),toString$1={}.toString,classofRaw=function(e){return toString$1.call(e).slice(8,-1)},TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,r){try{return e[r]}catch(e){}},classof=toStringTagSupport?classofRaw:function(e){var r,t,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(r=Object(e),TO_STRING_TAG$3))?t:CORRECT_ARGUMENTS?classofRaw(r):"Object"==(a=classofRaw(r))&&isCallable(r.callee)?"Arguments":a},objectToString=toStringTagSupport?{}.toString:function toString(){return"[object "+classof(this)+"]"};toStringTagSupport||redefine(Object.prototype,"toString",objectToString,{unsafe:!0});var $propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$4&&!$propertyIsEnumerable.call({1:2},1),f$4=NASHORN_BUG?function propertyIsEnumerable(e){var r=getOwnPropertyDescriptor$4(this,e);return!!r&&r.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable={f:f$4},split="".split,indexedObject=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$3=descriptors?$getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,r){if(e=toIndexedObject(e),r=toPropertyKey(r),ie8DomDefine)try{return $getOwnPropertyDescriptor(e,r)}catch(e){}if(has$1(e,r))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,r),e[r])},objectGetOwnPropertyDescriptor={f:f$3},ceil=Math.ceil,floor$7=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor$7:ceil)(e)},min$6=Math.min,toLength=function(e){return e>0?min$6(toInteger(e),9007199254740991):0},max$2=Math.max,min$5=Math.min,toAbsoluteIndex=function(e,r){var t=toInteger(e);return t<0?max$2(t+r,0):min$5(t,r)},createMethod$5=function(e){return function(r,t,a){var i,s=toIndexedObject(r),c=toLength(s.length),l=toAbsoluteIndex(a,c);if(e&&t!=t){for(;c>l;)if((i=s[l++])!=i)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===t)return e||l||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(e,r){var t,a=toIndexedObject(e),i=0,s=[];for(t in a)!has$1(hiddenKeys$1,t)&&has$1(a,t)&&s.push(t);for(;r.length>i;)has$1(a,t=r[i++])&&(~indexOf(s,t)||s.push(t));return s},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys=enumBugKeys.concat("length","prototype"),f$2=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return objectKeysInternal(e,hiddenKeys)},objectGetOwnPropertyNames={f:f$2},f$1=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$1},ownKeys=getBuiltIn("Reflect","ownKeys")||function ownKeys(e){var r=objectGetOwnPropertyNames.f(anObject(e)),t=objectGetOwnPropertySymbols.f;return t?r.concat(t(e)):r},copyConstructorProperties=function(e,r){for(var t=ownKeys(r),a=objectDefineProperty.f,i=objectGetOwnPropertyDescriptor.f,s=0;ss;s++)if((l=callFn(e[s]))&&l instanceof Result)return l;return new Result(!1)}a=getIterator(e,i)}for(u=a.next;!(p=u.call(a)).done;){try{l=callFn(p.value)}catch(e){iteratorClose(a,"throw",e)}if("object"==typeof l&&l&&l instanceof Result)return l}return new Result(!1)},ITERATOR$6=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$6]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration=function(e,r){if(!r&&!SAFE_CLOSING)return!1;var t=!1;try{var a={};a[ITERATOR$6]=function(){return{next:function(){return{done:t=!0}}}},e(a)}catch(e){}return t},empty=[],construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=constructorRegExp.exec,INCORRECT_TO_STRING=!constructorRegExp.exec((function(){})),isConstructorModern=function(e){if(!isCallable(e))return!1;try{return construct(Object,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable(e))return!1;switch(classof(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return INCORRECT_TO_STRING||!!exec.call(constructorRegExp,inspectSource(e))},isConstructor=!construct||fails((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,aConstructor=function(e){if(isConstructor(e))return e;throw TypeError(tryToString(e)+" is not a constructor")},SPECIES$5=wellKnownSymbol("species"),speciesConstructor=function(e,r){var t,a=anObject(e).constructor;return void 0===a||null==(t=anObject(a)[SPECIES$5])?r:aConstructor(t)},html=getBuiltIn("document","documentElement"),engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent),engineIsNode="process"==classofRaw(global$1.process),set$1=global$1.setImmediate,clear=global$1.clearImmediate,process$2=global$1.process,MessageChannel=global$1.MessageChannel,Dispatch=global$1.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",location,defer,channel,port;try{location=global$1.location}catch(e){}var run=function(e){if(queue.hasOwnProperty(e)){var r=queue[e];delete queue[e],r()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$1.postMessage(String(e),location.protocol+"//"+location.host)};set$1&&clear||(set$1=function setImmediate(e){for(var r=[],t=arguments.length,a=1;t>a;)r.push(arguments[a++]);return queue[++counter]=function(){(isCallable(e)?e:Function(e)).apply(void 0,r)},defer(counter),counter},clear=function clearImmediate(e){delete queue[e]},engineIsNode?defer=function(e){process$2.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!engineIsIos?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=functionBindContext(port.postMessage,port,1)):global$1.addEventListener&&isCallable(global$1.postMessage)&&!global$1.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global$1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(e){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$1,clear:clear},engineIsIosPebble=/ipad|iphone|ipod/i.test(engineUserAgent)&&void 0!==global$1.Pebble,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(engineUserAgent),getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,MutationObserver=global$1.MutationObserver||global$1.WebKitMutationObserver,document$2=global$1.document,process$1=global$1.process,Promise$1=global$1.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,flush,head,last,notify$1,toggle,node,promise,then;queueMicrotask||(flush=function(){var e,r;for(engineIsNode&&(e=process$1.domain)&&e.exit();head;){r=head.fn,head=head.next;try{r()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},engineIsIos||engineIsNode||engineIsWebosWebkit||!MutationObserver||!document$2?!engineIsIosPebble&&Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),promise.constructor=Promise$1,then=promise.then,notify$1=function(){then.call(promise,flush)}):notify$1=engineIsNode?function(){process$1.nextTick(flush)}:function(){macrotask.call(global$1,flush)}:(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}));var microtask=queueMicrotask||function(e){var r={fn:e,next:void 0};last&&(last.next=r),head||(head=r,notify$1()),last=r},PromiseCapability=function(e){var r,t;this.promise=new e((function(e,a){if(void 0!==r||void 0!==t)throw TypeError("Bad Promise constructor");r=e,t=a})),this.resolve=aCallable(r),this.reject=aCallable(t)},f=function(e){return new PromiseCapability(e)},newPromiseCapability$1={f:f},promiseResolve=function(e,r){if(anObject(e),isObject(r)&&r.constructor===e)return r;var t=newPromiseCapability$1.f(e);return(0,t.resolve)(r),t.promise},hostReportErrors=function(e,r){var t=global$1.console;t&&t.error&&(1===arguments.length?t.error(e):t.error(e,r))},perform=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},engineIsBrowser="object"==typeof window,task=task$1.set,SPECIES$4=wellKnownSymbol("species"),PROMISE="Promise",getInternalState$4=internalState.get,setInternalState$5=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),NativePromisePrototype=nativePromiseConstructor&&nativePromiseConstructor.prototype,PromiseConstructor=nativePromiseConstructor,PromiseConstructorPrototype=NativePromisePrototype,TypeError$1=global$1.TypeError,document$1=global$1.document,process=global$1.process,newPromiseCapability=newPromiseCapability$1.f,newGenericPromiseCapability=newPromiseCapability,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),NATIVE_REJECTION_EVENT=isCallable(global$1.PromiseRejectionEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,SUBCLASSING=!1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,FORCED$6=isForced_1(PROMISE,(function(){var e=inspectSource(PromiseConstructor),r=e!==String(PromiseConstructor);if(!r&&66===engineV8Version)return!0;if(engineV8Version>=51&&/native code/.test(e))return!1;var t=new PromiseConstructor((function(e){e(1)})),FakePromise=function(e){e((function(){}),(function(){}))};return(t.constructor={})[SPECIES$4]=FakePromise,!(SUBCLASSING=t.then((function(){}))instanceof FakePromise)||!r&&engineIsBrowser&&!NATIVE_REJECTION_EVENT})),INCORRECT_ITERATION=FORCED$6||!checkCorrectnessOfIteration((function(e){PromiseConstructor.all(e).catch((function(){}))})),isThenable=function(e){var r;return!(!isObject(e)||!isCallable(r=e.then))&&r},notify=function(e,r){if(!e.notified){e.notified=!0;var t=e.reactions;microtask((function(){for(var a=e.value,i=e.state==FULFILLED,s=0;t.length>s;){var c,l,u,p=t[s++],d=i?p.ok:p.fail,h=p.resolve,y=p.reject,A=p.domain;try{d?(i||(e.rejection===UNHANDLED&&onHandleUnhandled(e),e.rejection=HANDLED),!0===d?c=a:(A&&A.enter(),c=d(a),A&&(A.exit(),u=!0)),c===p.promise?y(TypeError$1("Promise-chain cycle")):(l=isThenable(c))?l.call(c,h,y):h(c)):y(a)}catch(e){A&&!u&&A.exit(),y(e)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(e)}))}},dispatchEvent=function(e,r,t){var a,i;DISPATCH_EVENT?((a=document$1.createEvent("Event")).promise=r,a.reason=t,a.initEvent(e,!1,!0),global$1.dispatchEvent(a)):a={promise:r,reason:t},!NATIVE_REJECTION_EVENT&&(i=global$1["on"+e])?i(a):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",t)},onUnhandled=function(e){task.call(global$1,(function(){var r,t=e.facade,a=e.value;if(isUnhandled(e)&&(r=perform((function(){engineIsNode?process.emit("unhandledRejection",a,t):dispatchEvent(UNHANDLED_REJECTION,t,a)})),e.rejection=engineIsNode||isUnhandled(e)?UNHANDLED:HANDLED,r.error))throw r.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){task.call(global$1,(function(){var r=e.facade;engineIsNode?process.emit("rejectionHandled",r):dispatchEvent(REJECTION_HANDLED,r,e.value)}))},bind=function(e,r,t){return function(a){e(r,a,t)}},internalReject=function(e,r,t){e.done||(e.done=!0,t&&(e=t),e.value=r,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,r,t){if(!e.done){e.done=!0,t&&(e=t);try{if(e.facade===r)throw TypeError$1("Promise can't be resolved itself");var a=isThenable(r);a?microtask((function(){var t={done:!1};try{a.call(r,bind(internalResolve,t,e),bind(internalReject,t,e))}catch(r){internalReject(t,r,e)}})):(e.value=r,e.state=FULFILLED,notify(e,!1))}catch(r){internalReject({done:!1},r,e)}}};if(FORCED$6&&(PromiseConstructor=function Promise(e){anInstance(this,PromiseConstructor,PROMISE),aCallable(e),Internal.call(this);var r=getInternalState$4(this);try{e(bind(internalResolve,r),bind(internalReject,r))}catch(e){internalReject(r,e)}},PromiseConstructorPrototype=PromiseConstructor.prototype,Internal=function Promise(e){setInternalState$5(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})},Internal.prototype=redefineAll(PromiseConstructorPrototype,{then:function then(e,r){var t=getInternalPromiseState(this),a=newPromiseCapability(speciesConstructor(this,PromiseConstructor));return a.ok=!isCallable(e)||e,a.fail=isCallable(r)&&r,a.domain=engineIsNode?process.domain:void 0,t.parent=!0,t.reactions.push(a),t.state!=PENDING&¬ify(t,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal,r=getInternalState$4(e);this.promise=e,this.resolve=bind(internalResolve,r),this.reject=bind(internalReject,r)},newPromiseCapability$1.f=newPromiseCapability=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable(nativePromiseConstructor)&&NativePromisePrototype!==Object.prototype)){nativeThen=NativePromisePrototype.then,SUBCLASSING||(redefine(NativePromisePrototype,"then",(function then(e,r){var t=this;return new PromiseConstructor((function(e,r){nativeThen.call(t,e,r)})).then(e,r)}),{unsafe:!0}),redefine(NativePromisePrototype,"catch",PromiseConstructorPrototype.catch,{unsafe:!0}));try{delete NativePromisePrototype.constructor}catch(e){}objectSetPrototypeOf&&objectSetPrototypeOf(NativePromisePrototype,PromiseConstructorPrototype)}_export({global:!0,wrap:!0,forced:FORCED$6},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE),PromiseWrapper=getBuiltIn(PROMISE),_export({target:PROMISE,stat:!0,forced:FORCED$6},{reject:function reject(e){var r=newPromiseCapability(this);return r.reject.call(void 0,e),r.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED$6},{resolve:function resolve(e){return promiseResolve(this,e)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function all(e){var r=this,t=newPromiseCapability(r),a=t.resolve,i=t.reject,s=perform((function(){var t=aCallable(r.resolve),s=[],c=0,l=1;iterate(e,(function(e){var u=c++,p=!1;s.push(void 0),l++,t.call(r,e).then((function(e){p||(p=!0,s[u]=e,--l||a(s))}),i)})),--l||a(s)}));return s.error&&i(s.value),t.promise},race:function race(e){var r=this,t=newPromiseCapability(r),a=t.reject,i=perform((function(){var i=aCallable(r.resolve);iterate(e,(function(e){i.call(r,e).then(t.resolve,a)}))}));return i.error&&a(i.value),t.promise}});var inheritIfRequired=function(e,r,t){var a,i;return objectSetPrototypeOf&&isCallable(a=r.constructor)&&a!==t&&isObject(i=a.prototype)&&i!==t.prototype&&objectSetPrototypeOf(e,i),e},objectKeys=Object.keys||function keys(e){return objectKeysInternal(e,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function defineProperties(e,r){anObject(e);for(var t,a=objectKeys(r),i=a.length,s=0;i>s;)objectDefineProperty.f(e,t=a[s++],r[t]);return e},GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var r=e.parentWindow.Object;return e=null,r},NullProtoObjectViaIFrame=function(){var e,r=documentCreateElement("iframe"),t="java"+SCRIPT+":";return r.style.display="none",html.appendChild(r),r.src=String(t),(e=r.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys[e]];return NullProtoObject()};hiddenKeys$1[IE_PROTO$1]=!0;var objectCreate=Object.create||function create(e,r){var t;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject(e),t=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,t[IE_PROTO$1]=e):t=NullProtoObject(),void 0===r?t:objectDefineProperties(t,r)},toString=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},whitespaces="\t\n\v\f\r                 \u2028\u2029\ufeff",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$4=function(e){return function(r){var t=toString(requireObjectCoercible(r));return 1&e&&(t=t.replace(ltrim,"")),2&e&&(t=t.replace(rtrim,"")),t}},stringTrim={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},getOwnPropertyNames$1=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,defineProperty$4=objectDefineProperty.f,trim=stringTrim.trim,NUMBER="Number",NativeNumber=global$1[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classofRaw(objectCreate(NumberPrototype))==NUMBER,toNumber=function(e){if(isSymbol(e))throw TypeError("Cannot convert a Symbol value to a number");var r,t,a,i,s,c,l,u,p=toPrimitive(e,"number");if("string"==typeof p&&p.length>2)if(43===(r=(p=trim(p)).charCodeAt(0))||45===r){if(88===(t=p.charCodeAt(2))||120===t)return NaN}else if(48===r){switch(p.charCodeAt(1)){case 66:case 98:a=2,i=49;break;case 79:case 111:a=8,i=55;break;default:return+p}for(c=(s=p.slice(2)).length,l=0;li)return NaN;return parseInt(s,a)}return+p};if(isForced_1(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var NumberWrapper=function Number(e){var r=arguments.length<1?0:e,t=this;return t instanceof NumberWrapper&&(BROKEN_CLASSOF?fails((function(){NumberPrototype.valueOf.call(t)})):classofRaw(t)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(r)),t,NumberWrapper):toNumber(r)},keys$1=descriptors?getOwnPropertyNames$1(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),j$1=0,key$1;keys$1.length>j$1;j$1++)has$1(NativeNumber,key$1=keys$1[j$1])&&!has$1(NumberWrapper,key$1)&&defineProperty$4(NumberWrapper,key$1,getOwnPropertyDescriptor$1(NativeNumber,key$1));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global$1,NUMBER,NumberWrapper)}var FUNCTION_NAME_EXISTS=functionName.EXISTS,defineProperty$3=objectDefineProperty.f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME$1="name";descriptors&&!FUNCTION_NAME_EXISTS&&defineProperty$3(FunctionPrototype,NAME$1,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(e){return""}}}),_export({global:!0},{globalThis:global$1});var $assign=Object.assign,defineProperty$2=Object.defineProperty,objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},r={},t=Symbol();return e[t]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),7!=$assign({},e)[t]||"abcdefghijklmnopqrst"!=objectKeys($assign({},r)).join("")}))?function assign(e,r){for(var t=toObject(e),a=arguments.length,i=1,s=objectGetOwnPropertySymbols.f,c=objectPropertyIsEnumerable.f;a>i;)for(var l,u=indexedObject(arguments[i++]),p=s?objectKeys(u).concat(s(u)):objectKeys(u),d=p.length,h=0;d>h;)l=p[h++],descriptors&&!c.call(u,l)||(t[l]=u[l]);return t}:$assign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign});var path=global$1;path.Object.assign;var regexpFlags=function(){var e=anObject(this),r="";return e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.sticky&&(r+="y"),r},$RegExp$2=global$1.RegExp,UNSUPPORTED_Y$2=fails((function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET=fails((function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={UNSUPPORTED_Y:UNSUPPORTED_Y$2,BROKEN_CARET:BROKEN_CARET},$RegExp$1=global$1.RegExp,regexpUnsupportedDotAll=fails((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),$RegExp=global$1.RegExp,regexpUnsupportedNcg=fails((function(){var e=$RegExp("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})),getInternalState$3=internalState.get,nativeExec=RegExp.prototype.exec,nativeReplace=shared("native-string-replace",String.prototype.replace),patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=(re1=/a/,re2=/b*/g,nativeExec.call(re1,"a"),nativeExec.call(re2,"a"),0!==re1.lastIndex||0!==re2.lastIndex),re1,re2,UNSUPPORTED_Y$1=regexpStickyHelpers.UNSUPPORTED_Y||regexpStickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||regexpUnsupportedDotAll||regexpUnsupportedNcg;PATCH&&(patchedExec=function exec(e){var r,t,a,i,s,c,l,u=this,p=getInternalState$3(u),d=toString(e),h=p.raw;if(h)return h.lastIndex=u.lastIndex,r=patchedExec.call(h,d),u.lastIndex=h.lastIndex,r;var y=p.groups,A=UNSUPPORTED_Y$1&&u.sticky,g=regexpFlags.call(u),v=u.source,E=0,m=d;if(A&&(-1===(g=g.replace("y","")).indexOf("g")&&(g+="g"),m=d.slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==d.charAt(u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,E++),t=new RegExp("^(?:"+v+")",g)),NPCG_INCLUDED&&(t=new RegExp("^"+v+"$(?!\\s)",g)),UPDATES_LAST_INDEX_WRONG&&(a=u.lastIndex),i=nativeExec.call(A?t:u,m),A?i?(i.input=i.input.slice(E),i[0]=i[0].slice(E),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&i&&(u.lastIndex=u.global?i.index+i[0].length:a),NPCG_INCLUDED&&i&&i.length>1&&nativeReplace.call(i[0],t,(function(){for(s=1;s=l?e?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(i=s.charCodeAt(c+1))<56320||i>57343?e?s.charAt(c):a:e?s.slice(c,c+2):i-56320+(a-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex=function(e,r,t){return r+(t?charAt$1(e,r).length:1)},regexpExecAbstract=function(e,r){var t=e.exec;if(isCallable(t)){var a=t.call(e,r);return null!==a&&anObject(a),a}if("RegExp"===classofRaw(e))return regexpExec.call(e,r);throw TypeError("RegExp#exec called on incompatible receiver")},UNSUPPORTED_Y=regexpStickyHelpers.UNSUPPORTED_Y,arrayPush=[].push,min$4=Math.min,MAX_UINT32=4294967295,SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails((function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var t="ab".split(e);return 2!==t.length||"a"!==t[0]||"b"!==t[1]}));fixRegexpWellKnownSymbolLogic("split",(function(e,r,t){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var a=toString(requireObjectCoercible(this)),i=void 0===t?MAX_UINT32:t>>>0;if(0===i)return[];if(void 0===e)return[a];if(!isRegexp(e))return r.call(a,e,i);for(var s,c,l,u=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=new RegExp(e.source,p+"g");(s=regexpExec.call(h,a))&&!((c=h.lastIndex)>d&&(u.push(a.slice(d,s.index)),s.length>1&&s.index=i));)h.lastIndex===s.index&&h.lastIndex++;return d===a.length?!l&&h.test("")||u.push(""):u.push(a.slice(d)),u.length>i?u.slice(0,i):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)}:r,[function split(r,t){var i=requireObjectCoercible(this),s=null==r?void 0:getMethod(r,e);return s?s.call(r,i,t):a.call(toString(i),r,t)},function(e,i){var s=anObject(this),c=toString(e),l=t(a,s,c,i,a!==r);if(l.done)return l.value;var u=speciesConstructor(s,RegExp),p=s.unicode,d=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),h=new u(UNSUPPORTED_Y?"^(?:"+s.source+")":s,d),y=void 0===i?MAX_UINT32:i>>>0;if(0===y)return[];if(0===c.length)return null===regexpExecAbstract(h,c)?[c]:[];for(var A=0,g=0,v=[];g=r.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==t?{value:a,done:!1}:"values"==t?{value:r[a],done:!1}:{value:[a,r[a]],done:!1}}),"values");iterators.Arguments=iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var arrayBufferNative="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,defineProperty$1=objectDefineProperty.f,Int8Array$3=global$1.Int8Array,Int8ArrayPrototype=Int8Array$3&&Int8Array$3.prototype,Uint8ClampedArray=global$1.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray&&Uint8ClampedArray.prototype,TypedArray=Int8Array$3&&objectGetPrototypeOf(Int8Array$3),TypedArrayPrototype=Int8ArrayPrototype&&objectGetPrototypeOf(Int8ArrayPrototype),ObjectPrototype$1=Object.prototype,isPrototypeOf=ObjectPrototype$1.isPrototypeOf,TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),TYPED_ARRAY_TAG=uid("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR$1=uid("TYPED_ARRAY_CONSTRUCTOR"),NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferNative&&!!objectSetPrototypeOf&&"Opera"!==classof(global$1.opera),TYPED_ARRAY_TAG_REQIRED=!1,NAME,Constructor,Prototype,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView=function isView(e){if(!isObject(e))return!1;var r=classof(e);return"DataView"===r||has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},isTypedArray=function(e){if(!isObject(e))return!1;var r=classof(e);return has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},aTypedArray$m=function(e){if(isTypedArray(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor$2=function(e){if(isCallable(e)&&(!objectSetPrototypeOf||isPrototypeOf.call(TypedArray,e)))return e;throw TypeError(tryToString(e)+" is not a typed array constructor")},exportTypedArrayMethod$n=function(e,r,t){if(descriptors){if(t)for(var a in TypedArrayConstructorsList){var i=global$1[a];if(i&&has$1(i.prototype,e))try{delete i.prototype[e]}catch(e){}}TypedArrayPrototype[e]&&!t||redefine(TypedArrayPrototype,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&Int8ArrayPrototype[e]||r)}},exportTypedArrayStaticMethod=function(e,r,t){var a,i;if(descriptors){if(objectSetPrototypeOf){if(t)for(a in TypedArrayConstructorsList)if((i=global$1[a])&&has$1(i,e))try{delete i[e]}catch(e){}if(TypedArray[e]&&!t)return;try{return redefine(TypedArray,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&TypedArray[e]||r)}catch(e){}}for(a in TypedArrayConstructorsList)!(i=global$1[a])||i[e]&&!t||redefine(i,e,r)}};for(NAME in TypedArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype?createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor):NATIVE_ARRAY_BUFFER_VIEWS$1=!1;for(NAME in BigIntArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype&&createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!isCallable(TypedArray)||TypedArray===Function.prototype)&&(TypedArray=function TypedArray(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME],TypedArray);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!TypedArrayPrototype||TypedArrayPrototype===ObjectPrototype$1)&&(TypedArrayPrototype=TypedArray.prototype,NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME].prototype,TypedArrayPrototype);if(NATIVE_ARRAY_BUFFER_VIEWS$1&&objectGetPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype&&objectSetPrototypeOf(Uint8ClampedArrayPrototype,TypedArrayPrototype),descriptors&&!has$1(TypedArrayPrototype,TO_STRING_TAG$1))for(NAME in TYPED_ARRAY_TAG_REQIRED=!0,defineProperty$1(TypedArrayPrototype,TO_STRING_TAG$1,{get:function(){return isObject(this)?this[TYPED_ARRAY_TAG]:void 0}}),TypedArrayConstructorsList)global$1[NAME]&&createNonEnumerableProperty(global$1[NAME],TYPED_ARRAY_TAG,NAME);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$1,TYPED_ARRAY_CONSTRUCTOR:TYPED_ARRAY_CONSTRUCTOR$1,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED&&TYPED_ARRAY_TAG,aTypedArray:aTypedArray$m,aTypedArrayConstructor:aTypedArrayConstructor$2,exportTypedArrayMethod:exportTypedArrayMethod$n,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod,isView:isView,isTypedArray:isTypedArray,TypedArray:TypedArray,TypedArrayPrototype:TypedArrayPrototype},NATIVE_ARRAY_BUFFER_VIEWS=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$1=global$1.ArrayBuffer,Int8Array$2=global$1.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS||!fails((function(){Int8Array$2(1)}))||!fails((function(){new Int8Array$2(-1)}))||!checkCorrectnessOfIteration((function(e){new Int8Array$2,new Int8Array$2(null),new Int8Array$2(1.5),new Int8Array$2(e)}),!0)||fails((function(){return 1!==new Int8Array$2(new ArrayBuffer$1(2),1,void 0).length})),toIndex=function(e){if(void 0===e)return 0;var r=toInteger(e),t=toLength(r);if(r!==t)throw RangeError("Wrong length or index");return t},abs=Math.abs,pow$1=Math.pow,floor$6=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(e,r,t){var a,i,s,c=new Array(t),l=8*t-r-1,u=(1<>1,d=23===r?pow$1(2,-24)-pow$1(2,-77):0,h=e<0||0===e&&1/e<0?1:0,y=0;for((e=abs(e))!=e||e===1/0?(i=e!=e?1:0,a=u):(a=floor$6(log(e)/LN2),e*(s=pow$1(2,-a))<1&&(a--,s*=2),(e+=a+p>=1?d/s:d*pow$1(2,1-p))*s>=2&&(a++,s/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(e*s-1)*pow$1(2,r),a+=p):(i=e*pow$1(2,p-1)*pow$1(2,r),a=0));r>=8;c[y++]=255&i,i/=256,r-=8);for(a=a<0;c[y++]=255&a,a/=256,l-=8);return c[--y]|=128*h,c},unpack=function(e,r){var t,a=e.length,i=8*a-r-1,s=(1<>1,l=i-7,u=a-1,p=e[u--],d=127&p;for(p>>=7;l>0;d=256*d+e[u],u--,l-=8);for(t=d&(1<<-l)-1,d>>=-l,l+=r;l>0;t=256*t+e[u],u--,l-=8);if(0===d)d=1-c;else{if(d===s)return t?NaN:p?-1/0:1/0;t+=pow$1(2,r),d-=c}return(p?-1:1)*t*pow$1(2,d-r)},ieee754={pack:pack,unpack:unpack},arrayFill=function fill(e){for(var r=toObject(this),t=toLength(r.length),a=arguments.length,i=toAbsoluteIndex(a>1?arguments[1]:void 0,t),s=a>2?arguments[2]:void 0,c=void 0===s?t:toAbsoluteIndex(s,t);c>i;)r[i++]=e;return r},getOwnPropertyNames=objectGetOwnPropertyNames.f,defineProperty=objectDefineProperty.f,PROPER_FUNCTION_NAME$2=functionName.PROPER,CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,getInternalState$1=internalState.get,setInternalState$3=internalState.set,ARRAY_BUFFER="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer=global$1[ARRAY_BUFFER],$ArrayBuffer=NativeArrayBuffer,$DataView=global$1[DATA_VIEW],$DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,RangeError$1=global$1.RangeError,packIEEE754=ieee754.pack,unpackIEEE754=ieee754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter=function(e,r){defineProperty(e[PROTOTYPE],r,{get:function(){return getInternalState$1(this)[r]}})},get=function(e,r,t,a){var i=toIndex(t),s=getInternalState$1(e);if(i+r>s.byteLength)throw RangeError$1(WRONG_INDEX);var c=getInternalState$1(s.buffer).bytes,l=i+s.byteOffset,u=c.slice(l,l+r);return a?u:u.reverse()},set=function(e,r,t,a,i,s){var c=toIndex(t),l=getInternalState$1(e);if(c+r>l.byteLength)throw RangeError$1(WRONG_INDEX);for(var u=getInternalState$1(l.buffer).bytes,p=c+l.byteOffset,d=a(+i),h=0;hj;)(key=keys[j++])in $ArrayBuffer||createNonEnumerableProperty($ArrayBuffer,key,NativeArrayBuffer[key]);ArrayBufferPrototype.constructor=$ArrayBuffer}objectSetPrototypeOf&&objectGetPrototypeOf($DataViewPrototype)!==ObjectPrototype&&objectSetPrototypeOf($DataViewPrototype,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=$DataViewPrototype.setInt8;testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||redefineAll($DataViewPrototype,{setInt8:function setInt8(e,r){$setInt8.call(this,e,r<<24>>24)},setUint8:function setUint8(e,r){$setInt8.call(this,e,r<<24>>24)}},{unsafe:!0})}else $ArrayBuffer=function ArrayBuffer(e){anInstance(this,$ArrayBuffer,ARRAY_BUFFER);var r=toIndex(e);setInternalState$3(this,{bytes:arrayFill.call(new Array(r),0),byteLength:r}),descriptors||(this.byteLength=r)},$DataView=function DataView(e,r,t){anInstance(this,$DataView,DATA_VIEW),anInstance(e,$ArrayBuffer,DATA_VIEW);var a=getInternalState$1(e).byteLength,i=toInteger(r);if(i<0||i>a)throw RangeError$1("Wrong offset");if(i+(t=void 0===t?a-i:toLength(t))>a)throw RangeError$1(WRONG_LENGTH);setInternalState$3(this,{buffer:e,byteLength:t,byteOffset:i}),descriptors||(this.buffer=e,this.byteLength=t,this.byteOffset=i)},descriptors&&(addGetter($ArrayBuffer,"byteLength"),addGetter($DataView,"buffer"),addGetter($DataView,"byteLength"),addGetter($DataView,"byteOffset")),redefineAll($DataView[PROTOTYPE],{getInt8:function getInt8(e){return get(this,1,e)[0]<<24>>24},getUint8:function getUint8(e){return get(this,1,e)[0]},getInt16:function getInt16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return r[1]<<8|r[0]},getInt32:function getInt32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function getUint32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function getFloat32(e){return unpackIEEE754(get(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function getFloat64(e){return unpackIEEE754(get(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function setInt8(e,r){set(this,1,e,packInt8,r)},setUint8:function setUint8(e,r){set(this,1,e,packInt8,r)},setInt16:function setInt16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setUint16:function setUint16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setInt32:function setInt32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setUint32:function setUint32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setFloat32:function setFloat32(e,r){set(this,4,e,packFloat32,r,arguments.length>2?arguments[2]:void 0)},setFloat64:function setFloat64(e,r){set(this,8,e,packFloat64,r,arguments.length>2?arguments[2]:void 0)}});setToStringTag($ArrayBuffer,ARRAY_BUFFER),setToStringTag($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},floor$5=Math.floor,isInteger=function isInteger(e){return!isObject(e)&&isFinite(e)&&floor$5(e)===e},toPositiveInteger=function(e){var r=toInteger(e);if(r<0)throw RangeError("The argument can't be less than 0");return r},toOffset=function(e,r){var t=toPositiveInteger(e);if(t%r)throw RangeError("Wrong offset");return t},aTypedArrayConstructor$1=arrayBufferViewCore.aTypedArrayConstructor,typedArrayFrom=function from(e){var r,t,a,i,s,c,l=aConstructor(this),u=toObject(e),p=arguments.length,d=p>1?arguments[1]:void 0,h=void 0!==d,y=getIteratorMethod(u);if(y&&!isArrayIteratorMethod(y))for(c=(s=getIterator(u,y)).next,u=[];!(i=c.call(s)).done;)u.push(i.value);for(h&&p>2&&(d=functionBindContext(d,arguments[2],2)),t=toLength(u.length),a=new(aTypedArrayConstructor$1(l))(t),r=0;t>r;r++)a[r]=h?d(u[r],r):u[r];return a},isArray=Array.isArray||function isArray(e){return"Array"==classofRaw(e)},SPECIES$2=wellKnownSymbol("species"),arraySpeciesConstructor=function(e){var r;return isArray(e)&&(r=e.constructor,(isConstructor(r)&&(r===Array||isArray(r.prototype))||isObject(r)&&null===(r=r[SPECIES$2]))&&(r=void 0)),void 0===r?Array:r},arraySpeciesCreate=function(e,r){return new(arraySpeciesConstructor(e))(0===r?0:r)},push=[].push,createMethod$2=function(e){var r=1==e,t=2==e,a=3==e,i=4==e,s=6==e,c=7==e,l=5==e||s;return function(u,p,d,h){for(var y,A,g=toObject(u),v=indexedObject(g),E=functionBindContext(p,d,3),m=toLength(v.length),I=0,P=h||arraySpeciesCreate,b=r?P(u,m):t||c?P(u,0):void 0;m>I;I++)if((l||I in v)&&(A=E(y=v[I],I,g),e))if(r)b[I]=A;else if(A)switch(e){case 3:return!0;case 5:return y;case 6:return I;case 2:push.call(b,y)}else switch(e){case 4:return!1;case 7:push.call(b,y)}return s?-1:a||i?i:b}},arrayIteration={forEach:createMethod$2(0),map:createMethod$2(1),filter:createMethod$2(2),some:createMethod$2(3),every:createMethod$2(4),find:createMethod$2(5),findIndex:createMethod$2(6),filterReject:createMethod$2(7)},typedArrayConstructor=createCommonjsModule((function(e){var r=objectGetOwnPropertyNames.f,t=arrayIteration.forEach,a=internalState.get,i=internalState.set,s=objectDefineProperty.f,c=objectGetOwnPropertyDescriptor.f,l=Math.round,u=global$1.RangeError,p=arrayBuffer.ArrayBuffer,d=arrayBuffer.DataView,h=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,y=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,A=arrayBufferViewCore.TYPED_ARRAY_TAG,g=arrayBufferViewCore.TypedArray,v=arrayBufferViewCore.TypedArrayPrototype,E=arrayBufferViewCore.aTypedArrayConstructor,m=arrayBufferViewCore.isTypedArray,fromList=function(e,r){for(var t=0,a=r.length,i=new(E(e))(a);a>t;)i[t]=r[t++];return i},addGetter=function(e,r){s(e,r,{get:function(){return a(this)[r]}})},isArrayBuffer=function(e){var r;return e instanceof p||"ArrayBuffer"==(r=classof(e))||"SharedArrayBuffer"==r},isTypedArrayIndex=function(e,r){return m(e)&&!isSymbol(r)&&r in e&&isInteger(+r)&&r>=0},I=function getOwnPropertyDescriptor(e,r){return r=toPropertyKey(r),isTypedArrayIndex(e,r)?createPropertyDescriptor(2,e[r]):c(e,r)},P=function defineProperty(e,r,t){return r=toPropertyKey(r),!(isTypedArrayIndex(e,r)&&isObject(t)&&has$1(t,"value"))||has$1(t,"get")||has$1(t,"set")||t.configurable||has$1(t,"writable")&&!t.writable||has$1(t,"enumerable")&&!t.enumerable?s(e,r,t):(e[r]=t.value,e)};descriptors?(h||(objectGetOwnPropertyDescriptor.f=I,objectDefineProperty.f=P,addGetter(v,"buffer"),addGetter(v,"byteOffset"),addGetter(v,"byteLength"),addGetter(v,"length")),_export({target:"Object",stat:!0,forced:!h},{getOwnPropertyDescriptor:I,defineProperty:P}),e.exports=function(e,c,E){var I=e.match(/\d+$/)[0]/8,P=e+(E?"Clamped":"")+"Array",b="get"+e,T="set"+e,S=global$1[P],R=S,_=R&&R.prototype,U={},addElement=function(e,r){s(e,r,{get:function(){return function(e,r){var t=a(e);return t.view[b](r*I+t.byteOffset,!0)}(this,r)},set:function(e){return function(e,r,t){var i=a(e);E&&(t=(t=l(t))<0?0:t>255?255:255&t),i.view[T](r*I+i.byteOffset,t,!0)}(this,r,e)},enumerable:!0})};h?typedArrayConstructorsRequireWrappers&&(R=c((function(e,r,t,a){return anInstance(e,R,P),inheritIfRequired(isObject(r)?isArrayBuffer(r)?void 0!==a?new S(r,toOffset(t,I),a):void 0!==t?new S(r,toOffset(t,I)):new S(r):m(r)?fromList(R,r):typedArrayFrom.call(R,r):new S(toIndex(r)),e,R)})),objectSetPrototypeOf&&objectSetPrototypeOf(R,g),t(r(S),(function(e){e in R||createNonEnumerableProperty(R,e,S[e])})),R.prototype=_):(R=c((function(e,r,t,a){anInstance(e,R,P);var s,c,l,h=0,y=0;if(isObject(r)){if(!isArrayBuffer(r))return m(r)?fromList(R,r):typedArrayFrom.call(R,r);s=r,y=toOffset(t,I);var A=r.byteLength;if(void 0===a){if(A%I)throw u("Wrong length");if((c=A-y)<0)throw u("Wrong length")}else if((c=toLength(a)*I)+y>A)throw u("Wrong length");l=c/I}else l=toIndex(r),s=new p(c=l*I);for(i(e,{buffer:s,byteOffset:y,byteLength:c,length:l,view:new d(s)});h2?arguments[2]:void 0,l=min$3((void 0===c?a:toAbsoluteIndex(c,a))-s,a-i),u=1;for(s0;)s in t?t[i]=t[s]:delete t[i],i+=u,s+=u;return t},aTypedArray$l=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$m=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$m("copyWithin",(function copyWithin(e,r){return arrayCopyWithin.call(aTypedArray$l(this),e,r,arguments.length>2?arguments[2]:void 0)}));var $every=arrayIteration.every,aTypedArray$k=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$l=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$l("every",(function every(e){return $every(aTypedArray$k(this),e,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$j=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$k=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$k("fill",(function fill(e){return arrayFill.apply(aTypedArray$j(this),arguments)}));var arrayFromConstructorAndList=function(e,r){for(var t=0,a=r.length,i=new e(a);a>t;)i[t]=r[t++];return i},TYPED_ARRAY_CONSTRUCTOR=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,aTypedArrayConstructor=arrayBufferViewCore.aTypedArrayConstructor,typedArraySpeciesConstructor=function(e){return aTypedArrayConstructor(speciesConstructor(e,e[TYPED_ARRAY_CONSTRUCTOR]))},typedArrayFromSpeciesAndList=function(e,r){return arrayFromConstructorAndList(typedArraySpeciesConstructor(e),r)},$filter$1=arrayIteration.filter,aTypedArray$i=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$j=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$j("filter",(function filter(e){var r=$filter$1(aTypedArray$i(this),e,arguments.length>1?arguments[1]:void 0);return typedArrayFromSpeciesAndList(this,r)}));var $find=arrayIteration.find,aTypedArray$h=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$i=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$i("find",(function find(e){return $find(aTypedArray$h(this),e,arguments.length>1?arguments[1]:void 0)}));var $findIndex=arrayIteration.findIndex,aTypedArray$g=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$h=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$h("findIndex",(function findIndex(e){return $findIndex(aTypedArray$g(this),e,arguments.length>1?arguments[1]:void 0)}));var $forEach$1=arrayIteration.forEach,aTypedArray$f=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$g=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$g("forEach",(function forEach(e){$forEach$1(aTypedArray$f(this),e,arguments.length>1?arguments[1]:void 0)}));var $includes$1=arrayIncludes.includes,aTypedArray$e=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$f=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$f("includes",(function includes(e){return $includes$1(aTypedArray$e(this),e,arguments.length>1?arguments[1]:void 0)}));var $indexOf=arrayIncludes.indexOf,aTypedArray$d=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$e=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$e("indexOf",(function indexOf(e){return $indexOf(aTypedArray$d(this),e,arguments.length>1?arguments[1]:void 0)}));var PROPER_FUNCTION_NAME$1=functionName.PROPER,ITERATOR$3=wellKnownSymbol("iterator"),Uint8Array$2=global$1.Uint8Array,arrayValues=es_array_iterator.values,arrayKeys=es_array_iterator.keys,arrayEntries=es_array_iterator.entries,aTypedArray$c=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$d=arrayBufferViewCore.exportTypedArrayMethod,nativeTypedArrayIterator=Uint8Array$2&&Uint8Array$2.prototype[ITERATOR$3],PROPER_ARRAY_VALUES_NAME=!!nativeTypedArrayIterator&&"values"===nativeTypedArrayIterator.name,typedArrayValues=function values(){return arrayValues.call(aTypedArray$c(this))};exportTypedArrayMethod$d("entries",(function entries(){return arrayEntries.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("keys",(function keys(){return arrayKeys.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("values",typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME),exportTypedArrayMethod$d(ITERATOR$3,typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME);var aTypedArray$b=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$c=arrayBufferViewCore.exportTypedArrayMethod,$join=[].join;exportTypedArrayMethod$c("join",(function join(e){return $join.apply(aTypedArray$b(this),arguments)}));var arrayMethodIsStrict=function(e,r){var t=[][e];return!!t&&fails((function(){t.call(null,r||function(){throw 1},1)}))},min$2=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$2=arrayMethodIsStrict("lastIndexOf"),FORCED$5=NEGATIVE_ZERO||!STRICT_METHOD$2,arrayLastIndexOf=FORCED$5?function lastIndexOf(e){if(NEGATIVE_ZERO)return $lastIndexOf.apply(this,arguments)||0;var r=toIndexedObject(this),t=toLength(r.length),a=t-1;for(arguments.length>1&&(a=min$2(a,toInteger(arguments[1]))),a<0&&(a=t+a);a>=0;a--)if(a in r&&r[a]===e)return a||0;return-1}:$lastIndexOf,aTypedArray$a=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$b=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$b("lastIndexOf",(function lastIndexOf(e){return arrayLastIndexOf.apply(aTypedArray$a(this),arguments)}));var $map=arrayIteration.map,aTypedArray$9=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$a=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$a("map",(function map(e){return $map(aTypedArray$9(this),e,arguments.length>1?arguments[1]:void 0,(function(e,r){return new(typedArraySpeciesConstructor(e))(r)}))}));var createMethod$1=function(e){return function(r,t,a,i){aCallable(t);var s=toObject(r),c=indexedObject(s),l=toLength(s.length),u=e?l-1:0,p=e?-1:1;if(a<2)for(;;){if(u in c){i=c[u],u+=p;break}if(u+=p,e?u<0:l<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:l>u;u+=p)u in c&&(i=t(i,c[u],u,s));return i}},arrayReduce={left:createMethod$1(!1),right:createMethod$1(!0)},$reduce=arrayReduce.left,aTypedArray$8=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$9=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$9("reduce",(function reduce(e){return $reduce(aTypedArray$8(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var $reduceRight=arrayReduce.right,aTypedArray$7=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$8=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$8("reduceRight",(function reduceRight(e){return $reduceRight(aTypedArray$7(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$6=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$7=arrayBufferViewCore.exportTypedArrayMethod,floor$4=Math.floor;exportTypedArrayMethod$7("reverse",(function reverse(){for(var e,r=aTypedArray$6(this).length,t=floor$4(r/2),a=0;a1?arguments[1]:void 0,1),t=this.length,a=toObject(e),i=toLength(a.length),s=0;if(i+r>t)throw RangeError("Wrong length");for(;si;)c[i]=t[i++];return c}),FORCED$3);var $some=arrayIteration.some,aTypedArray$3=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$4=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$4("some",(function some(e){return $some(aTypedArray$3(this),e,arguments.length>1?arguments[1]:void 0)}));var floor$3=Math.floor,mergeSort=function(e,r){var t=e.length,a=floor$3(t/2);return t<8?insertionSort(e,r):merge(mergeSort(e.slice(0,a),r),mergeSort(e.slice(a),r),r)},insertionSort=function(e,r){for(var t,a,i=e.length,s=1;s0;)e[a]=e[--a];a!==s++&&(e[a]=t)}return e},merge=function(e,r,t){for(var a=e.length,i=r.length,s=0,c=0,l=[];s0&&1/t<0?1:-1:r>t}};exportTypedArrayMethod$3("sort",(function sort(e){if(void 0!==e&&aCallable(e),STABLE_SORT$1)return nativeSort$1.call(this,e);aTypedArray$2(this);var r,t=toLength(this.length),a=Array(t);for(r=0;r1?arguments[1]:void 0)}}),addToUnscopables("includes");var notARegexp=function(e){if(isRegexp(e))throw TypeError("The method doesn't accept regular expressions");return e},MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[MATCH]=!1,"/./"[e](r)}catch(e){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function includes(e){return!!~toString(requireObjectCoercible(this)).indexOf(toString(notARegexp(e)),arguments.length>1?arguments[1]:void 0)}});var createProperty=function(e,r,t){var a=toPropertyKey(r);a in e?objectDefineProperty.f(e,a,createPropertyDescriptor(0,t)):e[a]=t},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return engineV8Version>=51||!fails((function(){var r=[];return(r.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==r[e](Boolean).foo}))},HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("slice"),SPECIES=wellKnownSymbol("species"),nativeSlice=[].slice,max$1=Math.max;_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function slice(e,r){var t,a,i,s=toIndexedObject(this),c=toLength(s.length),l=toAbsoluteIndex(e,c),u=toAbsoluteIndex(void 0===r?c:r,c);if(isArray(s)&&(t=s.constructor,(isConstructor(t)&&(t===Array||isArray(t.prototype))||isObject(t)&&null===(t=t[SPECIES]))&&(t=void 0),t===Array||void 0===t))return nativeSlice.call(s,l,u);for(a=new(void 0===t?Array:t)(max$1(u-l,0)),i=0;l1?arguments[1]:void 0)}});var PROPER_FUNCTION_NAME=functionName.PROPER,TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails((function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=PROPER_FUNCTION_NAME&&nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,(function toString$1(){var e=anObject(this),r=toString(e.source),t=e.flags;return"/"+r+"/"+toString(void 0===t&&e instanceof RegExp&&!("flags"in RegExpPrototype)?regexpFlags.call(e):t)}),{unsafe:!0});var test=[],nativeSort=test.sort,FAILS_ON_UNDEFINED=fails((function(){test.sort(void 0)})),FAILS_ON_NULL=fails((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict("sort"),STABLE_SORT=!fails((function(){if(engineV8Version)return engineV8Version<70;if(!(engineFfVersion&&engineFfVersion>3)){if(engineIsIeOrEdge)return!0;if(engineWebkitVersion)return engineWebkitVersion<603;var e,r,t,a,i="";for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(a=0;a<47;a++)test.push({k:r+a,v:t})}for(test.sort((function(e,r){return r.v-e.v})),a=0;atoString(t)?1:-1}};_export({target:"Array",proto:!0,forced:FORCED$1},{sort:function sort(e){void 0!==e&&aCallable(e);var r=toObject(this);if(STABLE_SORT)return void 0===e?nativeSort.call(r):nativeSort.call(r,e);var t,a,i=[],s=toLength(r.length);for(a=0;a>>24&255,a[t+1]=i>>>16&255,a[t+2]=i>>>8&255,a[t+3]=i>>>0&255,new Uint8Array(a.buffer,0,t+4)},UZIP.deflateRaw=function(e,r){null==r&&(r={level:6});var t=new Uint8Array(50+Math.floor(1.1*e.length)),a=UZIP.F.deflateRaw(e,t,a,r.level);return new Uint8Array(t.buffer,0,a)},UZIP.encode=function(e,r){null==r&&(r=!1);var t=0,a=UZIP.bin.writeUint,i=UZIP.bin.writeUshort,s={};for(var c in e){var l=!UZIP._noNeed(c)&&!r,u=e[c],p=UZIP.crc.crc(u,0,u.length);s[c]={cpr:l,usize:u.length,crc:p,file:l?UZIP.deflateRaw(u):u}}for(var c in s)t+=s[c].file.length+30+46+2*UZIP.bin.sizeUTF8(c);t+=22;var d=new Uint8Array(t),h=0,y=[];for(var c in s){var A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,0)}var g=0,v=h;for(var c in s){A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,1,y[g++])}var E=h-v;return a(d,h,101010256),h+=4,i(d,h+=4,g),i(d,h+=2,g),a(d,h+=2,E),a(d,h+=4,v),h+=4,h+=2,d.buffer},UZIP._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(r)},UZIP._writeHeader=function(e,r,t,a,i,s){var c=UZIP.bin.writeUint,l=UZIP.bin.writeUshort,u=a.file;return c(e,r,0==i?67324752:33639248),r+=4,1==i&&(r+=2),l(e,r,20),l(e,r+=2,0),l(e,r+=2,a.cpr?8:0),c(e,r+=2,0),c(e,r+=4,a.crc),c(e,r+=4,u.length),c(e,r+=4,a.usize),l(e,r+=4,UZIP.bin.sizeUTF8(t)),l(e,r+=2,0),r+=2,1==i&&(r+=2,r+=2,c(e,r+=6,s),r+=4),r+=UZIP.bin.writeUTF8(e,r,t),0==i&&(e.set(u,r),r+=u.length),r},UZIP.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,a=0;a<8;a++)1&t?t=3988292384^t>>>1:t>>>=1;e[r]=t}return e}(),update:function(e,r,t,a){for(var i=0;i>>8;return e},crc:function(e,r,t){return 4294967295^UZIP.crc.update(4294967295,e,r,t)}},UZIP.adler=function(e,r,t){for(var a=1,i=0,s=r,c=r+t;s>8&255},readUint:function(e,r){return 16777216*e[r+3]+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,t){e[r]=255&t,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},readASCII:function(e,r,t){for(var a="",i=0;i>6,e[r+i+1]=128|c>>0&63,i+=2;else if(0==(4294901760&c))e[r+i]=224|c>>12,e[r+i+1]=128|c>>6&63,e[r+i+2]=128|c>>0&63,i+=3;else{if(0!=(4292870144&c))throw"e";e[r+i]=240|c>>18,e[r+i+1]=128|c>>12&63,e[r+i+2]=128|c>>6&63,e[r+i+3]=128|c>>0&63,i+=4}}return i},sizeUTF8:function(e){for(var r=e.length,t=0,a=0;a>>3}var y=s.lits,A=s.strt,g=s.prev,v=0,E=0,m=0,I=0,P=0,b=0;for(h>2&&(A[b=UZIP.F._hash(e,0)]=0),u=0;u14e3||E>26697)&&h-u>100&&(d>>16,_=65535&S;if(0!=S){_=65535&S;var U=c(R=S>>>16,s.of0);s.lhst[257+U]++;var w=c(_,s.df0);s.dhst[w]++,I+=s.exb[U]+s.dxb[w],y[v]=R<<23|u-d,y[v+1]=_<<16|U<<8|w,v+=2,d=u+R}else s.lhst[e[u]]++;E++}}for(m==u&&0!=e.length||(d>>3},UZIP.F._bestMatch=function(e,r,t,a,i,s){var c=32767&r,l=t[c],u=c-l+32768&32767;if(l==c||a!=UZIP.F._hash(e,r-u))return 0;for(var p=0,d=0,h=Math.min(32767,r);u<=h&&0!=--s&&l!=c;){if(0==p||e[r+p]==e[r+p-u]){var y=UZIP.F._howLong(e,r,u);if(y>p){if(d=u,(p=y)>=i)break;u+2A&&(A=E,l=v)}}}u+=(c=l)-(l=t[c])+32768&32767}return p<<16|d},UZIP.F._howLong=function(e,r,t){if(e[r]!=e[r-t]||e[r+1]!=e[r+1-t]||e[r+2]!=e[r+2-t])return 0;var a=r,i=Math.min(e.length,r+258);for(r+=3;r>>23,B=$+(8388607&x);$>16,V=D>>8&255,k=255&D;b(l,u=UZIP.F._writeLit(257+V,w,l,u),M-I.of0[V]),u+=I.exb[V],P(l,u=UZIP.F._writeLit(k,O,l,u),G-I.df0[k]),u+=I.dxb[k],$+=M}}u=UZIP.F._writeLit(256,w,l,u)}return u},UZIP.F._copyExact=function(e,r,t,a,i){var s=i>>>3;return a[s]=t,a[s+1]=t>>>8,a[s+2]=255-a[s],a[s+3]=255-a[s+1],s+=4,a.set(new Uint8Array(e.buffer,r,t),s),i+(t+4<<3)},UZIP.F.getTrees=function(){for(var e=UZIP.F.U,r=UZIP.F._hufTree(e.lhst,e.ltree,15),t=UZIP.F._hufTree(e.dhst,e.dtree,15),a=[],i=UZIP.F._lenCodes(e.ltree,a),s=[],c=UZIP.F._lenCodes(e.dtree,s),l=0;l4&&0==e.itree[1+(e.ordr[p-1]<<1)];)p--;return[r,t,u,i,c,p,a,s]},UZIP.F.getSecond=function(e){for(var r=[],t=0;t>1)+",");return r},UZIP.F.contSize=function(e,r){for(var t=0,a=0;a15&&(UZIP.F._putsE(t,a,c,l),a+=l)}return a},UZIP.F._lenCodes=function(e,r){for(var t=e.length;2!=t&&0==e[t-1];)t-=2;for(var a=0;a>>1,138))<11?r.push(17,p-3):r.push(18,p-11),a+=2*p-2}else if(i==l&&s==i&&c==i){for(u=a+5;u+2>>1,6);r.push(16,p-3),a+=2*p-2}else r.push(i,0)}return t>>>1},UZIP.F._hufTree=function(e,r,t){var a=[],i=e.length,s=r.length,c=0;for(c=0;ct&&(UZIP.F.restrictDepth(u,t,v),v=t),c=0;cr;a++){var c=e[a].d;e[a].d=r,s+=i-(1<>>=t-r;s>0;){(c=e[a].d)=0;a--)e[a].d==r&&s<0&&(e[a].d--,s++);0!=s&&console.log("debt left")},UZIP.F._goodIndex=function(e,r){var t=0;return r[16|t]<=e&&(t|=16),r[8|t]<=e&&(t|=8),r[4|t]<=e&&(t|=4),r[2|t]<=e&&(t|=2),r[1|t]<=e&&(t|=1),t},UZIP.F._writeLit=function(e,r,t,a){return UZIP.F._putsF(t,a,r[e<<1]),a+r[1+(e<<1)]},UZIP.F.inflate=function(e,r){var t=Uint8Array;if(3==e[0]&&0==e[1])return r||new t(0);var a=UZIP.F,i=a._bitsF,s=a._bitsE,c=a._decodeTiny,l=a.makeCodes,u=a.codes2map,p=a._get17,d=a.U,h=null==r;h&&(r=new t(e.length>>>2<<3));for(var y,A,g=0,v=0,E=0,m=0,I=0,P=0,b=0,T=0,S=0;0==g;)if(g=i(e,S,1),v=i(e,S+1,2),S+=3,0!=v){if(h&&(r=UZIP.F._check(r,T+(1<<17))),1==v&&(y=d.flmap,A=d.fdmap,P=511,b=31),2==v){E=s(e,S,5)+257,m=s(e,S+5,5)+1,I=s(e,S+10,4)+4,S+=14;for(var R=0;R<38;R+=2)d.itree[R]=0,d.itree[R+1]=0;var _=1;for(R=0;R_&&(_=U)}S+=3*I,l(d.itree,_),u(d.itree,_,d.imap),y=d.lmap,A=d.dmap,S=c(d.imap,(1<<_)-1,E+m,e,S,d.ttree);var w=a._copyOut(d.ttree,0,E,d.ltree);P=(1<>>4;if($>>>8==0)r[T++]=$;else{if(256==$)break;var L=T+$-254;if($>264){var x=d.ldef[$-257];L=T+(x>>>3)+s(e,S,7&x),S+=7&x}var M=A[p(e,S)&b];S+=15&M;var B=M>>>4,D=d.ddef[B],G=(D>>>4)+i(e,S,15&D);for(S+=15&D,h&&(r=UZIP.F._check(r,T+(1<<17)));T>>3),k=e[V-4]|e[V-3]<<8;h&&(r=UZIP.F._check(r,T+k)),r.set(new t(e.buffer,e.byteOffset+V,k),T),S=V+k<<3,T+=k}return r.length==T?r:r.slice(0,T)},UZIP.F._check=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(Math.max(t<<1,r));return a.set(e,0),a},UZIP.F._decodeTiny=function(e,r,t,a,i,s){for(var c=UZIP.F._bitsE,l=UZIP.F._get17,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++}},UZIP.F.revCodes=function(e,r){for(var t=UZIP.F.U.rev15,a=15-r,i=0;i>>a}},UZIP.F._putsE=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},UZIP.F._putsF=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},UZIP.F._bitsE=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},UZIP.F._get25=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},UZIP.F.U=(r=Uint16Array,t=Uint32Array,{next_code:new r(16),bl_count:new r(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new t(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new r(65536),prev:new r(32768)}),function(){for(var e=UZIP.F.U,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.rev15[r]=(t>>>16|t<<16)>>>17}function pushV(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.ldef[r]=e.of0[r]<<3|e.exb[r],e.ddef[r]=e.df0[r]<<4|e.dxb[r];pushV(e.fltree,144,8),pushV(e.fltree,112,9),pushV(e.fltree,24,7),pushV(e.fltree,8,8),UZIP.F.makeCodes(e.fltree,9),UZIP.F.codes2map(e.fltree,9,e.flmap),UZIP.F.revCodes(e.fltree,9),pushV(e.fdtree,32,5),UZIP.F.makeCodes(e.fdtree,5),UZIP.F.codes2map(e.fdtree,5,e.fdmap),UZIP.F.revCodes(e.fdtree,5),pushV(e.itree,19,0),pushV(e.ltree,286,0),pushV(e.dtree,30,0),pushV(e.ttree,320,0)}()})),UZIP=Object.freeze(_mergeNamespaces({__proto__:null,default:UZIP_1},[UZIP_1])),UPNG={},N,W,H;UPNG.toRGBA8=function(e){var r=e.width,t=e.height;if(null==e.tabs.acTL)return[UPNG.toRGBA8.decodeImage(e.data,r,t,e).buffer];var a=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var i=r*t*4,s=new Uint8Array(i),c=new Uint8Array(i),l=new Uint8Array(i),u=0;u>3)]>>7-((7&A)<<0)&1);l[P]=b[w],l[P+1]=b[w+1],l[P+2]=b[w+2],l[P+3]=O>2)]>>6-((3&A)<<1)&3);l[P]=b[w],l[P+1]=b[w+1],l[P+2]=b[w+2],l[P+3]=O>1)]>>4-((1&A)<<2)&15);l[P]=b[w],l[P+1]=b[w+1],l[P+2]=b[w+2],l[P+3]=O>>3)]>>>7-(7&M)&1))==255*E?0:255;u[x+M]=B<<24|C<<16|C<<8|C}else if(2==d)for(M=0;M>>2)]>>>6-((3&M)<<1)&3))==85*E?0:255;u[x+M]=B<<24|C<<16|C<<8|C}else if(4==d)for(M=0;M>>1)]>>>4-((1&M)<<2)&15))==17*E?0:255;u[x+M]=B<<24|C<<16|C<<8|C}else if(8==d)for(M=0;M>>2<<5));0==s;)if(s=v(e,A,1),c=v(e,A+1,2),A+=3,0!=c){if(S&&(r=H.H.W(r,y+(1<<17))),1==c&&(t=T.J,a=T.h,d=511,h=31),2==c){l=E(e,A,5)+257,u=E(e,A+5,5)+1,p=E(e,A+10,4)+4,A+=14;for(var R=1,_=0;_<38;_+=2)T.Q[_]=0,T.Q[_+1]=0;for(_=0;_R&&(R=U)}A+=3*p,I(T.Q,R),P(T.Q,R,T.u),t=T.w,a=T.d,A=m(T.u,(1<>>4;if($>>>8==0)r[y++]=$;else{if(256==$)break;var L=y+$-254;if($>264){var x=T.q[$-257];L=y+(x>>>3)+E(e,A,7&x),A+=7&x}var M=a[b(e,A)&h];A+=15&M;var B=M>>>4,D=T.c[B],G=(D>>>4)+v(e,A,15&D);for(A+=15&D;y>>3),k=e[V-4]|e[V-3]<<8;S&&(r=H.H.W(r,y+k)),r.set(new i(e.buffer,e.byteOffset+V,k),y),A=V+k<<3,y+=k}return r.length==y?r:r.slice(0,y)},H.H.W=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(t<<1);return a.set(e,0),a},H.H.R=function(e,r,t,a,i,s){for(var c=H.H.e,l=H.H.Z,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++},H.H.l=function(e,r){for(var t=H.H.m.r,a=15-r,i=0;i>>a}},H.H.M=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},H.H.I=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},H.H.e=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},H.H.i=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},H.H.m=(N=Uint16Array,W=Uint32Array,{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(32768),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(65536),g:new N(32768)}),function(){for(var e=H.H.m,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.r[r]=(t>>>16|t<<16)>>>17}function n(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.q[r]=e.S[r]<<3|e.T[r],e.c[r]=e.p[r]<<4|e.z[r];n(e._,144,8),n(e._,112,9),n(e._,24,7),n(e._,8,8),H.H.n(e._,9),H.H.A(e._,9,e.J),H.H.l(e._,9),n(e.$,32,5),H.H.n(e.$,5),H.H.A(e.$,5,e.h),H.H.l(e.$,5),n(e.Q,19,0),n(e.C,286,0),n(e.D,30,0),n(e.v,320,0)}(),H.H.N),UPNG.decode._readInterlace=function(e,r){for(var t=r.width,a=r.height,i=UPNG.decode._getBPP(r),s=i>>3,c=Math.ceil(t*i/8),l=new Uint8Array(a*c),u=0,p=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],y=[8,8,4,4,2,2,1],A=0;A<7;){for(var g=h[A],v=y[A],E=0,m=0,I=p[A];I>3])>>7-(7&_)&1,l[S*c+(R>>3)]|=U<<7-((7&R)<<0);if(2==i)U=(U=e[_>>3])>>6-(7&_)&3,l[S*c+(R>>2)]|=U<<6-((3&R)<<1);if(4==i)U=(U=e[_>>3])>>4-(7&_)&15,l[S*c+(R>>1)]|=U<<4-((1&R)<<2);if(i>=8)for(var w=S*c+R*s,O=0;O>3)+O];_+=i,R+=v}T++,S+=g}E*m!=0&&(u+=m*(1+b)),A+=1}return l},UPNG.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},UPNG.decode._filterZero=function(e,r,t,a,i){var s=UPNG.decode._getBPP(r),c=Math.ceil(a*s/8),l=UPNG.decode._paeth;s=Math.ceil(s/8);var u=0,p=1,d=e[t],h=0;if(d>1&&(e[t]=[0,0,1][d-2]),3==d)for(h=s;h>>1)&255;for(var y=0;y>>1);for(;h>>1)}else{for(;h>8&255,e[r+1]=255&t},readUint:function readUint(e,r){return 16777216*e[r]+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function writeUint(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=255&t},readASCII:function readASCII(e,r,t){for(var a="",i=0;i=0&&l>=0?(h=A*r+g<<2,y=(l+A)*i+c+g<<2):(h=(-l+A)*r-c+g<<2,y=A*i+g<<2),0==u)a[y]=e[h],a[y+1]=e[h+1],a[y+2]=e[h+2],a[y+3]=e[h+3];else if(1==u){var v=e[h+3]*(1/255),E=e[h]*v,m=e[h+1]*v,I=e[h+2]*v,P=a[y+3]*(1/255),b=a[y]*P,T=a[y+1]*P,S=a[y+2]*P,R=1-v,_=v+P*R,U=0==_?0:1/_;a[y+3]=255*_,a[y+0]=(E+b*R)*U,a[y+1]=(m+T*R)*U,a[y+2]=(I+S*R)*U}else if(2==u){v=e[h+3],E=e[h],m=e[h+1],I=e[h+2],P=a[y+3],b=a[y],T=a[y+1],S=a[y+2];v==P&&E==b&&m==T&&I==S?(a[y]=0,a[y+1]=0,a[y+2]=0,a[y+3]=0):(a[y]=E,a[y+1]=m,a[y+2]=I,a[y+3]=v)}else if(3==u){v=e[h+3],E=e[h],m=e[h+1],I=e[h+2],P=a[y+3],b=a[y],T=a[y+1],S=a[y+2];if(v==P&&E==b&&m==T&&I==S)continue;if(v<220&&P>20)return!1}return!0},UPNG.encode=function(e,r,t,a,i,s,c){null==a&&(a=0),null==c&&(c=!1);var l=UPNG.encode.compress(e,r,t,a,[!1,!1,!1,0,c]);return UPNG.encode.compressPNG(l,-1),UPNG.encode._main(l,r,t,i,s)},UPNG.encodeLL=function(e,r,t,a,i,s,c,l){for(var u={ctype:0+(1==a?0:2)+(0==i?0:4),depth:s,frames:[]},p=(a+i)*s,d=p*r,h=0;h1,h=!1,y=33+(d?20:0);if(null!=i.sRGB&&(y+=13),null!=i.pHYs&&(y+=21),3==e.ctype){for(var A=e.plte.length,g=0;g>>24!=255&&(h=!0);y+=8+3*A+4+(h?8+1*A+4:0)}for(var v=0;v>>8&255,S=P>>>16&255;E[p+I+0]=b,E[p+I+1]=T,E[p+I+2]=S}if(c(E,p+=3*A,s(E,p-3*A-4,3*A+4)),p+=4,h){c(E,p,A),u(E,p+=4,"tRNS"),p+=4;for(g=0;g>>24&255;c(E,p+=A,s(E,p-A-4,A+4)),p+=4}}var R=0;for(v=0;v>2,O>>2));for(A=0;AL&&M==$[E-L])x[E]=x[E-L];else{var B=P[M];if(null==B&&(P[M]=B=b.length,b.push(M),b.length>=300))break;x[E]=B}}}var D=b.length;D<=256&&0==p&&(h=D<=2?1:D<=4?2:D<=16?4:8,h=Math.max(h,u));for(A=0;A>1)]|=Z[z+K]<<4-4*(1&K);else if(2==h)for(K=0;K>2)]|=Z[z+K]<<6-2*(3&K);else if(1==h)for(K=0;K>3)]|=Z[z+K]<<7-1*(7&K)}V=q,d=3,Y=1}else if(0==m&&1==I.length){q=new Uint8Array(L*G*3);var X=L*G;for(E=0;E_&&(_=O),wU&&(U=w))}-1==_&&(S=R=_=U=0),i&&(1==(1&S)&&S--,1==(1&R)&&R--);var C=(_-S+1)*(U-R+1);CE&&(E=b),Tm&&(m=T))}-1==E&&(g=v=E=m=0),c&&(1==(1&g)&&g--,1==(1&v)&&v--),s={x:g,y:v,width:E-g+1,height:m-v+1};var _=a[i];_.rect=s,_.blend=1,_.img=new Uint8Array(s.width*s.height*4),0==a[i-1].dispose?(UPNG._copyTile(p,r,t,_.img,s.width,s.height,-s.x,-s.y,0),UPNG.encode._prepareDiff(y,r,t,_.img,s)):UPNG._copyTile(y,r,t,_.img,s.width,s.height,-s.x,-s.y,0)},UPNG.encode._prepareDiff=function(e,r,t,a,i){UPNG._copyTile(e,r,t,a,i.width,i.height,-i.x,-i.y,2)},UPNG.encode._filterZero=function(e,r,t,a,i,s,c){var l,u=[],p=[0,1,2,3,4];-1!=s?p=[s]:(r*a>5e5||1==t)&&(p=[0]),c&&(l={level:0});for(var d,h=UZIP,y=0;y>1)+256&255;if(4==s)for(p=i;p>1)&255;for(p=i;p>1)&255}if(4==s){for(p=0;p>>1:t>>>=1;e[r]=t}return e}(),update:function update(e,r,t,a){for(var i=0;i>>8;return e},crc:function crc(e,r,t){return 4294967295^UPNG.crc.update(4294967295,e,r,t)}},UPNG.quantize=function(e,r){var t,a=new Uint8Array(e),i=a.slice(0),s=new Uint32Array(i.buffer),c=UPNG.quantize.getKDtree(i,r),l=c[0],u=c[1],p=UPNG.quantize.planeDst,d=a,h=s,y=d.length,A=new Uint8Array(a.length>>2);if(a.length<2e7)for(var g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}else for(g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}return{abuf:i.buffer,inds:A,plte:u}},UPNG.quantize.getKDtree=function(e,r,t){null==t&&(t=1e-4);var a=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=UPNG.quantize.stats(e,i.i0,i.i1),i.est=UPNG.quantize.estats(i.bst);for(var s=[i];s.lengthc&&(c=s[u].est.L,l=u);if(c=d||p.i1<=d)p.est.L=0;else{var h={i0:p.i0,i1:d,bst:null,est:null,tdst:0,left:null,right:null};h.bst=UPNG.quantize.stats(e,h.i0,h.i1),h.est=UPNG.quantize.estats(h.bst);var y={i0:d,i1:p.i1,bst:null,est:null,tdst:0,left:null,right:null};y.bst={R:[],m:[],N:p.bst.N-h.bst.N};for(u=0;u<16;u++)y.bst.R[u]=p.bst.R[u]-h.bst.R[u];for(u=0;u<4;u++)y.bst.m[u]=p.bst.m[u]-h.bst.m[u];y.est=UPNG.quantize.estats(y.bst),p.left=h,p.right=y,s[l]=h,s.push(y)}}s.sort((function(e,r){return r.bst.N-e.bst.N}));for(u=0;u0&&(c=e.right,l=e.left);var u=UPNG.quantize.getNearest(c,r,t,a,i);if(u.tdst<=s*s)return u;var p=UPNG.quantize.getNearest(l,r,t,a,i);return p.tdsts;)a-=4;if(t>=a)break;var l=r[t>>2];r[t>>2]=r[a>>2],r[a>>2]=l,t+=4,a-=4}for(;c(e,t,i)>s;)t-=4;return t+4},UPNG.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},UPNG.quantize.stats=function(e,r,t){for(var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],s=t-r>>2,c=r;c>>0}},UPNG.M4={multVec:function multVec(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function dot(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function sml(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},UPNG.encode.concatRGBA=function(e){for(var r=0,t=0;t2&&void 0!==arguments[2]?arguments[2]:Date.now();return new Promise((function(a){for(var i=e.split(","),s=i[0].match(/:(.*?);/)[1],c=globalThis.atob(i[1]),l=c.length,u=new Uint8Array(l);l--;)u[l]=c.charCodeAt(l);var p=new Blob([u],{type:s});p.name=r,p.lastModified=t,a(p)}))}function getDataUrlFromFile(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(){return r(a.result)},a.onerror=function(e){return t(e)},a.readAsDataURL(e)}))}function loadImage(e){return new Promise((function(r,t){var a=new Image;a.onload=function(){return r(a)},a.onerror=function(e){return t(e)},a.src=e}))}function getBrowserName(){var e="etc",r=navigator.userAgent;return/Chrom(e|ium)/i.test(r)?e="chrome":/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(r)?e="mobile safari":/Safari/i.test(r)?e="desktop safari":/Firefox/i.test(r)?e="firefox":(/MSIE/i.test(r)||!0==!!document.documentMode)&&(e="internet explorer"),e}function approximateBelowMaximumCanvasSizeOfBrowser(e,r){for(var t=getBrowserName(),a=MaxCanvasSize[t],i=e,s=r,c=i*s,l=i>s?s/i:i/s;c>a*a;){var u=(a+i)/2,p=(a+s)/2;u1&&void 0!==arguments[1]?arguments[1]:void 0,t=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),a=t.width,i=t.height,s=getNewCanvasAndCtx(a,i),c=_slicedToArray(s,2),l=c[0],u=c[1];return r&&/jpe?g/.test(r)&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height)),u.drawImage(e,0,0,l.width,l.height),l}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e){return new Promise((function(r,t){var a,i,s=function $Try_2_Post(){try{return i=drawImageInCanvas(a,e.type),r([a,i])}catch(e){return t(e)}},c=function $Try_2_Catch(r){try{0;var i=function $Try_3_Catch(e){try{throw e}catch(e){return t(e)}};try{return getDataUrlFromFile(e).then((function(e){try{return loadImage(e).then((function(e){try{return a=e,function $Try_3_Post(){try{return s()}catch(e){return t(e)}}()}catch(e){return i(e)}}),i)}catch(e){return i(e)}}),i)}catch(e){i(e)}}catch(e){return t(e)}};try{if(isIOS())throw new Error("Skip createImageBitmap on IOS device");return createImageBitmap(e).then((function(e){try{return a=e,s()}catch(e){return c()}}),c)}catch(e){c()}}))}function canvasToFile(e,r,t,a){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return new Promise((function(s,c){var l,u,p;if("image/png"===r)return u=e.getContext("2d").getImageData(0,0,e.width,e.height).data,p=UPNG.encode([u],e.width,e.height,256*i),(l=new Blob([p],{type:r})).name=t,l.lastModified=a,$If_4.call(this);{return"function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?e.convertToBlob({type:r,quality:i}).then(function(e){try{return(l=e).name=t,l.lastModified=a,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c):getFilefromDataUrl(e.toDataURL(r,i),t,a).then(function(e){try{return l=e,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c);function $If_5(){return $If_4.call(this)}}function $If_4(){return s(l)}}))}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise((function(e,r){var t,a,i,s;return void 0!==isAutoOrientationInBrowser.result?e(isAutoOrientationInBrowser.result):("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(c){try{return drawFileInCanvas(t=c).then((function(c){try{return canvasToFile(a=c[1],t.type,t.name,t.lastModified).then((function(t){try{return i=t,cleanupCanvasMemory(a),drawFileInCanvas(i).then((function(t){try{return s=t[0],isAutoOrientationInBrowser.result=1===s.width&&2===s.height,e(isAutoOrientationInBrowser.result)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r))}))}function getExifOrientation(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(e){var t=new DataView(e.target.result);if(65496!=t.getUint16(0,!1))return r(-2);for(var a=t.byteLength,i=2;is||i>s)){var l=_slicedToArray(getNewCanvasAndCtx(a,i),2);c=l[0],t=l[1],a>i?(c.width=s,c.height=i/a*s):(c.width=a/i*s,c.height=s),t.drawImage(e,0,0,c.width,c.height),cleanupCanvasMemory(e)}return c}function followExifOrientation(e,r){var t=e.width,a=e.height,i=_slicedToArray(getNewCanvasAndCtx(t,a),2),s=i[0],c=i[1];switch(r>4&&r<9?(s.width=a,s.height=t):(s.width=t,s.height=a),r){case 2:c.transform(-1,0,0,1,t,0);break;case 3:c.transform(-1,0,0,-1,t,a);break;case 4:c.transform(1,0,0,-1,0,a);break;case 5:c.transform(0,1,1,0,0,0);break;case 6:c.transform(0,1,-1,0,a,0);break;case 7:c.transform(0,-1,-1,0,a,t);break;case 8:c.transform(0,-1,1,0,0,t)}return c.drawImage(e,0,0,t,a),cleanupCanvasMemory(e),s}function compress(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(a,i){var s,c,l,u,p,d,h,y,A,g,v,E,m,I,P,b,T,S;function incProgress(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;s+=e,r.onProgress(Math.min(s,100))}function setProgress(e){s=Math.min(Math.max(e,s),100),r.onProgress(s)}return s=t,c=r.maxIteration||10,l=1024*r.maxSizeMB*1024,incProgress(),drawFileInCanvas(e).then(function(t){try{var s=_slicedToArray(t,2);return u=s[1],incProgress(),p=handleMaxWidthOrHeight(u,r),incProgress(),new Promise((function(t,a){var i;if(!(i=r.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,$If_2.call(this)}catch(e){return a(e)}}.bind(this),a);function $If_2(){return t(i)}return $If_2.call(this)})).then(function(t){try{return d=t,incProgress(),isAutoOrientationInBrowser().then(function(t){try{return h=t?p:followExifOrientation(p,d),incProgress(),y=r.initialQuality||1,A=r.fileType||e.type,canvasToFile(h,A,e.name,e.lastModified,y).then(function(r){try{{if(g=r,incProgress(),v=g.size>l,E=g.size>e.size,!v&&!E)return setProgress(100),a(g);var t;function $Loop_3(){if(c--&&(P>l||P>m)){var r,t,a=_slicedToArray(getNewCanvasAndCtx(r=v?.95*S.width:S.width,t=v?.95*S.height:S.height),2);return T=a[0],a[1].drawImage(S,0,0,r,t),y*=.95,canvasToFile(T,A,e.name,e.lastModified,y).then((function(e){try{return b=e,cleanupCanvasMemory(S),S=T,P=b.size,setProgress(Math.min(99,Math.floor((I-P)/(I-l)*100))),$Loop_3}catch(e){return i(e)}}),i)}return[1]}return m=e.size,I=g.size,P=I,S=h,(t=function(e){for(;e;){if(e.then)return void e.then(t,i);try{if(e.pop){if(e.length)return e.pop()?$Loop_3_exit.call(this):e;e=$Loop_3}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))($Loop_3);function $Loop_3_exit(){return cleanupCanvasMemory(S),cleanupCanvasMemory(T),cleanupCanvasMemory(p),cleanupCanvasMemory(h),cleanupCanvasMemory(u),setProgress(100),a(b)}}}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}))}var charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:toString(e),index:0})}),(function next(){var e,r=getInternalState(this),t=r.string,a=r.index;return a>=t.length?{value:void 0,done:!0}:(e=charAt(t,a),r.index+=e.length,{value:e,done:!1})}));var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},classList=documentCreateElement("span").classList,DOMTokenListPrototype=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype===Object.prototype?void 0:DOMTokenListPrototype,ITERATOR$2=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values,handlePrototype$1=function(e,r){if(e){if(e[ITERATOR$2]!==ArrayValues)try{createNonEnumerableProperty(e,ITERATOR$2,ArrayValues)}catch(r){e[ITERATOR$2]=ArrayValues}if(e[TO_STRING_TAG]||createNonEnumerableProperty(e,TO_STRING_TAG,r),domIterables[r])for(var t in es_array_iterator)if(e[t]!==es_array_iterator[t])try{createNonEnumerableProperty(e,t,es_array_iterator[t])}catch(r){e[t]=es_array_iterator[t]}}};for(var COLLECTION_NAME$1 in domIterables)handlePrototype$1(global$1[COLLECTION_NAME$1]&&global$1[COLLECTION_NAME$1].prototype,COLLECTION_NAME$1);handlePrototype$1(domTokenListPrototype,"DOMTokenList");var ITERATOR$1=wellKnownSymbol("iterator"),nativeUrl=!fails((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),r=e.searchParams,t="";return e.pathname="c%20d",r.forEach((function(e,a){r.delete("b"),t+=a+e})),isPure&&!e.toJSON||!r.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[ITERATOR$1]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==t||"x"!==new URL("http://x",void 0).host})),callWithSafeIterationClosing=function(e,r,t,a){try{return a?r(anObject(t)[0],t[1]):r(t)}catch(r){iteratorClose(e,"throw",r)}},arrayFrom=function from(e){var r=toObject(e),t=isConstructor(this),a=arguments.length,i=a>1?arguments[1]:void 0,s=void 0!==i;s&&(i=functionBindContext(i,a>2?arguments[2]:void 0,2));var c,l,u,p,d,h,y=getIteratorMethod(r),A=0;if(!y||this==Array&&isArrayIteratorMethod(y))for(c=toLength(r.length),l=t?new this(c):Array(c);c>A;A++)h=s?i(r[A],A):r[A],createProperty(l,A,h);else for(d=(p=getIterator(r,y)).next,l=t?new this:[];!(u=d.call(p)).done;A++)h=s?callWithSafeIterationClosing(p,i,[u.value,A],!0):u.value,createProperty(l,A,h);return l.length=A,l},maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,floor$2=Math.floor,stringFromCharCode=String.fromCharCode,ucs2decode=function(e){for(var r=[],t=0,a=e.length;t=55296&&i<=56319&&t>1,e+=floor$2(e/r);e>baseMinusTMin*tMax>>1;a+=base)e=floor$2(e/baseMinusTMin);return floor$2(a+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var r,t,a=[],i=(e=ucs2decode(e)).length,s=initialN,c=0,l=initialBias;for(r=0;r=s&&tfloor$2((maxInt-c)/h))throw RangeError(OVERFLOW_ERROR);for(c+=(d-s)*h,s=d,r=0;rmaxInt)throw RangeError(OVERFLOW_ERROR);if(t==s){for(var y=c,A=base;;A+=base){var g=A<=l?tMin:A>=l+tMax?tMax:A-l;if(y0?arguments[0]:void 0,d=this,h=[];if(setInternalState$1(d,{type:URL_SEARCH_PARAMS,entries:h,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==p)if(isObject(p))if(e=getIteratorMethod(p))for(t=(r=getIterator(p,e)).next;!(a=t.call(r)).done;){if((c=(s=(i=getIterator(anObject(a.value))).next).call(i)).done||(l=s.call(i)).done||!s.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:toString(c.value),value:toString(l.value)})}else for(u in p)has$1(p,u)&&h.push({key:u,value:toString(p[u])});else parseSearchParams(h,"string"==typeof p?"?"===p.charAt(0)?p.slice(1):p:toString(p))},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(redefineAll(URLSearchParamsPrototype,{append:function append(e,r){validateArgumentsLength(arguments.length,2);var t=getInternalParamsState(this);t.entries.push({key:toString(e),value:toString(r)}),t.updateURL()},delete:function(e){validateArgumentsLength(arguments.length,1);for(var r=getInternalParamsState(this),t=r.entries,a=toString(e),i=0;ie.key){i.splice(r,0,e);break}r===t&&i.push(e)}a.updateURL()},forEach:function forEach(e){for(var r,t=getInternalParamsState(this).entries,a=functionBindContext(e,arguments.length>1?arguments[1]:void 0,3),i=0;i1?wrapRequestOptions(arguments[1]):{})}}),isCallable(NativeRequest)){var RequestConstructor=function Request(e){return anInstance(this,RequestConstructor,"Request"),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,_export({global:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},codeAt=stringMultibyte.codeAt,NativeURL=global$1.URL,URLSearchParams$1=web_urlSearchParams.URLSearchParams,getInternalSearchParamsState=web_urlSearchParams.getState,setInternalState=internalState.set,getInternalURLState=internalState.getterFor("URL"),floor$1=Math.floor,pow=Math.pow,INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[A-Za-z]/,ALPHANUMERIC=/[\d+-.A-Za-z]/,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\dA-Fa-f]+$/,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseHost=function(e,r){var t,a,i;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return INVALID_HOST;if(!(t=parseIPv6(r.slice(1,-1))))return INVALID_HOST;e.host=t}else if(isSpecial(e)){if(r=stringPunycodeToAscii(r),FORBIDDEN_HOST_CODE_POINT.test(r))return INVALID_HOST;if(null===(t=parseIPv4(r)))return INVALID_HOST;e.host=t}else{if(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(r))return INVALID_HOST;for(t="",a=arrayFrom(r),i=0;i4)return e;for(t=[],a=0;a1&&"0"==i.charAt(0)&&(s=HEX_START.test(i)?16:8,i=i.slice(8==s?1:2)),""===i)c=0;else{if(!(10==s?DEC:8==s?OCT:HEX).test(i))return e;c=parseInt(i,s)}t.push(c)}for(a=0;a=pow(256,5-r))return null}else if(c>255)return null;for(l=t.pop(),a=0;a6)return;for(a=0;chr();){if(i=null,a>0){if(!("."==chr()&&a<4))return;h++}if(!DIGIT.test(chr()))return;for(;DIGIT.test(chr());){if(s=parseInt(chr(),10),null===i)i=s;else{if(0==i)return;i=10*i+s}if(i>255)return;h++}u[p]=256*u[p]+i,2!=++a&&4!=a||p++}if(4!=a)return;break}if(":"==chr()){if(h++,!chr())return}else if(chr())return;u[p++]=r}else{if(null!==d)return;h++,d=++p}}if(null!==d)for(c=p-d,p=7;0!=p&&c>0;)l=u[p],u[p--]=u[d+c-1],u[d+--c]=l;else if(8!=p)return;return u},findLongestZeroSequence=function(e){for(var r=null,t=1,a=null,i=0,s=0;s<8;s++)0!==e[s]?(i>t&&(r=a,t=i),a=null,i=0):(null===a&&(a=s),++i);return i>t&&(r=a,t=i),r},serializeHost=function(e){var r,t,a,i;if("number"==typeof e){for(r=[],t=0;t<4;t++)r.unshift(e%256),e=floor$1(e/256);return r.join(".")}if("object"==typeof e){for(r="",a=findLongestZeroSequence(e),t=0;t<8;t++)i&&0===e[t]||(i&&(i=!1),a===t?(r+=t?":":"::",i=!0):(r+=e[t].toString(16),t<7&&(r+=":")));return"["+r+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=objectAssign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=objectAssign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=objectAssign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,r){var t=codeAt(e,0);return t>32&&t<127&&!has$1(r,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(e){return has$1(specialSchemes,e.scheme)},includesCredentials=function(e){return""!=e.username||""!=e.password},cannotHaveUsernamePasswordPort=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},isWindowsDriveLetter=function(e,r){var t;return 2==e.length&&ALPHA.test(e.charAt(0))&&(":"==(t=e.charAt(1))||!r&&"|"==t)},startsWithWindowsDriveLetter=function(e){var r;return e.length>1&&isWindowsDriveLetter(e.slice(0,2))&&(2==e.length||"/"===(r=e.charAt(2))||"\\"===r||"?"===r||"#"===r)},shortenURLsPath=function(e){var r=e.path,t=r.length;!t||"file"==e.scheme&&1==t&&isWindowsDriveLetter(r[0],!0)||r.pop()},isSingleDot=function(e){return"."===e||"%2e"===e.toLowerCase()},isDoubleDot=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},parseURL=function(e,r,t,a){var i,s,c,l,u=t||SCHEME_START,p=0,d="",h=!1,y=!1,A=!1;for(t||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,r=r.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),r=r.replace(TAB_AND_NEW_LINE,""),i=arrayFrom(r);p<=i.length;){switch(s=i[p],u){case SCHEME_START:if(!s||!ALPHA.test(s)){if(t)return INVALID_SCHEME;u=NO_SCHEME;continue}d+=s.toLowerCase(),u=SCHEME;break;case SCHEME:if(s&&(ALPHANUMERIC.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(t)return INVALID_SCHEME;d="",u=NO_SCHEME,p=0;continue}if(t&&(isSpecial(e)!=has$1(specialSchemes,d)||"file"==d&&(includesCredentials(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,t)return void(isSpecial(e)&&specialSchemes[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?u=FILE:isSpecial(e)&&a&&a.scheme==e.scheme?u=SPECIAL_RELATIVE_OR_AUTHORITY:isSpecial(e)?u=SPECIAL_AUTHORITY_SLASHES:"/"==i[p+1]?(u=PATH_OR_AUTHORITY,p++):(e.cannotBeABaseURL=!0,e.path.push(""),u=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!a||a.cannotBeABaseURL&&"#"!=s)return INVALID_SCHEME;if(a.cannotBeABaseURL&&"#"==s){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=FRAGMENT;break}u="file"==a.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=s||"/"!=i[p+1]){u=RELATIVE;continue}u=SPECIAL_AUTHORITY_IGNORE_SLASHES,p++;break;case PATH_OR_AUTHORITY:if("/"==s){u=AUTHORITY;break}u=PATH;continue;case RELATIVE:if(e.scheme=a.scheme,s==EOF)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==s||"\\"==s&&isSpecial(e))u=RELATIVE_SLASH;else if("?"==s)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=PATH;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}break;case RELATIVE_SLASH:if(!isSpecial(e)||"/"!=s&&"\\"!=s){if("/"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=PATH;continue}u=AUTHORITY}else u=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(u=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=s||"/"!=d.charAt(p+1))continue;p++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=s&&"\\"!=s){u=AUTHORITY;continue}break;case AUTHORITY:if("@"==s){h&&(d="%40"+d),h=!0,c=arrayFrom(d);for(var g=0;g65535)return INVALID_PORT;e.port=isSpecial(e)&&m===specialSchemes[e.scheme]?null:m,d=""}if(t)return;u=PATH_START;continue}return INVALID_PORT}d+=s;break;case FILE:if(e.scheme="file","/"==s||"\\"==s)u=FILE_SLASH;else{if(!a||"file"!=a.scheme){u=PATH;continue}if(s==EOF)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==s)e.host=a.host,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){startsWithWindowsDriveLetter(i.slice(p).join(""))||(e.host=a.host,e.path=a.path.slice(),shortenURLsPath(e)),u=PATH;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}}break;case FILE_SLASH:if("/"==s||"\\"==s){u=FILE_HOST;break}a&&"file"==a.scheme&&!startsWithWindowsDriveLetter(i.slice(p).join(""))&&(isWindowsDriveLetter(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=PATH;continue;case FILE_HOST:if(s==EOF||"/"==s||"\\"==s||"?"==s||"#"==s){if(!t&&isWindowsDriveLetter(d))u=PATH;else if(""==d){if(e.host="",t)return;u=PATH_START}else{if(l=parseHost(e,d))return l;if("localhost"==e.host&&(e.host=""),t)return;d="",u=PATH_START}continue}d+=s;break;case PATH_START:if(isSpecial(e)){if(u=PATH,"/"!=s&&"\\"!=s)continue}else if(t||"?"!=s)if(t||"#"!=s){if(s!=EOF&&(u=PATH,"/"!=s))continue}else e.fragment="",u=FRAGMENT;else e.query="",u=QUERY;break;case PATH:if(s==EOF||"/"==s||"\\"==s&&isSpecial(e)||!t&&("?"==s||"#"==s)){if(isDoubleDot(d)?(shortenURLsPath(e),"/"==s||"\\"==s&&isSpecial(e)||e.path.push("")):isSingleDot(d)?"/"==s||"\\"==s&&isSpecial(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&isWindowsDriveLetter(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(s==EOF||"?"==s||"#"==s))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==s?(e.query="",u=QUERY):"#"==s&&(e.fragment="",u=FRAGMENT)}else d+=percentEncode(s,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==s?(e.query="",u=QUERY):"#"==s?(e.fragment="",u=FRAGMENT):s!=EOF&&(e.path[0]+=percentEncode(s,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=s?s!=EOF&&("'"==s&&isSpecial(e)?e.query+="%27":e.query+="#"==s?"%23":percentEncode(s,C0ControlPercentEncodeSet)):(e.fragment="",u=FRAGMENT);break;case FRAGMENT:s!=EOF&&(e.fragment+=percentEncode(s,fragmentPercentEncodeSet))}p++}},URLConstructor=function URL(e){var r,t,a=anInstance(this,URLConstructor,"URL"),i=arguments.length>1?arguments[1]:void 0,s=toString(e),c=setInternalState(a,{type:"URL"});if(void 0!==i)if(i instanceof URLConstructor)r=getInternalURLState(i);else if(t=parseURL(r={},toString(i)))throw TypeError(t);if(t=parseURL(c,s,null,r))throw TypeError(t);var l=c.searchParams=new URLSearchParams$1,u=getInternalSearchParamsState(l);u.updateSearchParams(c.query),u.updateURL=function(){c.query=String(l)||null},descriptors||(a.href=serializeURL.call(a),a.origin=getOrigin.call(a),a.protocol=getProtocol.call(a),a.username=getUsername.call(a),a.password=getPassword.call(a),a.host=getHost.call(a),a.hostname=getHostname.call(a),a.port=getPort.call(a),a.pathname=getPathname.call(a),a.search=getSearch.call(a),a.searchParams=getSearchParams.call(a),a.hash=getHash.call(a))},URLPrototype=URLConstructor.prototype,serializeURL=function(){var e=getInternalURLState(this),r=e.scheme,t=e.username,a=e.password,i=e.host,s=e.port,c=e.path,l=e.query,u=e.fragment,p=r+":";return null!==i?(p+="//",includesCredentials(e)&&(p+=t+(a?":"+a:"")+"@"),p+=serializeHost(i),null!==s&&(p+=":"+s)):"file"==r&&(p+="//"),p+=e.cannotBeABaseURL?c[0]:c.length?"/"+c.join("/"):"",null!==l&&(p+="?"+l),null!==u&&(p+="#"+u),p},getOrigin=function(){var e=getInternalURLState(this),r=e.scheme,t=e.port;if("blob"==r)try{return new URLConstructor(r.path[0]).origin}catch(e){return"null"}return"file"!=r&&isSpecial(e)?r+"://"+serializeHost(e.host)+(null!==t?":"+t:""):"null"},getProtocol=function(){return getInternalURLState(this).scheme+":"},getUsername=function(){return getInternalURLState(this).username},getPassword=function(){return getInternalURLState(this).password},getHost=function(){var e=getInternalURLState(this),r=e.host,t=e.port;return null===r?"":null===t?serializeHost(r):serializeHost(r)+":"+t},getHostname=function(){var e=getInternalURLState(this).host;return null===e?"":serializeHost(e)},getPort=function(){var e=getInternalURLState(this).port;return null===e?"":String(e)},getPathname=function(){var e=getInternalURLState(this),r=e.path;return e.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},getSearch=function(){var e=getInternalURLState(this).query;return e?"?"+e:""},getSearchParams=function(){return getInternalURLState(this).searchParams},getHash=function(){var e=getInternalURLState(this).fragment;return e?"#"+e:""},accessorDescriptor=function(e,r){return{get:e,set:r,configurable:!0,enumerable:!0}};if(descriptors&&objectDefineProperties(URLPrototype,{href:accessorDescriptor(serializeURL,(function(e){var r=getInternalURLState(this),t=toString(e),a=parseURL(r,t);if(a)throw TypeError(a);getInternalSearchParamsState(r.searchParams).updateSearchParams(r.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(e){var r=getInternalURLState(this);parseURL(r,toString(e)+":",SCHEME_START)})),username:accessorDescriptor(getUsername,(function(e){var r=getInternalURLState(this),t=arrayFrom(toString(e));if(!cannotHaveUsernamePasswordPort(r)){r.username="";for(var a=0;a1?arguments[1]:void 0)},handlePrototype=function(e){if(e&&e.forEach!==arrayForEach)try{createNonEnumerableProperty(e,"forEach",arrayForEach)}catch(r){e.forEach=arrayForEach}};for(var COLLECTION_NAME in domIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype);handlePrototype(domTokenListPrototype);var propertyIsEnumerable=objectPropertyIsEnumerable.f,createMethod=function(e){return function(r){for(var t,a=toIndexedObject(r),i=objectKeys(a),s=i.length,c=0,l=[];s>c;)t=i[c++],descriptors&&!propertyIsEnumerable.call(a,t)||l.push(e?[t,a[t]]:a[t]);return l}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$entries=objectToArray.entries;_export({target:"Object",stat:!0},{entries:function entries(e){return $entries(e)}});var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,$startsWith="".startsWith,min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegexpLogic("startsWith"),MDN_POLYFILL_BUG=!(CORRECT_IS_REGEXP_LOGIC||(descriptor=getOwnPropertyDescriptor(String.prototype,"startsWith"),!descriptor||descriptor.writable)),descriptor;_export({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function startsWith(e){var r=toString(requireObjectCoercible(this));notARegexp(e);var t=toLength(min$1(arguments.length>1?arguments[1]:void 0,r.length)),a=toString(e);return $startsWith?$startsWith.call(r,a,t):r.slice(t,t+a.length)===a}});var floor=Math.floor,replace="".replace,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(e,r,t,a,i,s){var c=t+e.length,l=a.length,u=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==i&&(i=toObject(i),u=SUBSTITUTION_SYMBOLS),replace.call(s,u,(function(s,u){var p;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,t);case"'":return r.slice(c);case"<":p=i[u.slice(1,-1)];break;default:var d=+u;if(0===d)return s;if(d>l){var h=floor(d/10);return 0===h?s:h<=l?void 0===a[h-1]?u.charAt(1):a[h-1]+u.charAt(1):s}p=a[d-1]}return void 0===p?"":p}))},REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}));fixRegexpWellKnownSymbolLogic("replace",(function(e,r,t){var a=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function replace(e,t){var a=requireObjectCoercible(this),i=null==e?void 0:getMethod(e,REPLACE);return i?i.call(e,a,t):r.call(toString(a),e,t)},function(e,i){var s=anObject(this),c=toString(e);if("string"==typeof i&&-1===i.indexOf(a)&&-1===i.indexOf("$<")){var l=t(r,s,c,i);if(l.done)return l.value}var u=isCallable(i);u||(i=toString(i));var p=s.global;if(p){var d=s.unicode;s.lastIndex=0}for(var h=[];;){var y=regexpExecAbstract(s,c);if(null===y)break;if(h.push(y),!p)break;""===toString(y[0])&&(s.lastIndex=advanceStringIndex(c,toLength(s.lastIndex),d))}for(var A="",g=0,v=0;v=g&&(A+=c.slice(g,m)+S,g=m+E.length)}return A+c.slice(g)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=engineV8Version>=51||!fails((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var r=e[IS_CONCAT_SPREADABLE];return void 0!==r?!!r:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function concat(e){var r,t,a,i,s,c=toObject(this),l=arraySpeciesCreate(c,0),u=0;for(r=-1,a=arguments.length;rMAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(t=0;t=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(l,u++,s)}return l.length=u,l}});var cnt=0,imageCompressionLibUrl,worker;function createWorker(e){var r=[];return"function"==typeof e?r.push("(".concat(e,")()")):r.push(e),new Worker(URL.createObjectURL(new Blob(r)))}function createSourceObject(e){return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}function stringify(e){return JSON.stringify(e,(function(e,r){return"function"==typeof r?"BIC_FN:::(function () { return ".concat(r.toString()," })()"):r}))}function parse(o){if("string"==typeof o)return o;var result={};return Object.entries(o).forEach((function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];if("string"==typeof value&&value.startsWith("BIC_FN:::"))try{result[key]=eval(value.replace(/^BIC_FN:::/,""))}catch(e){throw e}else result[key]=parse(value)})),result}function generateLib(){return createSourceObject("\n // reconstruct library\n function imageCompression (){return (".concat(imageCompression,").apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ").concat(imageCompression.getDataUrlFromFile,"\n imageCompression.getFilefromDataUrl = ").concat(imageCompression.getFilefromDataUrl,"\n imageCompression.loadImage = ").concat(imageCompression.loadImage,"\n imageCompression.drawImageInCanvas = ").concat(imageCompression.drawImageInCanvas,"\n imageCompression.drawFileInCanvas = ").concat(imageCompression.drawFileInCanvas,"\n imageCompression.canvasToFile = ").concat(imageCompression.canvasToFile,"\n imageCompression.getExifOrientation = ").concat(imageCompression.getExifOrientation,"\n imageCompression.handleMaxWidthOrHeight = ").concat(imageCompression.handleMaxWidthOrHeight,"\n imageCompression.followExifOrientation = ").concat(imageCompression.followExifOrientation,"\n imageCompression.cleanupCanvasMemory = ").concat(imageCompression.cleanupCanvasMemory,"\n imageCompression.isAutoOrientationInBrowser = ").concat(imageCompression.isAutoOrientationInBrowser,"\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ").concat(imageCompression.approximateBelowMaximumCanvasSizeOfBrowser,"\n imageCompression.getBrowserName = ").concat(imageCompression.getBrowserName,"\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ").concat(isIOS,"\n \n getNewCanvasAndCtx = ").concat(getNewCanvasAndCtx,"\n CustomFileReader = FileReader\n CustomFile = File\n MaxCanvasSize = ").concat(JSON.stringify(MaxCanvasSize),"\n function compress (){return (").concat(compress,").apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ").concat(parse,"\n const UPNG = {}\n UPNG.toRGBA8 = ").concat(UPNG.toRGBA8,"\n UPNG.toRGBA8.decodeImage = ").concat(UPNG.toRGBA8.decodeImage,"\n UPNG.decode = ").concat(UPNG.decode,"\n UPNG.decode._decompress = ").concat(UPNG.decode._decompress,"\n UPNG.decode._inflate = ").concat(UPNG.decode._inflate,"\n UPNG.decode._readInterlace = ").concat(UPNG.decode._readInterlace,"\n UPNG.decode._getBPP = ").concat(UPNG.decode._getBPP," \n UPNG.decode._filterZero = ").concat(UPNG.decode._filterZero,"\n UPNG.decode._paeth = ").concat(UPNG.decode._paeth,"\n UPNG.decode._IHDR = ").concat(UPNG.decode._IHDR,"\n UPNG._bin = parse(").concat(stringify(UPNG._bin),")\n UPNG._copyTile = ").concat(UPNG._copyTile,"\n UPNG.encode = ").concat(UPNG.encode,"\n UPNG.encodeLL = ").concat(UPNG.encodeLL," \n UPNG.encode._main = ").concat(UPNG.encode._main,"\n UPNG.encode.compressPNG = ").concat(UPNG.encode.compressPNG," \n UPNG.encode.compress = ").concat(UPNG.encode.compress,"\n UPNG.encode.framize = ").concat(UPNG.encode.framize," \n UPNG.encode._updateFrame = ").concat(UPNG.encode._updateFrame," \n UPNG.encode._prepareDiff = ").concat(UPNG.encode._prepareDiff," \n UPNG.encode._filterZero = ").concat(UPNG.encode._filterZero," \n UPNG.encode._filterLine = ").concat(UPNG.encode._filterLine,"\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,"\n UPNG.crc = parse(").concat(stringify(UPNG.crc),")\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ").concat(UPNG.quantize," \n UPNG.quantize.getKDtree = ").concat(UPNG.quantize.getKDtree," \n UPNG.quantize.getNearest = ").concat(UPNG.quantize.getNearest," \n UPNG.quantize.planeDst = ").concat(UPNG.quantize.planeDst," \n UPNG.quantize.dist = ").concat(UPNG.quantize.dist," \n UPNG.quantize.splitPixels = ").concat(UPNG.quantize.splitPixels," \n UPNG.quantize.vecDot = ").concat(UPNG.quantize.vecDot," \n UPNG.quantize.stats = ").concat(UPNG.quantize.stats," \n UPNG.quantize.estats = ").concat(UPNG.quantize.estats,"\n UPNG.M4 = parse(").concat(stringify(UPNG.M4),")\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,'\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP["parse"] = ').concat(UZIP_1.parse,"\n UZIP._readLocal = ").concat(UZIP_1._readLocal,"\n UZIP.inflateRaw = ").concat(UZIP_1.inflateRaw,"\n UZIP.inflate = ").concat(UZIP_1.inflate,"\n UZIP.deflate = ").concat(UZIP_1.deflate,"\n UZIP.deflateRaw = ").concat(UZIP_1.deflateRaw,"\n UZIP.encode = ").concat(UZIP_1.encode,"\n UZIP._noNeed = ").concat(UZIP_1._noNeed,"\n UZIP._writeHeader = ").concat(UZIP_1._writeHeader,"\n UZIP.crc = parse(").concat(stringify(UZIP_1.crc),")\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ").concat(UZIP_1.adler,"\n UZIP.bin = parse(").concat(stringify(UZIP_1.bin),")\n UZIP.F = {}\n UZIP.F.deflateRaw = ").concat(UZIP_1.F.deflateRaw,"\n UZIP.F._bestMatch = ").concat(UZIP_1.F._bestMatch,"\n UZIP.F._howLong = ").concat(UZIP_1.F._howLong,"\n UZIP.F._hash = ").concat(UZIP_1.F._hash,"\n UZIP.saved = ").concat(UZIP_1.saved,"\n UZIP.F._writeBlock = ").concat(UZIP_1.F._writeBlock,"\n UZIP.F._copyExact = ").concat(UZIP_1.F._copyExact,"\n UZIP.F.getTrees = ").concat(UZIP_1.F.getTrees,"\n UZIP.F.getSecond = ").concat(UZIP_1.F.getSecond,"\n UZIP.F.nonZero = ").concat(UZIP_1.F.nonZero,"\n UZIP.F.contSize = ").concat(UZIP_1.F.contSize,"\n UZIP.F._codeTiny = ").concat(UZIP_1.F._codeTiny," \n UZIP.F._lenCodes = ").concat(UZIP_1.F._lenCodes," \n UZIP.F._hufTree = ").concat(UZIP_1.F._hufTree," \n UZIP.F.setDepth = ").concat(UZIP_1.F.setDepth," \n UZIP.F.restrictDepth = ").concat(UZIP_1.F.restrictDepth,"\n UZIP.F._goodIndex = ").concat(UZIP_1.F._goodIndex," \n UZIP.F._writeLit = ").concat(UZIP_1.F._writeLit," \n UZIP.F.inflate = ").concat(UZIP_1.F.inflate," \n UZIP.F._check = ").concat(UZIP_1.F._check," \n UZIP.F._decodeTiny = ").concat(UZIP_1.F._decodeTiny," \n UZIP.F._copyOut = ").concat(UZIP_1.F._copyOut," \n UZIP.F.makeCodes = ").concat(UZIP_1.F.makeCodes," \n UZIP.F.codes2map = ").concat(UZIP_1.F.codes2map," \n UZIP.F.revCodes = ").concat(UZIP_1.F.revCodes," \n\n // used only in deflate\n UZIP.F._putsE = ").concat(UZIP_1.F._putsE,"\n UZIP.F._putsF = ").concat(UZIP_1.F._putsF,"\n \n UZIP.F._bitsE = ").concat(UZIP_1.F._bitsE,"\n UZIP.F._bitsF = ").concat(UZIP_1.F._bitsF,"\n\n UZIP.F._get17 = ").concat(UZIP_1.F._get17,"\n UZIP.F._get25 = ").concat(UZIP_1.F._get25,"\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n "))}function generateWorkerScript(){return createWorker("\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n })\n ")}function compressOnWebWorker(e,r){return new Promise((function(t,a){var i=cnt+=1;imageCompressionLibUrl||(imageCompressionLibUrl=generateLib()),worker||(worker=generateWorkerScript()),worker.addEventListener("message",(function handler(e){if(e.data.id===i){if(void 0!==e.data.progress)return void r.onProgress(e.data.progress);worker.removeEventListener("message",handler),e.data.error&&a(new Error(e.data.error)),t(e.data.file)}})),worker.addEventListener("error",a),worker.postMessage({file:e,id:i,imageCompressionLibUrl:imageCompressionLibUrl,options:_objectSpread2(_objectSpread2({},r),{},{onProgress:void 0})})}))}function imageCompression(e,r){return new Promise((function(t,a){var i,s,c,l,u,p;if(i=_objectSpread2({},r),c=0,l=i.onProgress,i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,u="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=function(e){c=e,"function"==typeof l&&l(c)},!(e instanceof Blob||e instanceof CustomFile))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(p="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!u||"function"!=typeof Worker||p)return compress(e,i).then(function(e){try{return s=e,$If_3.call(this)}catch(e){return a(e)}}.bind(this),a);var d=function(){try{return $If_3.call(this)}catch(e){return a(e)}}.bind(this),h=function $Try_1_Catch(r){try{return compress(e,i).then((function(e){try{return s=e,d()}catch(e){return a(e)}}),a)}catch(e){return a(e)}};try{return compressOnWebWorker(e,i).then((function(e){try{return s=e,d()}catch(e){return h()}}),h)}catch(e){h()}function $If_3(){try{s.name=e.name,s.lastModified=e.lastModified}catch(e){}return t(s)}}))}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.getBrowserName=getBrowserName,imageCompression.version="1.0.16";export{imageCompression as default}; +function _mergeNamespaces(e,r){return r.forEach((function(r){Object.keys(r).forEach((function(t){if("default"!==t&&!(t in e)){var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:function(){return r[t]}})}}))})),Object.freeze(e)}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function _objectSpread2(e){for(var r=1;re.length)&&(r=e.length);for(var t=0,a=new Array(r);t=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=match[1])));var engineV8Version=version&&+version,fails=function(e){try{return!!e()}catch(e){return!0}},nativeSymbol=!!Object.getOwnPropertySymbols&&!fails((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,WellKnownSymbolsStore=shared("wks"),Symbol$1=global$1.Symbol,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(e){return has$1(WellKnownSymbolsStore,e)&&(nativeSymbol||"string"==typeof WellKnownSymbolsStore[e])||(nativeSymbol&&has$1(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},TO_STRING_TAG$4=wellKnownSymbol("toStringTag"),test$1={};test$1[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$1),descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),isObject=function(e){return"object"==typeof e?null!==e:isCallable(e)},document$3=global$1.document,EXISTS$1=isObject(document$3)&&isObject(document$3.createElement),documentCreateElement=function(e){return EXISTS$1?document$3.createElement(e):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(e){if(isObject(e))return e;throw TypeError(String(e)+" is not an object")},isSymbol=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var r=getBuiltIn("Symbol");return isCallable(r)&&Object(e)instanceof r},tryToString=function(e){try{return String(e)}catch(e){return"Object"}},aCallable=function(e){if(isCallable(e))return e;throw TypeError(tryToString(e)+" is not a function")},getMethod=function(e,r){var t=e[r];return null==t?void 0:aCallable(t)},ordinaryToPrimitive=function(e,r){var t,a;if("string"===r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;if(isCallable(t=e.valueOf)&&!isObject(a=t.call(e)))return a;if("string"!==r&&isCallable(t=e.toString)&&!isObject(a=t.call(e)))return a;throw TypeError("Can't convert object to primitive value")},TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),toPrimitive=function(e,r){if(!isObject(e)||isSymbol(e))return e;var t,a=getMethod(e,TO_PRIMITIVE);if(a){if(void 0===r&&(r="default"),t=a.call(e,r),!isObject(t)||isSymbol(t))return t;throw TypeError("Can't convert object to primitive value")}return void 0===r&&(r="number"),ordinaryToPrimitive(e,r)},toPropertyKey=function(e){var r=toPrimitive(e,"string");return isSymbol(r)?r:String(r)},$defineProperty=Object.defineProperty,f$5=descriptors?$defineProperty:function defineProperty(e,r,t){if(anObject(e),r=toPropertyKey(r),anObject(t),ie8DomDefine)try{return $defineProperty(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported");return"value"in t&&(e[r]=t.value),e},objectDefineProperty={f:f$5},createPropertyDescriptor=function(e,r){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:r}},createNonEnumerableProperty=descriptors?function(e,r,t){return objectDefineProperty.f(e,r,createPropertyDescriptor(1,t))}:function(e,r,t){return e[r]=t,e},functionToString=Function.toString;isCallable(sharedStore.inspectSource)||(sharedStore.inspectSource=function(e){return functionToString.call(e)});var inspectSource=sharedStore.inspectSource,WeakMap$1=global$1.WeakMap,nativeWeakMap=isCallable(WeakMap$1)&&/native code/.test(inspectSource(WeakMap$1)),keys$2=shared("keys"),sharedKey=function(e){return keys$2[e]||(keys$2[e]=uid(e))},hiddenKeys$1={},OBJECT_ALREADY_INITIALIZED="Object already initialized",WeakMap=global$1.WeakMap,set$2,get$1,has,enforce=function(e){return has(e)?get$1(e):set$2(e,{})},getterFor=function(e){return function(r){var t;if(!isObject(r)||(t=get$1(r)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}};if(nativeWeakMap||sharedStore.state){var store=sharedStore.state||(sharedStore.state=new WeakMap),wmget=store.get,wmhas=store.has,wmset=store.set;set$2=function(e,r){if(wmhas.call(store,e))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,wmset.call(store,e,r),r},get$1=function(e){return wmget.call(store,e)||{}},has=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys$1[STATE]=!0,set$2=function(e,r){if(has$1(e,STATE))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return r.facade=e,createNonEnumerableProperty(e,STATE,r),r},get$1=function(e){return has$1(e,STATE)?e[STATE]:{}},has=function(e){return has$1(e,STATE)}}var internalState={set:set$2,get:get$1,has:has,enforce:enforce,getterFor:getterFor},FunctionPrototype$1=Function.prototype,getDescriptor=descriptors&&Object.getOwnPropertyDescriptor,EXISTS=has$1(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function something(){}.name,CONFIGURABLE=EXISTS&&(!descriptors||descriptors&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},redefine=createCommonjsModule((function(e){var r=functionName.CONFIGURABLE,t=internalState.get,a=internalState.enforce,i=String(String).split("String");(e.exports=function(e,t,s,c){var l,u=!!c&&!!c.unsafe,p=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet,h=c&&void 0!==c.name?c.name:t;isCallable(s)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!has$1(s,"name")||r&&s.name!==h)&&createNonEnumerableProperty(s,"name",h),(l=a(s)).source||(l.source=i.join("string"==typeof h?h:""))),e!==global$1?(u?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=s:createNonEnumerableProperty(e,t,s)):p?e[t]=s:setGlobal(t,s)})(Function.prototype,"toString",(function toString(){return isCallable(this)&&t(this).source||inspectSource(this)}))})),toString$1={}.toString,classofRaw=function(e){return toString$1.call(e).slice(8,-1)},TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,r){try{return e[r]}catch(e){}},classof=toStringTagSupport?classofRaw:function(e){var r,t,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(r=Object(e),TO_STRING_TAG$3))?t:CORRECT_ARGUMENTS?classofRaw(r):"Object"==(a=classofRaw(r))&&isCallable(r.callee)?"Arguments":a},objectToString=toStringTagSupport?{}.toString:function toString(){return"[object "+classof(this)+"]"};toStringTagSupport||redefine(Object.prototype,"toString",objectToString,{unsafe:!0});var $propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$4&&!$propertyIsEnumerable.call({1:2},1),f$4=NASHORN_BUG?function propertyIsEnumerable(e){var r=getOwnPropertyDescriptor$4(this,e);return!!r&&r.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable={f:f$4},split="".split,indexedObject=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$3=descriptors?$getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,r){if(e=toIndexedObject(e),r=toPropertyKey(r),ie8DomDefine)try{return $getOwnPropertyDescriptor(e,r)}catch(e){}if(has$1(e,r))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,r),e[r])},objectGetOwnPropertyDescriptor={f:f$3},ceil=Math.ceil,floor$7=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor$7:ceil)(e)},min$6=Math.min,toLength=function(e){return e>0?min$6(toInteger(e),9007199254740991):0},max$2=Math.max,min$5=Math.min,toAbsoluteIndex=function(e,r){var t=toInteger(e);return t<0?max$2(t+r,0):min$5(t,r)},createMethod$5=function(e){return function(r,t,a){var i,s=toIndexedObject(r),c=toLength(s.length),l=toAbsoluteIndex(a,c);if(e&&t!=t){for(;c>l;)if((i=s[l++])!=i)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===t)return e||l||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(e,r){var t,a=toIndexedObject(e),i=0,s=[];for(t in a)!has$1(hiddenKeys$1,t)&&has$1(a,t)&&s.push(t);for(;r.length>i;)has$1(a,t=r[i++])&&(~indexOf(s,t)||s.push(t));return s},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys=enumBugKeys.concat("length","prototype"),f$2=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return objectKeysInternal(e,hiddenKeys)},objectGetOwnPropertyNames={f:f$2},f$1=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$1},ownKeys=getBuiltIn("Reflect","ownKeys")||function ownKeys(e){var r=objectGetOwnPropertyNames.f(anObject(e)),t=objectGetOwnPropertySymbols.f;return t?r.concat(t(e)):r},copyConstructorProperties=function(e,r){for(var t=ownKeys(r),a=objectDefineProperty.f,i=objectGetOwnPropertyDescriptor.f,s=0;ss;s++)if((l=callFn(e[s]))&&l instanceof Result)return l;return new Result(!1)}a=getIterator(e,i)}for(u=a.next;!(p=u.call(a)).done;){try{l=callFn(p.value)}catch(e){iteratorClose(a,"throw",e)}if("object"==typeof l&&l&&l instanceof Result)return l}return new Result(!1)},ITERATOR$6=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$6]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration=function(e,r){if(!r&&!SAFE_CLOSING)return!1;var t=!1;try{var a={};a[ITERATOR$6]=function(){return{next:function(){return{done:t=!0}}}},e(a)}catch(e){}return t},empty=[],construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=constructorRegExp.exec,INCORRECT_TO_STRING=!constructorRegExp.exec((function(){})),isConstructorModern=function(e){if(!isCallable(e))return!1;try{return construct(Object,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable(e))return!1;switch(classof(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return INCORRECT_TO_STRING||!!exec.call(constructorRegExp,inspectSource(e))},isConstructor=!construct||fails((function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){e=!0}))||e}))?isConstructorLegacy:isConstructorModern,aConstructor=function(e){if(isConstructor(e))return e;throw TypeError(tryToString(e)+" is not a constructor")},SPECIES$5=wellKnownSymbol("species"),speciesConstructor=function(e,r){var t,a=anObject(e).constructor;return void 0===a||null==(t=anObject(a)[SPECIES$5])?r:aConstructor(t)},html=getBuiltIn("document","documentElement"),engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent),engineIsNode="process"==classofRaw(global$1.process),set$1=global$1.setImmediate,clear=global$1.clearImmediate,process$2=global$1.process,MessageChannel=global$1.MessageChannel,Dispatch=global$1.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",location,defer,channel,port;try{location=global$1.location}catch(e){}var run=function(e){if(queue.hasOwnProperty(e)){var r=queue[e];delete queue[e],r()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$1.postMessage(String(e),location.protocol+"//"+location.host)};set$1&&clear||(set$1=function setImmediate(e){for(var r=[],t=arguments.length,a=1;t>a;)r.push(arguments[a++]);return queue[++counter]=function(){(isCallable(e)?e:Function(e)).apply(void 0,r)},defer(counter),counter},clear=function clearImmediate(e){delete queue[e]},engineIsNode?defer=function(e){process$2.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!engineIsIos?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=functionBindContext(port.postMessage,port,1)):global$1.addEventListener&&isCallable(global$1.postMessage)&&!global$1.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global$1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(e){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$1,clear:clear},engineIsIosPebble=/ipad|iphone|ipod/i.test(engineUserAgent)&&void 0!==global$1.Pebble,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(engineUserAgent),getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,MutationObserver=global$1.MutationObserver||global$1.WebKitMutationObserver,document$2=global$1.document,process$1=global$1.process,Promise$1=global$1.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,flush,head,last,notify$1,toggle,node,promise,then;queueMicrotask||(flush=function(){var e,r;for(engineIsNode&&(e=process$1.domain)&&e.exit();head;){r=head.fn,head=head.next;try{r()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},engineIsIos||engineIsNode||engineIsWebosWebkit||!MutationObserver||!document$2?!engineIsIosPebble&&Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),promise.constructor=Promise$1,then=promise.then,notify$1=function(){then.call(promise,flush)}):notify$1=engineIsNode?function(){process$1.nextTick(flush)}:function(){macrotask.call(global$1,flush)}:(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}));var microtask=queueMicrotask||function(e){var r={fn:e,next:void 0};last&&(last.next=r),head||(head=r,notify$1()),last=r},PromiseCapability=function(e){var r,t;this.promise=new e((function(e,a){if(void 0!==r||void 0!==t)throw TypeError("Bad Promise constructor");r=e,t=a})),this.resolve=aCallable(r),this.reject=aCallable(t)},f=function(e){return new PromiseCapability(e)},newPromiseCapability$1={f:f},promiseResolve=function(e,r){if(anObject(e),isObject(r)&&r.constructor===e)return r;var t=newPromiseCapability$1.f(e);return(0,t.resolve)(r),t.promise},hostReportErrors=function(e,r){var t=global$1.console;t&&t.error&&(1===arguments.length?t.error(e):t.error(e,r))},perform=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},engineIsBrowser="object"==typeof window,task=task$1.set,SPECIES$4=wellKnownSymbol("species"),PROMISE="Promise",getInternalState$4=internalState.get,setInternalState$5=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),NativePromisePrototype=nativePromiseConstructor&&nativePromiseConstructor.prototype,PromiseConstructor=nativePromiseConstructor,PromiseConstructorPrototype=NativePromisePrototype,TypeError$1=global$1.TypeError,document$1=global$1.document,process=global$1.process,newPromiseCapability=newPromiseCapability$1.f,newGenericPromiseCapability=newPromiseCapability,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),NATIVE_REJECTION_EVENT=isCallable(global$1.PromiseRejectionEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,SUBCLASSING=!1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,FORCED$6=isForced_1(PROMISE,(function(){var e=inspectSource(PromiseConstructor),r=e!==String(PromiseConstructor);if(!r&&66===engineV8Version)return!0;if(engineV8Version>=51&&/native code/.test(e))return!1;var t=new PromiseConstructor((function(e){e(1)})),FakePromise=function(e){e((function(){}),(function(){}))};return(t.constructor={})[SPECIES$4]=FakePromise,!(SUBCLASSING=t.then((function(){}))instanceof FakePromise)||!r&&engineIsBrowser&&!NATIVE_REJECTION_EVENT})),INCORRECT_ITERATION=FORCED$6||!checkCorrectnessOfIteration((function(e){PromiseConstructor.all(e).catch((function(){}))})),isThenable=function(e){var r;return!(!isObject(e)||!isCallable(r=e.then))&&r},notify=function(e,r){if(!e.notified){e.notified=!0;var t=e.reactions;microtask((function(){for(var a=e.value,i=e.state==FULFILLED,s=0;t.length>s;){var c,l,u,p=t[s++],d=i?p.ok:p.fail,h=p.resolve,y=p.reject,A=p.domain;try{d?(i||(e.rejection===UNHANDLED&&onHandleUnhandled(e),e.rejection=HANDLED),!0===d?c=a:(A&&A.enter(),c=d(a),A&&(A.exit(),u=!0)),c===p.promise?y(TypeError$1("Promise-chain cycle")):(l=isThenable(c))?l.call(c,h,y):h(c)):y(a)}catch(e){A&&!u&&A.exit(),y(e)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(e)}))}},dispatchEvent=function(e,r,t){var a,i;DISPATCH_EVENT?((a=document$1.createEvent("Event")).promise=r,a.reason=t,a.initEvent(e,!1,!0),global$1.dispatchEvent(a)):a={promise:r,reason:t},!NATIVE_REJECTION_EVENT&&(i=global$1["on"+e])?i(a):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",t)},onUnhandled=function(e){task.call(global$1,(function(){var r,t=e.facade,a=e.value;if(isUnhandled(e)&&(r=perform((function(){engineIsNode?process.emit("unhandledRejection",a,t):dispatchEvent(UNHANDLED_REJECTION,t,a)})),e.rejection=engineIsNode||isUnhandled(e)?UNHANDLED:HANDLED,r.error))throw r.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){task.call(global$1,(function(){var r=e.facade;engineIsNode?process.emit("rejectionHandled",r):dispatchEvent(REJECTION_HANDLED,r,e.value)}))},bind=function(e,r,t){return function(a){e(r,a,t)}},internalReject=function(e,r,t){e.done||(e.done=!0,t&&(e=t),e.value=r,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,r,t){if(!e.done){e.done=!0,t&&(e=t);try{if(e.facade===r)throw TypeError$1("Promise can't be resolved itself");var a=isThenable(r);a?microtask((function(){var t={done:!1};try{a.call(r,bind(internalResolve,t,e),bind(internalReject,t,e))}catch(r){internalReject(t,r,e)}})):(e.value=r,e.state=FULFILLED,notify(e,!1))}catch(r){internalReject({done:!1},r,e)}}};if(FORCED$6&&(PromiseConstructor=function Promise(e){anInstance(this,PromiseConstructor,PROMISE),aCallable(e),Internal.call(this);var r=getInternalState$4(this);try{e(bind(internalResolve,r),bind(internalReject,r))}catch(e){internalReject(r,e)}},PromiseConstructorPrototype=PromiseConstructor.prototype,Internal=function Promise(e){setInternalState$5(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})},Internal.prototype=redefineAll(PromiseConstructorPrototype,{then:function then(e,r){var t=getInternalPromiseState(this),a=newPromiseCapability(speciesConstructor(this,PromiseConstructor));return a.ok=!isCallable(e)||e,a.fail=isCallable(r)&&r,a.domain=engineIsNode?process.domain:void 0,t.parent=!0,t.reactions.push(a),t.state!=PENDING&¬ify(t,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal,r=getInternalState$4(e);this.promise=e,this.resolve=bind(internalResolve,r),this.reject=bind(internalReject,r)},newPromiseCapability$1.f=newPromiseCapability=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable(nativePromiseConstructor)&&NativePromisePrototype!==Object.prototype)){nativeThen=NativePromisePrototype.then,SUBCLASSING||(redefine(NativePromisePrototype,"then",(function then(e,r){var t=this;return new PromiseConstructor((function(e,r){nativeThen.call(t,e,r)})).then(e,r)}),{unsafe:!0}),redefine(NativePromisePrototype,"catch",PromiseConstructorPrototype.catch,{unsafe:!0}));try{delete NativePromisePrototype.constructor}catch(e){}objectSetPrototypeOf&&objectSetPrototypeOf(NativePromisePrototype,PromiseConstructorPrototype)}_export({global:!0,wrap:!0,forced:FORCED$6},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE),PromiseWrapper=getBuiltIn(PROMISE),_export({target:PROMISE,stat:!0,forced:FORCED$6},{reject:function reject(e){var r=newPromiseCapability(this);return r.reject.call(void 0,e),r.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED$6},{resolve:function resolve(e){return promiseResolve(this,e)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function all(e){var r=this,t=newPromiseCapability(r),a=t.resolve,i=t.reject,s=perform((function(){var t=aCallable(r.resolve),s=[],c=0,l=1;iterate(e,(function(e){var u=c++,p=!1;s.push(void 0),l++,t.call(r,e).then((function(e){p||(p=!0,s[u]=e,--l||a(s))}),i)})),--l||a(s)}));return s.error&&i(s.value),t.promise},race:function race(e){var r=this,t=newPromiseCapability(r),a=t.reject,i=perform((function(){var i=aCallable(r.resolve);iterate(e,(function(e){i.call(r,e).then(t.resolve,a)}))}));return i.error&&a(i.value),t.promise}});var inheritIfRequired=function(e,r,t){var a,i;return objectSetPrototypeOf&&isCallable(a=r.constructor)&&a!==t&&isObject(i=a.prototype)&&i!==t.prototype&&objectSetPrototypeOf(e,i),e},objectKeys=Object.keys||function keys(e){return objectKeysInternal(e,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function defineProperties(e,r){anObject(e);for(var t,a=objectKeys(r),i=a.length,s=0;i>s;)objectDefineProperty.f(e,t=a[s++],r[t]);return e},GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var r=e.parentWindow.Object;return e=null,r},NullProtoObjectViaIFrame=function(){var e,r=documentCreateElement("iframe"),t="java"+SCRIPT+":";return r.style.display="none",html.appendChild(r),r.src=String(t),(e=r.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys[e]];return NullProtoObject()};hiddenKeys$1[IE_PROTO$1]=!0;var objectCreate=Object.create||function create(e,r){var t;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject(e),t=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,t[IE_PROTO$1]=e):t=NullProtoObject(),void 0===r?t:objectDefineProperties(t,r)},toString=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},whitespaces="\t\n\v\f\r                 \u2028\u2029\ufeff",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$4=function(e){return function(r){var t=toString(requireObjectCoercible(r));return 1&e&&(t=t.replace(ltrim,"")),2&e&&(t=t.replace(rtrim,"")),t}},stringTrim={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},getOwnPropertyNames$1=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,defineProperty$4=objectDefineProperty.f,trim=stringTrim.trim,NUMBER="Number",NativeNumber=global$1[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classofRaw(objectCreate(NumberPrototype))==NUMBER,toNumber=function(e){if(isSymbol(e))throw TypeError("Cannot convert a Symbol value to a number");var r,t,a,i,s,c,l,u,p=toPrimitive(e,"number");if("string"==typeof p&&p.length>2)if(43===(r=(p=trim(p)).charCodeAt(0))||45===r){if(88===(t=p.charCodeAt(2))||120===t)return NaN}else if(48===r){switch(p.charCodeAt(1)){case 66:case 98:a=2,i=49;break;case 79:case 111:a=8,i=55;break;default:return+p}for(c=(s=p.slice(2)).length,l=0;li)return NaN;return parseInt(s,a)}return+p};if(isForced_1(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var NumberWrapper=function Number(e){var r=arguments.length<1?0:e,t=this;return t instanceof NumberWrapper&&(BROKEN_CLASSOF?fails((function(){NumberPrototype.valueOf.call(t)})):classofRaw(t)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(r)),t,NumberWrapper):toNumber(r)},keys$1=descriptors?getOwnPropertyNames$1(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),j$1=0,key$1;keys$1.length>j$1;j$1++)has$1(NativeNumber,key$1=keys$1[j$1])&&!has$1(NumberWrapper,key$1)&&defineProperty$4(NumberWrapper,key$1,getOwnPropertyDescriptor$1(NativeNumber,key$1));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global$1,NUMBER,NumberWrapper)}var FUNCTION_NAME_EXISTS=functionName.EXISTS,defineProperty$3=objectDefineProperty.f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME$1="name";descriptors&&!FUNCTION_NAME_EXISTS&&defineProperty$3(FunctionPrototype,NAME$1,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(e){return""}}}),_export({global:!0},{globalThis:global$1});var $assign=Object.assign,defineProperty$2=Object.defineProperty,objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},r={},t=Symbol();return e[t]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),7!=$assign({},e)[t]||"abcdefghijklmnopqrst"!=objectKeys($assign({},r)).join("")}))?function assign(e,r){for(var t=toObject(e),a=arguments.length,i=1,s=objectGetOwnPropertySymbols.f,c=objectPropertyIsEnumerable.f;a>i;)for(var l,u=indexedObject(arguments[i++]),p=s?objectKeys(u).concat(s(u)):objectKeys(u),d=p.length,h=0;d>h;)l=p[h++],descriptors&&!c.call(u,l)||(t[l]=u[l]);return t}:$assign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign});var path=global$1;path.Object.assign;var regexpFlags=function(){var e=anObject(this),r="";return e.global&&(r+="g"),e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.dotAll&&(r+="s"),e.unicode&&(r+="u"),e.sticky&&(r+="y"),r},$RegExp$2=global$1.RegExp,UNSUPPORTED_Y$2=fails((function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET=fails((function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={UNSUPPORTED_Y:UNSUPPORTED_Y$2,BROKEN_CARET:BROKEN_CARET},$RegExp$1=global$1.RegExp,regexpUnsupportedDotAll=fails((function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),$RegExp=global$1.RegExp,regexpUnsupportedNcg=fails((function(){var e=$RegExp("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})),getInternalState$3=internalState.get,nativeExec=RegExp.prototype.exec,nativeReplace=shared("native-string-replace",String.prototype.replace),patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=(re1=/a/,re2=/b*/g,nativeExec.call(re1,"a"),nativeExec.call(re2,"a"),0!==re1.lastIndex||0!==re2.lastIndex),re1,re2,UNSUPPORTED_Y$1=regexpStickyHelpers.UNSUPPORTED_Y||regexpStickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||regexpUnsupportedDotAll||regexpUnsupportedNcg;PATCH&&(patchedExec=function exec(e){var r,t,a,i,s,c,l,u=this,p=getInternalState$3(u),d=toString(e),h=p.raw;if(h)return h.lastIndex=u.lastIndex,r=patchedExec.call(h,d),u.lastIndex=h.lastIndex,r;var y=p.groups,A=UNSUPPORTED_Y$1&&u.sticky,g=regexpFlags.call(u),E=u.source,v=0,m=d;if(A&&(-1===(g=g.replace("y","")).indexOf("g")&&(g+="g"),m=d.slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==d.charAt(u.lastIndex-1))&&(E="(?: "+E+")",m=" "+m,v++),t=new RegExp("^(?:"+E+")",g)),NPCG_INCLUDED&&(t=new RegExp("^"+E+"$(?!\\s)",g)),UPDATES_LAST_INDEX_WRONG&&(a=u.lastIndex),i=nativeExec.call(A?t:u,m),A?i?(i.input=i.input.slice(v),i[0]=i[0].slice(v),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&i&&(u.lastIndex=u.global?i.index+i[0].length:a),NPCG_INCLUDED&&i&&i.length>1&&nativeReplace.call(i[0],t,(function(){for(s=1;s=l?e?"":void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(i=s.charCodeAt(c+1))<56320||i>57343?e?s.charAt(c):a:e?s.slice(c,c+2):i-56320+(a-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex=function(e,r,t){return r+(t?charAt$1(e,r).length:1)},regexpExecAbstract=function(e,r){var t=e.exec;if(isCallable(t)){var a=t.call(e,r);return null!==a&&anObject(a),a}if("RegExp"===classofRaw(e))return regexpExec.call(e,r);throw TypeError("RegExp#exec called on incompatible receiver")},UNSUPPORTED_Y=regexpStickyHelpers.UNSUPPORTED_Y,arrayPush=[].push,min$4=Math.min,MAX_UINT32=4294967295,SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails((function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var t="ab".split(e);return 2!==t.length||"a"!==t[0]||"b"!==t[1]}));fixRegexpWellKnownSymbolLogic("split",(function(e,r,t){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var a=toString(requireObjectCoercible(this)),i=void 0===t?MAX_UINT32:t>>>0;if(0===i)return[];if(void 0===e)return[a];if(!isRegexp(e))return r.call(a,e,i);for(var s,c,l,u=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=new RegExp(e.source,p+"g");(s=regexpExec.call(h,a))&&!((c=h.lastIndex)>d&&(u.push(a.slice(d,s.index)),s.length>1&&s.index=i));)h.lastIndex===s.index&&h.lastIndex++;return d===a.length?!l&&h.test("")||u.push(""):u.push(a.slice(d)),u.length>i?u.slice(0,i):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)}:r,[function split(r,t){var i=requireObjectCoercible(this),s=null==r?void 0:getMethod(r,e);return s?s.call(r,i,t):a.call(toString(i),r,t)},function(e,i){var s=anObject(this),c=toString(e),l=t(a,s,c,i,a!==r);if(l.done)return l.value;var u=speciesConstructor(s,RegExp),p=s.unicode,d=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),h=new u(UNSUPPORTED_Y?"^(?:"+s.source+")":s,d),y=void 0===i?MAX_UINT32:i>>>0;if(0===y)return[];if(0===c.length)return null===regexpExecAbstract(h,c)?[c]:[];for(var A=0,g=0,E=[];g=r.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==t?{value:a,done:!1}:"values"==t?{value:r[a],done:!1}:{value:[a,r[a]],done:!1}}),"values");iterators.Arguments=iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var arrayBufferNative="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,defineProperty$1=objectDefineProperty.f,Int8Array$3=global$1.Int8Array,Int8ArrayPrototype=Int8Array$3&&Int8Array$3.prototype,Uint8ClampedArray=global$1.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray&&Uint8ClampedArray.prototype,TypedArray=Int8Array$3&&objectGetPrototypeOf(Int8Array$3),TypedArrayPrototype=Int8ArrayPrototype&&objectGetPrototypeOf(Int8ArrayPrototype),ObjectPrototype$1=Object.prototype,isPrototypeOf=ObjectPrototype$1.isPrototypeOf,TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),TYPED_ARRAY_TAG=uid("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR$1=uid("TYPED_ARRAY_CONSTRUCTOR"),NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferNative&&!!objectSetPrototypeOf&&"Opera"!==classof(global$1.opera),TYPED_ARRAY_TAG_REQIRED=!1,NAME,Constructor,Prototype,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView=function isView(e){if(!isObject(e))return!1;var r=classof(e);return"DataView"===r||has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},isTypedArray=function(e){if(!isObject(e))return!1;var r=classof(e);return has$1(TypedArrayConstructorsList,r)||has$1(BigIntArrayConstructorsList,r)},aTypedArray$m=function(e){if(isTypedArray(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor$2=function(e){if(isCallable(e)&&(!objectSetPrototypeOf||isPrototypeOf.call(TypedArray,e)))return e;throw TypeError(tryToString(e)+" is not a typed array constructor")},exportTypedArrayMethod$n=function(e,r,t){if(descriptors){if(t)for(var a in TypedArrayConstructorsList){var i=global$1[a];if(i&&has$1(i.prototype,e))try{delete i.prototype[e]}catch(e){}}TypedArrayPrototype[e]&&!t||redefine(TypedArrayPrototype,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&Int8ArrayPrototype[e]||r)}},exportTypedArrayStaticMethod=function(e,r,t){var a,i;if(descriptors){if(objectSetPrototypeOf){if(t)for(a in TypedArrayConstructorsList)if((i=global$1[a])&&has$1(i,e))try{delete i[e]}catch(e){}if(TypedArray[e]&&!t)return;try{return redefine(TypedArray,e,t?r:NATIVE_ARRAY_BUFFER_VIEWS$1&&TypedArray[e]||r)}catch(e){}}for(a in TypedArrayConstructorsList)!(i=global$1[a])||i[e]&&!t||redefine(i,e,r)}};for(NAME in TypedArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype?createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor):NATIVE_ARRAY_BUFFER_VIEWS$1=!1;for(NAME in BigIntArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype&&createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!isCallable(TypedArray)||TypedArray===Function.prototype)&&(TypedArray=function TypedArray(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME],TypedArray);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!TypedArrayPrototype||TypedArrayPrototype===ObjectPrototype$1)&&(TypedArrayPrototype=TypedArray.prototype,NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME].prototype,TypedArrayPrototype);if(NATIVE_ARRAY_BUFFER_VIEWS$1&&objectGetPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype&&objectSetPrototypeOf(Uint8ClampedArrayPrototype,TypedArrayPrototype),descriptors&&!has$1(TypedArrayPrototype,TO_STRING_TAG$1))for(NAME in TYPED_ARRAY_TAG_REQIRED=!0,defineProperty$1(TypedArrayPrototype,TO_STRING_TAG$1,{get:function(){return isObject(this)?this[TYPED_ARRAY_TAG]:void 0}}),TypedArrayConstructorsList)global$1[NAME]&&createNonEnumerableProperty(global$1[NAME],TYPED_ARRAY_TAG,NAME);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$1,TYPED_ARRAY_CONSTRUCTOR:TYPED_ARRAY_CONSTRUCTOR$1,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED&&TYPED_ARRAY_TAG,aTypedArray:aTypedArray$m,aTypedArrayConstructor:aTypedArrayConstructor$2,exportTypedArrayMethod:exportTypedArrayMethod$n,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod,isView:isView,isTypedArray:isTypedArray,TypedArray:TypedArray,TypedArrayPrototype:TypedArrayPrototype},NATIVE_ARRAY_BUFFER_VIEWS=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$1=global$1.ArrayBuffer,Int8Array$2=global$1.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS||!fails((function(){Int8Array$2(1)}))||!fails((function(){new Int8Array$2(-1)}))||!checkCorrectnessOfIteration((function(e){new Int8Array$2,new Int8Array$2(null),new Int8Array$2(1.5),new Int8Array$2(e)}),!0)||fails((function(){return 1!==new Int8Array$2(new ArrayBuffer$1(2),1,void 0).length})),toIndex=function(e){if(void 0===e)return 0;var r=toInteger(e),t=toLength(r);if(r!==t)throw RangeError("Wrong length or index");return t},abs=Math.abs,pow$1=Math.pow,floor$6=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(e,r,t){var a,i,s,c=new Array(t),l=8*t-r-1,u=(1<>1,d=23===r?pow$1(2,-24)-pow$1(2,-77):0,h=e<0||0===e&&1/e<0?1:0,y=0;for((e=abs(e))!=e||e===1/0?(i=e!=e?1:0,a=u):(a=floor$6(log(e)/LN2),e*(s=pow$1(2,-a))<1&&(a--,s*=2),(e+=a+p>=1?d/s:d*pow$1(2,1-p))*s>=2&&(a++,s/=2),a+p>=u?(i=0,a=u):a+p>=1?(i=(e*s-1)*pow$1(2,r),a+=p):(i=e*pow$1(2,p-1)*pow$1(2,r),a=0));r>=8;c[y++]=255&i,i/=256,r-=8);for(a=a<0;c[y++]=255&a,a/=256,l-=8);return c[--y]|=128*h,c},unpack=function(e,r){var t,a=e.length,i=8*a-r-1,s=(1<>1,l=i-7,u=a-1,p=e[u--],d=127&p;for(p>>=7;l>0;d=256*d+e[u],u--,l-=8);for(t=d&(1<<-l)-1,d>>=-l,l+=r;l>0;t=256*t+e[u],u--,l-=8);if(0===d)d=1-c;else{if(d===s)return t?NaN:p?-1/0:1/0;t+=pow$1(2,r),d-=c}return(p?-1:1)*t*pow$1(2,d-r)},ieee754={pack:pack,unpack:unpack},arrayFill=function fill(e){for(var r=toObject(this),t=toLength(r.length),a=arguments.length,i=toAbsoluteIndex(a>1?arguments[1]:void 0,t),s=a>2?arguments[2]:void 0,c=void 0===s?t:toAbsoluteIndex(s,t);c>i;)r[i++]=e;return r},getOwnPropertyNames=objectGetOwnPropertyNames.f,defineProperty=objectDefineProperty.f,PROPER_FUNCTION_NAME$2=functionName.PROPER,CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,getInternalState$1=internalState.get,setInternalState$3=internalState.set,ARRAY_BUFFER="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer=global$1[ARRAY_BUFFER],$ArrayBuffer=NativeArrayBuffer,$DataView=global$1[DATA_VIEW],$DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,RangeError$1=global$1.RangeError,packIEEE754=ieee754.pack,unpackIEEE754=ieee754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter=function(e,r){defineProperty(e[PROTOTYPE],r,{get:function(){return getInternalState$1(this)[r]}})},get=function(e,r,t,a){var i=toIndex(t),s=getInternalState$1(e);if(i+r>s.byteLength)throw RangeError$1(WRONG_INDEX);var c=getInternalState$1(s.buffer).bytes,l=i+s.byteOffset,u=c.slice(l,l+r);return a?u:u.reverse()},set=function(e,r,t,a,i,s){var c=toIndex(t),l=getInternalState$1(e);if(c+r>l.byteLength)throw RangeError$1(WRONG_INDEX);for(var u=getInternalState$1(l.buffer).bytes,p=c+l.byteOffset,d=a(+i),h=0;hj;)(key=keys[j++])in $ArrayBuffer||createNonEnumerableProperty($ArrayBuffer,key,NativeArrayBuffer[key]);ArrayBufferPrototype.constructor=$ArrayBuffer}objectSetPrototypeOf&&objectGetPrototypeOf($DataViewPrototype)!==ObjectPrototype&&objectSetPrototypeOf($DataViewPrototype,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=$DataViewPrototype.setInt8;testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||redefineAll($DataViewPrototype,{setInt8:function setInt8(e,r){$setInt8.call(this,e,r<<24>>24)},setUint8:function setUint8(e,r){$setInt8.call(this,e,r<<24>>24)}},{unsafe:!0})}else $ArrayBuffer=function ArrayBuffer(e){anInstance(this,$ArrayBuffer,ARRAY_BUFFER);var r=toIndex(e);setInternalState$3(this,{bytes:arrayFill.call(new Array(r),0),byteLength:r}),descriptors||(this.byteLength=r)},$DataView=function DataView(e,r,t){anInstance(this,$DataView,DATA_VIEW),anInstance(e,$ArrayBuffer,DATA_VIEW);var a=getInternalState$1(e).byteLength,i=toInteger(r);if(i<0||i>a)throw RangeError$1("Wrong offset");if(i+(t=void 0===t?a-i:toLength(t))>a)throw RangeError$1(WRONG_LENGTH);setInternalState$3(this,{buffer:e,byteLength:t,byteOffset:i}),descriptors||(this.buffer=e,this.byteLength=t,this.byteOffset=i)},descriptors&&(addGetter($ArrayBuffer,"byteLength"),addGetter($DataView,"buffer"),addGetter($DataView,"byteLength"),addGetter($DataView,"byteOffset")),redefineAll($DataView[PROTOTYPE],{getInt8:function getInt8(e){return get(this,1,e)[0]<<24>>24},getUint8:function getUint8(e){return get(this,1,e)[0]},getInt16:function getInt16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(e){var r=get(this,2,e,arguments.length>1?arguments[1]:void 0);return r[1]<<8|r[0]},getInt32:function getInt32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function getUint32(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function getFloat32(e){return unpackIEEE754(get(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function getFloat64(e){return unpackIEEE754(get(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function setInt8(e,r){set(this,1,e,packInt8,r)},setUint8:function setUint8(e,r){set(this,1,e,packInt8,r)},setInt16:function setInt16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setUint16:function setUint16(e,r){set(this,2,e,packInt16,r,arguments.length>2?arguments[2]:void 0)},setInt32:function setInt32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setUint32:function setUint32(e,r){set(this,4,e,packInt32,r,arguments.length>2?arguments[2]:void 0)},setFloat32:function setFloat32(e,r){set(this,4,e,packFloat32,r,arguments.length>2?arguments[2]:void 0)},setFloat64:function setFloat64(e,r){set(this,8,e,packFloat64,r,arguments.length>2?arguments[2]:void 0)}});setToStringTag($ArrayBuffer,ARRAY_BUFFER),setToStringTag($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},floor$5=Math.floor,isInteger=function isInteger(e){return!isObject(e)&&isFinite(e)&&floor$5(e)===e},toPositiveInteger=function(e){var r=toInteger(e);if(r<0)throw RangeError("The argument can't be less than 0");return r},toOffset=function(e,r){var t=toPositiveInteger(e);if(t%r)throw RangeError("Wrong offset");return t},aTypedArrayConstructor$1=arrayBufferViewCore.aTypedArrayConstructor,typedArrayFrom=function from(e){var r,t,a,i,s,c,l=aConstructor(this),u=toObject(e),p=arguments.length,d=p>1?arguments[1]:void 0,h=void 0!==d,y=getIteratorMethod(u);if(y&&!isArrayIteratorMethod(y))for(c=(s=getIterator(u,y)).next,u=[];!(i=c.call(s)).done;)u.push(i.value);for(h&&p>2&&(d=functionBindContext(d,arguments[2],2)),t=toLength(u.length),a=new(aTypedArrayConstructor$1(l))(t),r=0;t>r;r++)a[r]=h?d(u[r],r):u[r];return a},isArray=Array.isArray||function isArray(e){return"Array"==classofRaw(e)},SPECIES$2=wellKnownSymbol("species"),arraySpeciesConstructor=function(e){var r;return isArray(e)&&(r=e.constructor,(isConstructor(r)&&(r===Array||isArray(r.prototype))||isObject(r)&&null===(r=r[SPECIES$2]))&&(r=void 0)),void 0===r?Array:r},arraySpeciesCreate=function(e,r){return new(arraySpeciesConstructor(e))(0===r?0:r)},push=[].push,createMethod$2=function(e){var r=1==e,t=2==e,a=3==e,i=4==e,s=6==e,c=7==e,l=5==e||s;return function(u,p,d,h){for(var y,A,g=toObject(u),E=indexedObject(g),v=functionBindContext(p,d,3),m=toLength(E.length),I=0,R=h||arraySpeciesCreate,P=r?R(u,m):t||c?R(u,0):void 0;m>I;I++)if((l||I in E)&&(A=v(y=E[I],I,g),e))if(r)P[I]=A;else if(A)switch(e){case 3:return!0;case 5:return y;case 6:return I;case 2:push.call(P,y)}else switch(e){case 4:return!1;case 7:push.call(P,y)}return s?-1:a||i?i:P}},arrayIteration={forEach:createMethod$2(0),map:createMethod$2(1),filter:createMethod$2(2),some:createMethod$2(3),every:createMethod$2(4),find:createMethod$2(5),findIndex:createMethod$2(6),filterReject:createMethod$2(7)},typedArrayConstructor=createCommonjsModule((function(e){var r=objectGetOwnPropertyNames.f,t=arrayIteration.forEach,a=internalState.get,i=internalState.set,s=objectDefineProperty.f,c=objectGetOwnPropertyDescriptor.f,l=Math.round,u=global$1.RangeError,p=arrayBuffer.ArrayBuffer,d=arrayBuffer.DataView,h=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,y=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,A=arrayBufferViewCore.TYPED_ARRAY_TAG,g=arrayBufferViewCore.TypedArray,E=arrayBufferViewCore.TypedArrayPrototype,v=arrayBufferViewCore.aTypedArrayConstructor,m=arrayBufferViewCore.isTypedArray,fromList=function(e,r){for(var t=0,a=r.length,i=new(v(e))(a);a>t;)i[t]=r[t++];return i},addGetter=function(e,r){s(e,r,{get:function(){return a(this)[r]}})},isArrayBuffer=function(e){var r;return e instanceof p||"ArrayBuffer"==(r=classof(e))||"SharedArrayBuffer"==r},isTypedArrayIndex=function(e,r){return m(e)&&!isSymbol(r)&&r in e&&isInteger(+r)&&r>=0},I=function getOwnPropertyDescriptor(e,r){return r=toPropertyKey(r),isTypedArrayIndex(e,r)?createPropertyDescriptor(2,e[r]):c(e,r)},R=function defineProperty(e,r,t){return r=toPropertyKey(r),!(isTypedArrayIndex(e,r)&&isObject(t)&&has$1(t,"value"))||has$1(t,"get")||has$1(t,"set")||t.configurable||has$1(t,"writable")&&!t.writable||has$1(t,"enumerable")&&!t.enumerable?s(e,r,t):(e[r]=t.value,e)};descriptors?(h||(objectGetOwnPropertyDescriptor.f=I,objectDefineProperty.f=R,addGetter(E,"buffer"),addGetter(E,"byteOffset"),addGetter(E,"byteLength"),addGetter(E,"length")),_export({target:"Object",stat:!0,forced:!h},{getOwnPropertyDescriptor:I,defineProperty:R}),e.exports=function(e,c,v){var I=e.match(/\d+$/)[0]/8,R=e+(v?"Clamped":"")+"Array",P="get"+e,S="set"+e,b=global$1[R],T=b,_=T&&T.prototype,O={},addElement=function(e,r){s(e,r,{get:function(){return function(e,r){var t=a(e);return t.view[P](r*I+t.byteOffset,!0)}(this,r)},set:function(e){return function(e,r,t){var i=a(e);v&&(t=(t=l(t))<0?0:t>255?255:255&t),i.view[S](r*I+i.byteOffset,t,!0)}(this,r,e)},enumerable:!0})};h?typedArrayConstructorsRequireWrappers&&(T=c((function(e,r,t,a){return anInstance(e,T,R),inheritIfRequired(isObject(r)?isArrayBuffer(r)?void 0!==a?new b(r,toOffset(t,I),a):void 0!==t?new b(r,toOffset(t,I)):new b(r):m(r)?fromList(T,r):typedArrayFrom.call(T,r):new b(toIndex(r)),e,T)})),objectSetPrototypeOf&&objectSetPrototypeOf(T,g),t(r(b),(function(e){e in T||createNonEnumerableProperty(T,e,b[e])})),T.prototype=_):(T=c((function(e,r,t,a){anInstance(e,T,R);var s,c,l,h=0,y=0;if(isObject(r)){if(!isArrayBuffer(r))return m(r)?fromList(T,r):typedArrayFrom.call(T,r);s=r,y=toOffset(t,I);var A=r.byteLength;if(void 0===a){if(A%I)throw u("Wrong length");if((c=A-y)<0)throw u("Wrong length")}else if((c=toLength(a)*I)+y>A)throw u("Wrong length");l=c/I}else l=toIndex(r),s=new p(c=l*I);for(i(e,{buffer:s,byteOffset:y,byteLength:c,length:l,view:new d(s)});h2?arguments[2]:void 0,l=min$3((void 0===c?a:toAbsoluteIndex(c,a))-s,a-i),u=1;for(s0;)s in t?t[i]=t[s]:delete t[i],i+=u,s+=u;return t},aTypedArray$l=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$m=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$m("copyWithin",(function copyWithin(e,r){return arrayCopyWithin.call(aTypedArray$l(this),e,r,arguments.length>2?arguments[2]:void 0)}));var $every=arrayIteration.every,aTypedArray$k=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$l=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$l("every",(function every(e){return $every(aTypedArray$k(this),e,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$j=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$k=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$k("fill",(function fill(e){return arrayFill.apply(aTypedArray$j(this),arguments)}));var arrayFromConstructorAndList=function(e,r){for(var t=0,a=r.length,i=new e(a);a>t;)i[t]=r[t++];return i},TYPED_ARRAY_CONSTRUCTOR=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,aTypedArrayConstructor=arrayBufferViewCore.aTypedArrayConstructor,typedArraySpeciesConstructor=function(e){return aTypedArrayConstructor(speciesConstructor(e,e[TYPED_ARRAY_CONSTRUCTOR]))},typedArrayFromSpeciesAndList=function(e,r){return arrayFromConstructorAndList(typedArraySpeciesConstructor(e),r)},$filter$1=arrayIteration.filter,aTypedArray$i=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$j=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$j("filter",(function filter(e){var r=$filter$1(aTypedArray$i(this),e,arguments.length>1?arguments[1]:void 0);return typedArrayFromSpeciesAndList(this,r)}));var $find=arrayIteration.find,aTypedArray$h=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$i=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$i("find",(function find(e){return $find(aTypedArray$h(this),e,arguments.length>1?arguments[1]:void 0)}));var $findIndex=arrayIteration.findIndex,aTypedArray$g=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$h=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$h("findIndex",(function findIndex(e){return $findIndex(aTypedArray$g(this),e,arguments.length>1?arguments[1]:void 0)}));var $forEach$1=arrayIteration.forEach,aTypedArray$f=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$g=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$g("forEach",(function forEach(e){$forEach$1(aTypedArray$f(this),e,arguments.length>1?arguments[1]:void 0)}));var $includes$1=arrayIncludes.includes,aTypedArray$e=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$f=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$f("includes",(function includes(e){return $includes$1(aTypedArray$e(this),e,arguments.length>1?arguments[1]:void 0)}));var $indexOf=arrayIncludes.indexOf,aTypedArray$d=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$e=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$e("indexOf",(function indexOf(e){return $indexOf(aTypedArray$d(this),e,arguments.length>1?arguments[1]:void 0)}));var PROPER_FUNCTION_NAME$1=functionName.PROPER,ITERATOR$3=wellKnownSymbol("iterator"),Uint8Array$2=global$1.Uint8Array,arrayValues=es_array_iterator.values,arrayKeys=es_array_iterator.keys,arrayEntries=es_array_iterator.entries,aTypedArray$c=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$d=arrayBufferViewCore.exportTypedArrayMethod,nativeTypedArrayIterator=Uint8Array$2&&Uint8Array$2.prototype[ITERATOR$3],PROPER_ARRAY_VALUES_NAME=!!nativeTypedArrayIterator&&"values"===nativeTypedArrayIterator.name,typedArrayValues=function values(){return arrayValues.call(aTypedArray$c(this))};exportTypedArrayMethod$d("entries",(function entries(){return arrayEntries.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("keys",(function keys(){return arrayKeys.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("values",typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME),exportTypedArrayMethod$d(ITERATOR$3,typedArrayValues,PROPER_FUNCTION_NAME$1&&!PROPER_ARRAY_VALUES_NAME);var aTypedArray$b=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$c=arrayBufferViewCore.exportTypedArrayMethod,$join=[].join;exportTypedArrayMethod$c("join",(function join(e){return $join.apply(aTypedArray$b(this),arguments)}));var arrayMethodIsStrict=function(e,r){var t=[][e];return!!t&&fails((function(){t.call(null,r||function(){throw 1},1)}))},min$2=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$2=arrayMethodIsStrict("lastIndexOf"),FORCED$5=NEGATIVE_ZERO||!STRICT_METHOD$2,arrayLastIndexOf=FORCED$5?function lastIndexOf(e){if(NEGATIVE_ZERO)return $lastIndexOf.apply(this,arguments)||0;var r=toIndexedObject(this),t=toLength(r.length),a=t-1;for(arguments.length>1&&(a=min$2(a,toInteger(arguments[1]))),a<0&&(a=t+a);a>=0;a--)if(a in r&&r[a]===e)return a||0;return-1}:$lastIndexOf,aTypedArray$a=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$b=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$b("lastIndexOf",(function lastIndexOf(e){return arrayLastIndexOf.apply(aTypedArray$a(this),arguments)}));var $map=arrayIteration.map,aTypedArray$9=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$a=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$a("map",(function map(e){return $map(aTypedArray$9(this),e,arguments.length>1?arguments[1]:void 0,(function(e,r){return new(typedArraySpeciesConstructor(e))(r)}))}));var createMethod$1=function(e){return function(r,t,a,i){aCallable(t);var s=toObject(r),c=indexedObject(s),l=toLength(s.length),u=e?l-1:0,p=e?-1:1;if(a<2)for(;;){if(u in c){i=c[u],u+=p;break}if(u+=p,e?u<0:l<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:l>u;u+=p)u in c&&(i=t(i,c[u],u,s));return i}},arrayReduce={left:createMethod$1(!1),right:createMethod$1(!0)},$reduce=arrayReduce.left,aTypedArray$8=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$9=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$9("reduce",(function reduce(e){return $reduce(aTypedArray$8(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var $reduceRight=arrayReduce.right,aTypedArray$7=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$8=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$8("reduceRight",(function reduceRight(e){return $reduceRight(aTypedArray$7(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$6=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$7=arrayBufferViewCore.exportTypedArrayMethod,floor$4=Math.floor;exportTypedArrayMethod$7("reverse",(function reverse(){for(var e,r=aTypedArray$6(this).length,t=floor$4(r/2),a=0;a1?arguments[1]:void 0,1),t=this.length,a=toObject(e),i=toLength(a.length),s=0;if(i+r>t)throw RangeError("Wrong length");for(;si;)c[i]=t[i++];return c}),FORCED$3);var $some=arrayIteration.some,aTypedArray$3=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$4=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$4("some",(function some(e){return $some(aTypedArray$3(this),e,arguments.length>1?arguments[1]:void 0)}));var floor$3=Math.floor,mergeSort=function(e,r){var t=e.length,a=floor$3(t/2);return t<8?insertionSort(e,r):merge(mergeSort(e.slice(0,a),r),mergeSort(e.slice(a),r),r)},insertionSort=function(e,r){for(var t,a,i=e.length,s=1;s0;)e[a]=e[--a];a!==s++&&(e[a]=t)}return e},merge=function(e,r,t){for(var a=e.length,i=r.length,s=0,c=0,l=[];s0&&1/t<0?1:-1:r>t}};exportTypedArrayMethod$3("sort",(function sort(e){if(void 0!==e&&aCallable(e),STABLE_SORT$1)return nativeSort$1.call(this,e);aTypedArray$2(this);var r,t=toLength(this.length),a=Array(t);for(r=0;r1?arguments[1]:void 0)}}),addToUnscopables("includes");var notARegexp=function(e){if(isRegexp(e))throw TypeError("The method doesn't accept regular expressions");return e},MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var r=/./;try{"/./"[e](r)}catch(t){try{return r[MATCH]=!1,"/./"[e](r)}catch(e){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function includes(e){return!!~toString(requireObjectCoercible(this)).indexOf(toString(notARegexp(e)),arguments.length>1?arguments[1]:void 0)}});var createProperty=function(e,r,t){var a=toPropertyKey(r);a in e?objectDefineProperty.f(e,a,createPropertyDescriptor(0,t)):e[a]=t},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return engineV8Version>=51||!fails((function(){var r=[];return(r.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==r[e](Boolean).foo}))},HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("slice"),SPECIES=wellKnownSymbol("species"),nativeSlice=[].slice,max$1=Math.max;_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function slice(e,r){var t,a,i,s=toIndexedObject(this),c=toLength(s.length),l=toAbsoluteIndex(e,c),u=toAbsoluteIndex(void 0===r?c:r,c);if(isArray(s)&&(t=s.constructor,(isConstructor(t)&&(t===Array||isArray(t.prototype))||isObject(t)&&null===(t=t[SPECIES]))&&(t=void 0),t===Array||void 0===t))return nativeSlice.call(s,l,u);for(a=new(void 0===t?Array:t)(max$1(u-l,0)),i=0;l1?arguments[1]:void 0)}});var PROPER_FUNCTION_NAME=functionName.PROPER,TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails((function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=PROPER_FUNCTION_NAME&&nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,(function toString$1(){var e=anObject(this),r=toString(e.source),t=e.flags;return"/"+r+"/"+toString(void 0===t&&e instanceof RegExp&&!("flags"in RegExpPrototype)?regexpFlags.call(e):t)}),{unsafe:!0});var test=[],nativeSort=test.sort,FAILS_ON_UNDEFINED=fails((function(){test.sort(void 0)})),FAILS_ON_NULL=fails((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict("sort"),STABLE_SORT=!fails((function(){if(engineV8Version)return engineV8Version<70;if(!(engineFfVersion&&engineFfVersion>3)){if(engineIsIeOrEdge)return!0;if(engineWebkitVersion)return engineWebkitVersion<603;var e,r,t,a,i="";for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(a=0;a<47;a++)test.push({k:r+a,v:t})}for(test.sort((function(e,r){return r.v-e.v})),a=0;atoString(t)?1:-1}};_export({target:"Array",proto:!0,forced:FORCED$1},{sort:function sort(e){void 0!==e&&aCallable(e);var r=toObject(this);if(STABLE_SORT)return void 0===e?nativeSort.call(r):nativeSort.call(r,e);var t,a,i=[],s=toLength(r.length);for(a=0;a>>24&255,a[t+1]=i>>>16&255,a[t+2]=i>>>8&255,a[t+3]=i>>>0&255,new Uint8Array(a.buffer,0,t+4)},UZIP.deflateRaw=function(e,r){null==r&&(r={level:6});var t=new Uint8Array(50+Math.floor(1.1*e.length)),a=UZIP.F.deflateRaw(e,t,a,r.level);return new Uint8Array(t.buffer,0,a)},UZIP.encode=function(e,r){null==r&&(r=!1);var t=0,a=UZIP.bin.writeUint,i=UZIP.bin.writeUshort,s={};for(var c in e){var l=!UZIP._noNeed(c)&&!r,u=e[c],p=UZIP.crc.crc(u,0,u.length);s[c]={cpr:l,usize:u.length,crc:p,file:l?UZIP.deflateRaw(u):u}}for(var c in s)t+=s[c].file.length+30+46+2*UZIP.bin.sizeUTF8(c);t+=22;var d=new Uint8Array(t),h=0,y=[];for(var c in s){var A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,0)}var g=0,E=h;for(var c in s){A=s[c];y.push(h),h=UZIP._writeHeader(d,h,c,A,1,y[g++])}var v=h-E;return a(d,h,101010256),h+=4,i(d,h+=4,g),i(d,h+=2,g),a(d,h+=2,v),a(d,h+=4,E),h+=4,h+=2,d.buffer},UZIP._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(r)},UZIP._writeHeader=function(e,r,t,a,i,s){var c=UZIP.bin.writeUint,l=UZIP.bin.writeUshort,u=a.file;return c(e,r,0==i?67324752:33639248),r+=4,1==i&&(r+=2),l(e,r,20),l(e,r+=2,0),l(e,r+=2,a.cpr?8:0),c(e,r+=2,0),c(e,r+=4,a.crc),c(e,r+=4,u.length),c(e,r+=4,a.usize),l(e,r+=4,UZIP.bin.sizeUTF8(t)),l(e,r+=2,0),r+=2,1==i&&(r+=2,r+=2,c(e,r+=6,s),r+=4),r+=UZIP.bin.writeUTF8(e,r,t),0==i&&(e.set(u,r),r+=u.length),r},UZIP.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var t=r,a=0;a<8;a++)1&t?t=3988292384^t>>>1:t>>>=1;e[r]=t}return e}(),update:function(e,r,t,a){for(var i=0;i>>8;return e},crc:function(e,r,t){return 4294967295^UZIP.crc.update(4294967295,e,r,t)}},UZIP.adler=function(e,r,t){for(var a=1,i=0,s=r,c=r+t;s>8&255},readUint:function(e,r){return 16777216*e[r+3]+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,t){e[r]=255&t,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},readASCII:function(e,r,t){for(var a="",i=0;i>6,e[r+i+1]=128|c>>0&63,i+=2;else if(0==(4294901760&c))e[r+i]=224|c>>12,e[r+i+1]=128|c>>6&63,e[r+i+2]=128|c>>0&63,i+=3;else{if(0!=(4292870144&c))throw"e";e[r+i]=240|c>>18,e[r+i+1]=128|c>>12&63,e[r+i+2]=128|c>>6&63,e[r+i+3]=128|c>>0&63,i+=4}}return i},sizeUTF8:function(e){for(var r=e.length,t=0,a=0;a>>3}var y=s.lits,A=s.strt,g=s.prev,E=0,v=0,m=0,I=0,R=0,P=0;for(h>2&&(A[P=UZIP.F._hash(e,0)]=0),u=0;u14e3||v>26697)&&h-u>100&&(d>>16,_=65535&b;if(0!=b){_=65535&b;var O=c(T=b>>>16,s.of0);s.lhst[257+O]++;var w=c(_,s.df0);s.dhst[w]++,I+=s.exb[O]+s.dxb[w],y[E]=T<<23|u-d,y[E+1]=_<<16|O<<8|w,E+=2,d=u+T}else s.lhst[e[u]]++;v++}}for(m==u&&0!=e.length||(d>>3},UZIP.F._bestMatch=function(e,r,t,a,i,s){var c=32767&r,l=t[c],u=c-l+32768&32767;if(l==c||a!=UZIP.F._hash(e,r-u))return 0;for(var p=0,d=0,h=Math.min(32767,r);u<=h&&0!=--s&&l!=c;){if(0==p||e[r+p]==e[r+p-u]){var y=UZIP.F._howLong(e,r,u);if(y>p){if(d=u,(p=y)>=i)break;u+2A&&(A=v,l=E)}}}u+=(c=l)-(l=t[c])+32768&32767}return p<<16|d},UZIP.F._howLong=function(e,r,t){if(e[r]!=e[r-t]||e[r+1]!=e[r+1-t]||e[r+2]!=e[r+2-t])return 0;var a=r,i=Math.min(e.length,r+258);for(r+=3;r>>23,B=$+(8388607&M);$>16,V=D>>8&255,k=255&D;P(l,u=UZIP.F._writeLit(257+V,w,l,u),x-I.of0[V]),u+=I.exb[V],R(l,u=UZIP.F._writeLit(k,U,l,u),G-I.df0[k]),u+=I.dxb[k],$+=x}}u=UZIP.F._writeLit(256,w,l,u)}return u},UZIP.F._copyExact=function(e,r,t,a,i){var s=i>>>3;return a[s]=t,a[s+1]=t>>>8,a[s+2]=255-a[s],a[s+3]=255-a[s+1],s+=4,a.set(new Uint8Array(e.buffer,r,t),s),i+(t+4<<3)},UZIP.F.getTrees=function(){for(var e=UZIP.F.U,r=UZIP.F._hufTree(e.lhst,e.ltree,15),t=UZIP.F._hufTree(e.dhst,e.dtree,15),a=[],i=UZIP.F._lenCodes(e.ltree,a),s=[],c=UZIP.F._lenCodes(e.dtree,s),l=0;l4&&0==e.itree[1+(e.ordr[p-1]<<1)];)p--;return[r,t,u,i,c,p,a,s]},UZIP.F.getSecond=function(e){for(var r=[],t=0;t>1)+",");return r},UZIP.F.contSize=function(e,r){for(var t=0,a=0;a15&&(UZIP.F._putsE(t,a,c,l),a+=l)}return a},UZIP.F._lenCodes=function(e,r){for(var t=e.length;2!=t&&0==e[t-1];)t-=2;for(var a=0;a>>1,138))<11?r.push(17,p-3):r.push(18,p-11),a+=2*p-2}else if(i==l&&s==i&&c==i){for(u=a+5;u+2>>1,6);r.push(16,p-3),a+=2*p-2}else r.push(i,0)}return t>>>1},UZIP.F._hufTree=function(e,r,t){var a=[],i=e.length,s=r.length,c=0;for(c=0;ct&&(UZIP.F.restrictDepth(u,t,E),E=t),c=0;cr;a++){var c=e[a].d;e[a].d=r,s+=i-(1<>>=t-r;s>0;){(c=e[a].d)=0;a--)e[a].d==r&&s<0&&(e[a].d--,s++);0!=s&&console.log("debt left")},UZIP.F._goodIndex=function(e,r){var t=0;return r[16|t]<=e&&(t|=16),r[8|t]<=e&&(t|=8),r[4|t]<=e&&(t|=4),r[2|t]<=e&&(t|=2),r[1|t]<=e&&(t|=1),t},UZIP.F._writeLit=function(e,r,t,a){return UZIP.F._putsF(t,a,r[e<<1]),a+r[1+(e<<1)]},UZIP.F.inflate=function(e,r){var t=Uint8Array;if(3==e[0]&&0==e[1])return r||new t(0);var a=UZIP.F,i=a._bitsF,s=a._bitsE,c=a._decodeTiny,l=a.makeCodes,u=a.codes2map,p=a._get17,d=a.U,h=null==r;h&&(r=new t(e.length>>>2<<3));for(var y,A,g=0,E=0,v=0,m=0,I=0,R=0,P=0,S=0,b=0;0==g;)if(g=i(e,b,1),E=i(e,b+1,2),b+=3,0!=E){if(h&&(r=UZIP.F._check(r,S+(1<<17))),1==E&&(y=d.flmap,A=d.fdmap,R=511,P=31),2==E){v=s(e,b,5)+257,m=s(e,b+5,5)+1,I=s(e,b+10,4)+4,b+=14;for(var T=0;T<38;T+=2)d.itree[T]=0,d.itree[T+1]=0;var _=1;for(T=0;T_&&(_=O)}b+=3*I,l(d.itree,_),u(d.itree,_,d.imap),y=d.lmap,A=d.dmap,b=c(d.imap,(1<<_)-1,v+m,e,b,d.ttree);var w=a._copyOut(d.ttree,0,v,d.ltree);R=(1<>>4;if($>>>8==0)r[S++]=$;else{if(256==$)break;var L=S+$-254;if($>264){var M=d.ldef[$-257];L=S+(M>>>3)+s(e,b,7&M),b+=7&M}var x=A[p(e,b)&P];b+=15&x;var B=x>>>4,D=d.ddef[B],G=(D>>>4)+i(e,b,15&D);for(b+=15&D,h&&(r=UZIP.F._check(r,S+(1<<17)));S>>3),k=e[V-4]|e[V-3]<<8;h&&(r=UZIP.F._check(r,S+k)),r.set(new t(e.buffer,e.byteOffset+V,k),S),b=V+k<<3,S+=k}return r.length==S?r:r.slice(0,S)},UZIP.F._check=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(Math.max(t<<1,r));return a.set(e,0),a},UZIP.F._decodeTiny=function(e,r,t,a,i,s){for(var c=UZIP.F._bitsE,l=UZIP.F._get17,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++}},UZIP.F.revCodes=function(e,r){for(var t=UZIP.F.U.rev15,a=15-r,i=0;i>>a}},UZIP.F._putsE=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},UZIP.F._putsF=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},UZIP.F._bitsE=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},UZIP.F._get25=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},UZIP.F.U=(r=Uint16Array,t=Uint32Array,{next_code:new r(16),bl_count:new r(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new t(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new t(286),dhst:new t(30),ihst:new t(19),lits:new t(15e3),strt:new r(65536),prev:new r(32768)}),function(){for(var e=UZIP.F.U,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.rev15[r]=(t>>>16|t<<16)>>>17}function pushV(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.ldef[r]=e.of0[r]<<3|e.exb[r],e.ddef[r]=e.df0[r]<<4|e.dxb[r];pushV(e.fltree,144,8),pushV(e.fltree,112,9),pushV(e.fltree,24,7),pushV(e.fltree,8,8),UZIP.F.makeCodes(e.fltree,9),UZIP.F.codes2map(e.fltree,9,e.flmap),UZIP.F.revCodes(e.fltree,9),pushV(e.fdtree,32,5),UZIP.F.makeCodes(e.fdtree,5),UZIP.F.codes2map(e.fdtree,5,e.fdmap),UZIP.F.revCodes(e.fdtree,5),pushV(e.itree,19,0),pushV(e.ltree,286,0),pushV(e.dtree,30,0),pushV(e.ttree,320,0)}()})),UZIP=Object.freeze(_mergeNamespaces({__proto__:null,default:UZIP_1},[UZIP_1])),UPNG={},N,W,H;UPNG.toRGBA8=function(e){var r=e.width,t=e.height;if(null==e.tabs.acTL)return[UPNG.toRGBA8.decodeImage(e.data,r,t,e).buffer];var a=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var i=r*t*4,s=new Uint8Array(i),c=new Uint8Array(i),l=new Uint8Array(i),u=0;u>3)]>>7-((7&A)<<0)&1);l[R]=P[w],l[R+1]=P[w+1],l[R+2]=P[w+2],l[R+3]=U>2)]>>6-((3&A)<<1)&3);l[R]=P[w],l[R+1]=P[w+1],l[R+2]=P[w+2],l[R+3]=U>1)]>>4-((1&A)<<2)&15);l[R]=P[w],l[R+1]=P[w+1],l[R+2]=P[w+2],l[R+3]=U>>3)]>>>7-(7&x)&1))==255*v?0:255;u[M+x]=B<<24|C<<16|C<<8|C}else if(2==d)for(x=0;x>>2)]>>>6-((3&x)<<1)&3))==85*v?0:255;u[M+x]=B<<24|C<<16|C<<8|C}else if(4==d)for(x=0;x>>1)]>>>4-((1&x)<<2)&15))==17*v?0:255;u[M+x]=B<<24|C<<16|C<<8|C}else if(8==d)for(x=0;x>>2<<5));0==s;)if(s=E(e,A,1),c=E(e,A+1,2),A+=3,0!=c){if(b&&(r=H.H.W(r,y+(1<<17))),1==c&&(t=S.J,a=S.h,d=511,h=31),2==c){l=v(e,A,5)+257,u=v(e,A+5,5)+1,p=v(e,A+10,4)+4,A+=14;for(var T=1,_=0;_<38;_+=2)S.Q[_]=0,S.Q[_+1]=0;for(_=0;_T&&(T=O)}A+=3*p,I(S.Q,T),R(S.Q,T,S.u),t=S.w,a=S.d,A=m(S.u,(1<>>4;if($>>>8==0)r[y++]=$;else{if(256==$)break;var L=y+$-254;if($>264){var M=S.q[$-257];L=y+(M>>>3)+v(e,A,7&M),A+=7&M}var x=a[P(e,A)&h];A+=15&x;var B=x>>>4,D=S.c[B],G=(D>>>4)+E(e,A,15&D);for(A+=15&D;y>>3),k=e[V-4]|e[V-3]<<8;b&&(r=H.H.W(r,y+k)),r.set(new i(e.buffer,e.byteOffset+V,k),y),A=V+k<<3,y+=k}return r.length==y?r:r.slice(0,y)},H.H.W=function(e,r){var t=e.length;if(r<=t)return e;var a=new Uint8Array(t<<1);return a.set(e,0),a},H.H.R=function(e,r,t,a,i,s){for(var c=H.H.e,l=H.H.Z,u=0;u>>4;if(d<=15)s[u]=d,u++;else{var h=0,y=0;16==d?(y=3+c(a,i,2),i+=2,h=s[u-1]):17==d?(y=3+c(a,i,3),i+=3):18==d&&(y=11+c(a,i,7),i+=7);for(var A=u+y;u>>1;si&&(i=l),s++}for(;s>1,l=e[s+1],u=c<<4|l,p=r-l,d=e[s]<>>15-r]=u,d++},H.H.l=function(e,r){for(var t=H.H.m.r,a=15-r,i=0;i>>a}},H.H.M=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8},H.H.I=function(e,r,t){t<<=7&r;var a=r>>>3;e[a]|=t,e[a+1]|=t>>>8,e[a+2]|=t>>>16},H.H.e=function(e,r,t){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},H.H.i=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},H.H.m=(N=Uint16Array,W=Uint32Array,{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(32768),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(65536),g:new N(32768)}),function(){for(var e=H.H.m,r=0;r<32768;r++){var t=r;t=(4278255360&(t=(4042322160&(t=(3435973836&(t=(2863311530&t)>>>1|(1431655765&t)<<1))>>>2|(858993459&t)<<2))>>>4|(252645135&t)<<4))>>>8|(16711935&t)<<8,e.r[r]=(t>>>16|t<<16)>>>17}function n(e,r,t){for(;0!=r--;)e.push(0,t)}for(r=0;r<32;r++)e.q[r]=e.S[r]<<3|e.T[r],e.c[r]=e.p[r]<<4|e.z[r];n(e._,144,8),n(e._,112,9),n(e._,24,7),n(e._,8,8),H.H.n(e._,9),H.H.A(e._,9,e.J),H.H.l(e._,9),n(e.$,32,5),H.H.n(e.$,5),H.H.A(e.$,5,e.h),H.H.l(e.$,5),n(e.Q,19,0),n(e.C,286,0),n(e.D,30,0),n(e.v,320,0)}(),H.H.N),UPNG.decode._readInterlace=function(e,r){for(var t=r.width,a=r.height,i=UPNG.decode._getBPP(r),s=i>>3,c=Math.ceil(t*i/8),l=new Uint8Array(a*c),u=0,p=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],y=[8,8,4,4,2,2,1],A=0;A<7;){for(var g=h[A],E=y[A],v=0,m=0,I=p[A];I>3])>>7-(7&_)&1,l[b*c+(T>>3)]|=O<<7-((7&T)<<0);if(2==i)O=(O=e[_>>3])>>6-(7&_)&3,l[b*c+(T>>2)]|=O<<6-((3&T)<<1);if(4==i)O=(O=e[_>>3])>>4-(7&_)&15,l[b*c+(T>>1)]|=O<<4-((1&T)<<2);if(i>=8)for(var w=b*c+T*s,U=0;U>3)+U];_+=i,T+=E}S++,b+=g}v*m!=0&&(u+=m*(1+P)),A+=1}return l},UPNG.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},UPNG.decode._filterZero=function(e,r,t,a,i){var s=UPNG.decode._getBPP(r),c=Math.ceil(a*s/8),l=UPNG.decode._paeth;s=Math.ceil(s/8);var u=0,p=1,d=e[t],h=0;if(d>1&&(e[t]=[0,0,1][d-2]),3==d)for(h=s;h>>1)&255;for(var y=0;y>>1);for(;h>>1)}else{for(;h>8&255,e[r+1]=255&t},readUint:function readUint(e,r){return 16777216*e[r]+(e[r+1]<<16|e[r+2]<<8|e[r+3])},writeUint:function writeUint(e,r,t){e[r]=t>>24&255,e[r+1]=t>>16&255,e[r+2]=t>>8&255,e[r+3]=255&t},readASCII:function readASCII(e,r,t){for(var a="",i=0;i=0&&l>=0?(h=A*r+g<<2,y=(l+A)*i+c+g<<2):(h=(-l+A)*r-c+g<<2,y=A*i+g<<2),0==u)a[y]=e[h],a[y+1]=e[h+1],a[y+2]=e[h+2],a[y+3]=e[h+3];else if(1==u){var E=e[h+3]*(1/255),v=e[h]*E,m=e[h+1]*E,I=e[h+2]*E,R=a[y+3]*(1/255),P=a[y]*R,S=a[y+1]*R,b=a[y+2]*R,T=1-E,_=E+R*T,O=0==_?0:1/_;a[y+3]=255*_,a[y+0]=(v+P*T)*O,a[y+1]=(m+S*T)*O,a[y+2]=(I+b*T)*O}else if(2==u){E=e[h+3],v=e[h],m=e[h+1],I=e[h+2],R=a[y+3],P=a[y],S=a[y+1],b=a[y+2];E==R&&v==P&&m==S&&I==b?(a[y]=0,a[y+1]=0,a[y+2]=0,a[y+3]=0):(a[y]=v,a[y+1]=m,a[y+2]=I,a[y+3]=E)}else if(3==u){E=e[h+3],v=e[h],m=e[h+1],I=e[h+2],R=a[y+3],P=a[y],S=a[y+1],b=a[y+2];if(E==R&&v==P&&m==S&&I==b)continue;if(E<220&&R>20)return!1}return!0},UPNG.encode=function(e,r,t,a,i,s,c){null==a&&(a=0),null==c&&(c=!1);var l=UPNG.encode.compress(e,r,t,a,[!1,!1,!1,0,c]);return UPNG.encode.compressPNG(l,-1),UPNG.encode._main(l,r,t,i,s)},UPNG.encodeLL=function(e,r,t,a,i,s,c,l){for(var u={ctype:0+(1==a?0:2)+(0==i?0:4),depth:s,frames:[]},p=(a+i)*s,d=p*r,h=0;h1,h=!1,y=33+(d?20:0);if(null!=i.sRGB&&(y+=13),null!=i.pHYs&&(y+=21),3==e.ctype){for(var A=e.plte.length,g=0;g>>24!=255&&(h=!0);y+=8+3*A+4+(h?8+1*A+4:0)}for(var E=0;E>>8&255,b=R>>>16&255;v[p+I+0]=P,v[p+I+1]=S,v[p+I+2]=b}if(c(v,p+=3*A,s(v,p-3*A-4,3*A+4)),p+=4,h){c(v,p,A),u(v,p+=4,"tRNS"),p+=4;for(g=0;g>>24&255;c(v,p+=A,s(v,p-A-4,A+4)),p+=4}}var T=0;for(E=0;E>2,U>>2));for(A=0;AL&&x==$[v-L])M[v]=M[v-L];else{var B=R[x];if(null==B&&(R[x]=B=P.length,P.push(x),P.length>=300))break;M[v]=B}}}var D=P.length;D<=256&&0==p&&(h=D<=2?1:D<=4?2:D<=16?4:8,h=Math.max(h,u));for(A=0;A>1)]|=q[K+z]<<4-4*(1&z);else if(2==h)for(z=0;z>2)]|=q[K+z]<<6-2*(3&z);else if(1==h)for(z=0;z>3)]|=q[K+z]<<7-1*(7&z)}V=Z,d=3,Y=1}else if(0==m&&1==I.length){Z=new Uint8Array(L*G*3);var X=L*G;for(v=0;v_&&(_=U),wO&&(O=w))}-1==_&&(b=T=_=O=0),i&&(1==(1&b)&&b--,1==(1&T)&&T--);var C=(_-b+1)*(O-T+1);Cv&&(v=P),Sm&&(m=S))}-1==v&&(g=E=v=m=0),c&&(1==(1&g)&&g--,1==(1&E)&&E--),s={x:g,y:E,width:v-g+1,height:m-E+1};var _=a[i];_.rect=s,_.blend=1,_.img=new Uint8Array(s.width*s.height*4),0==a[i-1].dispose?(UPNG._copyTile(p,r,t,_.img,s.width,s.height,-s.x,-s.y,0),UPNG.encode._prepareDiff(y,r,t,_.img,s)):UPNG._copyTile(y,r,t,_.img,s.width,s.height,-s.x,-s.y,0)},UPNG.encode._prepareDiff=function(e,r,t,a,i){UPNG._copyTile(e,r,t,a,i.width,i.height,-i.x,-i.y,2)},UPNG.encode._filterZero=function(e,r,t,a,i,s,c){var l,u=[],p=[0,1,2,3,4];-1!=s?p=[s]:(r*a>5e5||1==t)&&(p=[0]),c&&(l={level:0});for(var d,h=UZIP,y=0;y>1)+256&255;if(4==s)for(p=i;p>1)&255;for(p=i;p>1)&255}if(4==s){for(p=0;p>>1:t>>>=1;e[r]=t}return e}(),update:function update(e,r,t,a){for(var i=0;i>>8;return e},crc:function crc(e,r,t){return 4294967295^UPNG.crc.update(4294967295,e,r,t)}},UPNG.quantize=function(e,r){var t,a=new Uint8Array(e),i=a.slice(0),s=new Uint32Array(i.buffer),c=UPNG.quantize.getKDtree(i,r),l=c[0],u=c[1],p=UPNG.quantize.planeDst,d=a,h=s,y=d.length,A=new Uint8Array(a.length>>2);if(a.length<2e7)for(var g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}else for(g=0;g>2]=t.ind,h[g>>2]=t.est.rgba}return{abuf:i.buffer,inds:A,plte:u}},UPNG.quantize.getKDtree=function(e,r,t){null==t&&(t=1e-4);var a=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=UPNG.quantize.stats(e,i.i0,i.i1),i.est=UPNG.quantize.estats(i.bst);for(var s=[i];s.lengthc&&(c=s[u].est.L,l=u);if(c=d||p.i1<=d)p.est.L=0;else{var h={i0:p.i0,i1:d,bst:null,est:null,tdst:0,left:null,right:null};h.bst=UPNG.quantize.stats(e,h.i0,h.i1),h.est=UPNG.quantize.estats(h.bst);var y={i0:d,i1:p.i1,bst:null,est:null,tdst:0,left:null,right:null};y.bst={R:[],m:[],N:p.bst.N-h.bst.N};for(u=0;u<16;u++)y.bst.R[u]=p.bst.R[u]-h.bst.R[u];for(u=0;u<4;u++)y.bst.m[u]=p.bst.m[u]-h.bst.m[u];y.est=UPNG.quantize.estats(y.bst),p.left=h,p.right=y,s[l]=h,s.push(y)}}s.sort((function(e,r){return r.bst.N-e.bst.N}));for(u=0;u0&&(c=e.right,l=e.left);var u=UPNG.quantize.getNearest(c,r,t,a,i);if(u.tdst<=s*s)return u;var p=UPNG.quantize.getNearest(l,r,t,a,i);return p.tdsts;)a-=4;if(t>=a)break;var l=r[t>>2];r[t>>2]=r[a>>2],r[a>>2]=l,t+=4,a-=4}for(;c(e,t,i)>s;)t-=4;return t+4},UPNG.quantize.vecDot=function(e,r,t){return e[r]*t[0]+e[r+1]*t[1]+e[r+2]*t[2]+e[r+3]*t[3]},UPNG.quantize.stats=function(e,r,t){for(var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],s=t-r>>2,c=r;c>>0}},UPNG.M4={multVec:function multVec(e,r){return[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]]},dot:function dot(e,r){return e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3]},sml:function sml(e,r){return[e*r[0],e*r[1],e*r[2],e*r[3]]}},UPNG.encode.concatRGBA=function(e){for(var r=0,t=0;t2&&void 0!==arguments[2]?arguments[2]:Date.now();return new Promise((function(a){for(var i=e.split(","),s=i[0].match(/:(.*?);/)[1],c=globalThis.atob(i[1]),l=c.length,u=new Uint8Array(l);l--;)u[l]=c.charCodeAt(l);var p=new Blob([u],{type:s});p.name=r,p.lastModified=t,a(p)}))}function getDataUrlFromFile(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(){return r(a.result)},a.onerror=function(e){return t(e)},a.readAsDataURL(e)}))}function loadImage(e){return new Promise((function(r,t){var a=new Image;a.onload=function(){return r(a)},a.onerror=function(e){return t(e)},a.src=e}))}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;var e=BROWSER_NAME.ETC,r=navigator.userAgent;return/Chrom(e|ium)/i.test(r)?e=BROWSER_NAME.CHROME:/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(r)?e=BROWSER_NAME.MOBILE_SAFARI:/Safari/i.test(r)?e=BROWSER_NAME.DESKTOP_SAFARI:/Firefox/i.test(r)?e=BROWSER_NAME.FIREFOX:(/MSIE/i.test(r)||!0==!!document.documentMode)&&(e=BROWSER_NAME.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,r){for(var t=getBrowserName(),a=MAX_CANVAS_SIZE[t],i=e,s=r,c=i*s,l=i>s?s/i:i/s;c>a*a;){var u=(a+i)/2,p=(a+s)/2;u1&&void 0!==arguments[1]?arguments[1]:void 0,t=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),a=t.width,i=t.height,s=getNewCanvasAndCtx(a,i),c=_slicedToArray(s,2),l=c[0],u=c[1];return r&&/jpe?g/.test(r)&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height)),u.drawImage(e,0,0,l.width,l.height),l}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(t,a){var i,s,c=function $Try_2_Post(){try{return s=drawImageInCanvas(i,r.fileType||e.type),t([i,s])}catch(e){return a(e)}},l=function $Try_2_Catch(r){try{0;var t=function $Try_3_Catch(e){try{throw e}catch(e){return a(e)}};try{return getDataUrlFromFile(e).then((function(e){try{return loadImage(e).then((function(e){try{return i=e,function $Try_3_Post(){try{return c()}catch(e){return a(e)}}()}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){t(e)}}catch(e){return a(e)}};try{if(isIOS()||[BROWSER_NAME.DESKTOP_SAFARI,BROWSER_NAME.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then((function(e){try{return i=e,c()}catch(e){return l()}}),l)}catch(e){l()}}))}function canvasToFile(e,r,t,a){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return new Promise((function(s,c){var l,u,p;if("image/png"===r)return u=e.getContext("2d").getImageData(0,0,e.width,e.height).data,p=UPNG.encode([u],e.width,e.height,256*i),(l=new Blob([p],{type:r})).name=t,l.lastModified=a,$If_4.call(this);{return"function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?e.convertToBlob({type:r,quality:i}).then(function(e){try{return(l=e).name=t,l.lastModified=a,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c):getFilefromDataUrl(e.toDataURL(r,i),t,a).then(function(e){try{return l=e,$If_5.call(this)}catch(e){return c(e)}}.bind(this),c);function $If_5(){return $If_4.call(this)}}function $If_4(){return s(l)}}))}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise((function(e,r){var t,a,i,s;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(c){try{return drawFileInCanvas(t=c).then((function(c){try{return canvasToFile(a=c[1],t.type,t.name,t.lastModified).then((function(t){try{return i=t,cleanupCanvasMemory(a),drawFileInCanvas(i).then((function(t){try{return s=t[0],isAutoOrientationInBrowser.cachedResult=1===s.width&&2===s.height,e(isAutoOrientationInBrowser.cachedResult)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r)}catch(e){return r(e)}}),r))}))}function getExifOrientation(e){return new Promise((function(r,t){var a=new CustomFileReader;a.onload=function(e){var t=new DataView(e.target.result);if(65496!=t.getUint16(0,!1))return r(-2);for(var a=t.byteLength,i=2;is||i>s)){var l=_slicedToArray(getNewCanvasAndCtx(a,i),2);c=l[0],t=l[1],a>i?(c.width=s,c.height=i/a*s):(c.width=a/i*s,c.height=s),t.drawImage(e,0,0,c.width,c.height),cleanupCanvasMemory(e)}return c}function followExifOrientation(e,r){var t=e.width,a=e.height,i=_slicedToArray(getNewCanvasAndCtx(t,a),2),s=i[0],c=i[1];switch(r>4&&r<9?(s.width=a,s.height=t):(s.width=t,s.height=a),r){case 2:c.transform(-1,0,0,1,t,0);break;case 3:c.transform(-1,0,0,-1,t,a);break;case 4:c.transform(1,0,0,-1,0,a);break;case 5:c.transform(0,1,1,0,0,0);break;case 6:c.transform(0,1,-1,0,a,0);break;case 7:c.transform(0,-1,-1,0,a,t);break;case 8:c.transform(0,-1,1,0,0,t)}return c.drawImage(e,0,0,t,a),cleanupCanvasMemory(e),s}function compress(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(a,i){var s,c,l,u,p,d,h,y,A,g,E,v,m,I,R,P,S,b;function incProgress(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;s+=e,r.onProgress(Math.min(s,100))}function setProgress(e){s=Math.min(Math.max(e,s),100),r.onProgress(s)}return s=t,c=r.maxIteration||10,l=1024*r.maxSizeMB*1024,incProgress(),drawFileInCanvas(e,r).then(function(t){try{var s=_slicedToArray(t,2);return u=s[1],incProgress(),p=handleMaxWidthOrHeight(u,r),incProgress(),new Promise((function(t,a){var i;if(!(i=r.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,$If_2.call(this)}catch(e){return a(e)}}.bind(this),a);function $If_2(){return t(i)}return $If_2.call(this)})).then(function(t){try{return d=t,incProgress(),isAutoOrientationInBrowser().then(function(t){try{return h=t?p:followExifOrientation(p,d),incProgress(),y=r.initialQuality||1,A=r.fileType||e.type,canvasToFile(h,A,e.name,e.lastModified,y).then(function(r){try{{if(g=r,incProgress(),E=g.size>l,v=g.size>e.size,!E&&!v)return setProgress(100),a(g);var t;function $Loop_3(){if(c--&&(R>l||R>m)){var r,t,a=_slicedToArray(getNewCanvasAndCtx(r=E?.95*b.width:b.width,t=E?.95*b.height:b.height),2);return S=a[0],a[1].drawImage(b,0,0,r,t),y*=.95,canvasToFile(S,A,e.name,e.lastModified,y).then((function(e){try{return P=e,cleanupCanvasMemory(b),b=S,R=P.size,setProgress(Math.min(99,Math.floor((I-R)/(I-l)*100))),$Loop_3}catch(e){return i(e)}}),i)}return[1]}return m=e.size,I=g.size,R=I,b=h,(t=function(e){for(;e;){if(e.then)return void e.then(t,i);try{if(e.pop){if(e.length)return e.pop()?$Loop_3_exit.call(this):e;e=$Loop_3}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))($Loop_3);function $Loop_3_exit(){return cleanupCanvasMemory(b),cleanupCanvasMemory(S),cleanupCanvasMemory(p),cleanupCanvasMemory(h),cleanupCanvasMemory(u),setProgress(100),a(P)}}}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}))}var charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:toString(e),index:0})}),(function next(){var e,r=getInternalState(this),t=r.string,a=r.index;return a>=t.length?{value:void 0,done:!0}:(e=charAt(t,a),r.index+=e.length,{value:e,done:!1})}));var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},classList=documentCreateElement("span").classList,DOMTokenListPrototype=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype===Object.prototype?void 0:DOMTokenListPrototype,ITERATOR$2=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values,handlePrototype$1=function(e,r){if(e){if(e[ITERATOR$2]!==ArrayValues)try{createNonEnumerableProperty(e,ITERATOR$2,ArrayValues)}catch(r){e[ITERATOR$2]=ArrayValues}if(e[TO_STRING_TAG]||createNonEnumerableProperty(e,TO_STRING_TAG,r),domIterables[r])for(var t in es_array_iterator)if(e[t]!==es_array_iterator[t])try{createNonEnumerableProperty(e,t,es_array_iterator[t])}catch(r){e[t]=es_array_iterator[t]}}};for(var COLLECTION_NAME$1 in domIterables)handlePrototype$1(global$1[COLLECTION_NAME$1]&&global$1[COLLECTION_NAME$1].prototype,COLLECTION_NAME$1);handlePrototype$1(domTokenListPrototype,"DOMTokenList");var ITERATOR$1=wellKnownSymbol("iterator"),nativeUrl=!fails((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),r=e.searchParams,t="";return e.pathname="c%20d",r.forEach((function(e,a){r.delete("b"),t+=a+e})),isPure&&!e.toJSON||!r.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[ITERATOR$1]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==t||"x"!==new URL("http://x",void 0).host})),callWithSafeIterationClosing=function(e,r,t,a){try{return a?r(anObject(t)[0],t[1]):r(t)}catch(r){iteratorClose(e,"throw",r)}},arrayFrom=function from(e){var r=toObject(e),t=isConstructor(this),a=arguments.length,i=a>1?arguments[1]:void 0,s=void 0!==i;s&&(i=functionBindContext(i,a>2?arguments[2]:void 0,2));var c,l,u,p,d,h,y=getIteratorMethod(r),A=0;if(!y||this==Array&&isArrayIteratorMethod(y))for(c=toLength(r.length),l=t?new this(c):Array(c);c>A;A++)h=s?i(r[A],A):r[A],createProperty(l,A,h);else for(d=(p=getIterator(r,y)).next,l=t?new this:[];!(u=d.call(p)).done;A++)h=s?callWithSafeIterationClosing(p,i,[u.value,A],!0):u.value,createProperty(l,A,h);return l.length=A,l},maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,floor$2=Math.floor,stringFromCharCode=String.fromCharCode,ucs2decode=function(e){for(var r=[],t=0,a=e.length;t=55296&&i<=56319&&t>1,e+=floor$2(e/r);e>baseMinusTMin*tMax>>1;a+=base)e=floor$2(e/baseMinusTMin);return floor$2(a+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var r,t,a=[],i=(e=ucs2decode(e)).length,s=initialN,c=0,l=initialBias;for(r=0;r=s&&tfloor$2((maxInt-c)/h))throw RangeError(OVERFLOW_ERROR);for(c+=(d-s)*h,s=d,r=0;rmaxInt)throw RangeError(OVERFLOW_ERROR);if(t==s){for(var y=c,A=base;;A+=base){var g=A<=l?tMin:A>=l+tMax?tMax:A-l;if(y0?arguments[0]:void 0,d=this,h=[];if(setInternalState$1(d,{type:URL_SEARCH_PARAMS,entries:h,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==p)if(isObject(p))if(e=getIteratorMethod(p))for(t=(r=getIterator(p,e)).next;!(a=t.call(r)).done;){if((c=(s=(i=getIterator(anObject(a.value))).next).call(i)).done||(l=s.call(i)).done||!s.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:toString(c.value),value:toString(l.value)})}else for(u in p)has$1(p,u)&&h.push({key:u,value:toString(p[u])});else parseSearchParams(h,"string"==typeof p?"?"===p.charAt(0)?p.slice(1):p:toString(p))},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(redefineAll(URLSearchParamsPrototype,{append:function append(e,r){validateArgumentsLength(arguments.length,2);var t=getInternalParamsState(this);t.entries.push({key:toString(e),value:toString(r)}),t.updateURL()},delete:function(e){validateArgumentsLength(arguments.length,1);for(var r=getInternalParamsState(this),t=r.entries,a=toString(e),i=0;ie.key){i.splice(r,0,e);break}r===t&&i.push(e)}a.updateURL()},forEach:function forEach(e){for(var r,t=getInternalParamsState(this).entries,a=functionBindContext(e,arguments.length>1?arguments[1]:void 0,3),i=0;i1?wrapRequestOptions(arguments[1]):{})}}),isCallable(NativeRequest)){var RequestConstructor=function Request(e){return anInstance(this,RequestConstructor,"Request"),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,_export({global:!0,forced:!0},{Request:RequestConstructor})}}var web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},codeAt=stringMultibyte.codeAt,NativeURL=global$1.URL,URLSearchParams$1=web_urlSearchParams.URLSearchParams,getInternalSearchParamsState=web_urlSearchParams.getState,setInternalState=internalState.set,getInternalURLState=internalState.getterFor("URL"),floor$1=Math.floor,pow=Math.pow,INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[A-Za-z]/,ALPHANUMERIC=/[\d+-.A-Za-z]/,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\dA-Fa-f]+$/,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseHost=function(e,r){var t,a,i;if("["==r.charAt(0)){if("]"!=r.charAt(r.length-1))return INVALID_HOST;if(!(t=parseIPv6(r.slice(1,-1))))return INVALID_HOST;e.host=t}else if(isSpecial(e)){if(r=stringPunycodeToAscii(r),FORBIDDEN_HOST_CODE_POINT.test(r))return INVALID_HOST;if(null===(t=parseIPv4(r)))return INVALID_HOST;e.host=t}else{if(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(r))return INVALID_HOST;for(t="",a=arrayFrom(r),i=0;i4)return e;for(t=[],a=0;a1&&"0"==i.charAt(0)&&(s=HEX_START.test(i)?16:8,i=i.slice(8==s?1:2)),""===i)c=0;else{if(!(10==s?DEC:8==s?OCT:HEX).test(i))return e;c=parseInt(i,s)}t.push(c)}for(a=0;a=pow(256,5-r))return null}else if(c>255)return null;for(l=t.pop(),a=0;a6)return;for(a=0;chr();){if(i=null,a>0){if(!("."==chr()&&a<4))return;h++}if(!DIGIT.test(chr()))return;for(;DIGIT.test(chr());){if(s=parseInt(chr(),10),null===i)i=s;else{if(0==i)return;i=10*i+s}if(i>255)return;h++}u[p]=256*u[p]+i,2!=++a&&4!=a||p++}if(4!=a)return;break}if(":"==chr()){if(h++,!chr())return}else if(chr())return;u[p++]=r}else{if(null!==d)return;h++,d=++p}}if(null!==d)for(c=p-d,p=7;0!=p&&c>0;)l=u[p],u[p--]=u[d+c-1],u[d+--c]=l;else if(8!=p)return;return u},findLongestZeroSequence=function(e){for(var r=null,t=1,a=null,i=0,s=0;s<8;s++)0!==e[s]?(i>t&&(r=a,t=i),a=null,i=0):(null===a&&(a=s),++i);return i>t&&(r=a,t=i),r},serializeHost=function(e){var r,t,a,i;if("number"==typeof e){for(r=[],t=0;t<4;t++)r.unshift(e%256),e=floor$1(e/256);return r.join(".")}if("object"==typeof e){for(r="",a=findLongestZeroSequence(e),t=0;t<8;t++)i&&0===e[t]||(i&&(i=!1),a===t?(r+=t?":":"::",i=!0):(r+=e[t].toString(16),t<7&&(r+=":")));return"["+r+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=objectAssign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=objectAssign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=objectAssign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,r){var t=codeAt(e,0);return t>32&&t<127&&!has$1(r,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(e){return has$1(specialSchemes,e.scheme)},includesCredentials=function(e){return""!=e.username||""!=e.password},cannotHaveUsernamePasswordPort=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},isWindowsDriveLetter=function(e,r){var t;return 2==e.length&&ALPHA.test(e.charAt(0))&&(":"==(t=e.charAt(1))||!r&&"|"==t)},startsWithWindowsDriveLetter=function(e){var r;return e.length>1&&isWindowsDriveLetter(e.slice(0,2))&&(2==e.length||"/"===(r=e.charAt(2))||"\\"===r||"?"===r||"#"===r)},shortenURLsPath=function(e){var r=e.path,t=r.length;!t||"file"==e.scheme&&1==t&&isWindowsDriveLetter(r[0],!0)||r.pop()},isSingleDot=function(e){return"."===e||"%2e"===e.toLowerCase()},isDoubleDot=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},parseURL=function(e,r,t,a){var i,s,c,l,u=t||SCHEME_START,p=0,d="",h=!1,y=!1,A=!1;for(t||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,r=r.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),r=r.replace(TAB_AND_NEW_LINE,""),i=arrayFrom(r);p<=i.length;){switch(s=i[p],u){case SCHEME_START:if(!s||!ALPHA.test(s)){if(t)return INVALID_SCHEME;u=NO_SCHEME;continue}d+=s.toLowerCase(),u=SCHEME;break;case SCHEME:if(s&&(ALPHANUMERIC.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(t)return INVALID_SCHEME;d="",u=NO_SCHEME,p=0;continue}if(t&&(isSpecial(e)!=has$1(specialSchemes,d)||"file"==d&&(includesCredentials(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,t)return void(isSpecial(e)&&specialSchemes[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?u=FILE:isSpecial(e)&&a&&a.scheme==e.scheme?u=SPECIAL_RELATIVE_OR_AUTHORITY:isSpecial(e)?u=SPECIAL_AUTHORITY_SLASHES:"/"==i[p+1]?(u=PATH_OR_AUTHORITY,p++):(e.cannotBeABaseURL=!0,e.path.push(""),u=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!a||a.cannotBeABaseURL&&"#"!=s)return INVALID_SCHEME;if(a.cannotBeABaseURL&&"#"==s){e.scheme=a.scheme,e.path=a.path.slice(),e.query=a.query,e.fragment="",e.cannotBeABaseURL=!0,u=FRAGMENT;break}u="file"==a.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=s||"/"!=i[p+1]){u=RELATIVE;continue}u=SPECIAL_AUTHORITY_IGNORE_SLASHES,p++;break;case PATH_OR_AUTHORITY:if("/"==s){u=AUTHORITY;break}u=PATH;continue;case RELATIVE:if(e.scheme=a.scheme,s==EOF)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query;else if("/"==s||"\\"==s&&isSpecial(e))u=RELATIVE_SLASH;else if("?"==s)e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.path.pop(),u=PATH;continue}e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}break;case RELATIVE_SLASH:if(!isSpecial(e)||"/"!=s&&"\\"!=s){if("/"!=s){e.username=a.username,e.password=a.password,e.host=a.host,e.port=a.port,u=PATH;continue}u=AUTHORITY}else u=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(u=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=s||"/"!=d.charAt(p+1))continue;p++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=s&&"\\"!=s){u=AUTHORITY;continue}break;case AUTHORITY:if("@"==s){h&&(d="%40"+d),h=!0,c=arrayFrom(d);for(var g=0;g65535)return INVALID_PORT;e.port=isSpecial(e)&&m===specialSchemes[e.scheme]?null:m,d=""}if(t)return;u=PATH_START;continue}return INVALID_PORT}d+=s;break;case FILE:if(e.scheme="file","/"==s||"\\"==s)u=FILE_SLASH;else{if(!a||"file"!=a.scheme){u=PATH;continue}if(s==EOF)e.host=a.host,e.path=a.path.slice(),e.query=a.query;else if("?"==s)e.host=a.host,e.path=a.path.slice(),e.query="",u=QUERY;else{if("#"!=s){startsWithWindowsDriveLetter(i.slice(p).join(""))||(e.host=a.host,e.path=a.path.slice(),shortenURLsPath(e)),u=PATH;continue}e.host=a.host,e.path=a.path.slice(),e.query=a.query,e.fragment="",u=FRAGMENT}}break;case FILE_SLASH:if("/"==s||"\\"==s){u=FILE_HOST;break}a&&"file"==a.scheme&&!startsWithWindowsDriveLetter(i.slice(p).join(""))&&(isWindowsDriveLetter(a.path[0],!0)?e.path.push(a.path[0]):e.host=a.host),u=PATH;continue;case FILE_HOST:if(s==EOF||"/"==s||"\\"==s||"?"==s||"#"==s){if(!t&&isWindowsDriveLetter(d))u=PATH;else if(""==d){if(e.host="",t)return;u=PATH_START}else{if(l=parseHost(e,d))return l;if("localhost"==e.host&&(e.host=""),t)return;d="",u=PATH_START}continue}d+=s;break;case PATH_START:if(isSpecial(e)){if(u=PATH,"/"!=s&&"\\"!=s)continue}else if(t||"?"!=s)if(t||"#"!=s){if(s!=EOF&&(u=PATH,"/"!=s))continue}else e.fragment="",u=FRAGMENT;else e.query="",u=QUERY;break;case PATH:if(s==EOF||"/"==s||"\\"==s&&isSpecial(e)||!t&&("?"==s||"#"==s)){if(isDoubleDot(d)?(shortenURLsPath(e),"/"==s||"\\"==s&&isSpecial(e)||e.path.push("")):isSingleDot(d)?"/"==s||"\\"==s&&isSpecial(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&isWindowsDriveLetter(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(s==EOF||"?"==s||"#"==s))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==s?(e.query="",u=QUERY):"#"==s&&(e.fragment="",u=FRAGMENT)}else d+=percentEncode(s,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==s?(e.query="",u=QUERY):"#"==s?(e.fragment="",u=FRAGMENT):s!=EOF&&(e.path[0]+=percentEncode(s,C0ControlPercentEncodeSet));break;case QUERY:t||"#"!=s?s!=EOF&&("'"==s&&isSpecial(e)?e.query+="%27":e.query+="#"==s?"%23":percentEncode(s,C0ControlPercentEncodeSet)):(e.fragment="",u=FRAGMENT);break;case FRAGMENT:s!=EOF&&(e.fragment+=percentEncode(s,fragmentPercentEncodeSet))}p++}},URLConstructor=function URL(e){var r,t,a=anInstance(this,URLConstructor,"URL"),i=arguments.length>1?arguments[1]:void 0,s=toString(e),c=setInternalState(a,{type:"URL"});if(void 0!==i)if(i instanceof URLConstructor)r=getInternalURLState(i);else if(t=parseURL(r={},toString(i)))throw TypeError(t);if(t=parseURL(c,s,null,r))throw TypeError(t);var l=c.searchParams=new URLSearchParams$1,u=getInternalSearchParamsState(l);u.updateSearchParams(c.query),u.updateURL=function(){c.query=String(l)||null},descriptors||(a.href=serializeURL.call(a),a.origin=getOrigin.call(a),a.protocol=getProtocol.call(a),a.username=getUsername.call(a),a.password=getPassword.call(a),a.host=getHost.call(a),a.hostname=getHostname.call(a),a.port=getPort.call(a),a.pathname=getPathname.call(a),a.search=getSearch.call(a),a.searchParams=getSearchParams.call(a),a.hash=getHash.call(a))},URLPrototype=URLConstructor.prototype,serializeURL=function(){var e=getInternalURLState(this),r=e.scheme,t=e.username,a=e.password,i=e.host,s=e.port,c=e.path,l=e.query,u=e.fragment,p=r+":";return null!==i?(p+="//",includesCredentials(e)&&(p+=t+(a?":"+a:"")+"@"),p+=serializeHost(i),null!==s&&(p+=":"+s)):"file"==r&&(p+="//"),p+=e.cannotBeABaseURL?c[0]:c.length?"/"+c.join("/"):"",null!==l&&(p+="?"+l),null!==u&&(p+="#"+u),p},getOrigin=function(){var e=getInternalURLState(this),r=e.scheme,t=e.port;if("blob"==r)try{return new URLConstructor(r.path[0]).origin}catch(e){return"null"}return"file"!=r&&isSpecial(e)?r+"://"+serializeHost(e.host)+(null!==t?":"+t:""):"null"},getProtocol=function(){return getInternalURLState(this).scheme+":"},getUsername=function(){return getInternalURLState(this).username},getPassword=function(){return getInternalURLState(this).password},getHost=function(){var e=getInternalURLState(this),r=e.host,t=e.port;return null===r?"":null===t?serializeHost(r):serializeHost(r)+":"+t},getHostname=function(){var e=getInternalURLState(this).host;return null===e?"":serializeHost(e)},getPort=function(){var e=getInternalURLState(this).port;return null===e?"":String(e)},getPathname=function(){var e=getInternalURLState(this),r=e.path;return e.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},getSearch=function(){var e=getInternalURLState(this).query;return e?"?"+e:""},getSearchParams=function(){return getInternalURLState(this).searchParams},getHash=function(){var e=getInternalURLState(this).fragment;return e?"#"+e:""},accessorDescriptor=function(e,r){return{get:e,set:r,configurable:!0,enumerable:!0}};if(descriptors&&objectDefineProperties(URLPrototype,{href:accessorDescriptor(serializeURL,(function(e){var r=getInternalURLState(this),t=toString(e),a=parseURL(r,t);if(a)throw TypeError(a);getInternalSearchParamsState(r.searchParams).updateSearchParams(r.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(e){var r=getInternalURLState(this);parseURL(r,toString(e)+":",SCHEME_START)})),username:accessorDescriptor(getUsername,(function(e){var r=getInternalURLState(this),t=arrayFrom(toString(e));if(!cannotHaveUsernamePasswordPort(r)){r.username="";for(var a=0;a1?arguments[1]:void 0)},handlePrototype=function(e){if(e&&e.forEach!==arrayForEach)try{createNonEnumerableProperty(e,"forEach",arrayForEach)}catch(r){e.forEach=arrayForEach}};for(var COLLECTION_NAME in domIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype);handlePrototype(domTokenListPrototype);var propertyIsEnumerable=objectPropertyIsEnumerable.f,createMethod=function(e){return function(r){for(var t,a=toIndexedObject(r),i=objectKeys(a),s=i.length,c=0,l=[];s>c;)t=i[c++],descriptors&&!propertyIsEnumerable.call(a,t)||l.push(e?[t,a[t]]:a[t]);return l}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$entries=objectToArray.entries;_export({target:"Object",stat:!0},{entries:function entries(e){return $entries(e)}});var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,$startsWith="".startsWith,min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegexpLogic("startsWith"),MDN_POLYFILL_BUG=!(CORRECT_IS_REGEXP_LOGIC||(descriptor=getOwnPropertyDescriptor(String.prototype,"startsWith"),!descriptor||descriptor.writable)),descriptor;_export({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function startsWith(e){var r=toString(requireObjectCoercible(this));notARegexp(e);var t=toLength(min$1(arguments.length>1?arguments[1]:void 0,r.length)),a=toString(e);return $startsWith?$startsWith.call(r,a,t):r.slice(t,t+a.length)===a}});var floor=Math.floor,replace="".replace,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(e,r,t,a,i,s){var c=t+e.length,l=a.length,u=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==i&&(i=toObject(i),u=SUBSTITUTION_SYMBOLS),replace.call(s,u,(function(s,u){var p;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,t);case"'":return r.slice(c);case"<":p=i[u.slice(1,-1)];break;default:var d=+u;if(0===d)return s;if(d>l){var h=floor(d/10);return 0===h?s:h<=l?void 0===a[h-1]?u.charAt(1):a[h-1]+u.charAt(1):s}p=a[d-1]}return void 0===p?"":p}))},REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}));fixRegexpWellKnownSymbolLogic("replace",(function(e,r,t){var a=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function replace(e,t){var a=requireObjectCoercible(this),i=null==e?void 0:getMethod(e,REPLACE);return i?i.call(e,a,t):r.call(toString(a),e,t)},function(e,i){var s=anObject(this),c=toString(e);if("string"==typeof i&&-1===i.indexOf(a)&&-1===i.indexOf("$<")){var l=t(r,s,c,i);if(l.done)return l.value}var u=isCallable(i);u||(i=toString(i));var p=s.global;if(p){var d=s.unicode;s.lastIndex=0}for(var h=[];;){var y=regexpExecAbstract(s,c);if(null===y)break;if(h.push(y),!p)break;""===toString(y[0])&&(s.lastIndex=advanceStringIndex(c,toLength(s.lastIndex),d))}for(var A="",g=0,E=0;E=g&&(A+=c.slice(g,m)+b,g=m+v.length)}return A+c.slice(g)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=engineV8Version>=51||!fails((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var r=e[IS_CONCAT_SPREADABLE];return void 0!==r?!!r:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function concat(e){var r,t,a,i,s,c=toObject(this),l=arraySpeciesCreate(c,0),u=0;for(r=-1,a=arguments.length;rMAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(t=0;t=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(l,u++,s)}return l.length=u,l}});var cnt=0,imageCompressionLibUrl,worker;function createWorker(e){var r=[];return"function"==typeof e?r.push("(".concat(e,")()")):r.push(e),new Worker(URL.createObjectURL(new Blob(r)))}function createSourceObject(e){return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}function stringify(e){return JSON.stringify(e,(function(e,r){return"function"==typeof r?"BIC_FN:::(function () { return ".concat(r.toString()," })()"):r}))}function parse(o){if("string"==typeof o)return o;var result={};return Object.entries(o).forEach((function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];if("string"==typeof value&&value.startsWith("BIC_FN:::"))try{result[key]=eval(value.replace(/^BIC_FN:::/,""))}catch(e){throw e}else result[key]=parse(value)})),result}function generateLib(){return createSourceObject("\n // reconstruct library\n function imageCompression (){return (".concat(imageCompression,").apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ").concat(imageCompression.getDataUrlFromFile,"\n imageCompression.getFilefromDataUrl = ").concat(imageCompression.getFilefromDataUrl,"\n imageCompression.loadImage = ").concat(imageCompression.loadImage,"\n imageCompression.drawImageInCanvas = ").concat(imageCompression.drawImageInCanvas,"\n imageCompression.drawFileInCanvas = ").concat(imageCompression.drawFileInCanvas,"\n imageCompression.canvasToFile = ").concat(imageCompression.canvasToFile,"\n imageCompression.getExifOrientation = ").concat(imageCompression.getExifOrientation,"\n imageCompression.handleMaxWidthOrHeight = ").concat(imageCompression.handleMaxWidthOrHeight,"\n imageCompression.followExifOrientation = ").concat(imageCompression.followExifOrientation,"\n imageCompression.cleanupCanvasMemory = ").concat(imageCompression.cleanupCanvasMemory,"\n imageCompression.isAutoOrientationInBrowser = ").concat(imageCompression.isAutoOrientationInBrowser,"\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ").concat(imageCompression.approximateBelowMaximumCanvasSizeOfBrowser,"\n imageCompression.getBrowserName = ").concat(imageCompression.getBrowserName,"\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ").concat(isIOS,"\n \n getNewCanvasAndCtx = ").concat(getNewCanvasAndCtx,"\n CustomFileReader = FileReader\n CustomFile = File\n MAX_CANVAS_SIZE = ").concat(JSON.stringify(MAX_CANVAS_SIZE),"\n BROWSER_NAME = ").concat(JSON.stringify(BROWSER_NAME),"\n function compress (){return (").concat(compress,").apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ").concat(parse,"\n const UPNG = {}\n UPNG.toRGBA8 = ").concat(UPNG.toRGBA8,"\n UPNG.toRGBA8.decodeImage = ").concat(UPNG.toRGBA8.decodeImage,"\n UPNG.decode = ").concat(UPNG.decode,"\n UPNG.decode._decompress = ").concat(UPNG.decode._decompress,"\n UPNG.decode._inflate = ").concat(UPNG.decode._inflate,"\n UPNG.decode._readInterlace = ").concat(UPNG.decode._readInterlace,"\n UPNG.decode._getBPP = ").concat(UPNG.decode._getBPP," \n UPNG.decode._filterZero = ").concat(UPNG.decode._filterZero,"\n UPNG.decode._paeth = ").concat(UPNG.decode._paeth,"\n UPNG.decode._IHDR = ").concat(UPNG.decode._IHDR,"\n UPNG._bin = parse(").concat(stringify(UPNG._bin),")\n UPNG._copyTile = ").concat(UPNG._copyTile,"\n UPNG.encode = ").concat(UPNG.encode,"\n UPNG.encodeLL = ").concat(UPNG.encodeLL," \n UPNG.encode._main = ").concat(UPNG.encode._main,"\n UPNG.encode.compressPNG = ").concat(UPNG.encode.compressPNG," \n UPNG.encode.compress = ").concat(UPNG.encode.compress,"\n UPNG.encode.framize = ").concat(UPNG.encode.framize," \n UPNG.encode._updateFrame = ").concat(UPNG.encode._updateFrame," \n UPNG.encode._prepareDiff = ").concat(UPNG.encode._prepareDiff," \n UPNG.encode._filterZero = ").concat(UPNG.encode._filterZero," \n UPNG.encode._filterLine = ").concat(UPNG.encode._filterLine,"\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,"\n UPNG.crc = parse(").concat(stringify(UPNG.crc),")\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ").concat(UPNG.quantize," \n UPNG.quantize.getKDtree = ").concat(UPNG.quantize.getKDtree," \n UPNG.quantize.getNearest = ").concat(UPNG.quantize.getNearest," \n UPNG.quantize.planeDst = ").concat(UPNG.quantize.planeDst," \n UPNG.quantize.dist = ").concat(UPNG.quantize.dist," \n UPNG.quantize.splitPixels = ").concat(UPNG.quantize.splitPixels," \n UPNG.quantize.vecDot = ").concat(UPNG.quantize.vecDot," \n UPNG.quantize.stats = ").concat(UPNG.quantize.stats," \n UPNG.quantize.estats = ").concat(UPNG.quantize.estats,"\n UPNG.M4 = parse(").concat(stringify(UPNG.M4),")\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,'\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP["parse"] = ').concat(UZIP_1.parse,"\n UZIP._readLocal = ").concat(UZIP_1._readLocal,"\n UZIP.inflateRaw = ").concat(UZIP_1.inflateRaw,"\n UZIP.inflate = ").concat(UZIP_1.inflate,"\n UZIP.deflate = ").concat(UZIP_1.deflate,"\n UZIP.deflateRaw = ").concat(UZIP_1.deflateRaw,"\n UZIP.encode = ").concat(UZIP_1.encode,"\n UZIP._noNeed = ").concat(UZIP_1._noNeed,"\n UZIP._writeHeader = ").concat(UZIP_1._writeHeader,"\n UZIP.crc = parse(").concat(stringify(UZIP_1.crc),")\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ").concat(UZIP_1.adler,"\n UZIP.bin = parse(").concat(stringify(UZIP_1.bin),")\n UZIP.F = {}\n UZIP.F.deflateRaw = ").concat(UZIP_1.F.deflateRaw,"\n UZIP.F._bestMatch = ").concat(UZIP_1.F._bestMatch,"\n UZIP.F._howLong = ").concat(UZIP_1.F._howLong,"\n UZIP.F._hash = ").concat(UZIP_1.F._hash,"\n UZIP.saved = ").concat(UZIP_1.saved,"\n UZIP.F._writeBlock = ").concat(UZIP_1.F._writeBlock,"\n UZIP.F._copyExact = ").concat(UZIP_1.F._copyExact,"\n UZIP.F.getTrees = ").concat(UZIP_1.F.getTrees,"\n UZIP.F.getSecond = ").concat(UZIP_1.F.getSecond,"\n UZIP.F.nonZero = ").concat(UZIP_1.F.nonZero,"\n UZIP.F.contSize = ").concat(UZIP_1.F.contSize,"\n UZIP.F._codeTiny = ").concat(UZIP_1.F._codeTiny," \n UZIP.F._lenCodes = ").concat(UZIP_1.F._lenCodes," \n UZIP.F._hufTree = ").concat(UZIP_1.F._hufTree," \n UZIP.F.setDepth = ").concat(UZIP_1.F.setDepth," \n UZIP.F.restrictDepth = ").concat(UZIP_1.F.restrictDepth,"\n UZIP.F._goodIndex = ").concat(UZIP_1.F._goodIndex," \n UZIP.F._writeLit = ").concat(UZIP_1.F._writeLit," \n UZIP.F.inflate = ").concat(UZIP_1.F.inflate," \n UZIP.F._check = ").concat(UZIP_1.F._check," \n UZIP.F._decodeTiny = ").concat(UZIP_1.F._decodeTiny," \n UZIP.F._copyOut = ").concat(UZIP_1.F._copyOut," \n UZIP.F.makeCodes = ").concat(UZIP_1.F.makeCodes," \n UZIP.F.codes2map = ").concat(UZIP_1.F.codes2map," \n UZIP.F.revCodes = ").concat(UZIP_1.F.revCodes," \n\n // used only in deflate\n UZIP.F._putsE = ").concat(UZIP_1.F._putsE,"\n UZIP.F._putsF = ").concat(UZIP_1.F._putsF,"\n \n UZIP.F._bitsE = ").concat(UZIP_1.F._bitsE,"\n UZIP.F._bitsF = ").concat(UZIP_1.F._bitsF,"\n\n UZIP.F._get17 = ").concat(UZIP_1.F._get17,"\n UZIP.F._get25 = ").concat(UZIP_1.F._get25,"\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n "))}function generateWorkerScript(){return createWorker("\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n })\n ")}function compressOnWebWorker(e,r){return new Promise((function(t,a){var i=cnt+=1;imageCompressionLibUrl||(imageCompressionLibUrl=generateLib()),worker||(worker=generateWorkerScript()),worker.addEventListener("message",(function handler(e){if(e.data.id===i){if(void 0!==e.data.progress)return void r.onProgress(e.data.progress);worker.removeEventListener("message",handler),e.data.error&&a(new Error(e.data.error)),t(e.data.file)}})),worker.addEventListener("error",a),worker.postMessage({file:e,id:i,imageCompressionLibUrl:imageCompressionLibUrl,options:_objectSpread2(_objectSpread2({},r),{},{onProgress:void 0})})}))}function imageCompression(e,r){return new Promise((function(t,a){var i,s,c,l,u,p;if(i=_objectSpread2({},r),c=0,l=i.onProgress,i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,u="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=function(e){c=e,"function"==typeof l&&l(c)},!(e instanceof Blob||e instanceof CustomFile))return a(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(new Error("The file given is not an image"));if(p="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!u||"function"!=typeof Worker||p)return compress(e,i).then(function(e){try{return s=e,$If_3.call(this)}catch(e){return a(e)}}.bind(this),a);var d=function(){try{return $If_3.call(this)}catch(e){return a(e)}}.bind(this),h=function $Try_1_Catch(r){try{return compress(e,i).then((function(e){try{return s=e,d()}catch(e){return a(e)}}),a)}catch(e){return a(e)}};try{return compressOnWebWorker(e,i).then((function(e){try{return s=e,d()}catch(e){return h()}}),h)}catch(e){h()}function $If_3(){try{s.name=e.name,s.lastModified=e.lastModified}catch(e){}return t(s)}}))}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.getBrowserName=getBrowserName,imageCompression.version="1.0.17";export{imageCompression as default}; //# sourceMappingURL=browser-image-compression.mjs.map diff --git a/dist/browser-image-compression.mjs.map b/dist/browser-image-compression.mjs.map index 3203ebe..d4a9627 100644 --- a/dist/browser-image-compression.mjs.map +++ b/dist/browser-image-compression.mjs.map @@ -1 +1 @@ -{"version":3,"file":"browser-image-compression.mjs","sources":["../node_modules/core-js/internals/global.js","../node_modules/core-js/internals/is-pure.js","../node_modules/core-js/internals/to-object.js","../node_modules/core-js/internals/has.js","../node_modules/core-js/internals/uid.js","../node_modules/core-js/internals/is-callable.js","../node_modules/core-js/internals/get-built-in.js","../node_modules/core-js/internals/engine-v8-version.js","../node_modules/core-js/internals/fails.js","../node_modules/core-js/internals/well-known-symbol.js","../node_modules/core-js/internals/to-string-tag-support.js","../node_modules/core-js/internals/document-create-element.js","../node_modules/core-js/internals/an-object.js","../node_modules/core-js/internals/is-symbol.js","../node_modules/core-js/internals/try-to-string.js","../node_modules/core-js/internals/a-callable.js","../node_modules/core-js/internals/get-method.js","../node_modules/core-js/internals/ordinary-to-primitive.js","../node_modules/core-js/internals/to-primitive.js","../node_modules/core-js/internals/to-property-key.js","../node_modules/core-js/internals/create-property-descriptor.js","../node_modules/core-js/internals/create-non-enumerable-property.js","../node_modules/core-js/internals/inspect-source.js","../node_modules/core-js/internals/hidden-keys.js","../node_modules/core-js/internals/internal-state.js","../node_modules/core-js/internals/function-name.js","../node_modules/core-js/internals/redefine.js","../node_modules/core-js/internals/classof-raw.js","../node_modules/core-js/internals/classof.js","../node_modules/core-js/internals/object-property-is-enumerable.js","../node_modules/core-js/internals/indexed-object.js","../node_modules/core-js/internals/to-integer.js","../node_modules/core-js/internals/to-absolute-index.js","../node_modules/core-js/internals/array-includes.js","../node_modules/core-js/internals/object-keys-internal.js","../node_modules/core-js/internals/object-get-own-property-symbols.js","../node_modules/core-js/internals/copy-constructor-properties.js","../node_modules/core-js/internals/is-forced.js","../node_modules/core-js/internals/export.js","../node_modules/core-js/internals/redefine-all.js","../node_modules/core-js/internals/a-possible-prototype.js","../node_modules/core-js/internals/object-set-prototype-of.js","../node_modules/core-js/internals/set-to-string-tag.js","../node_modules/core-js/internals/set-species.js","../node_modules/core-js/internals/an-instance.js","../node_modules/core-js/internals/iterators.js","../node_modules/core-js/internals/is-array-iterator-method.js","../node_modules/core-js/internals/function-bind-context.js","../node_modules/core-js/internals/get-iterator.js","../node_modules/core-js/internals/iterator-close.js","../node_modules/core-js/internals/iterate.js","../node_modules/core-js/internals/check-correctness-of-iteration.js","../node_modules/core-js/internals/is-constructor.js","../node_modules/core-js/internals/a-constructor.js","../node_modules/core-js/internals/species-constructor.js","../node_modules/core-js/internals/task.js","../node_modules/core-js/internals/microtask.js","../node_modules/core-js/internals/new-promise-capability.js","../node_modules/core-js/internals/host-report-errors.js","../node_modules/core-js/internals/perform.js","../node_modules/core-js/internals/engine-is-browser.js","../node_modules/core-js/modules/es.promise.js","../node_modules/core-js/internals/object-create.js","../node_modules/core-js/internals/to-string.js","../node_modules/core-js/internals/whitespaces.js","../node_modules/core-js/internals/string-trim.js","../node_modules/core-js/modules/es.number.constructor.js","../node_modules/core-js/modules/es.function.name.js","../node_modules/core-js/internals/object-assign.js","../node_modules/core-js/internals/regexp-sticky-helpers.js","../node_modules/core-js/internals/regexp-unsupported-dot-all.js","../node_modules/core-js/internals/regexp-unsupported-ncg.js","../node_modules/core-js/internals/regexp-exec.js","../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../node_modules/core-js/internals/is-regexp.js","../node_modules/core-js/internals/string-multibyte.js","../node_modules/core-js/internals/advance-string-index.js","../node_modules/core-js/internals/regexp-exec-abstract.js","../node_modules/core-js/modules/es.string.split.js","../node_modules/core-js/modules/es.string.match.js","../node_modules/core-js/internals/add-to-unscopables.js","../node_modules/core-js/internals/object-get-prototype-of.js","../node_modules/core-js/internals/iterators-core.js","../node_modules/core-js/internals/define-iterator.js","../node_modules/core-js/internals/array-buffer-native.js","../node_modules/core-js/internals/array-buffer-view-core.js","../node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","../node_modules/core-js/internals/to-index.js","../node_modules/core-js/internals/ieee754.js","../node_modules/core-js/internals/array-buffer.js","../node_modules/core-js/internals/typed-array-from.js","../node_modules/core-js/internals/array-species-constructor.js","../node_modules/core-js/internals/array-species-create.js","../node_modules/core-js/internals/array-iteration.js","../node_modules/core-js/internals/typed-array-constructor.js","../node_modules/core-js/modules/es.typed-array.uint8-array.js","../node_modules/core-js/internals/array-copy-within.js","../node_modules/core-js/internals/array-from-constructor-and-list.js","../node_modules/core-js/internals/typed-array-species-constructor.js","../node_modules/core-js/modules/es.typed-array.filter.js","../node_modules/core-js/modules/es.typed-array.iterator.js","../node_modules/core-js/modules/es.typed-array.join.js","../node_modules/core-js/internals/array-method-is-strict.js","../node_modules/core-js/internals/array-last-index-of.js","../node_modules/core-js/modules/es.typed-array.map.js","../node_modules/core-js/internals/array-reduce.js","../node_modules/core-js/modules/es.typed-array.reverse.js","../node_modules/core-js/modules/es.typed-array.set.js","../node_modules/core-js/modules/es.typed-array.slice.js","../node_modules/core-js/internals/array-sort.js","../node_modules/core-js/modules/es.typed-array.sort.js","../node_modules/core-js/modules/es.typed-array.to-locale-string.js","../node_modules/core-js/modules/es.typed-array.to-string.js","../node_modules/core-js/modules/es.array.includes.js","../node_modules/core-js/internals/not-a-regexp.js","../node_modules/core-js/internals/correct-is-regexp-logic.js","../node_modules/core-js/internals/array-method-has-species-support.js","../node_modules/core-js/modules/es.typed-array.uint32-array.js","../node_modules/core-js/modules/es.typed-array.uint16-array.js","../node_modules/core-js/modules/es.regexp.to-string.js","../node_modules/core-js/modules/es.array.sort.js","../node_modules/uzip/UZIP.js","../lib/UPNG.js","../lib/utils.js","../lib/image-compression.js","../node_modules/core-js/modules/es.string.iterator.js","../node_modules/core-js/internals/dom-token-list-prototype.js","../node_modules/core-js/modules/web.dom-collections.iterator.js","../node_modules/core-js/internals/native-url.js","../node_modules/core-js/internals/array-from.js","../node_modules/core-js/internals/string-punycode-to-ascii.js","../node_modules/core-js/modules/web.url-search-params.js","../node_modules/core-js/modules/web.url.js","../node_modules/core-js/internals/array-for-each.js","../node_modules/core-js/modules/web.dom-collections.for-each.js","../node_modules/core-js/internals/object-to-array.js","../node_modules/core-js/modules/es.object.entries.js","../node_modules/core-js/modules/es.string.starts-with.js","../node_modules/core-js/internals/get-substitution.js","../node_modules/core-js/modules/es.string.replace.js","../node_modules/core-js/modules/es.array.concat.js","../lib/web-worker.js","../lib/index.js"],"sourcesContent":["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","module.exports = false;\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","// `isCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument === 'function';\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","module.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","module.exports = {};\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar has = require('../internals/has');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = has(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar has = require('../internals/has');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!has(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (argument) {\n if (typeof argument === 'object' || isCallable(argument)) return argument;\n throw TypeError(\"Can't set \" + String(argument) + ' as a prototype');\n};\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","module.exports = function (it, Constructor, name) {\n if (it instanceof Constructor) return it;\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n};\n","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var aCallable = require('../internals/a-callable');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aCallable(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(iteratorMethod.call(argument));\n throw TypeError(String(argument) + ' is not iterable');\n};\n","var anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = innerResult.call(iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw TypeError(String(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = constructorRegExp.exec;\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(function () { /* empty */ });\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(Object, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a constructor');\n};\n","var anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var argumentsLength = arguments.length;\n var i = 1;\n while (argumentsLength > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (isCallable(fn) ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","module.exports = typeof window == 'object';\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aCallable(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromiseConstructorPrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var classof = require('../internals/classof');\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a number');\n var it = toPrimitive(argument, 'number');\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nexports.UNSUPPORTED_Y = fails(function () {\n var re = $RegExp('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = $RegExp('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('.', 's');\n return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('(?b)', 'g');\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$c') !== 'bc';\n});\n","'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n // eslint-disable-next-line max-statements -- TODO\n patchedExec = function exec(string) {\n var re = this;\n var state = getInternalState(re);\n var str = toString(string);\n var raw = state.raw;\n var result, reCopy, lastIndex, match, i, object, group;\n\n if (raw) {\n raw.lastIndex = re.lastIndex;\n result = patchedExec.call(raw, str);\n re.lastIndex = raw.lastIndex;\n return result;\n }\n\n var groups = state.groups;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = str.slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str.charAt(re.lastIndex - 1) !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (match && groups) {\n match.groups = object = create(null);\n for (i = 0; i < groups.length; i++) {\n group = groups[i];\n object[group[0]] = match[group[1]];\n }\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n redefine(String.prototype, KEY, methods[0]);\n redefine(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var toInteger = require('../internals/to-integer');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.codePointAt` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (isCallable(exec)) {\n var result = exec.call(R, S);\n if (result !== null) anObject(result);\n return result;\n }\n if (classof(R) === 'RegExp') return regexpExec.call(R, S);\n throw TypeError('RegExp#exec called on incompatible receiver');\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = toString(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? splitter.call(separator, O, limit)\n : internalSplit.call(toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n if (res.done) return res.value;\n\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);\n return matcher ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var has = require('../internals/has');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (has(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n redefine(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n redefine(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;\n throw TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n redefine(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n redefine(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","/* eslint-disable no-new -- required for testing */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar FunctionName = require('../internals/function-name');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","var aConstructor = require('../internals/a-constructor');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar bind = require('../internals/function-bind-context');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var C = aConstructor(this);\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, step, iterator, next;\n if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n O = [];\n while (!(step = next.call(iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2], 2);\n }\n length = toLength(O.length);\n result = new (aTypedArrayConstructor(C))(length);\n for (i = 0; length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n};\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_REJECT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isInteger = require('../internals/is-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPropertyKey = require('../internals/to-property-key');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && !isSymbol(key)\n && key in target\n && isInteger(+key)\n && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n key = toPropertyKey(key);\n return isTypedArrayIndex(target, key)\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n key = toPropertyKey(key);\n if (isTypedArrayIndex(target, key)\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor);\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","module.exports = function (Constructor, list) {\n var index = 0;\n var length = list.length;\n var result = new Constructor(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n","var ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\n\n// a part of `TypedArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#typedarray-species-create\nmodule.exports = function (originalArray) {\n return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR]));\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values';\n\nvar typedArrayValues = function values() {\n return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('join', function join(separator) {\n return $join.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (typedArraySpeciesConstructor(O))(length);\n });\n});\n","var aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aCallable(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toOffset = require('../internals/to-offset');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = $slice.call(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","// TODO: use something more complex like timsort?\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n mergeSort(array.slice(0, middle), comparefn),\n mergeSort(array.slice(middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n var result = [];\n\n while (lindex < llength || rindex < rlength) {\n if (lindex < llength && rindex < rlength) {\n result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);\n } else {\n result.push(lindex < llength ? left[lindex++] : right[rindex++]);\n }\n } return result;\n};\n\nmodule.exports = mergeSort;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar toLength = require('../internals/to-length');\nvar internalSort = require('../internals/array-sort');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && Uint16Array.prototype.sort;\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !fails(function () {\n var array = new Uint16Array(2);\n array.sort(null);\n array.sort({});\n});\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n array.sort(function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n var array = this;\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort.call(array, comparefn);\n\n aTypedArray(array);\n var arrayLength = toLength(array.length);\n var items = Array(arrayLength);\n var index;\n\n for (index = 0; index < arrayLength; index++) {\n items[index] = array[index];\n }\n\n items = internalSort(array, getSortCompare(comparefn));\n\n for (index = 0; index < arrayLength; index++) {\n array[index] = items[index];\n }\n\n return array;\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint32', function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint16', function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = $toString(R.source);\n var rf = R.flags;\n var f = $toString(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn);\n\n var items = [];\n var arrayLength = toLength(array.length);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) items.push(array[index]);\n }\n\n items = internalSort(items, getSortCompare(comparefn));\n itemsLength = items.length;\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) delete array[index++];\n\n return array;\n }\n});\n","\r\n\r\nvar UZIP = {};\r\nif(typeof module == \"object\") module.exports = UZIP;\r\n\r\n\r\nUZIP[\"parse\"] = function(buf, onlyNames)\t// ArrayBuffer\r\n{\r\n\tvar rUs = UZIP.bin.readUshort, rUi = UZIP.bin.readUint, o = 0, out = {};\r\n\tvar data = new Uint8Array(buf);\r\n\tvar eocd = data.length-4;\r\n\t\r\n\twhile(rUi(data, eocd)!=0x06054b50) eocd--;\r\n\t\r\n\tvar o = eocd;\r\n\to+=4;\t// sign = 0x06054b50\r\n\to+=4; // disks = 0;\r\n\tvar cnu = rUs(data, o); o+=2;\r\n\tvar cnt = rUs(data, o); o+=2;\r\n\t\t\t\r\n\tvar csize = rUi(data, o); o+=4;\r\n\tvar coffs = rUi(data, o); o+=4;\r\n\t\r\n\to = coffs;\r\n\tfor(var i=0; i8514000) {\r\n\t\t\t//console.log(PUtils.readASCII(buf , 8514500, 500));\r\n\t\t\t//console.log(PUtils.readASCII(nbuf, 8514500, 500));\r\n\t\t}\r\n\t\tfor(var i=0; i>>4);\r\n\t//console.log(CM, CINFO,CMF,FLG);\r\n\treturn UZIP.inflateRaw(new Uint8Array(file.buffer, file.byteOffset+2, file.length-6), buf); \r\n}\r\nUZIP.deflate = function(data, opts/*, buf, off*/) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar off=0, buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tbuf[off]=120; buf[off+1]=156; off+=2;\r\n\toff = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\tvar crc = UZIP.adler(data, 0, data.length);\r\n\tbuf[off+0]=((crc>>>24)&255); \r\n\tbuf[off+1]=((crc>>>16)&255); \r\n\tbuf[off+2]=((crc>>> 8)&255); \r\n\tbuf[off+3]=((crc>>> 0)&255); \t\r\n\treturn new Uint8Array(buf.buffer, 0, off+4);\r\n}\r\nUZIP.deflateRaw = function(data, opts) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tvar off = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\treturn new Uint8Array(buf.buffer, 0, off);\r\n}\r\n\r\n\r\nUZIP.encode = function(obj, noCmpr) {\r\n\tif(noCmpr==null) noCmpr=false;\r\n\tvar tot = 0, wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar zpd = {};\r\n\tfor(var p in obj) { var cpr = !UZIP._noNeed(p) && !noCmpr, buf = obj[p], crc = UZIP.crc.crc(buf,0,buf.length); \r\n\t\tzpd[p] = { cpr:cpr, usize:buf.length, crc:crc, file: (cpr ? UZIP.deflateRaw(buf) : buf) }; }\r\n\t\r\n\tfor(var p in zpd) tot += zpd[p].file.length + 30 + 46 + 2*UZIP.bin.sizeUTF8(p);\r\n\ttot += 22;\r\n\t\r\n\tvar data = new Uint8Array(tot), o = 0;\r\n\tvar fof = []\r\n\t\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 0);\r\n\t}\r\n\tvar i=0, ioff = o;\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 1, fof[i++]);\t\t\r\n\t}\r\n\tvar csize = o-ioff;\r\n\t\r\n\twUi(data, o, 0x06054b50); o+=4;\r\n\to += 4; // disks\r\n\twUs(data, o, i); o += 2;\r\n\twUs(data, o, i); o += 2;\t// number of c d records\r\n\twUi(data, o, csize); o += 4;\r\n\twUi(data, o, ioff ); o += 4;\r\n\to += 2;\r\n\treturn data.buffer;\r\n}\r\n// no need to compress .PNG, .ZIP, .JPEG ....\r\nUZIP._noNeed = function(fn) { var ext = fn.split(\".\").pop().toLowerCase(); return \"png,jpg,jpeg,zip\".indexOf(ext)!=-1; }\r\n\r\nUZIP._writeHeader = function(data, o, p, obj, t, roff)\r\n{\r\n\tvar wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar file = obj.file;\r\n\t\r\n\twUi(data, o, t==0 ? 0x04034b50 : 0x02014b50); o+=4; // sign\r\n\tif(t==1) o+=2; // ver made by\r\n\twUs(data, o, 20); o+=2;\t// ver\r\n\twUs(data, o, 0); o+=2; // gflip\r\n\twUs(data, o, obj.cpr?8:0); o+=2;\t// cmpr\r\n\t\t\r\n\twUi(data, o, 0); o+=4;\t// time\t\t\r\n\twUi(data, o, obj.crc); o+=4;\t// crc32\r\n\twUi(data, o, file.length); o+=4;\t// csize\r\n\twUi(data, o, obj.usize); o+=4;\t// usize\r\n\t\t\r\n\twUs(data, o, UZIP.bin.sizeUTF8(p)); o+=2;\t// nlen\r\n\twUs(data, o, 0); o+=2;\t// elen\r\n\t\r\n\tif(t==1) {\r\n\t\to += 2; // comment length\r\n\t\to += 2; // disk number\r\n\t\to += 6; // attributes\r\n\t\twUi(data, o, roff); o+=4;\t// usize\r\n\t}\r\n\tvar nlen = UZIP.bin.writeUTF8(data, o, p); o+= nlen;\t\r\n\tif(t==0) { data.set(file, o); o += file.length; }\r\n\treturn o;\r\n}\r\n\r\n\r\n\r\n\r\n\r\nUZIP.crc = {\r\n\ttable : ( function() {\r\n\t var tab = new Uint32Array(256);\r\n\t for (var n=0; n<256; n++) {\r\n\t\t\tvar c = n;\r\n\t\t\tfor (var k=0; k<8; k++) {\r\n\t\t\t\tif (c & 1) c = 0xedb88320 ^ (c >>> 1);\r\n\t\t\t\telse c = c >>> 1;\r\n\t\t\t}\r\n\t\t\ttab[n] = c; } \r\n\t\treturn tab; })(),\r\n\tupdate : function(c, buf, off, len) {\r\n\t\tfor (var i=0; i>> 8);\r\n\t\treturn c;\r\n\t},\r\n\tcrc : function(b,o,l) { return UZIP.crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\r\n}\r\nUZIP.adler = function(data,o,len) {\r\n\tvar a = 1, b = 0;\r\n\tvar off = o, end=o+len;\r\n\twhile(off>8)&255; },\r\n\treadUint : function(buff,p) { return (buff[p+3]*(256*256*256)) + ((buff[p+2]<<16) | (buff[p+1]<< 8) | buff[p]); },\r\n\twriteUint : function(buff,p,n){ buff[p]=n&255; buff[p+1]=(n>>8)&255; buff[p+2]=(n>>16)&255; buff[p+3]=(n>>24)&255; },\r\n\treadASCII : function(buff,p,l){ var s = \"\"; for(var i=0; i> 6)); buff[p+i+1] = (128|((code>> 0)&63)); i+=2; }\r\n\t\t\telse if((code&(0xffffffff-(1<<16)+1))==0) { buff[p+i] = (224|(code>>12)); buff[p+i+1] = (128|((code>> 6)&63)); buff[p+i+2] = (128|((code>>0)&63)); i+=3; }\r\n\t\t\telse if((code&(0xffffffff-(1<<21)+1))==0) { buff[p+i] = (240|(code>>18)); buff[p+i+1] = (128|((code>>12)&63)); buff[p+i+2] = (128|((code>>6)&63)); buff[p+i+3] = (128|((code>>0)&63)); i+=4; }\r\n\t\t\telse throw \"e\";\r\n\t\t}\r\n\t\treturn i;\r\n\t},\r\n\tsizeUTF8 : function(str) {\r\n\t\tvar strl = str.length, i=0;\r\n\t\tfor(var ci=0; ci>>3;\r\n\t}\r\n\r\n\tvar lits = U.lits, strt=U.strt, prev=U.prev, li=0, lc=0, bs=0, ebits=0, c=0, nc=0; // last_item, literal_count, block_start\r\n\tif(dlen>2) { nc=UZIP.F._hash(data,0); strt[nc]=0; }\r\n\tvar nmch=0,nmci=0;\r\n\t\r\n\tfor(i=0; i14000 || lc>26697) && (dlen-i)>100) {\r\n\t\t\t\tif(cvrd>>16)>>16)>(mch>>>16)) mch=0;\r\n\t\t\t}//*/\r\n\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\tif(mch!=0) { \r\n\t\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\t\tvar lgi = goodIndex(len, U.of0); U.lhst[257+lgi]++; \r\n\t\t\t\tvar dgi = goodIndex(dst, U.df0); U.dhst[ dgi]++; ebits += U.exb[lgi] + U.dxb[dgi]; \r\n\t\t\t\tlits[li] = (len<<23)|(i-cvrd); lits[li+1] = (dst<<16)|(lgi<<8)|dgi; li+=2;\r\n\t\t\t\tcvrd = i + len; \r\n\t\t\t}\r\n\t\t\telse {\tU.lhst[data[i]]++; }\r\n\t\t\tlc++;\r\n\t\t}\r\n\t}\r\n\tif(bs!=i || data.length==0) {\r\n\t\tif(cvrd>>3;\r\n}\r\nUZIP.F._bestMatch = function(data, i, prev, c, nice, chain) {\r\n\tvar ci = (i&0x7fff), pi=prev[ci]; \r\n\t//console.log(\"----\", i);\r\n\tvar dif = ((ci-pi + (1<<15)) & 0x7fff); if(pi==ci || c!=UZIP.F._hash(data,i-dif)) return 0;\r\n\tvar tl=0, td=0; // top length, top distance\r\n\tvar dlim = Math.min(0x7fff, i);\r\n\twhile(dif<=dlim && --chain!=0 && pi!=ci /*&& c==UZIP.F._hash(data,i-dif)*/) {\r\n\t\tif(tl==0 || (data[i+tl]==data[i+tl-dif])) {\r\n\t\t\tvar cl = UZIP.F._howLong(data, i, dif);\r\n\t\t\tif(cl>tl) { \r\n\t\t\t\ttl=cl; td=dif; if(tl>=nice) break; //* \r\n\t\t\t\tif(dif+2maxd) { maxd=curd; pi = ei; }\r\n\t\t\t\t} //*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tci=pi; pi = prev[ci];\r\n\t\tdif += ((ci-pi + (1<<15)) & 0x7fff);\r\n\t}\r\n\treturn (tl<<16)|td;\r\n}\r\nUZIP.F._howLong = function(data, i, dif) {\r\n\tif(data[i]!=data[i-dif] || data[i+1]!=data[i+1-dif] || data[i+2]!=data[i+2-dif]) return 0;\r\n\tvar oi=i, l = Math.min(data.length, i+258); i+=3;\r\n\t//while(i+4>>23), end = off+(qb&((1<<23)-1));\r\n\t\t\twhile(off>16), lgi=(qc>>8)&255, dgi=(qc&255);\r\n\t\t\t\tpos = UZIP.F._writeLit(257+lgi, ltree, out, pos);\r\n\t\t\t\tputsE(out, pos, len-U.of0[lgi]); pos+=U.exb[lgi];\r\n\t\t\t\t\r\n\t\t\t\tpos = UZIP.F._writeLit(dgi, dtree, out, pos);\r\n\t\t\t\tputsF(out, pos, dst-U.df0[dgi]); pos+=U.dxb[dgi]; off+=len;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpos = UZIP.F._writeLit(256, ltree, out, pos);\r\n\t}\r\n\t//console.log(pos-opos, fxdSize, dynSize, cstSize);\r\n\treturn pos;\r\n}\r\nUZIP.F._copyExact = function(data,off,len,out,pos) {\r\n\tvar p8 = (pos>>>3);\r\n\tout[p8]=(len); out[p8+1]=(len>>>8); out[p8+2]=255-out[p8]; out[p8+3]=255-out[p8+1]; p8+=4;\r\n\tout.set(new Uint8Array(data.buffer, off, len), p8);\r\n\t//for(var i=0; i4 && U.itree[(U.ordr[numh-1]<<1)+1]==0) numh--;\r\n\treturn [ML, MD, MH, numl, numd, numh, lset, dset];\r\n}\r\nUZIP.F.getSecond= function(a) { var b=[]; for(var i=0; i>1)+\",\"; return b; }\r\nUZIP.F.contSize = function(tree, hst) { var s=0; for(var i=0; i15) { UZIP.F._putsE(out, pos, rst, rsl); pos+=rsl; }\r\n\t}\r\n\treturn pos;\r\n}\r\nUZIP.F._lenCodes = function(tree, set) {\r\n\tvar len=tree.length; while(len!=2 && tree[len-1]==0) len-=2; // when no distances, keep one code with length 0\r\n\tfor(var i=0; i>>1, 138);\r\n\t\t\tif(zc<11) set.push(17, zc-3);\r\n\t\t\telse set.push(18, zc-11);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse if(l==prv && nxt==l && nnxt==l) {\r\n\t\t\tvar lz = i+5;\r\n\t\t\twhile(lz+2>>1, 6);\r\n\t\t\tset.push(16, zc-3);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse set.push(l, 0);\r\n\t}\r\n\treturn len>>>1;\r\n}\r\nUZIP.F._hufTree = function(hst, tree, MAXL) {\r\n\tvar list=[], hl = hst.length, tl=tree.length, i=0;\r\n\tfor(i=0; iMAXL) { UZIP.F.restrictDepth(l2, MAXL, maxl); maxl = MAXL; }\r\n\tfor(i=0; iMD) { var od=dps[i].d; dps[i].d=MD; dbt+=bCost-(1<<(maxl-od)); } else break;\r\n\tdbt = dbt>>>(maxl-MD);\r\n\twhile(dbt>0) { var od=dps[i].d; if(od=0; i--) if(dps[i].d==MD && dbt<0) { dps[i].d--; dbt++; } if(dbt!=0) console.log(\"debt left\");\r\n}\r\n\r\nUZIP.F._goodIndex = function(v, arr) {\r\n\tvar i=0; if(arr[i|16]<=v) i|=16; if(arr[i|8]<=v) i|=8; if(arr[i|4]<=v) i|=4; if(arr[i|2]<=v) i|=2; if(arr[i|1]<=v) i|=1; return i;\r\n}\r\nUZIP.F._writeLit = function(ch, ltree, out, pos) {\r\n\tUZIP.F._putsF(out, pos, ltree[ch<<1]);\r\n\treturn pos+ltree[(ch<<1)+1];\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nUZIP.F.inflate = function(data, buf) {\r\n\tvar u8=Uint8Array;\r\n\tif(data[0]==3 && data[1]==0) return (buf ? buf : new u8(0));\r\n\tvar F=UZIP.F, bitsF = F._bitsF, bitsE = F._bitsE, decodeTiny = F._decodeTiny, makeCodes = F.makeCodes, codes2map=F.codes2map, get17 = F._get17;\r\n\tvar U = F.U;\r\n\t\r\n\tvar noBuf = (buf==null);\r\n\tif(noBuf) buf = new u8((data.length>>>2)<<3);\r\n\t\r\n\tvar BFINAL=0, BTYPE=0, HLIT=0, HDIST=0, HCLEN=0, ML=0, MD=0; \t\r\n\tvar off = 0, pos = 0;\r\n\tvar lmap, dmap;\r\n\t\r\n\twhile(BFINAL==0) {\t\t\r\n\t\tBFINAL = bitsF(data, pos , 1);\r\n\t\tBTYPE = bitsF(data, pos+1, 2); pos+=3;\r\n\t\t//console.log(BFINAL, BTYPE);\r\n\t\t\r\n\t\tif(BTYPE==0) {\r\n\t\t\tif((pos&7)!=0) pos+=8-(pos&7);\r\n\t\t\tvar p8 = (pos>>>3)+4, len = data[p8-4]|(data[p8-3]<<8); //console.log(len);//bitsF(data, pos, 16), \r\n\t\t\tif(noBuf) buf=UZIP.F._check(buf, off+len);\r\n\t\t\tbuf.set(new u8(data.buffer, data.byteOffset+p8, len), off);\r\n\t\t\t//for(var i=0; itl)tl=l; } pos+=3*HCLEN; //console.log(itree);\r\n\t\t\tmakeCodes(U.itree, tl);\r\n\t\t\tcodes2map(U.itree, tl, U.imap);\r\n\t\t\t\r\n\t\t\tlmap = U.lmap; dmap = U.dmap;\r\n\t\t\t\r\n\t\t\tpos = decodeTiny(U.imap, (1<>>24))-1; pos+=(ml&0xffffff);\r\n\t\t\tmakeCodes(U.ltree, mx0);\r\n\t\t\tcodes2map(U.ltree, mx0, lmap);\r\n\t\t\t\r\n\t\t\t//var md = decodeTiny(U.imap, (1<>>24))-1; pos+=(md&0xffffff);\r\n\t\t\tmakeCodes(U.dtree, mx1);\r\n\t\t\tcodes2map(U.dtree, mx1, dmap);\r\n\t\t}\r\n\t\t//var ooff=off, opos=pos;\r\n\t\twhile(true) {\r\n\t\t\tvar code = lmap[get17(data, pos) & ML]; pos += code&15;\r\n\t\t\tvar lit = code>>>4; //U.lhst[lit]++; \r\n\t\t\tif((lit>>>8)==0) { buf[off++] = lit; }\r\n\t\t\telse if(lit==256) { break; }\r\n\t\t\telse {\r\n\t\t\t\tvar end = off+lit-254;\r\n\t\t\t\tif(lit>264) { var ebs = U.ldef[lit-257]; end = off + (ebs>>>3) + bitsE(data, pos, ebs&7); pos += ebs&7; }\r\n\t\t\t\t//UZIP.F.dst[end-off]++;\r\n\t\t\t\t\r\n\t\t\t\tvar dcode = dmap[get17(data, pos) & MD]; pos += dcode&15;\r\n\t\t\t\tvar dlit = dcode>>>4;\r\n\t\t\t\tvar dbs = U.ddef[dlit], dst = (dbs>>>4) + bitsF(data, pos, dbs&15); pos += dbs&15;\r\n\t\t\t\t\r\n\t\t\t\t//var o0 = off-dst, stp = Math.min(end-off, dst);\r\n\t\t\t\t//if(stp>20) while(off>>3);\r\n\t}\r\n\t//console.log(UZIP.F.dst);\r\n\t//console.log(tlen, dlen, off-tlen+tcnt);\r\n\treturn buf.length==off ? buf : buf.slice(0,off);\r\n}\r\nUZIP.F._check=function(buf, len) {\r\n\tvar bl=buf.length; if(len<=bl) return buf;\r\n\tvar nbuf = new Uint8Array(Math.max(bl<<1,len)); nbuf.set(buf,0);\r\n\t//for(var i=0; i>>4; \r\n\t\tif(lit<=15) { tree[i]=lit; i++; }\r\n\t\telse {\r\n\t\t\tvar ll = 0, n = 0;\r\n\t\t\tif(lit==16) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 2)); pos += 2; ll = tree[i-1];\r\n\t\t\t}\r\n\t\t\telse if(lit==17) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 3)); pos += 3;\r\n\t\t\t}\r\n\t\t\telse if(lit==18) {\r\n\t\t\t\tn = (11 + bitsE(data, pos, 7)); pos += 7;\r\n\t\t\t}\r\n\t\t\tvar ni = i+n;\r\n\t\t\twhile(i>>1;\r\n\twhile(imx)mx=v; i++; }\r\n\twhile(i>1;\r\n\t\tvar cl = tree[i+1], val = (lit<<4)|cl; // : (0x8000 | (U.of0[lit-257]<<7) | (U.exb[lit-257]<<4) | cl);\r\n\t\tvar rest = (MAX_BITS-cl), i0 = tree[i]<>>(15-MAX_BITS);\r\n\t\twhile(i0!=i1) {\r\n\t\t\tvar p0 = r15[i0]>>>(15-MAX_BITS);\r\n\t\t\tmap[p0]=val; i0++;\r\n\t\t}\r\n\t}\r\n}\r\nUZIP.F.revCodes = function(tree, MAX_BITS) {\r\n\tvar r15 = UZIP.F.U.rev15, imb = 15-MAX_BITS;\r\n\tfor(var i=0; i>>imb; }\r\n}\r\n\r\n// used only in deflate\r\nUZIP.F._putsE= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); }\r\nUZIP.F._putsF= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); dt[o+2]|=(val>>>16); }\r\n\r\nUZIP.F._bitsE= function(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) )>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16))>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8))>>>(pos&7))&511;\r\n} */\r\nUZIP.F._get17= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) )>>>(pos&7);\r\n}\r\nUZIP.F._get25= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) | (dt[(pos>>>3)+3]<<24) )>>>(pos&7);\r\n}\r\nUZIP.F.U = function(){\r\n\tvar u16=Uint16Array, u32=Uint32Array;\r\n\treturn {\r\n\t\tnext_code : new u16(16),\r\n\t\tbl_count : new u16(16),\r\n\t\tordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\r\n\t\tof0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\r\n\t\texb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\r\n\t\tldef : new u16(32),\r\n\t\tdf0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\r\n\t\tdxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\r\n\t\tddef : new u32(32),\r\n\t\tflmap: new u16( 512), fltree: [],\r\n\t\tfdmap: new u16( 32), fdtree: [],\r\n\t\tlmap : new u16(32768), ltree : [], ttree:[],\r\n\t\tdmap : new u16(32768), dtree : [],\r\n\t\timap : new u16( 512), itree : [],\r\n\t\t//rev9 : new u16( 512)\r\n\t\trev15: new u16(1<<15),\r\n\t\tlhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\r\n\t\tlits : new u32(15000),\r\n\t\tstrt : new u16(1<<16),\r\n\t\tprev : new u16(1<<15)\r\n\t}; \r\n} ();\r\n\r\n(function(){\t\r\n\tvar U = UZIP.F.U;\r\n\tvar len = 1<<15;\r\n\tfor(var i=0; i>> 1) | ((x & 0x55555555) << 1));\r\n\t\tx = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\r\n\t\tx = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\r\n\t\tx = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\r\n\t\tU.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\r\n\t}\r\n\t\r\n\tfunction pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\r\n\t\r\n\tfor(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\r\n\t\r\n\tpushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\r\n\t/*\r\n\tvar i = 0;\r\n\tfor(; i<=143; i++) U.fltree.push(0,8);\r\n\tfor(; i<=255; i++) U.fltree.push(0,9);\r\n\tfor(; i<=279; i++) U.fltree.push(0,7);\r\n\tfor(; i<=287; i++) U.fltree.push(0,8);\r\n\t*/\r\n\tUZIP.F.makeCodes(U.fltree, 9);\r\n\tUZIP.F.codes2map(U.fltree, 9, U.flmap);\r\n\tUZIP.F.revCodes (U.fltree, 9)\r\n\t\r\n\tpushV(U.fdtree,32,5);\r\n\t//for(i=0;i<32; i++) U.fdtree.push(0,5);\r\n\tUZIP.F.makeCodes(U.fdtree, 5);\r\n\tUZIP.F.codes2map(U.fdtree, 5, U.fdmap);\r\n\tUZIP.F.revCodes (U.fdtree, 5)\r\n\t\r\n\tpushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\r\n\t/*\r\n\tfor(var i=0; i< 19; i++) U.itree.push(0,0);\r\n\tfor(var i=0; i<286; i++) U.ltree.push(0,0);\r\n\tfor(var i=0; i< 30; i++) U.dtree.push(0,0);\r\n\tfor(var i=0; i<320; i++) U.ttree.push(0,0);\r\n\t*/\r\n})()\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","// https://github.com/photopea/UPNG.js/blob/c976240e62b0497167f8aafabd7889625f8b2016/UPNG.js\n\n// import * as pako from 'pako'\nimport * as UZIP from 'uzip';\n\nconst UPNG = {};\n\nUPNG.toRGBA8 = function (out) {\n const w = out.width; const\n h = out.height;\n if (out.tabs.acTL == null) return [UPNG.toRGBA8.decodeImage(out.data, w, h, out).buffer];\n\n const frms = [];\n if (out.frames[0].data == null) out.frames[0].data = out.data;\n\n const len = w * h * 4; const img = new Uint8Array(len); const empty = new Uint8Array(len); const\n prev = new Uint8Array(len);\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i];\n const fx = frm.rect.x; const fy = frm.rect.y; const fw = frm.rect.width; const\n fh = frm.rect.height;\n const fdata = UPNG.toRGBA8.decodeImage(frm.data, fw, fh, out);\n\n if (i != 0) for (var j = 0; j < len; j++) prev[j] = img[j];\n\n if (frm.blend == 0) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.blend == 1) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 1);\n\n frms.push(img.buffer.slice(0));\n\n if (frm.dispose == 0) {} else if (frm.dispose == 1) UPNG._copyTile(empty, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.dispose == 2) for (var j = 0; j < len; j++) img[j] = prev[j];\n }\n return frms;\n};\nUPNG.toRGBA8.decodeImage = function (data, w, h, out) {\n const area = w * h; const\n bpp = UPNG.decode._getBPP(out);\n const bpl = Math.ceil(w * bpp / 8);\t// bytes per line\n\n const bf = new Uint8Array(area * 4); const\n bf32 = new Uint32Array(bf.buffer);\n const { ctype } = out;\n const { depth } = out;\n const rs = UPNG._bin.readUshort;\n\n // console.log(ctype, depth);\n const time = Date.now();\n\n if (ctype == 6) { // RGB + alpha\n const qarea = area << 2;\n if (depth == 8) for (var i = 0; i < qarea; i += 4) { bf[i] = data[i]; bf[i + 1] = data[i + 1]; bf[i + 2] = data[i + 2]; bf[i + 3] = data[i + 3]; }\n if (depth == 16) for (var i = 0; i < qarea; i++) { bf[i] = data[i << 1]; }\n } else if (ctype == 2) {\t// RGB\n const ts = out.tabs.tRNS;\n if (ts == null) {\n if (depth == 8) for (var i = 0; i < area; i++) { var ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti]; }\n if (depth == 16) for (var i = 0; i < area; i++) { var ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti]; }\n } else {\n var tr = ts[0]; const tg = ts[1]; const\n tb = ts[2];\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti];\n if (data[ti] == tr && data[ti + 1] == tg && data[ti + 2] == tb) bf[qi + 3] = 0;\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti];\n if (rs(data, ti) == tr && rs(data, ti + 2) == tg && rs(data, ti + 4) == tb) bf[qi + 3] = 0;\n }\n }\n }\n } else if (ctype == 3) {\t// palette\n const p = out.tabs.PLTE;\n const ap = out.tabs.tRNS;\n const tl = ap ? ap.length : 0;\n // console.log(p, ap);\n if (depth == 1) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 3)] >> (7 - ((i & 7) << 0))) & 1); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 2) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 2)] >> (6 - ((i & 3) << 1))) & 3); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 4) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 1)] >> (4 - ((i & 1) << 2))) & 15); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var j = data[i]; var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n } else if (ctype == 4) {\t// gray + alpha\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 1; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 1];\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 2; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 2];\n }\n }\n } else if (ctype == 0) {\t// gray\n var tr = out.tabs.tRNS ? out.tabs.tRNS : -1;\n for (var y = 0; y < h; y++) {\n const off = y * bpl; const\n to = y * w;\n if (depth == 1) {\n for (var x = 0; x < w; x++) {\n var gr = 255 * ((data[off + (x >>> 3)] >>> (7 - ((x & 7)))) & 1); var\n al = (gr == tr * 255) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 2) {\n for (var x = 0; x < w; x++) {\n var gr = 85 * ((data[off + (x >>> 2)] >>> (6 - ((x & 3) << 1))) & 3); var\n al = (gr == tr * 85) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 4) {\n for (var x = 0; x < w; x++) {\n var gr = 17 * ((data[off + (x >>> 1)] >>> (4 - ((x & 1) << 2))) & 15); var\n al = (gr == tr * 17) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 8) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + x]; var\n al = (gr == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 16) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + (x << 1)]; var\n al = (rs(data, off + (x << i)) == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n }\n }\n }\n // console.log(Date.now()-time);\n return bf;\n};\n\nUPNG.decode = function (buff) {\n const data = new Uint8Array(buff); let offset = 8; const bin = UPNG._bin; const rUs = bin.readUshort; const\n rUi = bin.readUint;\n const out = { tabs: {}, frames: [] };\n const dd = new Uint8Array(data.length); let\n doff = 0;\t // put all IDAT data into it\n let fd; let\n foff = 0;\t// frames\n\n const mgck = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) if (data[i] != mgck[i]) throw 'The input is not a PNG file!';\n\n while (offset < data.length) {\n const len = bin.readUint(data, offset); offset += 4;\n const type = bin.readASCII(data, offset, 4); offset += 4;\n // console.log(type,len);\n\n if (type == 'IHDR') { UPNG.decode._IHDR(data, offset, out); } else if (type == 'CgBI') { out.tabs[type] = data.slice(offset, offset + 4); } else if (type == 'IDAT') {\n for (var i = 0; i < len; i++) dd[doff + i] = data[offset + i];\n doff += len;\n } else if (type == 'acTL') {\n out.tabs[type] = { num_frames: rUi(data, offset), num_plays: rUi(data, offset + 4) };\n fd = new Uint8Array(data.length);\n } else if (type == 'fcTL') {\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n const rct = {\n x: rUi(data, offset + 12), y: rUi(data, offset + 16), width: rUi(data, offset + 4), height: rUi(data, offset + 8),\n };\n let del = rUs(data, offset + 22); del = rUs(data, offset + 20) / (del == 0 ? 100 : del);\n const frm = {\n rect: rct, delay: Math.round(del * 1000), dispose: data[offset + 24], blend: data[offset + 25],\n };\n // console.log(frm);\n out.frames.push(frm);\n } else if (type == 'fdAT') {\n for (var i = 0; i < len - 4; i++) fd[foff + i] = data[offset + i + 4];\n foff += len - 4;\n } else if (type == 'pHYs') {\n out.tabs[type] = [bin.readUint(data, offset), bin.readUint(data, offset + 4), data[offset + 8]];\n } else if (type == 'cHRM') {\n out.tabs[type] = [];\n for (var i = 0; i < 8; i++) out.tabs[type].push(bin.readUint(data, offset + i * 4));\n } else if (type == 'tEXt' || type == 'zTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = bin.nextZero(data, offset);\n var keyw = bin.readASCII(data, offset, nz - offset);\n var text; var\n tl = offset + len - nz - 1;\n if (type == 'tEXt') text = bin.readASCII(data, nz + 1, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(nz + 2, nz + 2 + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'iTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = 0; let\n off = offset;\n nz = bin.nextZero(data, off);\n var keyw = bin.readASCII(data, off, nz - off); off = nz + 1;\n const cflag = data[off]; const\n cmeth = data[off + 1]; off += 2;\n nz = bin.nextZero(data, off);\n const ltag = bin.readASCII(data, off, nz - off); off = nz + 1;\n nz = bin.nextZero(data, off);\n const tkeyw = bin.readUTF8(data, off, nz - off); off = nz + 1;\n var text; var\n tl = len - (off - offset);\n if (cflag == 0) text = bin.readUTF8(data, off, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(off, off + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'PLTE') {\n out.tabs[type] = bin.readBytes(data, offset, len);\n } else if (type == 'hIST') {\n const pl = out.tabs.PLTE.length / 3;\n out.tabs[type] = []; for (var i = 0; i < pl; i++) out.tabs[type].push(rUs(data, offset + i * 2));\n } else if (type == 'tRNS') {\n if (out.ctype == 3) out.tabs[type] = bin.readBytes(data, offset, len);\n else if (out.ctype == 0) out.tabs[type] = rUs(data, offset);\n else if (out.ctype == 2) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n // else console.log(\"tRNS for unsupported color type\",out.ctype, len);\n } else if (type == 'gAMA') out.tabs[type] = bin.readUint(data, offset) / 100000;\n else if (type == 'sRGB') out.tabs[type] = data[offset];\n else if (type == 'bKGD') {\n if (out.ctype == 0 || out.ctype == 4) out.tabs[type] = [rUs(data, offset)];\n else if (out.ctype == 2 || out.ctype == 6) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n else if (out.ctype == 3) out.tabs[type] = data[offset];\n } else if (type == 'IEND') {\n break;\n }\n // else { log(\"unknown chunk type\", type, len); }\n offset += len;\n const crc = bin.readUint(data, offset); offset += 4;\n }\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n out.data = UPNG.decode._decompress(out, dd, out.width, out.height);\n\n delete out.compress; delete out.interlace; delete out.filter;\n return out;\n};\n\nUPNG.decode._decompress = function (out, dd, w, h) {\n var time = Date.now();\n const bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n buff = new Uint8Array((bpl + 1 + out.interlace) * h);\n if (out.tabs.CgBI) dd = UPNG.inflateRaw(dd, buff);\n else dd = UPNG.decode._inflate(dd, buff);\n // console.log(dd.length, buff.length);\n // console.log(Date.now()-time);\n\n var time = Date.now();\n if (out.interlace == 0) dd = UPNG.decode._filterZero(dd, out, 0, w, h);\n else if (out.interlace == 1) dd = UPNG.decode._readInterlace(dd, out);\n // console.log(Date.now()-time);\n return dd;\n};\n\nUPNG.decode._inflate = function (data, buff) { const out = UPNG.inflateRaw(new Uint8Array(data.buffer, 2, data.length - 6), buff); return out; };\nUPNG.inflateRaw = (function () {\n const H = {}; H.H = {}; H.H.N = function (N, W) {\n const R = Uint8Array; let i = 0; let m = 0; let J = 0; let h = 0; let Q = 0; let X = 0; let u = 0; let w = 0; let d = 0; let v; let C;\n if (N[0] == 3 && N[1] == 0) return W || new R(0); const V = H.H; const n = V.b; const A = V.e; const l = V.R; const M = V.n; const I = V.A; const e = V.Z; const b = V.m; const Z = W == null;\n if (Z)W = new R(N.length >>> 2 << 5); while (i == 0) {\n i = n(N, d, 1); m = n(N, d + 1, 2); d += 3; if (m == 0) {\n if ((d & 7) != 0)d += 8 - (d & 7);\n const D = (d >>> 3) + 4; const q = N[D - 4] | N[D - 3] << 8; if (Z)W = H.H.W(W, w + q); W.set(new R(N.buffer, N.byteOffset + D, q), w); d = D + q << 3;\n w += q; continue;\n } if (Z)W = H.H.W(W, w + (1 << 17)); if (m == 1) { v = b.J; C = b.h; X = (1 << 9) - 1; u = (1 << 5) - 1; } if (m == 2) {\n J = A(N, d, 5) + 257;\n h = A(N, d + 5, 5) + 1; Q = A(N, d + 10, 4) + 4; d += 14; const E = d; let j = 1; for (var c = 0; c < 38; c += 2) { b.Q[c] = 0; b.Q[c + 1] = 0; } for (var c = 0;\n c < Q; c++) { const K = A(N, d + c * 3, 3); b.Q[(b.X[c] << 1) + 1] = K; if (K > j)j = K; }d += 3 * Q; M(b.Q, j); I(b.Q, j, b.u); v = b.w; C = b.d;\n d = l(b.u, (1 << j) - 1, J + h, N, d, b.v); const r = V.V(b.v, 0, J, b.C); X = (1 << r) - 1; const S = V.V(b.v, J, h, b.D); u = (1 << S) - 1; M(b.C, r);\n I(b.C, r, v); M(b.D, S); I(b.D, S, C);\n } while (!0) {\n const T = v[e(N, d) & X]; d += T & 15; const p = T >>> 4; if (p >>> 8 == 0) { W[w++] = p; } else if (p == 256) { break; } else {\n let z = w + p - 254;\n if (p > 264) { const _ = b.q[p - 257]; z = w + (_ >>> 3) + A(N, d, _ & 7); d += _ & 7; } const $ = C[e(N, d) & u]; d += $ & 15; const s = $ >>> 4; const Y = b.c[s]; const a = (Y >>> 4) + n(N, d, Y & 15);\n d += Y & 15; while (w < z) { W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; }w = z;\n }\n }\n } return W.length == w ? W : W.slice(0, w);\n };\n H.H.W = function (N, W) { const R = N.length; if (W <= R) return N; const V = new Uint8Array(R << 1); V.set(N, 0); return V; };\n H.H.R = function (N, W, R, V, n, A) {\n const l = H.H.e; const M = H.H.Z; let I = 0; while (I < R) {\n const e = N[M(V, n) & W]; n += e & 15; const b = e >>> 4;\n if (b <= 15) { A[I] = b; I++; } else {\n let Z = 0; let m = 0; if (b == 16) { m = 3 + l(V, n, 2); n += 2; Z = A[I - 1]; } else if (b == 17) {\n m = 3 + l(V, n, 3);\n n += 3;\n } else if (b == 18) { m = 11 + l(V, n, 7); n += 7; } const J = I + m; while (I < J) { A[I] = Z; I++; }\n }\n } return n;\n }; H.H.V = function (N, W, R, V) {\n let n = 0; let A = 0; const l = V.length >>> 1;\n while (A < R) { const M = N[A + W]; V[A << 1] = 0; V[(A << 1) + 1] = M; if (M > n)n = M; A++; } while (A < l) { V[A << 1] = 0; V[(A << 1) + 1] = 0; A++; } return n;\n };\n H.H.n = function (N, W) {\n const R = H.H.m; const V = N.length; let n; let A; let l; var M; let I; const e = R.j; for (var M = 0; M <= W; M++)e[M] = 0; for (M = 1; M < V; M += 2)e[N[M]]++;\n const b = R.K; n = 0; e[0] = 0; for (A = 1; A <= W; A++) { n = n + e[A - 1] << 1; b[A] = n; } for (l = 0; l < V; l += 2) {\n I = N[l + 1]; if (I != 0) {\n N[l] = b[I];\n b[I]++;\n }\n }\n }; H.H.A = function (N, W, R) {\n const V = N.length; const n = H.H.m; const A = n.r; for (let l = 0; l < V; l += 2) {\n if (N[l + 1] != 0) {\n const M = l >> 1; const I = N[l + 1]; const e = M << 4 | I; const b = W - I; let Z = N[l] << b; const m = Z + (1 << b);\n while (Z != m) { const J = A[Z] >>> 15 - W; R[J] = e; Z++; }\n }\n }\n }; H.H.l = function (N, W) {\n const R = H.H.m.r; const V = 15 - W; for (let n = 0; n < N.length;\n n += 2) { const A = N[n] << W - N[n + 1]; N[n] = R[A] >>> V; }\n }; H.H.M = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; };\n H.H.I = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; N[V + 2] |= R >>> 16; }; H.H.e = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8) >>> (W & 7) & (1 << R) - 1; };\n H.H.b = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7) & (1 << R) - 1; }; H.H.Z = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7); };\n H.H.i = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16 | N[(W >>> 3) + 3] << 24) >>> (W & 7); }; H.H.m = (function () {\n const N = Uint16Array; const W = Uint32Array;\n return {\n K: new N(16), j: new N(16), X: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], S: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], T: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], q: new N(32), p: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], z: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], c: new W(32), J: new N(512), _: [], h: new N(32), $: [], w: new N(32768), C: [], v: [], d: new N(32768), D: [], u: new N(512), Q: [], r: new N(1 << 15), s: new W(286), Y: new W(30), a: new W(19), t: new W(15e3), k: new N(1 << 16), g: new N(1 << 15),\n };\n }());\n (function () {\n const N = H.H.m; const W = 1 << 15; for (var R = 0; R < W; R++) {\n let V = R; V = (V & 2863311530) >>> 1 | (V & 1431655765) << 1;\n V = (V & 3435973836) >>> 2 | (V & 858993459) << 2; V = (V & 4042322160) >>> 4 | (V & 252645135) << 4; V = (V & 4278255360) >>> 8 | (V & 16711935) << 8;\n N.r[R] = (V >>> 16 | V << 16) >>> 17;\n } function n(A, l, M) { while (l-- != 0)A.push(0, M); } for (var R = 0; R < 32; R++) {\n N.q[R] = N.S[R] << 3 | N.T[R];\n N.c[R] = N.p[R] << 4 | N.z[R];\n }n(N._, 144, 8); n(N._, 255 - 143, 9); n(N._, 279 - 255, 7); n(N._, 287 - 279, 8); H.H.n(N._, 9);\n H.H.A(N._, 9, N.J); H.H.l(N._, 9); n(N.$, 32, 5); H.H.n(N.$, 5); H.H.A(N.$, 5, N.h); H.H.l(N.$, 5); n(N.Q, 19, 0); n(N.C, 286, 0);\n n(N.D, 30, 0); n(N.v, 320, 0);\n }()); return H.H.N;\n}());\n\nUPNG.decode._readInterlace = function (data, out) {\n const w = out.width; const\n h = out.height;\n const bpp = UPNG.decode._getBPP(out); const cbpp = bpp >> 3; const\n bpl = Math.ceil(w * bpp / 8);\n const img = new Uint8Array(h * bpl);\n let di = 0;\n\n const starting_row = [0, 0, 4, 0, 2, 0, 1];\n const starting_col = [0, 4, 0, 2, 0, 1, 0];\n const row_increment = [8, 8, 8, 4, 4, 2, 2];\n const col_increment = [8, 8, 4, 4, 2, 2, 1];\n\n let pass = 0;\n while (pass < 7) {\n const ri = row_increment[pass]; const\n ci = col_increment[pass];\n let sw = 0; let\n sh = 0;\n let cr = starting_row[pass]; while (cr < h) { cr += ri; sh++; }\n let cc = starting_col[pass]; while (cc < w) { cc += ci; sw++; }\n const bpll = Math.ceil(sw * bpp / 8);\n UPNG.decode._filterZero(data, out, di, sw, sh);\n\n let y = 0; let\n row = starting_row[pass];\n while (row < h) {\n let col = starting_col[pass];\n let cdi = (di + y * bpll) << 3;\n\n while (col < w) {\n if (bpp == 1) {\n var val = data[cdi >> 3]; val = (val >> (7 - (cdi & 7))) & 1;\n img[row * bpl + (col >> 3)] |= (val << (7 - ((col & 7) << 0)));\n }\n if (bpp == 2) {\n var val = data[cdi >> 3]; val = (val >> (6 - (cdi & 7))) & 3;\n img[row * bpl + (col >> 2)] |= (val << (6 - ((col & 3) << 1)));\n }\n if (bpp == 4) {\n var val = data[cdi >> 3]; val = (val >> (4 - (cdi & 7))) & 15;\n img[row * bpl + (col >> 1)] |= (val << (4 - ((col & 1) << 2)));\n }\n if (bpp >= 8) {\n const ii = row * bpl + col * cbpp;\n for (let j = 0; j < cbpp; j++) img[ii + j] = data[(cdi >> 3) + j];\n }\n cdi += bpp; col += ci;\n }\n y++; row += ri;\n }\n if (sw * sh != 0) di += sh * (1 + bpll);\n pass += 1;\n }\n return img;\n};\n\nUPNG.decode._getBPP = function (out) {\n const noc = [1, null, 3, 1, 2, null, 4][out.ctype];\n return noc * out.depth;\n};\n\nUPNG.decode._filterZero = function (data, out, off, w, h) {\n let bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n paeth = UPNG.decode._paeth;\n bpp = Math.ceil(bpp / 8);\n\n let i = 0; let di = 1; let type = data[off]; let\n x = 0;\n\n if (type > 1) data[off] = [0, 0, 1][type - 2];\n if (type == 3) for (x = bpp; x < bpl; x++) data[x + 1] = (data[x + 1] + (data[x + 1 - bpp] >>> 1)) & 255;\n\n for (let y = 0; y < h; y++) {\n i = off + y * bpl; di = i + y + 1;\n type = data[di - 1]; x = 0;\n\n if (type == 0) for (; x < bpl; x++) data[i + x] = data[di + x];\n else if (type == 1) {\n for (; x < bpp; x++) data[i + x] = data[di + x];\n for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpp]);\n } else if (type == 2) { for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpl]); } else if (type == 3) {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + (data[i + x - bpl] >>> 1));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + ((data[i + x - bpl] + data[i + x - bpp]) >>> 1));\n } else {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + paeth(0, data[i + x - bpl], 0));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + paeth(data[i + x - bpp], data[i + x - bpl], data[i + x - bpp - bpl]));\n }\n }\n return data;\n};\n\nUPNG.decode._paeth = function (a, b, c) {\n const p = a + b - c; const pa = (p - a); const pb = (p - b); const\n pc = (p - c);\n if (pa * pa <= pb * pb && pa * pa <= pc * pc) return a;\n if (pb * pb <= pc * pc) return b;\n return c;\n};\n\nUPNG.decode._IHDR = function (data, offset, out) {\n const bin = UPNG._bin;\n out.width = bin.readUint(data, offset); offset += 4;\n out.height = bin.readUint(data, offset); offset += 4;\n out.depth = data[offset]; offset++;\n out.ctype = data[offset]; offset++;\n out.compress = data[offset]; offset++;\n out.filter = data[offset]; offset++;\n out.interlace = data[offset]; offset++;\n};\n\nUPNG._bin = {\n nextZero(data, p) { while (data[p] != 0) p++; return p; },\n readUshort(buff, p) { return (buff[p] << 8) | buff[p + 1]; },\n writeUshort(buff, p, n) { buff[p] = (n >> 8) & 255; buff[p + 1] = n & 255; },\n readUint(buff, p) { return (buff[p] * (256 * 256 * 256)) + ((buff[p + 1] << 16) | (buff[p + 2] << 8) | buff[p + 3]); },\n writeUint(buff, p, n) { buff[p] = (n >> 24) & 255; buff[p + 1] = (n >> 16) & 255; buff[p + 2] = (n >> 8) & 255; buff[p + 3] = n & 255; },\n readASCII(buff, p, l) { let s = ''; for (let i = 0; i < l; i++) s += String.fromCharCode(buff[p + i]); return s; },\n writeASCII(data, p, s) { for (let i = 0; i < s.length; i++) data[p + i] = s.charCodeAt(i); },\n readBytes(buff, p, l) { const arr = []; for (let i = 0; i < l; i++) arr.push(buff[p + i]); return arr; },\n pad(n) { return n.length < 2 ? `0${n}` : n; },\n readUTF8(buff, p, l) {\n let s = '';\n let ns;\n for (let i = 0; i < l; i++) s += `%${UPNG._bin.pad(buff[p + i].toString(16))}`;\n try { ns = decodeURIComponent(s); } catch (e) { return UPNG._bin.readASCII(buff, p, l); }\n return ns;\n },\n};\nUPNG._copyTile = function (sb, sw, sh, tb, tw, th, xoff, yoff, mode) {\n const w = Math.min(sw, tw); const\n h = Math.min(sh, th);\n let si = 0; let\n ti = 0;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n if (xoff >= 0 && yoff >= 0) { si = (y * sw + x) << 2; ti = ((yoff + y) * tw + xoff + x) << 2; } else { si = ((-yoff + y) * sw - xoff + x) << 2; ti = (y * tw + x) << 2; }\n\n if (mode == 0) { tb[ti] = sb[si]; tb[ti + 1] = sb[si + 1]; tb[ti + 2] = sb[si + 2]; tb[ti + 3] = sb[si + 3]; } else if (mode == 1) {\n var fa = sb[si + 3] * (1 / 255); var fr = sb[si] * fa; var fg = sb[si + 1] * fa; var\n fb = sb[si + 2] * fa;\n var ba = tb[ti + 3] * (1 / 255); var br = tb[ti] * ba; var bg = tb[ti + 1] * ba; var\n bb = tb[ti + 2] * ba;\n\n const ifa = 1 - fa; const oa = fa + ba * ifa; const\n ioa = (oa == 0 ? 0 : 1 / oa);\n tb[ti + 3] = 255 * oa;\n tb[ti + 0] = (fr + br * ifa) * ioa;\n tb[ti + 1] = (fg + bg * ifa) * ioa;\n tb[ti + 2] = (fb + bb * ifa) * ioa;\n } else if (mode == 2) {\t// copy only differences, otherwise zero\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) { tb[ti] = 0; tb[ti + 1] = 0; tb[ti + 2] = 0; tb[ti + 3] = 0; } else { tb[ti] = fr; tb[ti + 1] = fg; tb[ti + 2] = fb; tb[ti + 3] = fa; }\n } else if (mode == 3) {\t// check if can be blended\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) continue;\n // if(fa!=255 && ba!=0) return false;\n if (fa < 220 && ba > 20) return false;\n }\n }\n }\n return true;\n};\n\nUPNG.encode = function (bufs, w, h, ps, dels, tabs, forbidPlte) {\n if (ps == null) ps = 0;\n if (forbidPlte == null) forbidPlte = false;\n\n const nimg = UPNG.encode.compress(bufs, w, h, ps, [false, false, false, 0, forbidPlte]);\n UPNG.encode.compressPNG(nimg, -1);\n\n return UPNG.encode._main(nimg, w, h, dels, tabs);\n};\n\nUPNG.encodeLL = function (bufs, w, h, cc, ac, depth, dels, tabs) {\n const nimg = { ctype: 0 + (cc == 1 ? 0 : 2) + (ac == 0 ? 0 : 4), depth, frames: [] };\n\n const time = Date.now();\n const bipp = (cc + ac) * depth; const\n bipl = bipp * w;\n for (let i = 0; i < bufs.length; i++) {\n nimg.frames.push({\n rect: {\n x: 0, y: 0, width: w, height: h,\n },\n img: new Uint8Array(bufs[i]),\n blend: 0,\n dispose: 1,\n bpp: Math.ceil(bipp / 8),\n bpl: Math.ceil(bipl / 8),\n });\n }\n\n UPNG.encode.compressPNG(nimg, 0, true);\n\n const out = UPNG.encode._main(nimg, w, h, dels, tabs);\n return out;\n};\n\nUPNG.encode._main = function (nimg, w, h, dels, tabs) {\n if (tabs == null) tabs = {};\n const { crc } = UPNG.crc;\n const wUi = UPNG._bin.writeUint;\n const wUs = UPNG._bin.writeUshort;\n const wAs = UPNG._bin.writeASCII;\n let offset = 8; const anim = nimg.frames.length > 1; let\n pltAlpha = false;\n\n let leng = 8 + (16 + 5 + 4) /* + (9+4) */ + (anim ? 20 : 0);\n if (tabs.sRGB != null) leng += 8 + 1 + 4;\n if (tabs.pHYs != null) leng += 8 + 9 + 4;\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n for (var i = 0; i < dl; i++) if ((nimg.plte[i] >>> 24) != 255) pltAlpha = true;\n leng += (8 + dl * 3 + 4) + (pltAlpha ? (8 + dl * 1 + 4) : 0);\n }\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) leng += 38;\n leng += fr.cimg.length + 12;\n if (j != 0) leng += 4;\n }\n leng += 12;\n\n const data = new Uint8Array(leng);\n const wr = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) data[i] = wr[i];\n\n wUi(data, offset, 13); offset += 4;\n wAs(data, offset, 'IHDR'); offset += 4;\n wUi(data, offset, w); offset += 4;\n wUi(data, offset, h); offset += 4;\n data[offset] = nimg.depth; offset++; // depth\n data[offset] = nimg.ctype; offset++; // ctype\n data[offset] = 0; offset++; // compress\n data[offset] = 0; offset++; // filter\n data[offset] = 0; offset++; // interlace\n wUi(data, offset, crc(data, offset - 17, 17)); offset += 4; // crc\n\n // 13 bytes to say, that it is sRGB\n if (tabs.sRGB != null) {\n wUi(data, offset, 1); offset += 4;\n wAs(data, offset, 'sRGB'); offset += 4;\n data[offset] = tabs.sRGB; offset++;\n wUi(data, offset, crc(data, offset - 5, 5)); offset += 4; // crc\n }\n if (tabs.pHYs != null) {\n wUi(data, offset, 9); offset += 4;\n wAs(data, offset, 'pHYs'); offset += 4;\n wUi(data, offset, tabs.pHYs[0]); offset += 4;\n wUi(data, offset, tabs.pHYs[1]); offset += 4;\n data[offset] = tabs.pHYs[2];\t\t\toffset++;\n wUi(data, offset, crc(data, offset - 13, 13)); offset += 4; // crc\n }\n\n if (anim) {\n wUi(data, offset, 8); offset += 4;\n wAs(data, offset, 'acTL'); offset += 4;\n wUi(data, offset, nimg.frames.length); offset += 4;\n wUi(data, offset, tabs.loop != null ? tabs.loop : 0); offset += 4;\n wUi(data, offset, crc(data, offset - 12, 12)); offset += 4; // crc\n }\n\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n wUi(data, offset, dl * 3); offset += 4;\n wAs(data, offset, 'PLTE'); offset += 4;\n for (var i = 0; i < dl; i++) {\n const ti = i * 3; const c = nimg.plte[i]; const r = (c) & 255; const g = (c >>> 8) & 255; const\n b = (c >>> 16) & 255;\n data[offset + ti + 0] = r; data[offset + ti + 1] = g; data[offset + ti + 2] = b;\n }\n offset += dl * 3;\n wUi(data, offset, crc(data, offset - dl * 3 - 4, dl * 3 + 4)); offset += 4; // crc\n\n if (pltAlpha) {\n wUi(data, offset, dl); offset += 4;\n wAs(data, offset, 'tRNS'); offset += 4;\n for (var i = 0; i < dl; i++) data[offset + i] = (nimg.plte[i] >>> 24) & 255;\n offset += dl;\n wUi(data, offset, crc(data, offset - dl - 4, dl + 4)); offset += 4; // crc\n }\n }\n\n let fi = 0;\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) {\n wUi(data, offset, 26); offset += 4;\n wAs(data, offset, 'fcTL'); offset += 4;\n wUi(data, offset, fi++); offset += 4;\n wUi(data, offset, fr.rect.width); offset += 4;\n wUi(data, offset, fr.rect.height); offset += 4;\n wUi(data, offset, fr.rect.x); offset += 4;\n wUi(data, offset, fr.rect.y); offset += 4;\n wUs(data, offset, dels[j]); offset += 2;\n wUs(data, offset, 1000); offset += 2;\n data[offset] = fr.dispose; offset++;\t// dispose\n data[offset] = fr.blend; offset++;\t// blend\n wUi(data, offset, crc(data, offset - 30, 30)); offset += 4; // crc\n }\n\n const imgd = fr.cimg; var\n dl = imgd.length;\n wUi(data, offset, dl + (j == 0 ? 0 : 4)); offset += 4;\n const ioff = offset;\n wAs(data, offset, (j == 0) ? 'IDAT' : 'fdAT'); offset += 4;\n if (j != 0) { wUi(data, offset, fi++); offset += 4; }\n data.set(imgd, offset);\n offset += dl;\n wUi(data, offset, crc(data, ioff, offset - ioff)); offset += 4; // crc\n }\n\n wUi(data, offset, 0); offset += 4;\n wAs(data, offset, 'IEND'); offset += 4;\n wUi(data, offset, crc(data, offset - 4, 4)); offset += 4; // crc\n\n return data.buffer;\n};\n\nUPNG.encode.compressPNG = function (out, filter, levelZero) {\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i]; const nw = frm.rect.width; const\n nh = frm.rect.height;\n const fdata = new Uint8Array(nh * frm.bpl + nh);\n frm.cimg = UPNG.encode._filterZero(frm.img, nh, frm.bpp, frm.bpl, fdata, filter, levelZero);\n }\n};\n\nUPNG.encode.compress = function (bufs, w, h, ps, prms) // prms: onlyBlend, minBits, forbidPlte\n{\n // var time = Date.now();\n const onlyBlend = prms[0]; const evenCrd = prms[1]; const forbidPrev = prms[2]; const minBits = prms[3]; const\n forbidPlte = prms[4];\n\n let ctype = 6; let depth = 8; let\n alphaAnd = 255;\n\n for (var j = 0; j < bufs.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n const img = new Uint8Array(bufs[j]); var\n ilen = img.length;\n for (var i = 0; i < ilen; i += 4) alphaAnd &= img[i + 3];\n }\n const gotAlpha = (alphaAnd != 255);\n\n // console.log(\"alpha check\", Date.now()-time); time = Date.now();\n\n // var brute = gotAlpha && forGIF;\t\t// brute : frames can only be copied, not \"blended\"\n const frms = UPNG.encode.framize(bufs, w, h, onlyBlend, evenCrd, forbidPrev);\n // console.log(\"framize\", Date.now()-time); time = Date.now();\n\n const cmap = {}; const plte = []; const\n inds = [];\n\n if (ps != 0) {\n const nbufs = []; for (var i = 0; i < frms.length; i++) nbufs.push(frms[i].img.buffer);\n\n const abuf = UPNG.encode.concatRGBA(nbufs); const\n qres = UPNG.quantize(abuf, ps); // console.log(qres);\n let cof = 0; const\n bb = new Uint8Array(qres.abuf);\n for (var i = 0; i < frms.length; i++) {\n var ti = frms[i].img; const\n bln = ti.length; inds.push(new Uint8Array(qres.inds.buffer, cof >> 2, bln >> 2));\n for (var j = 0; j < bln; j += 4) { ti[j] = bb[cof + j]; ti[j + 1] = bb[cof + j + 1]; ti[j + 2] = bb[cof + j + 2]; ti[j + 3] = bb[cof + j + 3]; } cof += bln;\n }\n\n for (var i = 0; i < qres.plte.length; i++) plte.push(qres.plte[i].est.rgba);\n // console.log(\"quantize\", Date.now()-time); time = Date.now();\n } else {\n // what if ps==0, but there are <=256 colors? we still need to detect, if the palette could be used\n for (var j = 0; j < frms.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n var frm = frms[j]; const img32 = new Uint32Array(frm.img.buffer); var nw = frm.rect.width; var\n ilen = img32.length;\n const ind = new Uint8Array(ilen); inds.push(ind);\n for (var i = 0; i < ilen; i++) {\n const c = img32[i];\n if (i != 0 && c == img32[i - 1]) ind[i] = ind[i - 1];\n else if (i > nw && c == img32[i - nw]) ind[i] = ind[i - nw];\n else {\n let cmc = cmap[c];\n if (cmc == null) { cmap[c] = cmc = plte.length; plte.push(c); if (plte.length >= 300) break; }\n ind[i] = cmc;\n }\n }\n }\n // console.log(\"make palette\", Date.now()-time); time = Date.now();\n }\n\n const cc = plte.length; // console.log(\"colors:\",cc);\n if (cc <= 256 && forbidPlte == false) {\n if (cc <= 2) depth = 1; else if (cc <= 4) depth = 2; else if (cc <= 16) depth = 4; else depth = 8;\n depth = Math.max(depth, minBits);\n }\n\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; const nx = frm.rect.x; const ny = frm.rect.y; var nw = frm.rect.width; const\n nh = frm.rect.height;\n let cimg = frm.img; const\n cimg32 = new Uint32Array(cimg.buffer);\n let bpl = 4 * nw; let\n bpp = 4;\n if (cc <= 256 && forbidPlte == false) {\n bpl = Math.ceil(depth * nw / 8);\n var nimg = new Uint8Array(bpl * nh);\n const inj = inds[j];\n for (let y = 0; y < nh; y++) {\n var i = y * bpl; const\n ii = y * nw;\n if (depth == 8) for (var x = 0; x < nw; x++) nimg[i + (x)] = (inj[ii + x]);\n else if (depth == 4) for (var x = 0; x < nw; x++) nimg[i + (x >> 1)] |= (inj[ii + x] << (4 - (x & 1) * 4));\n else if (depth == 2) for (var x = 0; x < nw; x++) nimg[i + (x >> 2)] |= (inj[ii + x] << (6 - (x & 3) * 2));\n else if (depth == 1) for (var x = 0; x < nw; x++) nimg[i + (x >> 3)] |= (inj[ii + x] << (7 - (x & 7) * 1));\n }\n cimg = nimg; ctype = 3; bpp = 1;\n } else if (gotAlpha == false && frms.length == 1) {\t// some next \"reduced\" frames may contain alpha for blending\n var nimg = new Uint8Array(nw * nh * 3); const\n area = nw * nh;\n for (var i = 0; i < area; i++) {\n var ti = i * 3; const\n qi = i * 4; nimg[ti] = cimg[qi]; nimg[ti + 1] = cimg[qi + 1]; nimg[ti + 2] = cimg[qi + 2];\n }\n cimg = nimg; ctype = 2; bpp = 3; bpl = 3 * nw;\n }\n frm.img = cimg; frm.bpl = bpl; frm.bpp = bpp;\n }\n // console.log(\"colors => palette indices\", Date.now()-time); time = Date.now();\n\n return {\n ctype, depth, plte, frames: frms,\n };\n};\nUPNG.encode.framize = function (bufs, w, h, alwaysBlend, evenCrd, forbidPrev) {\n /* DISPOSE\n - 0 : no change\n - 1 : clear to transparent\n - 2 : retstore to content before rendering (previous frame disposed)\n BLEND\n - 0 : replace\n - 1 : blend\n */\n const frms = [];\n for (var j = 0; j < bufs.length; j++) {\n const cimg = new Uint8Array(bufs[j]); const\n cimg32 = new Uint32Array(cimg.buffer);\n var nimg;\n\n let nx = 0; let ny = 0; let nw = w; let nh = h; let\n blend = alwaysBlend ? 1 : 0;\n if (j != 0) {\n const tlim = (forbidPrev || alwaysBlend || j == 1 || frms[j - 2].dispose != 0) ? 1 : 2; let tstp = 0; let\n tarea = 1e9;\n for (let it = 0; it < tlim; it++) {\n var pimg = new Uint8Array(bufs[j - 1 - it]); const\n p32 = new Uint32Array(bufs[j - 1 - it]);\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n var i = y * w + x;\n if (cimg32[i] != p32[i]) {\n if (x < mix) mix = x; if (x > max) max = x;\n if (y < miy) miy = y; if (y > may) may = y;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n const sarea = (max - mix + 1) * (may - miy + 1);\n if (sarea < tarea) {\n tarea = sarea; tstp = it;\n nx = mix; ny = miy; nw = max - mix + 1; nh = may - miy + 1;\n }\n }\n\n // alwaysBlend: pokud zjistím, že blendit nelze, nastavím předchozímu snímku dispose=1. Zajistím, aby obsahoval můj obdélník.\n var pimg = new Uint8Array(bufs[j - 1 - tstp]);\n if (tstp == 1) frms[j - 1].dispose = 2;\n\n nimg = new Uint8Array(nw * nh * 4);\n UPNG._copyTile(pimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n\n blend = UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 3) ? 1 : 0;\n if (blend == 1) {\n UPNG.encode._prepareDiff(cimg, w, h, nimg, {\n x: nx, y: ny, width: nw, height: nh,\n });\n } else UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n // UPNG._copyTile(cimg,w,h, nimg,nw,nh, -nx,-ny, blend==1?2:0);\n } else nimg = cimg.slice(0);\t// img may be rewritten further ... don't rewrite input\n\n frms.push({\n rect: {\n x: nx, y: ny, width: nw, height: nh,\n },\n img: nimg,\n blend,\n dispose: 0,\n });\n }\n\n if (alwaysBlend) {\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; if (frm.blend == 1) continue;\n const r0 = frm.rect; const\n r1 = frms[j - 1].rect;\n const miX = Math.min(r0.x, r1.x); const\n miY = Math.min(r0.y, r1.y);\n const maX = Math.max(r0.x + r0.width, r1.x + r1.width); const\n maY = Math.max(r0.y + r0.height, r1.y + r1.height);\n const r = {\n x: miX, y: miY, width: maX - miX, height: maY - miY,\n };\n\n frms[j - 1].dispose = 1;\n if (j - 1 != 0) { UPNG.encode._updateFrame(bufs, w, h, frms, j - 1, r, evenCrd); }\n UPNG.encode._updateFrame(bufs, w, h, frms, j, r, evenCrd);\n }\n }\n let area = 0;\n if (bufs.length != 1) {\n for (var i = 0; i < frms.length; i++) {\n var frm = frms[i];\n area += frm.rect.width * frm.rect.height;\n // if(i==0 || frm.blend!=1) continue;\n // var ob = new Uint8Array(\n // console.log(frm.blend, frm.dispose, frm.rect);\n }\n }\n // if(area!=0) console.log(area);\n return frms;\n};\nUPNG.encode._updateFrame = function (bufs, w, h, frms, i, r, evenCrd) {\n const U8 = Uint8Array; const\n U32 = Uint32Array;\n const pimg = new U8(bufs[i - 1]); const pimg32 = new U32(bufs[i - 1]); const\n nimg = i + 1 < bufs.length ? new U8(bufs[i + 1]) : null;\n const cimg = new U8(bufs[i]); const\n cimg32 = new U32(cimg.buffer);\n\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < r.height; y++) {\n for (let x = 0; x < r.width; x++) {\n const cx = r.x + x; const\n cy = r.y + y;\n const j = cy * w + cx; const\n cc = cimg32[j];\n // no need to draw transparency, or to dispose it. Or, if writing the same color and the next one does not need transparency.\n if (cc == 0 || (frms[i - 1].dispose == 0 && pimg32[j] == cc && (nimg == null || nimg[j * 4 + 3] != 0))/**/) {} else {\n if (cx < mix) mix = cx; if (cx > max) max = cx;\n if (cy < miy) miy = cy; if (cy > may) may = cy;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n r = {\n x: mix, y: miy, width: max - mix + 1, height: may - miy + 1,\n };\n\n const fr = frms[i]; fr.rect = r; fr.blend = 1; fr.img = new Uint8Array(r.width * r.height * 4);\n if (frms[i - 1].dispose == 0) {\n UPNG._copyTile(pimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0);\n UPNG.encode._prepareDiff(cimg, w, h, fr.img, r);\n // UPNG._copyTile(cimg,w,h, fr.img,r.width,r.height, -r.x,-r.y, 2);\n } else { UPNG._copyTile(cimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0); }\n};\nUPNG.encode._prepareDiff = function (cimg, w, h, nimg, rec) {\n UPNG._copyTile(cimg, w, h, nimg, rec.width, rec.height, -rec.x, -rec.y, 2);\n /*\n var n32 = new Uint32Array(nimg.buffer);\n var og = new Uint8Array(rec.width*rec.height*4), o32 = new Uint32Array(og.buffer);\n UPNG._copyTile(cimg,w,h, og,rec.width,rec.height, -rec.x,-rec.y, 0);\n for(var i=4; i>>2]==o32[(i>>>2)-1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n }\n for(var i=nimg.length-8; i>0; i-=4) {\n if(nimg[i+7]!=0 && nimg[i+3]==0 && o32[i>>>2]==o32[(i>>>2)+1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n } */\n};\n\nUPNG.encode._filterZero = function (img, h, bpp, bpl, data, filter, levelZero) {\n const fls = []; let\n ftry = [0, 1, 2, 3, 4];\n if (filter != -1) ftry = [filter];\n else if (h * bpl > 500000 || bpp == 1) ftry = [0];\n let opts; if (levelZero) opts = { level: 0 };\n\n // var CMPR = (data.length>10e6 && typeof UZIP !== 'undefined') ? UZIP : pako;\n const CMPR = UZIP;\n\n const time = Date.now();\n for (var i = 0; i < ftry.length; i++) {\n for (let y = 0; y < h; y++) UPNG.encode._filterLine(data, img, y, bpl, bpp, ftry[i]);\n // var nimg = new Uint8Array(data.length);\n // var sz = UZIP.F.deflate(data, nimg); fls.push(nimg.slice(0,sz));\n // var dfl = pako[\"deflate\"](data), dl=dfl.length-4;\n // var crc = (dfl[dl+3]<<24)|(dfl[dl+2]<<16)|(dfl[dl+1]<<8)|(dfl[dl+0]<<0);\n // console.log(crc, UZIP.adler(data,2,data.length-6));\n fls.push(CMPR.deflate(data, opts));\n }\n\n let ti; let\n tsize = 1e9;\n for (var i = 0; i < fls.length; i++) if (fls[i].length < tsize) { ti = i; tsize = fls[i].length; }\n return fls[ti];\n};\nUPNG.encode._filterLine = function (data, img, y, bpl, bpp, type) {\n const i = y * bpl; let di = i + y; const\n paeth = UPNG.decode._paeth;\n data[di] = type; di++;\n\n if (type == 0) {\n if (bpl < 500) for (var x = 0; x < bpl; x++) data[di + x] = img[i + x];\n else data.set(new Uint8Array(img.buffer, i, bpl), di);\n } else if (type == 1) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - img[i + x - bpp] + 256) & 255;\n } else if (y == 0) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n\n if (type == 2) for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x];\n if (type == 3) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - (img[i + x - bpp] >> 1) + 256) & 255;\n if (type == 4) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - paeth(img[i + x - bpp], 0, 0) + 256) & 255;\n } else {\n if (type == 2) { for (var x = 0; x < bpl; x++) data[di + x] = (img[i + x] + 256 - img[i + x - bpl]) & 255; }\n if (type == 3) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - (img[i + x - bpl] >> 1)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - ((img[i + x - bpl] + img[i + x - bpp]) >> 1)) & 255;\n }\n if (type == 4) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - paeth(0, img[i + x - bpl], 0)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - paeth(img[i + x - bpp], img[i + x - bpl], img[i + x - bpp - bpl])) & 255;\n }\n }\n};\n\nUPNG.crc = {\n table: (function () {\n const tab = new Uint32Array(256);\n for (let n = 0; n < 256; n++) {\n let c = n;\n for (let k = 0; k < 8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c >>>= 1;\n }\n tab[n] = c;\n }\n return tab;\n }()),\n update(c, buf, off, len) {\n for (let i = 0; i < len; i++) c = UPNG.crc.table[(c ^ buf[off + i]) & 0xff] ^ (c >>> 8);\n return c;\n },\n crc(b, o, l) { return UPNG.crc.update(0xffffffff, b, o, l) ^ 0xffffffff; },\n};\n\nUPNG.quantize = function (abuf, ps) {\n const oimg = new Uint8Array(abuf); const nimg = oimg.slice(0); const\n nimg32 = new Uint32Array(nimg.buffer);\n\n const KD = UPNG.quantize.getKDtree(nimg, ps);\n const root = KD[0]; const\n leafs = KD[1];\n\n const { planeDst } = UPNG.quantize;\n const sb = oimg; const tb = nimg32; const\n len = sb.length;\n\n const inds = new Uint8Array(oimg.length >> 2); let\n nd;\n if (oimg.length < 20e6) // precise, but slow :(\n {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = UPNG.quantize.getNearest(root, r, g, b, a);\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n } else {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = root; while (nd.left) nd = (planeDst(nd.est, r, g, b, a) <= 0) ? nd.left : nd.right;\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n }\n return { abuf: nimg.buffer, inds, plte: leafs };\n};\n\nUPNG.quantize.getKDtree = function (nimg, ps, err) {\n if (err == null) err = 0.0001;\n const nimg32 = new Uint32Array(nimg.buffer);\n\n const root = {\n i0: 0, i1: nimg.length, bst: null, est: null, tdst: 0, left: null, right: null,\n }; // basic statistic, extra statistic\n root.bst = UPNG.quantize.stats(nimg, root.i0, root.i1); root.est = UPNG.quantize.estats(root.bst);\n const leafs = [root];\n\n while (leafs.length < ps) {\n let maxL = 0; let\n mi = 0;\n for (var i = 0; i < leafs.length; i++) if (leafs[i].est.L > maxL) { maxL = leafs[i].est.L; mi = i; }\n if (maxL < err) break;\n const node = leafs[mi];\n\n const s0 = UPNG.quantize.splitPixels(nimg, nimg32, node.i0, node.i1, node.est.e, node.est.eMq255);\n const s0wrong = (node.i0 >= s0 || node.i1 <= s0);\n // console.log(maxL, leafs.length, mi);\n if (s0wrong) { node.est.L = 0; continue; }\n\n const ln = {\n i0: node.i0, i1: s0, bst: null, est: null, tdst: 0, left: null, right: null,\n }; ln.bst = UPNG.quantize.stats(nimg, ln.i0, ln.i1);\n ln.est = UPNG.quantize.estats(ln.bst);\n const rn = {\n i0: s0, i1: node.i1, bst: null, est: null, tdst: 0, left: null, right: null,\n }; rn.bst = { R: [], m: [], N: node.bst.N - ln.bst.N };\n for (var i = 0; i < 16; i++) rn.bst.R[i] = node.bst.R[i] - ln.bst.R[i];\n for (var i = 0; i < 4; i++) rn.bst.m[i] = node.bst.m[i] - ln.bst.m[i];\n rn.est = UPNG.quantize.estats(rn.bst);\n\n node.left = ln; node.right = rn;\n leafs[mi] = ln; leafs.push(rn);\n }\n leafs.sort((a, b) => b.bst.N - a.bst.N);\n for (var i = 0; i < leafs.length; i++) leafs[i].ind = i;\n return [root, leafs];\n};\n\nUPNG.quantize.getNearest = function (nd, r, g, b, a) {\n if (nd.left == null) { nd.tdst = UPNG.quantize.dist(nd.est.q, r, g, b, a); return nd; }\n const planeDst = UPNG.quantize.planeDst(nd.est, r, g, b, a);\n\n let node0 = nd.left; let\n node1 = nd.right;\n if (planeDst > 0) { node0 = nd.right; node1 = nd.left; }\n\n const ln = UPNG.quantize.getNearest(node0, r, g, b, a);\n if (ln.tdst <= planeDst * planeDst) return ln;\n const rn = UPNG.quantize.getNearest(node1, r, g, b, a);\n return rn.tdst < ln.tdst ? rn : ln;\n};\nUPNG.quantize.planeDst = function (est, r, g, b, a) { const { e } = est; return e[0] * r + e[1] * g + e[2] * b + e[3] * a - est.eMq; };\nUPNG.quantize.dist = function (q, r, g, b, a) {\n const d0 = r - q[0]; const d1 = g - q[1]; const d2 = b - q[2]; const\n d3 = a - q[3]; return d0 * d0 + d1 * d1 + d2 * d2 + d3 * d3;\n};\n\nUPNG.quantize.splitPixels = function (nimg, nimg32, i0, i1, e, eMq) {\n const { vecDot } = UPNG.quantize;\n i1 -= 4;\n const shfs = 0;\n while (i0 < i1) {\n while (vecDot(nimg, i0, e) <= eMq) i0 += 4;\n while (vecDot(nimg, i1, e) > eMq) i1 -= 4;\n if (i0 >= i1) break;\n\n const t = nimg32[i0 >> 2]; nimg32[i0 >> 2] = nimg32[i1 >> 2]; nimg32[i1 >> 2] = t;\n\n i0 += 4; i1 -= 4;\n }\n while (vecDot(nimg, i0, e) > eMq) i0 -= 4;\n return i0 + 4;\n};\nUPNG.quantize.vecDot = function (nimg, i, e) {\n return nimg[i] * e[0] + nimg[i + 1] * e[1] + nimg[i + 2] * e[2] + nimg[i + 3] * e[3];\n};\nUPNG.quantize.stats = function (nimg, i0, i1) {\n const R = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n const m = [0, 0, 0, 0];\n const N = (i1 - i0) >> 2;\n for (let i = i0; i < i1; i += 4) {\n const r = nimg[i] * (1 / 255); const g = nimg[i + 1] * (1 / 255); const b = nimg[i + 2] * (1 / 255); const\n a = nimg[i + 3] * (1 / 255);\n // var r = nimg[i], g = nimg[i+1], b = nimg[i+2], a = nimg[i+3];\n m[0] += r; m[1] += g; m[2] += b; m[3] += a;\n\n R[0] += r * r; R[1] += r * g; R[2] += r * b; R[3] += r * a;\n R[5] += g * g; R[6] += g * b; R[7] += g * a;\n R[10] += b * b; R[11] += b * a;\n R[15] += a * a;\n }\n R[4] = R[1]; R[8] = R[2]; R[9] = R[6]; R[12] = R[3]; R[13] = R[7]; R[14] = R[11];\n\n return { R, m, N };\n};\nUPNG.quantize.estats = function (stats) {\n const { R } = stats;\n const { m } = stats;\n const { N } = stats;\n\n // when all samples are equal, but N is large (millions), the Rj can be non-zero ( 0.0003.... - precission error)\n const m0 = m[0]; const m1 = m[1]; const m2 = m[2]; const m3 = m[3]; const\n iN = (N == 0 ? 0 : 1 / N);\n const Rj = [\n R[0] - m0 * m0 * iN, R[1] - m0 * m1 * iN, R[2] - m0 * m2 * iN, R[3] - m0 * m3 * iN,\n R[4] - m1 * m0 * iN, R[5] - m1 * m1 * iN, R[6] - m1 * m2 * iN, R[7] - m1 * m3 * iN,\n R[8] - m2 * m0 * iN, R[9] - m2 * m1 * iN, R[10] - m2 * m2 * iN, R[11] - m2 * m3 * iN,\n R[12] - m3 * m0 * iN, R[13] - m3 * m1 * iN, R[14] - m3 * m2 * iN, R[15] - m3 * m3 * iN,\n ];\n\n const A = Rj; const\n M = UPNG.M4;\n let b = [Math.random(), Math.random(), Math.random(), Math.random()]; let mi = 0; let\n tmi = 0;\n\n if (N != 0) {\n for (let i = 0; i < 16; i++) {\n b = M.multVec(A, b); tmi = Math.sqrt(M.dot(b, b)); b = M.sml(1 / tmi, b);\n if (i != 0 && Math.abs(tmi - mi) < 1e-9) break; mi = tmi;\n }\n }\n // b = [0,0,1,0]; mi=N;\n const q = [m0 * iN, m1 * iN, m2 * iN, m3 * iN];\n const eMq255 = M.dot(M.sml(255, q), b);\n\n return {\n Cov: Rj,\n q,\n e: b,\n L: mi,\n eMq255,\n eMq: M.dot(b, q),\n rgba: (((Math.round(255 * q[3]) << 24) | (Math.round(255 * q[2]) << 16) | (Math.round(255 * q[1]) << 8) | (Math.round(255 * q[0]) << 0)) >>> 0),\n };\n};\nUPNG.M4 = {\n multVec(m, v) {\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * v[3],\n m[4] * v[0] + m[5] * v[1] + m[6] * v[2] + m[7] * v[3],\n m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11] * v[3],\n m[12] * v[0] + m[13] * v[1] + m[14] * v[2] + m[15] * v[3],\n ];\n },\n dot(x, y) { return x[0] * y[0] + x[1] * y[1] + x[2] * y[2] + x[3] * y[3]; },\n sml(a, y) { return [a * y[0], a * y[1], a * y[2], a * y[3]]; },\n};\n\nUPNG.encode.concatRGBA = function (bufs) {\n let tlen = 0;\n for (var i = 0; i < bufs.length; i++) tlen += bufs[i].byteLength;\n const nimg = new Uint8Array(tlen); let\n noff = 0;\n for (var i = 0; i < bufs.length; i++) {\n const img = new Uint8Array(bufs[i]); const\n il = img.length;\n for (let j = 0; j < il; j += 4) {\n let r = img[j]; let g = img[j + 1]; let b = img[j + 2]; const\n a = img[j + 3];\n if (a == 0) r = g = b = 0;\n nimg[noff + j] = r; nimg[noff + j + 1] = g; nimg[noff + j + 2] = b; nimg[noff + j + 3] = a;\n }\n noff += il;\n }\n return nimg.buffer;\n};\n\nexport default UPNG;\n","import UPNG from './UPNG';\nimport MaxCanvasSize from './config/max-canvas-size';\n\nconst isBrowser = typeof window !== 'undefined'; // change browser environment to support SSR\n\n// add support for cordova-plugin-file\nconst moduleMapper = isBrowser && window.cordova && window.cordova.require && window.cordova.require('cordova/modulemapper');\nexport const CustomFile = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'File')) || (typeof window.File !== 'undefined' && File));\nexport const CustomFileReader = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'FileReader')) || (typeof window.FileReader !== 'undefined' && FileReader));\n\n/**\n * getFilefromDataUrl\n *\n * @param {string} dataUrl\n * @param {string} filename\n * @param {number} [lastModified=Date.now()]\n * @returns {Promise}\n */\nexport function getFilefromDataUrl(dataUrl, filename, lastModified = Date.now()) {\n return new Promise((resolve) => {\n const arr = dataUrl.split(',');\n const mime = arr[0].match(/:(.*?);/)[1];\n const bstr = globalThis.atob(arr[1]);\n let n = bstr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n const file = new Blob([u8arr], { type: mime });\n file.name = filename;\n file.lastModified = lastModified;\n resolve(file);\n\n // Safari has issue with File constructor not being able to POST in FormData\n // https://github.com/Donaldcwl/browser-image-compression/issues/8\n // https://bugs.webkit.org/show_bug.cgi?id=165081\n // let file\n // try {\n // file = new File([u8arr], filename, { type: mime }) // Edge do not support File constructor\n // } catch (e) {\n // file = new Blob([u8arr], { type: mime })\n // file.name = filename\n // file.lastModified = lastModified\n // }\n // resolve(file)\n });\n}\n\n/**\n * getDataUrlFromFile\n *\n * @param {File | Blob} file\n * @returns {Promise}\n */\nexport function getDataUrlFromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = () => resolve(reader.result);\n reader.onerror = (e) => reject(e);\n reader.readAsDataURL(file);\n });\n}\n\n/**\n * loadImage\n *\n * @param {string} src\n * @returns {Promise}\n */\nexport function loadImage(src) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => resolve(img);\n img.onerror = (e) => reject(e);\n img.src = src;\n });\n}\n\n/**\n * getBrowserName\n *\n * Extracts the browser name from the useragent.\n *\n * ref: https://stackoverflow.com/a/26358856\n *\n * @returns {string}\n */\nexport function getBrowserName() {\n let browserName = 'etc';\n const { userAgent } = navigator;\n if (/Chrom(e|ium)/i.test(userAgent)) {\n browserName = 'chrome';\n } else if (/iP(ad|od|hone)/i.test(userAgent) && /WebKit/i.test(userAgent) && !(/(CriOS|FxiOS|OPiOS|mercury)/i.test(userAgent))) {\n // see: https://stackoverflow.com/a/35813965\n browserName = 'mobile safari';\n } else if (/Safari/i.test(userAgent)) {\n browserName = 'desktop safari';\n } else if (/Firefox/i.test(userAgent)) {\n browserName = 'firefox';\n } else if (/MSIE/i.test(userAgent) || (!!document.documentMode) === true) { // IF IE > 10\n browserName = 'internet explorer';\n }\n return browserName;\n}\n\n/**\n * approximateBelowCanvasMaximumSizeOfBrowser\n *\n * it uses binary search to converge below the browser's maximum Canvas size.\n *\n * @param {number} initWidth\n * @param {number} initHeight\n * @returns {object}\n */\nexport function approximateBelowMaximumCanvasSizeOfBrowser(initWidth, initHeight) {\n const browserName = getBrowserName();\n const maximumCanvasSize = MaxCanvasSize[browserName];\n\n let width = initWidth;\n let height = initHeight;\n let size = width * height;\n const ratio = width > height ? height / width : width / height;\n\n while (size > maximumCanvasSize * maximumCanvasSize) {\n const halfSizeWidth = (maximumCanvasSize + width) / 2;\n const halfSizeHeight = (maximumCanvasSize + height) / 2;\n if (halfSizeWidth < halfSizeHeight) {\n height = halfSizeHeight;\n width = halfSizeHeight * ratio;\n } else {\n height = halfSizeWidth * ratio;\n width = halfSizeWidth;\n }\n\n size = width * height;\n }\n\n return {\n width, height,\n };\n}\n\n/**\n * get new Canvas and it's context\n * @param width\n * @param height\n * @returns {[HTMLCanvasElement | OffscreenCanvas, CanvasRenderingContext2D]}\n */\nexport function getNewCanvasAndCtx(width, height) {\n let canvas;\n let ctx;\n try {\n canvas = new OffscreenCanvas(width, height);\n ctx = canvas.getContext('2d');\n if (ctx === null) {\n throw new Error('getContext of OffscreenCanvas returns null');\n }\n } catch (e) {\n canvas = document.createElement('canvas');\n ctx = canvas.getContext('2d');\n }\n canvas.width = width;\n canvas.height = height;\n // ctx.fillStyle = '#fff'\n // ctx.fillRect(0, 0, width, height)\n return [canvas, ctx];\n}\n\n/**\n * drawImageInCanvas\n *\n * @param {HTMLImageElement} img\n * @param {string} [fileType=undefined]\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function drawImageInCanvas(img, fileType = undefined) {\n const { width, height } = approximateBelowMaximumCanvasSizeOfBrowser(img.width, img.height);\n const [canvas, ctx] = getNewCanvasAndCtx(width, height);\n if (fileType && /jpe?g/.test(fileType)) {\n ctx.fillStyle = 'white'; // to fill the transparent background with white color for png file in jpeg extension\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n return canvas;\n}\n\n/**\n * Detect IOS device\n * see: https://stackoverflow.com/a/9039885\n * @returns {boolean} isIOS device\n */\nexport function isIOS() {\n if (isIOS.cachedResult !== undefined) {\n return isIOS.cachedResult;\n }\n isIOS.cachedResult = [\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod',\n ].includes(navigator.platform)\n // iPad on iOS 13 detection\n || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);\n return isIOS.cachedResult;\n}\n\n/**\n * drawFileInCanvas\n *\n * @param {File | Blob} file\n * @returns {Promise<[ImageBitmap | HTMLImageElement, HTMLCanvasElement | OffscreenCanvas]>}\n */\nexport async function drawFileInCanvas(file) {\n let img;\n try {\n if (isIOS()) {\n throw new Error('Skip createImageBitmap on IOS device'); // see https://github.com/Donaldcwl/browser-image-compression/issues/118\n }\n img = await createImageBitmap(file);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n try {\n const dataUrl = await getDataUrlFromFile(file);\n img = await loadImage(dataUrl);\n } catch (e2) {\n if (process.env.BUILD === 'development') {\n console.error(e2);\n }\n throw e2;\n }\n }\n const canvas = drawImageInCanvas(img, file.type);\n return [img, canvas];\n}\n\n/**\n * canvasToFile\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {string} fileType\n * @param {string} fileName\n * @param {number} fileLastModified\n * @param {number} [quality]\n * @returns {Promise}\n */\nexport async function canvasToFile(canvas, fileType, fileName, fileLastModified, quality = 1) {\n let file;\n if (fileType === 'image/png') {\n const ctx = canvas.getContext('2d');\n const { data } = ctx.getImageData(0, 0, canvas.width, canvas.height);\n const png = UPNG.encode([data], canvas.width, canvas.height, 256 * quality);\n file = new Blob([png], { type: fileType });\n file.name = fileName;\n file.lastModified = fileLastModified;\n } else if (typeof OffscreenCanvas === 'function' && canvas instanceof OffscreenCanvas) { // checked on Win Chrome 83, MacOS Chrome 83\n file = await canvas.convertToBlob({ type: fileType, quality });\n file.name = fileName;\n file.lastModified = fileLastModified;\n // some browser do not support quality parameter, see: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob\n // } else if (typeof canvas.toBlob === 'function') {\n // file = await new Promise(resolve => canvas.toBlob(resolve, fileType, quality))\n } else { // checked on Win Edge 44, Win IE 11, Win Firefox 76, MacOS Firefox 77, MacOS Safari 13.1\n const dataUrl = canvas.toDataURL(fileType, quality);\n file = await getFilefromDataUrl(dataUrl, fileName, fileLastModified);\n }\n return file;\n}\n\n/**\n * clear Canvas memory\n * @param canvas\n * @returns null\n */\nexport function cleanupCanvasMemory(canvas) {\n // garbage clean canvas for safari\n // ref: https://bugs.webkit.org/show_bug.cgi?id=195325\n // eslint-disable-next-line no-param-reassign\n canvas.width = 0;\n // eslint-disable-next-line no-param-reassign\n canvas.height = 0;\n}\n\n// Check if browser supports automatic image orientation\n// see https://github.com/blueimp/JavaScript-Load-Image/blob/1e4df707821a0afcc11ea0720ee403b8759f3881/js/load-image-orientation.js#L37-L53\nexport async function isAutoOrientationInBrowser() {\n if (isAutoOrientationInBrowser.result !== undefined) return isAutoOrientationInBrowser.result;\n\n // black 2x1 JPEG, with the following meta information set:\n // EXIF Orientation: 6 (Rotated 90° CCW)\n const testImageURL = 'data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAA'\n + 'AAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA'\n + 'QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE'\n + 'BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/x'\n + 'ABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAA'\n + 'AAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==';\n const testImageFile = await getFilefromDataUrl(testImageURL, 'test.jpg', Date.now());\n\n const testImageCanvas = (await drawFileInCanvas(testImageFile))[1];\n const testImageFile2 = await canvasToFile(testImageCanvas, testImageFile.type, testImageFile.name, testImageFile.lastModified);\n cleanupCanvasMemory(testImageCanvas);\n const img = (await drawFileInCanvas(testImageFile2))[0];\n // console.log('img', img.width, img.height)\n\n isAutoOrientationInBrowser.result = img.width === 1 && img.height === 2;\n return isAutoOrientationInBrowser.result;\n}\n\n/**\n * getExifOrientation\n * get image exif orientation info\n * source: https://stackoverflow.com/a/32490603/10395024\n *\n * @param {File | Blob} file\n * @returns {Promise} - orientation id, see https://i.stack.imgur.com/VGsAj.gif\n */\nexport function getExifOrientation(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = (e) => {\n const view = new DataView(e.target.result);\n if (view.getUint16(0, false) != 0xFFD8) {\n return resolve(-2);\n }\n const length = view.byteLength;\n let offset = 2;\n while (offset < length) {\n if (view.getUint16(offset + 2, false) <= 8) return resolve(-1);\n const marker = view.getUint16(offset, false);\n offset += 2;\n if (marker == 0xFFE1) {\n if (view.getUint32(offset += 2, false) != 0x45786966) {\n return resolve(-1);\n }\n\n const little = view.getUint16(offset += 6, false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n for (let i = 0; i < tags; i++) {\n if (view.getUint16(offset + (i * 12), little) == 0x0112) {\n return resolve(view.getUint16(offset + (i * 12) + 8, little));\n }\n }\n } else if ((marker & 0xFF00) != 0xFF00) {\n break;\n } else {\n offset += view.getUint16(offset, false);\n }\n }\n return resolve(-1);\n };\n reader.onerror = (e) => reject(e);\n reader.readAsArrayBuffer(file);\n });\n}\n\n/**\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param options\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function handleMaxWidthOrHeight(canvas, options) {\n const { width } = canvas;\n const { height } = canvas;\n const { maxWidthOrHeight } = options;\n\n const needToHandle = isFinite(maxWidthOrHeight) && (width > maxWidthOrHeight || height > maxWidthOrHeight);\n\n let newCanvas = canvas;\n let ctx;\n\n if (needToHandle) {\n [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n if (width > height) {\n newCanvas.width = maxWidthOrHeight;\n newCanvas.height = (height / width) * maxWidthOrHeight;\n } else {\n newCanvas.width = (width / height) * maxWidthOrHeight;\n newCanvas.height = maxWidthOrHeight;\n }\n ctx.drawImage(canvas, 0, 0, newCanvas.width, newCanvas.height);\n\n cleanupCanvasMemory(canvas);\n }\n\n return newCanvas;\n}\n\n/**\n * followExifOrientation\n * source: https://stackoverflow.com/a/40867559/10395024\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {number} exifOrientation\n * @returns {HTMLCanvasElement | OffscreenCanvas} canvas\n */\nexport function followExifOrientation(canvas, exifOrientation) {\n const { width } = canvas;\n const { height } = canvas;\n\n const [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n\n // set proper canvas dimensions before transform & export\n if (exifOrientation > 4 && exifOrientation < 9) {\n newCanvas.width = height;\n newCanvas.height = width;\n } else {\n newCanvas.width = width;\n newCanvas.height = height;\n }\n\n // transform context before drawing image\n switch (exifOrientation) {\n case 2:\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n break;\n }\n\n ctx.drawImage(canvas, 0, 0, width, height);\n\n cleanupCanvasMemory(canvas);\n\n return newCanvas;\n}\n","import {\n canvasToFile,\n cleanupCanvasMemory,\n drawFileInCanvas,\n followExifOrientation,\n getExifOrientation,\n getNewCanvasAndCtx,\n handleMaxWidthOrHeight,\n isAutoOrientationInBrowser,\n} from './utils';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} options\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @param {number} [options.initialQuality=1.0]\n * @param {number} previousProgress - for internal try catch rerunning start from previous progress\n * @returns {Promise}\n */\nexport default async function compress(file, options, previousProgress = 0) {\n let progress = previousProgress;\n\n function incProgress(inc = 5) {\n progress += inc;\n options.onProgress(Math.min(progress, 100));\n }\n\n function setProgress(p) {\n progress = Math.min(Math.max(p, progress), 100);\n options.onProgress(progress);\n }\n\n let remainingTrials = options.maxIteration || 10;\n\n const maxSizeByte = options.maxSizeMB * 1024 * 1024;\n\n incProgress();\n\n // drawFileInCanvas\n const [, origCanvas] = await drawFileInCanvas(file);\n\n incProgress();\n\n // handleMaxWidthOrHeight\n const maxWidthOrHeightFixedCanvas = handleMaxWidthOrHeight(origCanvas, options);\n\n incProgress();\n\n // exifOrientation\n const exifOrientation = options.exifOrientation || await getExifOrientation(file);\n incProgress();\n const orientationFixedCanvas = (await isAutoOrientationInBrowser()) ? maxWidthOrHeightFixedCanvas : followExifOrientation(maxWidthOrHeightFixedCanvas, exifOrientation);\n incProgress();\n\n let quality = options.initialQuality || 1.0;\n\n const outputFileType = options.fileType || file.type;\n\n const tempFile = await canvasToFile(orientationFixedCanvas, outputFileType, file.name, file.lastModified, quality);\n incProgress();\n\n const origExceedMaxSize = tempFile.size > maxSizeByte;\n const sizeBecomeLarger = tempFile.size > file.size;\n if (process.env.BUILD === 'development') {\n console.log('original file size', file.size);\n console.log('current file size', tempFile.size);\n }\n\n // check if we need to compress or resize\n if (!origExceedMaxSize && !sizeBecomeLarger) {\n // no need to compress\n if (process.env.BUILD === 'development') {\n console.log('no need to compress');\n }\n setProgress(100);\n return tempFile;\n }\n\n const sourceSize = file.size;\n const renderedSize = tempFile.size;\n let currentSize = renderedSize;\n let compressedFile;\n let newCanvas; let\n ctx;\n let canvas = orientationFixedCanvas;\n while (remainingTrials-- && (currentSize > maxSizeByte || currentSize > sourceSize)) {\n const newWidth = origExceedMaxSize ? canvas.width * 0.95 : canvas.width;\n const newHeight = origExceedMaxSize ? canvas.height * 0.95 : canvas.height;\n if (process.env.BUILD === 'development') {\n console.log('current width', newWidth);\n console.log('current height', newHeight);\n }\n [newCanvas, ctx] = getNewCanvasAndCtx(newWidth, newHeight);\n\n ctx.drawImage(canvas, 0, 0, newWidth, newHeight);\n\n quality *= 0.95;\n // eslint-disable-next-line no-await-in-loop\n compressedFile = await canvasToFile(newCanvas, outputFileType, file.name, file.lastModified, quality);\n\n cleanupCanvasMemory(canvas);\n\n canvas = newCanvas;\n\n currentSize = compressedFile.size;\n // console.log('currentSize', currentSize)\n setProgress(Math.min(99, Math.floor(((renderedSize - currentSize) / (renderedSize - maxSizeByte)) * 100)));\n }\n\n cleanupCanvasMemory(canvas);\n cleanupCanvasMemory(newCanvas);\n cleanupCanvasMemory(maxWidthOrHeightFixedCanvas);\n cleanupCanvasMemory(orientationFixedCanvas);\n cleanupCanvasMemory(origCanvas);\n\n setProgress(100);\n return compressedFile;\n}\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = IS_CONSTRUCTOR ? new this(length) : Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements -- TODO\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to , but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar $toString = require('../internals/to-string');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar nativeFetch = getBuiltIn('fetch');\nvar NativeRequest = getBuiltIn('Request');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (iteratorMethod) {\n iterator = getIterator(init, iteratorMethod);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: $toString(first.value), value: $toString(second.value) });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: $toString(init[key]) });\n } else {\n parseSearchParams(\n entries,\n typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : $toString(init)\n );\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: $toString(name), value: $toString(value) });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n } return init;\n };\n\n if (isCallable(nativeFetch)) {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestConstructor, 'Request');\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n\n $({ global: true, forced: true }, {\n Request: RequestConstructor\n });\n }\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar $toString = require('../internals/to-string');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\n// eslint-disable-next-line regexp/no-obscure-range -- safe\nvar ALPHANUMERIC = /[\\d+-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^0x/i;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n/* eslint-disable no-control-regex -- safe */\nvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/;\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/;\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g;\nvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\n/* eslint-enable no-control-regex -- safe */\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var chr = function () {\n return input.charAt(pointer);\n };\n\n if (chr() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (chr()) {\n if (pieceIndex == 8) return;\n if (chr() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(chr())) {\n value = value * 16 + parseInt(chr(), 16);\n pointer++;\n length++;\n }\n if (chr() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (chr()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (chr() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(chr())) return;\n while (DIGIT.test(chr())) {\n number = parseInt(chr(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (chr() == ':') {\n pointer++;\n if (!chr()) return;\n } else if (chr()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (chr, set) {\n var code = codeAt(chr, 0);\n return code > 0x20 && code < 0x7F && !has(set, chr) ? chr : encodeURIComponent(chr);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, chr, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n chr = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (chr && ALPHA.test(chr)) {\n buffer += chr.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (chr && (ALPHANUMERIC.test(chr) || chr == '+' || chr == '-' || chr == '.')) {\n buffer += chr.toLowerCase();\n } else if (chr == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && chr == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (chr == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (chr == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (chr == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '/' || (chr == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (chr == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (chr == '/' || chr == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (chr == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (chr != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (chr != '/' && chr != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (chr == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += chr;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (chr == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (chr == '[') seenBracket = true;\n else if (chr == ']') seenBracket = false;\n buffer += chr;\n } break;\n\n case PORT:\n if (DIGIT.test(chr)) {\n buffer += chr;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (chr == '/' || chr == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (chr == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (chr == '/' || chr == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (chr == EOF || chr == '/' || chr == '\\\\' || chr == '?' || chr == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += chr;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (chr != '/' && chr != '\\\\') continue;\n } else if (!stateOverride && chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n state = PATH;\n if (chr != '/') continue;\n } break;\n\n case PATH:\n if (\n chr == EOF || chr == '/' ||\n (chr == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (chr == '?' || chr == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(chr, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n if (chr == \"'\" && isSpecial(url)) url.query += '%27';\n else if (chr == '#') url.query += '%23';\n else url.query += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = $toString(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, $toString(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URLConstructor(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = $toString(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, $toString(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = $toString(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, $toString(pathname), PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = $toString(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = $toString(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n}\n\nhandlePrototype(DOMTokenListPrototype);\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar $startsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n return ''.replace(re, '$') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);\n return replacer\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(toString(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (string, replaceValue) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (\n typeof replaceValue === 'string' &&\n replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1 &&\n replaceValue.indexOf('$<') === -1\n ) {\n var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n if (res.done) return res.value;\n }\n\n var functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = toString(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = toString(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = toString(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","import * as UZIP from 'uzip';\n// eslint-disable-next-line import/no-cycle\nimport lib from './index';\nimport compress from './image-compression';\nimport { getNewCanvasAndCtx, isIOS } from './utils';\nimport UPNG from './UPNG';\nimport MaxCanvasSize from './config/max-canvas-size';\n\nlet cnt = 0;\nlet imageCompressionLibUrl;\nlet worker;\n\nfunction createWorker(script) {\n const blobArgs = [];\n if (typeof script === 'function') {\n blobArgs.push(`(${script})()`);\n } else {\n blobArgs.push(script);\n }\n return new Worker(URL.createObjectURL(new Blob(blobArgs)));\n}\n\nfunction createSourceObject(str) {\n // console.log('createSourceObject', str)\n return URL.createObjectURL(new Blob([str], { type: 'application/javascript' }));\n}\n\nfunction stringify(o) {\n return JSON.stringify(o, (key, value) => ((typeof value === 'function') ? `BIC_FN:::(function () { return ${value.toString()} })()` : value));\n}\n\nfunction parse(o) {\n if (typeof o === 'string') return o;\n const result = {};\n Object.entries(o).forEach(([key, value]) => {\n if (typeof value === 'string' && value.startsWith('BIC_FN:::')) {\n try {\n // eslint-disable-next-line no-eval\n result[key] = eval(value.replace(/^BIC_FN:::/, ''));\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(key, e);\n }\n throw e;\n }\n } else {\n result[key] = parse(value);\n }\n });\n return result;\n}\n\nfunction generateLib() {\n // prepare the lib to be used inside WebWorker\n return createSourceObject(`\n // reconstruct library\n function imageCompression (){return (${lib}).apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ${lib.getDataUrlFromFile}\n imageCompression.getFilefromDataUrl = ${lib.getFilefromDataUrl}\n imageCompression.loadImage = ${lib.loadImage}\n imageCompression.drawImageInCanvas = ${lib.drawImageInCanvas}\n imageCompression.drawFileInCanvas = ${lib.drawFileInCanvas}\n imageCompression.canvasToFile = ${lib.canvasToFile}\n imageCompression.getExifOrientation = ${lib.getExifOrientation}\n imageCompression.handleMaxWidthOrHeight = ${lib.handleMaxWidthOrHeight}\n imageCompression.followExifOrientation = ${lib.followExifOrientation}\n imageCompression.cleanupCanvasMemory = ${lib.cleanupCanvasMemory}\n imageCompression.isAutoOrientationInBrowser = ${lib.isAutoOrientationInBrowser}\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ${lib.approximateBelowMaximumCanvasSizeOfBrowser}\n imageCompression.getBrowserName = ${lib.getBrowserName}\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ${isIOS}\n \n getNewCanvasAndCtx = ${getNewCanvasAndCtx}\n CustomFileReader = FileReader\n CustomFile = File\n MaxCanvasSize = ${JSON.stringify(MaxCanvasSize)}\n function compress (){return (${compress}).apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ${parse}\n const UPNG = {}\n UPNG.toRGBA8 = ${UPNG.toRGBA8}\n UPNG.toRGBA8.decodeImage = ${UPNG.toRGBA8.decodeImage}\n UPNG.decode = ${UPNG.decode}\n UPNG.decode._decompress = ${UPNG.decode._decompress}\n UPNG.decode._inflate = ${UPNG.decode._inflate}\n UPNG.decode._readInterlace = ${UPNG.decode._readInterlace}\n UPNG.decode._getBPP = ${UPNG.decode._getBPP} \n UPNG.decode._filterZero = ${UPNG.decode._filterZero}\n UPNG.decode._paeth = ${UPNG.decode._paeth}\n UPNG.decode._IHDR = ${UPNG.decode._IHDR}\n UPNG._bin = parse(${stringify(UPNG._bin)})\n UPNG._copyTile = ${UPNG._copyTile}\n UPNG.encode = ${UPNG.encode}\n UPNG.encodeLL = ${UPNG.encodeLL} \n UPNG.encode._main = ${UPNG.encode._main}\n UPNG.encode.compressPNG = ${UPNG.encode.compressPNG} \n UPNG.encode.compress = ${UPNG.encode.compress}\n UPNG.encode.framize = ${UPNG.encode.framize} \n UPNG.encode._updateFrame = ${UPNG.encode._updateFrame} \n UPNG.encode._prepareDiff = ${UPNG.encode._prepareDiff} \n UPNG.encode._filterZero = ${UPNG.encode._filterZero} \n UPNG.encode._filterLine = ${UPNG.encode._filterLine}\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.crc = parse(${stringify(UPNG.crc)})\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ${UPNG.quantize} \n UPNG.quantize.getKDtree = ${UPNG.quantize.getKDtree} \n UPNG.quantize.getNearest = ${UPNG.quantize.getNearest} \n UPNG.quantize.planeDst = ${UPNG.quantize.planeDst} \n UPNG.quantize.dist = ${UPNG.quantize.dist} \n UPNG.quantize.splitPixels = ${UPNG.quantize.splitPixels} \n UPNG.quantize.vecDot = ${UPNG.quantize.vecDot} \n UPNG.quantize.stats = ${UPNG.quantize.stats} \n UPNG.quantize.estats = ${UPNG.quantize.estats}\n UPNG.M4 = parse(${stringify(UPNG.M4)})\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP[\"parse\"] = ${UZIP.parse}\n UZIP._readLocal = ${UZIP._readLocal}\n UZIP.inflateRaw = ${UZIP.inflateRaw}\n UZIP.inflate = ${UZIP.inflate}\n UZIP.deflate = ${UZIP.deflate}\n UZIP.deflateRaw = ${UZIP.deflateRaw}\n UZIP.encode = ${UZIP.encode}\n UZIP._noNeed = ${UZIP._noNeed}\n UZIP._writeHeader = ${UZIP._writeHeader}\n UZIP.crc = parse(${stringify(UZIP.crc)})\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ${UZIP.adler}\n UZIP.bin = parse(${stringify(UZIP.bin)})\n UZIP.F = {}\n UZIP.F.deflateRaw = ${UZIP.F.deflateRaw}\n UZIP.F._bestMatch = ${UZIP.F._bestMatch}\n UZIP.F._howLong = ${UZIP.F._howLong}\n UZIP.F._hash = ${UZIP.F._hash}\n UZIP.saved = ${UZIP.saved}\n UZIP.F._writeBlock = ${UZIP.F._writeBlock}\n UZIP.F._copyExact = ${UZIP.F._copyExact}\n UZIP.F.getTrees = ${UZIP.F.getTrees}\n UZIP.F.getSecond = ${UZIP.F.getSecond}\n UZIP.F.nonZero = ${UZIP.F.nonZero}\n UZIP.F.contSize = ${UZIP.F.contSize}\n UZIP.F._codeTiny = ${UZIP.F._codeTiny} \n UZIP.F._lenCodes = ${UZIP.F._lenCodes} \n UZIP.F._hufTree = ${UZIP.F._hufTree} \n UZIP.F.setDepth = ${UZIP.F.setDepth} \n UZIP.F.restrictDepth = ${UZIP.F.restrictDepth}\n UZIP.F._goodIndex = ${UZIP.F._goodIndex} \n UZIP.F._writeLit = ${UZIP.F._writeLit} \n UZIP.F.inflate = ${UZIP.F.inflate} \n UZIP.F._check = ${UZIP.F._check} \n UZIP.F._decodeTiny = ${UZIP.F._decodeTiny} \n UZIP.F._copyOut = ${UZIP.F._copyOut} \n UZIP.F.makeCodes = ${UZIP.F.makeCodes} \n UZIP.F.codes2map = ${UZIP.F.codes2map} \n UZIP.F.revCodes = ${UZIP.F.revCodes} \n\n // used only in deflate\n UZIP.F._putsE = ${UZIP.F._putsE}\n UZIP.F._putsF = ${UZIP.F._putsF}\n \n UZIP.F._bitsE = ${UZIP.F._bitsE}\n UZIP.F._bitsF = ${UZIP.F._bitsF}\n\n UZIP.F._get17 = ${UZIP.F._get17}\n UZIP.F._get25 = ${UZIP.F._get25}\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n `);\n}\n\nfunction generateWorkerScript() {\n // code to be run in the WebWorker\n return createWorker(`\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\\\n' + e.stack, id })\n }\n })\n `);\n}\n\nexport default function compressOnWebWorker(file, options) {\n return new Promise((resolve, reject) => {\n cnt += 1;\n const id = cnt;\n\n if (!imageCompressionLibUrl) {\n imageCompressionLibUrl = generateLib();\n }\n\n if (!worker) {\n worker = generateWorkerScript();\n }\n\n function handler(e) {\n if (e.data.id === id) {\n if (e.data.progress !== undefined) {\n options.onProgress(e.data.progress);\n return;\n }\n worker.removeEventListener('message', handler);\n if (e.data.error) {\n reject(new Error(e.data.error));\n }\n resolve(e.data.file);\n }\n }\n\n worker.addEventListener('message', handler);\n worker.addEventListener('error', reject);\n\n worker.postMessage({\n file,\n id,\n imageCompressionLibUrl,\n options: { ...options, onProgress: undefined },\n });\n });\n}\n","import './polyfill';\n\nimport compress from './image-compression';\nimport {\n canvasToFile,\n drawFileInCanvas,\n drawImageInCanvas,\n getDataUrlFromFile,\n getFilefromDataUrl,\n loadImage,\n getExifOrientation,\n handleMaxWidthOrHeight,\n followExifOrientation,\n CustomFile,\n cleanupCanvasMemory,\n isAutoOrientationInBrowser,\n approximateBelowMaximumCanvasSizeOfBrowser,\n getBrowserName,\n} from './utils';\n// eslint-disable-next-line import/no-cycle\nimport compressOnWebWorker from './web-worker';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} opts - { maxSizeMB=Number.POSITIVE_INFINITY, maxWidthOrHeight, useWebWorker=false, maxIteration = 10, exifOrientation, fileType }\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @returns {Promise}\n */\nasync function imageCompression(file, options) {\n const opts = { ...options };\n\n let compressedFile;\n let progress = 0;\n const { onProgress } = opts;\n\n opts.maxSizeMB = opts.maxSizeMB || Number.POSITIVE_INFINITY;\n const useWebWorker = typeof opts.useWebWorker === 'boolean' ? opts.useWebWorker : true;\n delete opts.useWebWorker;\n opts.onProgress = (aProgress) => {\n progress = aProgress;\n if (typeof onProgress === 'function') {\n onProgress(progress);\n }\n };\n\n if (!(file instanceof Blob || file instanceof CustomFile)) {\n throw new Error('The file given is not an instance of Blob or File');\n } else if (!/^image/.test(file.type)) {\n throw new Error('The file given is not an image');\n }\n\n // try run in web worker, fall back to run in main thread\n // eslint-disable-next-line no-undef, no-restricted-globals\n const inWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n\n if (process.env.BUILD === 'development') {\n if ((useWebWorker && typeof Worker === 'function') || inWebWorker) {\n console.log('run compression in web worker');\n } else {\n console.log('run compression in main thread');\n }\n }\n\n if (useWebWorker && typeof Worker === 'function' && !inWebWorker) {\n try {\n // \"compressOnWebWorker\" is kind of like a recursion to call \"imageCompression\" again inside web worker\n compressedFile = await compressOnWebWorker(file, opts);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.warn('Run compression in web worker failed:', e, ', fall back to main thread');\n }\n compressedFile = await compress(file, opts);\n }\n } else {\n compressedFile = await compress(file, opts);\n }\n\n try {\n compressedFile.name = file.name;\n compressedFile.lastModified = file.lastModified;\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n }\n\n return compressedFile;\n}\n\nimageCompression.getDataUrlFromFile = getDataUrlFromFile;\nimageCompression.getFilefromDataUrl = getFilefromDataUrl;\nimageCompression.loadImage = loadImage;\nimageCompression.drawImageInCanvas = drawImageInCanvas;\nimageCompression.drawFileInCanvas = drawFileInCanvas;\nimageCompression.canvasToFile = canvasToFile;\nimageCompression.getExifOrientation = getExifOrientation;\n\nimageCompression.handleMaxWidthOrHeight = handleMaxWidthOrHeight;\nimageCompression.followExifOrientation = followExifOrientation;\nimageCompression.cleanupCanvasMemory = cleanupCanvasMemory;\nimageCompression.isAutoOrientationInBrowser = isAutoOrientationInBrowser;\nimageCompression.approximateBelowMaximumCanvasSizeOfBrowser = approximateBelowMaximumCanvasSizeOfBrowser;\nimageCompression.getBrowserName = getBrowserName;\nimageCompression.version = __buildVersion__;\n\nexport default imageCompression;\n"],"names":["check","it","Math","isPure","toObject","argument","has","Object","hasOwn","key","id","postfix","random","isCallable","aFunction","process","Deno","versions","match","userAgent","version","fails","WellKnownSymbolsStore","name","NATIVE_SYMBOL","TO_STRING_TAG","wellKnownSymbol","test","EXISTS","isObject","document","createElement","tryToString","func","V","P","val","toPrimitive","input","exoticToPrim","getMethod","isSymbol","toPropertyKey","createPropertyDescriptor","definePropertyModule","f","object","value","store","inspectSource","functionToString","hiddenKeys","OBJECT_ALREADY_INITIALIZED","set","get","NATIVE_WEAK_MAP","wmhas","call","STATE","FunctionPrototype","prototype","DESCRIPTORS","redefine","getInternalState","InternalStateModule","unsafe","simple","CONFIGURABLE_FUNCTION_NAME","toString","arguments","tryGet","$propertyIsEnumerable","getOwnPropertyDescriptor","NASHORN_BUG","split","ceil","floor","toInteger","max","IS_INCLUDES","$this","el","fromIndex","O","toIndexedObject","length","i","copyConstructorProperties","keys","descriptor","target","src","setPrototypeOf","proto","setToStringTag","TAG","STATIC","anInstance","Constructor","TypeError","iterators","ArrayPrototype","Array","a","usingIterator","innerResult","innerError","anObject","iterate","iterable","unboundFunction","options","AS_ENTRIES","bind","INTERRUPTED","fn","IS_ITERATOR","ITERATOR","constructorRegExp","INCORRECT_TO_STRING","isConstructorLegacy","speciesConstructor","defaultConstructor","global","setImmediate","MessageChannel","counter","ONREADYSTATECHANGE","queue","hasOwnProperty","event","location","protocol","host","args","now","runner","macrotask","promise","then","flush","PromiseCapability","C","resolve","console","perform","engineIsBrowser","SPECIES","PROMISE","NativePromisePrototype","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","SUBCLASSING","GLOBAL_CORE_JS_PROMISE","IS_BROWSER","INCORRECT_ITERATION","notify","state","reaction","DISPATCH_EVENT","rejection","IS_NODE","isUnhandled","UNHANDLED","HANDLED","onHandleUnhandled","REJECTED","internalReject","type","NativePromise","PromiseConstructorPrototype","forced","Promise","GT","LT","iframe","style","display","String","iframeDocument","write","scriptTag","F","activeXDocument","whitespaces","ltrim","RegExp","first","third","radix","maxCode","digits","index","code","FUNCTION_NAME_EXISTS","FunctionPrototypeToString","assign","B","symbol","chr","getOwnPropertySymbols","getOwnPropertySymbolsModule","re","$RegExp","exec","regexpUnsupportedDotAll","regexpUnsupportedNcg","nativeExec","nativeReplace","patchedExec","this","raw","strCopy","str","flags","replace","indexOf","lastIndex","UPDATES_LAST_INDEX_WRONG","MATCH","S","requireObjectCoercible","CONVERT_TO_STRING","undefined","charAt","require$$0","R","fixRegExpWellKnownSymbolLogic","SPLIT","nativeSplit","maybeCallNative","lastLastIndex","arrayPush","string","internalSplit","unicodeMatching","rx","unicode","ignoreCase","multiline","UNSUPPORTED_Y","regexp","matcher","UNSCOPABLES","configurable","objectGetPrototypeOf","PrototypeOfArrayIteratorPrototype","CurrentIteratorPrototype","returnThis","arrayBufferNative","Int8Array","Uint8ClampedArrayPrototype","Uint8ClampedArray","TypedArray","TYPED_ARRAY_CONSTRUCTOR","Prototype","Int32Array","BigIntArrayConstructorsList","BigInt64Array","klass","isTypedArray","aTypedArray","isPrototypeOf","TypedArrayPrototype","KEY","createNonEnumerableProperty","NAME","number","abs","pow","log","LN2","pack","exponentLength","exponent","c","unpack","buffer","nBits","eMax","mantissa","sign","mantissaLength","getOwnPropertyNames","defineProperty","require$$1","PROPER_FUNCTION_NAME","FunctionName","PROPER","setInternalState","$DataViewPrototype","$DataView","PROTOTYPE","intIndex","toIndex","count","byteLength","WRONG_INDEX","bytes","isLittleEndian","conversion","DataView","DATA_VIEW","byteOffset","packFloat32","aTypedArrayConstructor","typedArrayFrom","aConstructor","constructor","arraySpeciesCreate","originalArray","IS_SOME","IS_EVERY","IS_FIND_INDEX","TYPE","self","toLength","push","typedArrayConstructor","commonjsHelpers.createCommonjsModule","module","forEach","nativeGetOwnPropertyDescriptor","getOwnPropertyDescriptorModule","ArrayBufferModule","fromList","result","isArrayBuffer","isTypedArrayIndex","wrappedDefineProperty","wrapper","CLAMPED","CONSTRUCTOR_NAME","offset","BYTES","$len","Uint8Array","data","init","len","to","toAbsoluteIndex","end","from","arrayFromConstructorAndList","ArrayBufferViewCore","$filter","filter","arrayKeys","ArrayIterators","arrayEntries","exportTypedArrayMethod","nativeTypedArrayIterator","PROPER_ARRAY_VALUES_NAME","arrayMethodIsStrict","STRICT_METHOD","$map","map","IS_RIGHT","that","callbackfn","mergeSort","comparefn","array","j","right","Uint16Array","nativeSort","sort","STABLE_SORT","FF","WEBKIT","mod","$toLocaleString","FORCED","Uint8ArrayPrototype","arrayToString","arrayJoin","join","$includes","notARegexp","METHOD_NAME","Uint32Array","TO_STRING","RegExpPrototype","nativeToString","NOT_GENERIC","k","FAILS_ON_UNDEFINED","x","u32","UZIP","eocd","rUi","_readLocal","roff","out","csize","usize","onlyNames","rUs","nlen","buf","adler","crc","level","deflateRaw","p","cpr","zpd","file","bin","sizeUTF8","tot","o","_writeHeader","ioff","wUi","ext","obj","n","off","table","buff","charCodeAt","_goodIndex","_hash","putsE","_putsE","dlen","li","mch","lits","dst","lgi","dgi","lc","cvrd","ci","cl","U","pos","l0","BTYPE","o0","makeCodes","dtree","itree","si","dxb","p8","dset","b","tree","lz","l","_hufTree","list","hl","hst","l2","slice","maxl","MAXL","lit","bCost","MD","dbt","arr","v","ch","ltree","u8","noBuf","HLIT","HDIST","HCLEN","ML","bitsE","ttree","mx1","dmap","ebs","ldef","_check","lmap","LL","_bitsE","_copyOut","bl_count","MAX_BITS","dt","flmap","u16","fdmap","strt","rev15","sv","exb","w","height","h","img","frames","fh","frm","dispose","bpp","area","bf32","ctype","depth","tabs","tRNS","ts","ti","ap","y","bf","qi","cj","t0","di","gr","al","tr","readASCII","doff","num_frames","num_plays","del","fd","readUint","text","keyw","readUTF8","pl","PLTE","foff","bpl","interlace","CgBI","UPNG","inflateRaw","decode","_inflate","dd","_filterZero","_readInterlace","H","N","m","Z","W","A","u","r","D","X","Y","e","I","M","starting_row","row_increment","pass","cr","cc","row","starting_col","bpll","col","cbpp","sh","_paeth","pa","pc","s","fb","ifa","tb","fr","fg","mode","fa","sb","ba","bufs","nimg","encode","_main","ac","_bin","wUs","wAs","dl","anim","leng","sRGB","pHYs","loop","cimg","imgd","nh","onlyBlend","inds","nbufs","cof","bln","ind","ilen","img32","inj","gotAlpha","frms","nx","tlim","forbidPrev","alwaysBlend","pimg","mix","evenCrd","sarea","min","miY","r0","miX","_updateFrame","rect","width","U8","pimg32","cx","miy","blend","rec","ftry","opts","paeth","oimg","nimg32","KD","quantize","getKDtree","root","nd","err","i0","maxL","splitPixels","i1","node","left","planeDst","ln","rn","getNearest","q","d0","d1","d2","g","stats","m0","Rj","m1","iN","m3","Cov","round","M4","noff","isBrowser","window","cordova","CustomFileReader","reject","reader","onload","browserName","approximateBelowMaximumCanvasSizeOfBrowser","maximumCanvasSize","drawImageInCanvas","canvas","png","Blob","fileLastModified","$await_11","testImageCanvas","$await_13","view","getUint32","little","maxWidthOrHeight","maxSizeByte","classList","documentCreateElement","CollectionPrototype","searchParams","IS_CONSTRUCTOR","argumentsLength","mapfn","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexNonASCII","regexSeparators","OVERFLOW_ERROR","baseMinusTMin","stringFromCharCode","extra","digitToBasic","adapt","delta","numPoints","nativeFetch","getBuiltIn","NativeRequest","percentSequence","sequences","attribute","entries","query","URLSearchParamsIterator","createIteratorConstructor","Iterator","params","kind","entry","URLSearchParams","URLSearchParamsConstructor","URL_SEARCH_PARAMS","parseSearchParams","getInternalParamsState","entriesIndex","boundFunction","codeAt","NativeURL","getInternalSearchParamsState","getInternalURLState","getterFor","INVALID_AUTHORITY","INVALID_SCHEME","INVALID_PORT","ALPHA","DIGIT","HEX_START","OCT","DEC","LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE","INVALID_HOST","url","codePoints","C0ControlPercentEncodeSet","parseIPv4","parts","numbers","pieceIndex","ipv4Piece","maxLength","currLength","percentEncode","specialSchemes","https","ws","wss","isSpecial","includesCredentials","username","password","cannotHaveUsernamePasswordPort","isWindowsDriveLetter","second","path","segment","toLowerCase","SCHEME_START","PATH_OR_AUTHORITY","AUTHORITY","CANNOT_BE_A_BASE_URL_PATH","stateOverride","TAB_AND_NEW_LINE","arrayFrom","pointer","scheme","failure","fragment","searchParamsState","getPathname","URLPrototype","output","getProtocol","port","updateSearchParams","$toString","search","$forEach","propertyIsEnumerable","objectKeys","$startsWith","namedCaptures","position","maybeToString","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","REPLACE","searchValue","res","replaceValue","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","cnt","worker","script","blobArgs","Worker","createSourceObject","imageCompression","getDataUrlFromFile","getFilefromDataUrl","loadImage","drawFileInCanvas","canvasToFile","getExifOrientation","handleMaxWidthOrHeight","followExifOrientation","cleanupCanvasMemory","isAutoOrientationInBrowser","getBrowserName"],"mappings":"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"} \ No newline at end of file +{"version":3,"file":"browser-image-compression.mjs","sources":["../node_modules/core-js/internals/global.js","../node_modules/core-js/internals/is-pure.js","../node_modules/core-js/internals/to-object.js","../node_modules/core-js/internals/has.js","../node_modules/core-js/internals/uid.js","../node_modules/core-js/internals/is-callable.js","../node_modules/core-js/internals/get-built-in.js","../node_modules/core-js/internals/engine-v8-version.js","../node_modules/core-js/internals/fails.js","../node_modules/core-js/internals/well-known-symbol.js","../node_modules/core-js/internals/to-string-tag-support.js","../node_modules/core-js/internals/document-create-element.js","../node_modules/core-js/internals/an-object.js","../node_modules/core-js/internals/is-symbol.js","../node_modules/core-js/internals/try-to-string.js","../node_modules/core-js/internals/a-callable.js","../node_modules/core-js/internals/get-method.js","../node_modules/core-js/internals/ordinary-to-primitive.js","../node_modules/core-js/internals/to-primitive.js","../node_modules/core-js/internals/to-property-key.js","../node_modules/core-js/internals/create-property-descriptor.js","../node_modules/core-js/internals/create-non-enumerable-property.js","../node_modules/core-js/internals/inspect-source.js","../node_modules/core-js/internals/hidden-keys.js","../node_modules/core-js/internals/internal-state.js","../node_modules/core-js/internals/function-name.js","../node_modules/core-js/internals/redefine.js","../node_modules/core-js/internals/classof-raw.js","../node_modules/core-js/internals/classof.js","../node_modules/core-js/internals/object-property-is-enumerable.js","../node_modules/core-js/internals/indexed-object.js","../node_modules/core-js/internals/to-integer.js","../node_modules/core-js/internals/to-absolute-index.js","../node_modules/core-js/internals/array-includes.js","../node_modules/core-js/internals/object-keys-internal.js","../node_modules/core-js/internals/object-get-own-property-symbols.js","../node_modules/core-js/internals/copy-constructor-properties.js","../node_modules/core-js/internals/is-forced.js","../node_modules/core-js/internals/export.js","../node_modules/core-js/internals/redefine-all.js","../node_modules/core-js/internals/a-possible-prototype.js","../node_modules/core-js/internals/object-set-prototype-of.js","../node_modules/core-js/internals/set-to-string-tag.js","../node_modules/core-js/internals/set-species.js","../node_modules/core-js/internals/an-instance.js","../node_modules/core-js/internals/iterators.js","../node_modules/core-js/internals/is-array-iterator-method.js","../node_modules/core-js/internals/function-bind-context.js","../node_modules/core-js/internals/get-iterator.js","../node_modules/core-js/internals/iterator-close.js","../node_modules/core-js/internals/iterate.js","../node_modules/core-js/internals/check-correctness-of-iteration.js","../node_modules/core-js/internals/is-constructor.js","../node_modules/core-js/internals/a-constructor.js","../node_modules/core-js/internals/species-constructor.js","../node_modules/core-js/internals/task.js","../node_modules/core-js/internals/microtask.js","../node_modules/core-js/internals/new-promise-capability.js","../node_modules/core-js/internals/host-report-errors.js","../node_modules/core-js/internals/perform.js","../node_modules/core-js/internals/engine-is-browser.js","../node_modules/core-js/modules/es.promise.js","../node_modules/core-js/internals/object-create.js","../node_modules/core-js/internals/to-string.js","../node_modules/core-js/internals/whitespaces.js","../node_modules/core-js/internals/string-trim.js","../node_modules/core-js/modules/es.number.constructor.js","../node_modules/core-js/modules/es.function.name.js","../node_modules/core-js/internals/object-assign.js","../node_modules/core-js/internals/regexp-sticky-helpers.js","../node_modules/core-js/internals/regexp-unsupported-dot-all.js","../node_modules/core-js/internals/regexp-unsupported-ncg.js","../node_modules/core-js/internals/regexp-exec.js","../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../node_modules/core-js/internals/is-regexp.js","../node_modules/core-js/internals/string-multibyte.js","../node_modules/core-js/internals/advance-string-index.js","../node_modules/core-js/internals/regexp-exec-abstract.js","../node_modules/core-js/modules/es.string.split.js","../node_modules/core-js/modules/es.string.match.js","../node_modules/core-js/internals/add-to-unscopables.js","../node_modules/core-js/internals/object-get-prototype-of.js","../node_modules/core-js/internals/iterators-core.js","../node_modules/core-js/internals/define-iterator.js","../node_modules/core-js/internals/array-buffer-native.js","../node_modules/core-js/internals/array-buffer-view-core.js","../node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","../node_modules/core-js/internals/to-index.js","../node_modules/core-js/internals/ieee754.js","../node_modules/core-js/internals/array-buffer.js","../node_modules/core-js/internals/typed-array-from.js","../node_modules/core-js/internals/array-species-constructor.js","../node_modules/core-js/internals/array-species-create.js","../node_modules/core-js/internals/array-iteration.js","../node_modules/core-js/internals/typed-array-constructor.js","../node_modules/core-js/modules/es.typed-array.uint8-array.js","../node_modules/core-js/internals/array-copy-within.js","../node_modules/core-js/internals/array-from-constructor-and-list.js","../node_modules/core-js/internals/typed-array-species-constructor.js","../node_modules/core-js/modules/es.typed-array.filter.js","../node_modules/core-js/modules/es.typed-array.iterator.js","../node_modules/core-js/modules/es.typed-array.join.js","../node_modules/core-js/internals/array-method-is-strict.js","../node_modules/core-js/internals/array-last-index-of.js","../node_modules/core-js/modules/es.typed-array.map.js","../node_modules/core-js/internals/array-reduce.js","../node_modules/core-js/modules/es.typed-array.reverse.js","../node_modules/core-js/modules/es.typed-array.set.js","../node_modules/core-js/modules/es.typed-array.slice.js","../node_modules/core-js/internals/array-sort.js","../node_modules/core-js/modules/es.typed-array.sort.js","../node_modules/core-js/modules/es.typed-array.to-locale-string.js","../node_modules/core-js/modules/es.typed-array.to-string.js","../node_modules/core-js/modules/es.array.includes.js","../node_modules/core-js/internals/not-a-regexp.js","../node_modules/core-js/internals/correct-is-regexp-logic.js","../node_modules/core-js/internals/array-method-has-species-support.js","../node_modules/core-js/modules/es.typed-array.uint32-array.js","../node_modules/core-js/modules/es.typed-array.uint16-array.js","../node_modules/core-js/modules/es.regexp.to-string.js","../node_modules/core-js/modules/es.array.sort.js","../node_modules/uzip/UZIP.js","../lib/UPNG.js","../lib/config/browser-name.js","../lib/utils.js","../lib/image-compression.js","../node_modules/core-js/modules/es.string.iterator.js","../node_modules/core-js/internals/dom-token-list-prototype.js","../node_modules/core-js/modules/web.dom-collections.iterator.js","../node_modules/core-js/internals/native-url.js","../node_modules/core-js/internals/array-from.js","../node_modules/core-js/internals/string-punycode-to-ascii.js","../node_modules/core-js/modules/web.url-search-params.js","../node_modules/core-js/modules/web.url.js","../node_modules/core-js/internals/array-for-each.js","../node_modules/core-js/modules/web.dom-collections.for-each.js","../node_modules/core-js/internals/object-to-array.js","../node_modules/core-js/modules/es.object.entries.js","../node_modules/core-js/modules/es.string.starts-with.js","../node_modules/core-js/internals/get-substitution.js","../node_modules/core-js/modules/es.string.replace.js","../node_modules/core-js/modules/es.array.concat.js","../lib/web-worker.js","../lib/index.js"],"sourcesContent":["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","module.exports = false;\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","// `isCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument === 'function';\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","module.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","module.exports = {};\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar has = require('../internals/has');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = has(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar has = require('../internals/has');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!has(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (argument) {\n if (typeof argument === 'object' || isCallable(argument)) return argument;\n throw TypeError(\"Can't set \" + String(argument) + ' as a prototype');\n};\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","module.exports = function (it, Constructor, name) {\n if (it instanceof Constructor) return it;\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n};\n","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var aCallable = require('../internals/a-callable');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aCallable(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(iteratorMethod.call(argument));\n throw TypeError(String(argument) + ' is not iterable');\n};\n","var anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\n\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = innerResult.call(iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw TypeError(String(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = constructorRegExp.exec;\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(function () { /* empty */ });\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(Object, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec.call(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var isConstructor = require('../internals/is-constructor');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsConstructor(argument) is true`\nmodule.exports = function (argument) {\n if (isConstructor(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a constructor');\n};\n","var anObject = require('../internals/an-object');\nvar aConstructor = require('../internals/a-constructor');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var argumentsLength = arguments.length;\n var i = 1;\n while (argumentsLength > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (isCallable(fn) ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","'use strict';\nvar aCallable = require('../internals/a-callable');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aCallable(resolve);\n this.reject = aCallable(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","module.exports = typeof window == 'object';\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar aCallable = require('../internals/a-callable');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aCallable(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromiseConstructorPrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var classof = require('../internals/classof');\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar isSymbol = require('../internals/is-symbol');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.es/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a number');\n var it = toPrimitive(argument, 'number');\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.es/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +\n // ESNext\n 'fromString,range'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar FUNCTION_NAME_EXISTS = require('../internals/function-name').EXISTS;\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.es/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nexports.UNSUPPORTED_Y = fails(function () {\n var re = $RegExp('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = $RegExp('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('.', 's');\n return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n","var fails = require('../internals/fails');\nvar global = require('../internals/global');\n\n// babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError\nvar $RegExp = global.RegExp;\n\nmodule.exports = fails(function () {\n var re = $RegExp('(?b)', 'g');\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$c') !== 'bc';\n});\n","'use strict';\n/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar toString = require('../internals/to-string');\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n // eslint-disable-next-line max-statements -- TODO\n patchedExec = function exec(string) {\n var re = this;\n var state = getInternalState(re);\n var str = toString(string);\n var raw = state.raw;\n var result, reCopy, lastIndex, match, i, object, group;\n\n if (raw) {\n raw.lastIndex = re.lastIndex;\n result = patchedExec.call(raw, str);\n re.lastIndex = raw.lastIndex;\n return result;\n }\n\n var groups = state.groups;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = str.slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str.charAt(re.lastIndex - 1) !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (match && groups) {\n match.groups = object = create(null);\n for (i = 0; i < groups.length; i++) {\n group = groups[i];\n object[group[0]] = match[group[1]];\n }\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n redefine(String.prototype, KEY, methods[0]);\n redefine(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var toInteger = require('../internals/to-integer');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.codePointAt` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof-raw');\nvar regexpExec = require('../internals/regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (isCallable(exec)) {\n var result = exec.call(R, S);\n if (result !== null) anObject(result);\n return result;\n }\n if (classof(R) === 'RegExp') return regexpExec.call(R, S);\n throw TypeError('RegExp#exec called on incompatible receiver');\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = toString(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? splitter.call(separator, O, limit)\n : internalSplit.call(toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n if (res.done) return res.value;\n\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? S.slice(q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);\n return matcher ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var has = require('../internals/has');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (has(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n redefine(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n redefine(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });\n }\n Iterators[NAME] = defaultIterator;\n\n return methods;\n};\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar tryToString = require('../internals/try-to-string');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\nvar TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME, Constructor, Prototype;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (isCallable(C) && (!setPrototypeOf || isPrototypeOf.call(TypedArray, C))) return C;\n throw TypeError(tryToString(C) + ' is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n redefine(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n redefine(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n else NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\nfor (NAME in BigIntArrayConstructorsList) {\n Constructor = global[NAME];\n Prototype = Constructor && Constructor.prototype;\n if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","/* eslint-disable no-new -- required for testing */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.es/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n","// IEEE754 conversions based on https://github.com/feross/ieee754\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare -- NaN check\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar FunctionName = require('../internals/function-name');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","var aConstructor = require('../internals/a-constructor');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar bind = require('../internals/function-bind-context');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var C = aConstructor(this);\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, step, iterator, next;\n if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n O = [];\n while (!(step = next.call(iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2], 2);\n }\n length = toLength(O.length);\n result = new (aTypedArrayConstructor(C))(length);\n for (i = 0; length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n};\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_REJECT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isInteger = require('../internals/is-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPropertyKey = require('../internals/to-property-key');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && !isSymbol(key)\n && key in target\n && isInteger(+key)\n && key >= 0;\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n key = toPropertyKey(key);\n return isTypedArrayIndex(target, key)\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n key = toPropertyKey(key);\n if (isTypedArrayIndex(target, key)\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor);\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","module.exports = function (Constructor, list) {\n var index = 0;\n var length = list.length;\n var result = new Constructor(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n","var ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\n\n// a part of `TypedArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#typedarray-species-create\nmodule.exports = function (originalArray) {\n return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR]));\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return fromSpeciesAndList(this, list);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values';\n\nvar typedArrayValues = function values() {\n return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nexportTypedArrayMethod('join', function join(separator) {\n return $join.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (typedArraySpeciesConstructor(O))(length);\n });\n});\n","var aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aCallable(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toOffset = require('../internals/to-offset');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = $slice.call(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","// TODO: use something more complex like timsort?\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n mergeSort(array.slice(0, middle), comparefn),\n mergeSort(array.slice(middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n var result = [];\n\n while (lindex < llength || rindex < rlength) {\n if (lindex < llength && rindex < rlength) {\n result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);\n } else {\n result.push(lindex < llength ? left[lindex++] : right[rindex++]);\n }\n } return result;\n};\n\nmodule.exports = mergeSort;\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar aCallable = require('../internals/a-callable');\nvar toLength = require('../internals/to-length');\nvar internalSort = require('../internals/array-sort');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && Uint16Array.prototype.sort;\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !fails(function () {\n var array = new Uint16Array(2);\n array.sort(null);\n array.sort({});\n});\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n array.sort(function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n var array = this;\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort.call(array, comparefn);\n\n aTypedArray(array);\n var arrayLength = toLength(array.length);\n var items = Array(arrayLength);\n var index;\n\n for (index = 0; index < arrayLength; index++) {\n items[index] = array[index];\n }\n\n items = internalSort(array, getSortCompare(comparefn));\n\n for (index = 0; index < arrayLength; index++) {\n array[index] = items[index];\n }\n\n return array;\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint32Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint32', function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint16Array` constructor\n// https://tc39.es/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint16', function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar PROPER_FUNCTION_NAME = require('../internals/function-name').PROPER;\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar $toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = $toString(R.source);\n var rf = R.flags;\n var f = $toString(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn);\n\n var items = [];\n var arrayLength = toLength(array.length);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) items.push(array[index]);\n }\n\n items = internalSort(items, getSortCompare(comparefn));\n itemsLength = items.length;\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) delete array[index++];\n\n return array;\n }\n});\n","\r\n\r\nvar UZIP = {};\r\nif(typeof module == \"object\") module.exports = UZIP;\r\n\r\n\r\nUZIP[\"parse\"] = function(buf, onlyNames)\t// ArrayBuffer\r\n{\r\n\tvar rUs = UZIP.bin.readUshort, rUi = UZIP.bin.readUint, o = 0, out = {};\r\n\tvar data = new Uint8Array(buf);\r\n\tvar eocd = data.length-4;\r\n\t\r\n\twhile(rUi(data, eocd)!=0x06054b50) eocd--;\r\n\t\r\n\tvar o = eocd;\r\n\to+=4;\t// sign = 0x06054b50\r\n\to+=4; // disks = 0;\r\n\tvar cnu = rUs(data, o); o+=2;\r\n\tvar cnt = rUs(data, o); o+=2;\r\n\t\t\t\r\n\tvar csize = rUi(data, o); o+=4;\r\n\tvar coffs = rUi(data, o); o+=4;\r\n\t\r\n\to = coffs;\r\n\tfor(var i=0; i8514000) {\r\n\t\t\t//console.log(PUtils.readASCII(buf , 8514500, 500));\r\n\t\t\t//console.log(PUtils.readASCII(nbuf, 8514500, 500));\r\n\t\t}\r\n\t\tfor(var i=0; i>>4);\r\n\t//console.log(CM, CINFO,CMF,FLG);\r\n\treturn UZIP.inflateRaw(new Uint8Array(file.buffer, file.byteOffset+2, file.length-6), buf); \r\n}\r\nUZIP.deflate = function(data, opts/*, buf, off*/) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar off=0, buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tbuf[off]=120; buf[off+1]=156; off+=2;\r\n\toff = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\tvar crc = UZIP.adler(data, 0, data.length);\r\n\tbuf[off+0]=((crc>>>24)&255); \r\n\tbuf[off+1]=((crc>>>16)&255); \r\n\tbuf[off+2]=((crc>>> 8)&255); \r\n\tbuf[off+3]=((crc>>> 0)&255); \t\r\n\treturn new Uint8Array(buf.buffer, 0, off+4);\r\n}\r\nUZIP.deflateRaw = function(data, opts) {\r\n\tif(opts==null) opts={level:6};\r\n\tvar buf=new Uint8Array(50+Math.floor(data.length*1.1));\r\n\tvar off = UZIP.F.deflateRaw(data, buf, off, opts.level);\r\n\treturn new Uint8Array(buf.buffer, 0, off);\r\n}\r\n\r\n\r\nUZIP.encode = function(obj, noCmpr) {\r\n\tif(noCmpr==null) noCmpr=false;\r\n\tvar tot = 0, wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar zpd = {};\r\n\tfor(var p in obj) { var cpr = !UZIP._noNeed(p) && !noCmpr, buf = obj[p], crc = UZIP.crc.crc(buf,0,buf.length); \r\n\t\tzpd[p] = { cpr:cpr, usize:buf.length, crc:crc, file: (cpr ? UZIP.deflateRaw(buf) : buf) }; }\r\n\t\r\n\tfor(var p in zpd) tot += zpd[p].file.length + 30 + 46 + 2*UZIP.bin.sizeUTF8(p);\r\n\ttot += 22;\r\n\t\r\n\tvar data = new Uint8Array(tot), o = 0;\r\n\tvar fof = []\r\n\t\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 0);\r\n\t}\r\n\tvar i=0, ioff = o;\r\n\tfor(var p in zpd) {\r\n\t\tvar file = zpd[p]; fof.push(o);\r\n\t\to = UZIP._writeHeader(data, o, p, file, 1, fof[i++]);\t\t\r\n\t}\r\n\tvar csize = o-ioff;\r\n\t\r\n\twUi(data, o, 0x06054b50); o+=4;\r\n\to += 4; // disks\r\n\twUs(data, o, i); o += 2;\r\n\twUs(data, o, i); o += 2;\t// number of c d records\r\n\twUi(data, o, csize); o += 4;\r\n\twUi(data, o, ioff ); o += 4;\r\n\to += 2;\r\n\treturn data.buffer;\r\n}\r\n// no need to compress .PNG, .ZIP, .JPEG ....\r\nUZIP._noNeed = function(fn) { var ext = fn.split(\".\").pop().toLowerCase(); return \"png,jpg,jpeg,zip\".indexOf(ext)!=-1; }\r\n\r\nUZIP._writeHeader = function(data, o, p, obj, t, roff)\r\n{\r\n\tvar wUi = UZIP.bin.writeUint, wUs = UZIP.bin.writeUshort;\r\n\tvar file = obj.file;\r\n\t\r\n\twUi(data, o, t==0 ? 0x04034b50 : 0x02014b50); o+=4; // sign\r\n\tif(t==1) o+=2; // ver made by\r\n\twUs(data, o, 20); o+=2;\t// ver\r\n\twUs(data, o, 0); o+=2; // gflip\r\n\twUs(data, o, obj.cpr?8:0); o+=2;\t// cmpr\r\n\t\t\r\n\twUi(data, o, 0); o+=4;\t// time\t\t\r\n\twUi(data, o, obj.crc); o+=4;\t// crc32\r\n\twUi(data, o, file.length); o+=4;\t// csize\r\n\twUi(data, o, obj.usize); o+=4;\t// usize\r\n\t\t\r\n\twUs(data, o, UZIP.bin.sizeUTF8(p)); o+=2;\t// nlen\r\n\twUs(data, o, 0); o+=2;\t// elen\r\n\t\r\n\tif(t==1) {\r\n\t\to += 2; // comment length\r\n\t\to += 2; // disk number\r\n\t\to += 6; // attributes\r\n\t\twUi(data, o, roff); o+=4;\t// usize\r\n\t}\r\n\tvar nlen = UZIP.bin.writeUTF8(data, o, p); o+= nlen;\t\r\n\tif(t==0) { data.set(file, o); o += file.length; }\r\n\treturn o;\r\n}\r\n\r\n\r\n\r\n\r\n\r\nUZIP.crc = {\r\n\ttable : ( function() {\r\n\t var tab = new Uint32Array(256);\r\n\t for (var n=0; n<256; n++) {\r\n\t\t\tvar c = n;\r\n\t\t\tfor (var k=0; k<8; k++) {\r\n\t\t\t\tif (c & 1) c = 0xedb88320 ^ (c >>> 1);\r\n\t\t\t\telse c = c >>> 1;\r\n\t\t\t}\r\n\t\t\ttab[n] = c; } \r\n\t\treturn tab; })(),\r\n\tupdate : function(c, buf, off, len) {\r\n\t\tfor (var i=0; i>> 8);\r\n\t\treturn c;\r\n\t},\r\n\tcrc : function(b,o,l) { return UZIP.crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\r\n}\r\nUZIP.adler = function(data,o,len) {\r\n\tvar a = 1, b = 0;\r\n\tvar off = o, end=o+len;\r\n\twhile(off>8)&255; },\r\n\treadUint : function(buff,p) { return (buff[p+3]*(256*256*256)) + ((buff[p+2]<<16) | (buff[p+1]<< 8) | buff[p]); },\r\n\twriteUint : function(buff,p,n){ buff[p]=n&255; buff[p+1]=(n>>8)&255; buff[p+2]=(n>>16)&255; buff[p+3]=(n>>24)&255; },\r\n\treadASCII : function(buff,p,l){ var s = \"\"; for(var i=0; i> 6)); buff[p+i+1] = (128|((code>> 0)&63)); i+=2; }\r\n\t\t\telse if((code&(0xffffffff-(1<<16)+1))==0) { buff[p+i] = (224|(code>>12)); buff[p+i+1] = (128|((code>> 6)&63)); buff[p+i+2] = (128|((code>>0)&63)); i+=3; }\r\n\t\t\telse if((code&(0xffffffff-(1<<21)+1))==0) { buff[p+i] = (240|(code>>18)); buff[p+i+1] = (128|((code>>12)&63)); buff[p+i+2] = (128|((code>>6)&63)); buff[p+i+3] = (128|((code>>0)&63)); i+=4; }\r\n\t\t\telse throw \"e\";\r\n\t\t}\r\n\t\treturn i;\r\n\t},\r\n\tsizeUTF8 : function(str) {\r\n\t\tvar strl = str.length, i=0;\r\n\t\tfor(var ci=0; ci>>3;\r\n\t}\r\n\r\n\tvar lits = U.lits, strt=U.strt, prev=U.prev, li=0, lc=0, bs=0, ebits=0, c=0, nc=0; // last_item, literal_count, block_start\r\n\tif(dlen>2) { nc=UZIP.F._hash(data,0); strt[nc]=0; }\r\n\tvar nmch=0,nmci=0;\r\n\t\r\n\tfor(i=0; i14000 || lc>26697) && (dlen-i)>100) {\r\n\t\t\t\tif(cvrd>>16)>>16)>(mch>>>16)) mch=0;\r\n\t\t\t}//*/\r\n\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\tif(mch!=0) { \r\n\t\t\t\tvar len = mch>>>16, dst = mch&0xffff; //if(i-dst<0) throw \"e\";\r\n\t\t\t\tvar lgi = goodIndex(len, U.of0); U.lhst[257+lgi]++; \r\n\t\t\t\tvar dgi = goodIndex(dst, U.df0); U.dhst[ dgi]++; ebits += U.exb[lgi] + U.dxb[dgi]; \r\n\t\t\t\tlits[li] = (len<<23)|(i-cvrd); lits[li+1] = (dst<<16)|(lgi<<8)|dgi; li+=2;\r\n\t\t\t\tcvrd = i + len; \r\n\t\t\t}\r\n\t\t\telse {\tU.lhst[data[i]]++; }\r\n\t\t\tlc++;\r\n\t\t}\r\n\t}\r\n\tif(bs!=i || data.length==0) {\r\n\t\tif(cvrd>>3;\r\n}\r\nUZIP.F._bestMatch = function(data, i, prev, c, nice, chain) {\r\n\tvar ci = (i&0x7fff), pi=prev[ci]; \r\n\t//console.log(\"----\", i);\r\n\tvar dif = ((ci-pi + (1<<15)) & 0x7fff); if(pi==ci || c!=UZIP.F._hash(data,i-dif)) return 0;\r\n\tvar tl=0, td=0; // top length, top distance\r\n\tvar dlim = Math.min(0x7fff, i);\r\n\twhile(dif<=dlim && --chain!=0 && pi!=ci /*&& c==UZIP.F._hash(data,i-dif)*/) {\r\n\t\tif(tl==0 || (data[i+tl]==data[i+tl-dif])) {\r\n\t\t\tvar cl = UZIP.F._howLong(data, i, dif);\r\n\t\t\tif(cl>tl) { \r\n\t\t\t\ttl=cl; td=dif; if(tl>=nice) break; //* \r\n\t\t\t\tif(dif+2maxd) { maxd=curd; pi = ei; }\r\n\t\t\t\t} //*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tci=pi; pi = prev[ci];\r\n\t\tdif += ((ci-pi + (1<<15)) & 0x7fff);\r\n\t}\r\n\treturn (tl<<16)|td;\r\n}\r\nUZIP.F._howLong = function(data, i, dif) {\r\n\tif(data[i]!=data[i-dif] || data[i+1]!=data[i+1-dif] || data[i+2]!=data[i+2-dif]) return 0;\r\n\tvar oi=i, l = Math.min(data.length, i+258); i+=3;\r\n\t//while(i+4>>23), end = off+(qb&((1<<23)-1));\r\n\t\t\twhile(off>16), lgi=(qc>>8)&255, dgi=(qc&255);\r\n\t\t\t\tpos = UZIP.F._writeLit(257+lgi, ltree, out, pos);\r\n\t\t\t\tputsE(out, pos, len-U.of0[lgi]); pos+=U.exb[lgi];\r\n\t\t\t\t\r\n\t\t\t\tpos = UZIP.F._writeLit(dgi, dtree, out, pos);\r\n\t\t\t\tputsF(out, pos, dst-U.df0[dgi]); pos+=U.dxb[dgi]; off+=len;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpos = UZIP.F._writeLit(256, ltree, out, pos);\r\n\t}\r\n\t//console.log(pos-opos, fxdSize, dynSize, cstSize);\r\n\treturn pos;\r\n}\r\nUZIP.F._copyExact = function(data,off,len,out,pos) {\r\n\tvar p8 = (pos>>>3);\r\n\tout[p8]=(len); out[p8+1]=(len>>>8); out[p8+2]=255-out[p8]; out[p8+3]=255-out[p8+1]; p8+=4;\r\n\tout.set(new Uint8Array(data.buffer, off, len), p8);\r\n\t//for(var i=0; i4 && U.itree[(U.ordr[numh-1]<<1)+1]==0) numh--;\r\n\treturn [ML, MD, MH, numl, numd, numh, lset, dset];\r\n}\r\nUZIP.F.getSecond= function(a) { var b=[]; for(var i=0; i>1)+\",\"; return b; }\r\nUZIP.F.contSize = function(tree, hst) { var s=0; for(var i=0; i15) { UZIP.F._putsE(out, pos, rst, rsl); pos+=rsl; }\r\n\t}\r\n\treturn pos;\r\n}\r\nUZIP.F._lenCodes = function(tree, set) {\r\n\tvar len=tree.length; while(len!=2 && tree[len-1]==0) len-=2; // when no distances, keep one code with length 0\r\n\tfor(var i=0; i>>1, 138);\r\n\t\t\tif(zc<11) set.push(17, zc-3);\r\n\t\t\telse set.push(18, zc-11);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse if(l==prv && nxt==l && nnxt==l) {\r\n\t\t\tvar lz = i+5;\r\n\t\t\twhile(lz+2>>1, 6);\r\n\t\t\tset.push(16, zc-3);\r\n\t\t\ti += zc*2-2;\r\n\t\t}\r\n\t\telse set.push(l, 0);\r\n\t}\r\n\treturn len>>>1;\r\n}\r\nUZIP.F._hufTree = function(hst, tree, MAXL) {\r\n\tvar list=[], hl = hst.length, tl=tree.length, i=0;\r\n\tfor(i=0; iMAXL) { UZIP.F.restrictDepth(l2, MAXL, maxl); maxl = MAXL; }\r\n\tfor(i=0; iMD) { var od=dps[i].d; dps[i].d=MD; dbt+=bCost-(1<<(maxl-od)); } else break;\r\n\tdbt = dbt>>>(maxl-MD);\r\n\twhile(dbt>0) { var od=dps[i].d; if(od=0; i--) if(dps[i].d==MD && dbt<0) { dps[i].d--; dbt++; } if(dbt!=0) console.log(\"debt left\");\r\n}\r\n\r\nUZIP.F._goodIndex = function(v, arr) {\r\n\tvar i=0; if(arr[i|16]<=v) i|=16; if(arr[i|8]<=v) i|=8; if(arr[i|4]<=v) i|=4; if(arr[i|2]<=v) i|=2; if(arr[i|1]<=v) i|=1; return i;\r\n}\r\nUZIP.F._writeLit = function(ch, ltree, out, pos) {\r\n\tUZIP.F._putsF(out, pos, ltree[ch<<1]);\r\n\treturn pos+ltree[(ch<<1)+1];\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nUZIP.F.inflate = function(data, buf) {\r\n\tvar u8=Uint8Array;\r\n\tif(data[0]==3 && data[1]==0) return (buf ? buf : new u8(0));\r\n\tvar F=UZIP.F, bitsF = F._bitsF, bitsE = F._bitsE, decodeTiny = F._decodeTiny, makeCodes = F.makeCodes, codes2map=F.codes2map, get17 = F._get17;\r\n\tvar U = F.U;\r\n\t\r\n\tvar noBuf = (buf==null);\r\n\tif(noBuf) buf = new u8((data.length>>>2)<<3);\r\n\t\r\n\tvar BFINAL=0, BTYPE=0, HLIT=0, HDIST=0, HCLEN=0, ML=0, MD=0; \t\r\n\tvar off = 0, pos = 0;\r\n\tvar lmap, dmap;\r\n\t\r\n\twhile(BFINAL==0) {\t\t\r\n\t\tBFINAL = bitsF(data, pos , 1);\r\n\t\tBTYPE = bitsF(data, pos+1, 2); pos+=3;\r\n\t\t//console.log(BFINAL, BTYPE);\r\n\t\t\r\n\t\tif(BTYPE==0) {\r\n\t\t\tif((pos&7)!=0) pos+=8-(pos&7);\r\n\t\t\tvar p8 = (pos>>>3)+4, len = data[p8-4]|(data[p8-3]<<8); //console.log(len);//bitsF(data, pos, 16), \r\n\t\t\tif(noBuf) buf=UZIP.F._check(buf, off+len);\r\n\t\t\tbuf.set(new u8(data.buffer, data.byteOffset+p8, len), off);\r\n\t\t\t//for(var i=0; itl)tl=l; } pos+=3*HCLEN; //console.log(itree);\r\n\t\t\tmakeCodes(U.itree, tl);\r\n\t\t\tcodes2map(U.itree, tl, U.imap);\r\n\t\t\t\r\n\t\t\tlmap = U.lmap; dmap = U.dmap;\r\n\t\t\t\r\n\t\t\tpos = decodeTiny(U.imap, (1<>>24))-1; pos+=(ml&0xffffff);\r\n\t\t\tmakeCodes(U.ltree, mx0);\r\n\t\t\tcodes2map(U.ltree, mx0, lmap);\r\n\t\t\t\r\n\t\t\t//var md = decodeTiny(U.imap, (1<>>24))-1; pos+=(md&0xffffff);\r\n\t\t\tmakeCodes(U.dtree, mx1);\r\n\t\t\tcodes2map(U.dtree, mx1, dmap);\r\n\t\t}\r\n\t\t//var ooff=off, opos=pos;\r\n\t\twhile(true) {\r\n\t\t\tvar code = lmap[get17(data, pos) & ML]; pos += code&15;\r\n\t\t\tvar lit = code>>>4; //U.lhst[lit]++; \r\n\t\t\tif((lit>>>8)==0) { buf[off++] = lit; }\r\n\t\t\telse if(lit==256) { break; }\r\n\t\t\telse {\r\n\t\t\t\tvar end = off+lit-254;\r\n\t\t\t\tif(lit>264) { var ebs = U.ldef[lit-257]; end = off + (ebs>>>3) + bitsE(data, pos, ebs&7); pos += ebs&7; }\r\n\t\t\t\t//UZIP.F.dst[end-off]++;\r\n\t\t\t\t\r\n\t\t\t\tvar dcode = dmap[get17(data, pos) & MD]; pos += dcode&15;\r\n\t\t\t\tvar dlit = dcode>>>4;\r\n\t\t\t\tvar dbs = U.ddef[dlit], dst = (dbs>>>4) + bitsF(data, pos, dbs&15); pos += dbs&15;\r\n\t\t\t\t\r\n\t\t\t\t//var o0 = off-dst, stp = Math.min(end-off, dst);\r\n\t\t\t\t//if(stp>20) while(off>>3);\r\n\t}\r\n\t//console.log(UZIP.F.dst);\r\n\t//console.log(tlen, dlen, off-tlen+tcnt);\r\n\treturn buf.length==off ? buf : buf.slice(0,off);\r\n}\r\nUZIP.F._check=function(buf, len) {\r\n\tvar bl=buf.length; if(len<=bl) return buf;\r\n\tvar nbuf = new Uint8Array(Math.max(bl<<1,len)); nbuf.set(buf,0);\r\n\t//for(var i=0; i>>4; \r\n\t\tif(lit<=15) { tree[i]=lit; i++; }\r\n\t\telse {\r\n\t\t\tvar ll = 0, n = 0;\r\n\t\t\tif(lit==16) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 2)); pos += 2; ll = tree[i-1];\r\n\t\t\t}\r\n\t\t\telse if(lit==17) {\r\n\t\t\t\tn = (3 + bitsE(data, pos, 3)); pos += 3;\r\n\t\t\t}\r\n\t\t\telse if(lit==18) {\r\n\t\t\t\tn = (11 + bitsE(data, pos, 7)); pos += 7;\r\n\t\t\t}\r\n\t\t\tvar ni = i+n;\r\n\t\t\twhile(i>>1;\r\n\twhile(imx)mx=v; i++; }\r\n\twhile(i>1;\r\n\t\tvar cl = tree[i+1], val = (lit<<4)|cl; // : (0x8000 | (U.of0[lit-257]<<7) | (U.exb[lit-257]<<4) | cl);\r\n\t\tvar rest = (MAX_BITS-cl), i0 = tree[i]<>>(15-MAX_BITS);\r\n\t\twhile(i0!=i1) {\r\n\t\t\tvar p0 = r15[i0]>>>(15-MAX_BITS);\r\n\t\t\tmap[p0]=val; i0++;\r\n\t\t}\r\n\t}\r\n}\r\nUZIP.F.revCodes = function(tree, MAX_BITS) {\r\n\tvar r15 = UZIP.F.U.rev15, imb = 15-MAX_BITS;\r\n\tfor(var i=0; i>>imb; }\r\n}\r\n\r\n// used only in deflate\r\nUZIP.F._putsE= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); }\r\nUZIP.F._putsF= function(dt, pos, val ) { val = val<<(pos&7); var o=(pos>>>3); dt[o]|=val; dt[o+1]|=(val>>>8); dt[o+2]|=(val>>>16); }\r\n\r\nUZIP.F._bitsE= function(dt, pos, length) { return ((dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) )>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16))>>>(pos&7))&((1<>>3] | (dt[(pos>>>3)+1]<<8))>>>(pos&7))&511;\r\n} */\r\nUZIP.F._get17= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) )>>>(pos&7);\r\n}\r\nUZIP.F._get25= function(dt, pos) {\t// return at least 17 meaningful bytes\r\n\treturn (dt[pos>>>3] | (dt[(pos>>>3)+1]<<8) | (dt[(pos>>>3)+2]<<16) | (dt[(pos>>>3)+3]<<24) )>>>(pos&7);\r\n}\r\nUZIP.F.U = function(){\r\n\tvar u16=Uint16Array, u32=Uint32Array;\r\n\treturn {\r\n\t\tnext_code : new u16(16),\r\n\t\tbl_count : new u16(16),\r\n\t\tordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\r\n\t\tof0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\r\n\t\texb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\r\n\t\tldef : new u16(32),\r\n\t\tdf0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\r\n\t\tdxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\r\n\t\tddef : new u32(32),\r\n\t\tflmap: new u16( 512), fltree: [],\r\n\t\tfdmap: new u16( 32), fdtree: [],\r\n\t\tlmap : new u16(32768), ltree : [], ttree:[],\r\n\t\tdmap : new u16(32768), dtree : [],\r\n\t\timap : new u16( 512), itree : [],\r\n\t\t//rev9 : new u16( 512)\r\n\t\trev15: new u16(1<<15),\r\n\t\tlhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\r\n\t\tlits : new u32(15000),\r\n\t\tstrt : new u16(1<<16),\r\n\t\tprev : new u16(1<<15)\r\n\t}; \r\n} ();\r\n\r\n(function(){\t\r\n\tvar U = UZIP.F.U;\r\n\tvar len = 1<<15;\r\n\tfor(var i=0; i>> 1) | ((x & 0x55555555) << 1));\r\n\t\tx = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\r\n\t\tx = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\r\n\t\tx = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\r\n\t\tU.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\r\n\t}\r\n\t\r\n\tfunction pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\r\n\t\r\n\tfor(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\r\n\t\r\n\tpushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\r\n\t/*\r\n\tvar i = 0;\r\n\tfor(; i<=143; i++) U.fltree.push(0,8);\r\n\tfor(; i<=255; i++) U.fltree.push(0,9);\r\n\tfor(; i<=279; i++) U.fltree.push(0,7);\r\n\tfor(; i<=287; i++) U.fltree.push(0,8);\r\n\t*/\r\n\tUZIP.F.makeCodes(U.fltree, 9);\r\n\tUZIP.F.codes2map(U.fltree, 9, U.flmap);\r\n\tUZIP.F.revCodes (U.fltree, 9)\r\n\t\r\n\tpushV(U.fdtree,32,5);\r\n\t//for(i=0;i<32; i++) U.fdtree.push(0,5);\r\n\tUZIP.F.makeCodes(U.fdtree, 5);\r\n\tUZIP.F.codes2map(U.fdtree, 5, U.fdmap);\r\n\tUZIP.F.revCodes (U.fdtree, 5)\r\n\t\r\n\tpushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\r\n\t/*\r\n\tfor(var i=0; i< 19; i++) U.itree.push(0,0);\r\n\tfor(var i=0; i<286; i++) U.ltree.push(0,0);\r\n\tfor(var i=0; i< 30; i++) U.dtree.push(0,0);\r\n\tfor(var i=0; i<320; i++) U.ttree.push(0,0);\r\n\t*/\r\n})()\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","// https://github.com/photopea/UPNG.js/blob/c976240e62b0497167f8aafabd7889625f8b2016/UPNG.js\n\n// import * as pako from 'pako'\nimport * as UZIP from 'uzip';\n\nconst UPNG = {};\n\nUPNG.toRGBA8 = function (out) {\n const w = out.width; const\n h = out.height;\n if (out.tabs.acTL == null) return [UPNG.toRGBA8.decodeImage(out.data, w, h, out).buffer];\n\n const frms = [];\n if (out.frames[0].data == null) out.frames[0].data = out.data;\n\n const len = w * h * 4; const img = new Uint8Array(len); const empty = new Uint8Array(len); const\n prev = new Uint8Array(len);\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i];\n const fx = frm.rect.x; const fy = frm.rect.y; const fw = frm.rect.width; const\n fh = frm.rect.height;\n const fdata = UPNG.toRGBA8.decodeImage(frm.data, fw, fh, out);\n\n if (i != 0) for (var j = 0; j < len; j++) prev[j] = img[j];\n\n if (frm.blend == 0) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.blend == 1) UPNG._copyTile(fdata, fw, fh, img, w, h, fx, fy, 1);\n\n frms.push(img.buffer.slice(0));\n\n if (frm.dispose == 0) {} else if (frm.dispose == 1) UPNG._copyTile(empty, fw, fh, img, w, h, fx, fy, 0);\n else if (frm.dispose == 2) for (var j = 0; j < len; j++) img[j] = prev[j];\n }\n return frms;\n};\nUPNG.toRGBA8.decodeImage = function (data, w, h, out) {\n const area = w * h; const\n bpp = UPNG.decode._getBPP(out);\n const bpl = Math.ceil(w * bpp / 8);\t// bytes per line\n\n const bf = new Uint8Array(area * 4); const\n bf32 = new Uint32Array(bf.buffer);\n const { ctype } = out;\n const { depth } = out;\n const rs = UPNG._bin.readUshort;\n\n // console.log(ctype, depth);\n const time = Date.now();\n\n if (ctype == 6) { // RGB + alpha\n const qarea = area << 2;\n if (depth == 8) for (var i = 0; i < qarea; i += 4) { bf[i] = data[i]; bf[i + 1] = data[i + 1]; bf[i + 2] = data[i + 2]; bf[i + 3] = data[i + 3]; }\n if (depth == 16) for (var i = 0; i < qarea; i++) { bf[i] = data[i << 1]; }\n } else if (ctype == 2) {\t// RGB\n const ts = out.tabs.tRNS;\n if (ts == null) {\n if (depth == 8) for (var i = 0; i < area; i++) { var ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti]; }\n if (depth == 16) for (var i = 0; i < area; i++) { var ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti]; }\n } else {\n var tr = ts[0]; const tg = ts[1]; const\n tb = ts[2];\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 3; bf32[i] = (255 << 24) | (data[ti + 2] << 16) | (data[ti + 1] << 8) | data[ti];\n if (data[ti] == tr && data[ti + 1] == tg && data[ti + 2] == tb) bf[qi + 3] = 0;\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var\n ti = i * 6; bf32[i] = (255 << 24) | (data[ti + 4] << 16) | (data[ti + 2] << 8) | data[ti];\n if (rs(data, ti) == tr && rs(data, ti + 2) == tg && rs(data, ti + 4) == tb) bf[qi + 3] = 0;\n }\n }\n }\n } else if (ctype == 3) {\t// palette\n const p = out.tabs.PLTE;\n const ap = out.tabs.tRNS;\n const tl = ap ? ap.length : 0;\n // console.log(p, ap);\n if (depth == 1) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 3)] >> (7 - ((i & 7) << 0))) & 1); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 2) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 2)] >> (6 - ((i & 3) << 1))) & 3); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 4) {\n for (var y = 0; y < h; y++) {\n var s0 = y * bpl; var\n t0 = y * w;\n for (var i = 0; i < w; i++) {\n var qi = (t0 + i) << 2; var j = ((data[s0 + (i >> 1)] >> (4 - ((i & 1) << 2))) & 15); var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n }\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var j = data[i]; var\n cj = 3 * j; bf[qi] = p[cj]; bf[qi + 1] = p[cj + 1]; bf[qi + 2] = p[cj + 2]; bf[qi + 3] = (j < tl) ? ap[j] : 255;\n }\n }\n } else if (ctype == 4) {\t// gray + alpha\n if (depth == 8) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 1; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 1];\n }\n }\n if (depth == 16) {\n for (var i = 0; i < area; i++) {\n var qi = i << 2; var di = i << 2; var\n gr = data[di]; bf[qi] = gr; bf[qi + 1] = gr; bf[qi + 2] = gr; bf[qi + 3] = data[di + 2];\n }\n }\n } else if (ctype == 0) {\t// gray\n var tr = out.tabs.tRNS ? out.tabs.tRNS : -1;\n for (var y = 0; y < h; y++) {\n const off = y * bpl; const\n to = y * w;\n if (depth == 1) {\n for (var x = 0; x < w; x++) {\n var gr = 255 * ((data[off + (x >>> 3)] >>> (7 - ((x & 7)))) & 1); var\n al = (gr == tr * 255) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 2) {\n for (var x = 0; x < w; x++) {\n var gr = 85 * ((data[off + (x >>> 2)] >>> (6 - ((x & 3) << 1))) & 3); var\n al = (gr == tr * 85) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 4) {\n for (var x = 0; x < w; x++) {\n var gr = 17 * ((data[off + (x >>> 1)] >>> (4 - ((x & 1) << 2))) & 15); var\n al = (gr == tr * 17) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 8) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + x]; var\n al = (gr == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n } else if (depth == 16) {\n for (var x = 0; x < w; x++) {\n var gr = data[off + (x << 1)]; var\n al = (rs(data, off + (x << i)) == tr) ? 0 : 255; bf32[to + x] = (al << 24) | (gr << 16) | (gr << 8) | gr;\n }\n }\n }\n }\n // console.log(Date.now()-time);\n return bf;\n};\n\nUPNG.decode = function (buff) {\n const data = new Uint8Array(buff); let offset = 8; const bin = UPNG._bin; const rUs = bin.readUshort; const\n rUi = bin.readUint;\n const out = { tabs: {}, frames: [] };\n const dd = new Uint8Array(data.length); let\n doff = 0;\t // put all IDAT data into it\n let fd; let\n foff = 0;\t// frames\n\n const mgck = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) if (data[i] != mgck[i]) throw 'The input is not a PNG file!';\n\n while (offset < data.length) {\n const len = bin.readUint(data, offset); offset += 4;\n const type = bin.readASCII(data, offset, 4); offset += 4;\n // console.log(type,len);\n\n if (type == 'IHDR') { UPNG.decode._IHDR(data, offset, out); } else if (type == 'CgBI') { out.tabs[type] = data.slice(offset, offset + 4); } else if (type == 'IDAT') {\n for (var i = 0; i < len; i++) dd[doff + i] = data[offset + i];\n doff += len;\n } else if (type == 'acTL') {\n out.tabs[type] = { num_frames: rUi(data, offset), num_plays: rUi(data, offset + 4) };\n fd = new Uint8Array(data.length);\n } else if (type == 'fcTL') {\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n const rct = {\n x: rUi(data, offset + 12), y: rUi(data, offset + 16), width: rUi(data, offset + 4), height: rUi(data, offset + 8),\n };\n let del = rUs(data, offset + 22); del = rUs(data, offset + 20) / (del == 0 ? 100 : del);\n const frm = {\n rect: rct, delay: Math.round(del * 1000), dispose: data[offset + 24], blend: data[offset + 25],\n };\n // console.log(frm);\n out.frames.push(frm);\n } else if (type == 'fdAT') {\n for (var i = 0; i < len - 4; i++) fd[foff + i] = data[offset + i + 4];\n foff += len - 4;\n } else if (type == 'pHYs') {\n out.tabs[type] = [bin.readUint(data, offset), bin.readUint(data, offset + 4), data[offset + 8]];\n } else if (type == 'cHRM') {\n out.tabs[type] = [];\n for (var i = 0; i < 8; i++) out.tabs[type].push(bin.readUint(data, offset + i * 4));\n } else if (type == 'tEXt' || type == 'zTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = bin.nextZero(data, offset);\n var keyw = bin.readASCII(data, offset, nz - offset);\n var text; var\n tl = offset + len - nz - 1;\n if (type == 'tEXt') text = bin.readASCII(data, nz + 1, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(nz + 2, nz + 2 + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'iTXt') {\n if (out.tabs[type] == null) out.tabs[type] = {};\n var nz = 0; let\n off = offset;\n nz = bin.nextZero(data, off);\n var keyw = bin.readASCII(data, off, nz - off); off = nz + 1;\n const cflag = data[off]; const\n cmeth = data[off + 1]; off += 2;\n nz = bin.nextZero(data, off);\n const ltag = bin.readASCII(data, off, nz - off); off = nz + 1;\n nz = bin.nextZero(data, off);\n const tkeyw = bin.readUTF8(data, off, nz - off); off = nz + 1;\n var text; var\n tl = len - (off - offset);\n if (cflag == 0) text = bin.readUTF8(data, off, tl);\n else {\n var bfr = UPNG.decode._inflate(data.slice(off, off + tl));\n text = bin.readUTF8(bfr, 0, bfr.length);\n }\n out.tabs[type][keyw] = text;\n } else if (type == 'PLTE') {\n out.tabs[type] = bin.readBytes(data, offset, len);\n } else if (type == 'hIST') {\n const pl = out.tabs.PLTE.length / 3;\n out.tabs[type] = []; for (var i = 0; i < pl; i++) out.tabs[type].push(rUs(data, offset + i * 2));\n } else if (type == 'tRNS') {\n if (out.ctype == 3) out.tabs[type] = bin.readBytes(data, offset, len);\n else if (out.ctype == 0) out.tabs[type] = rUs(data, offset);\n else if (out.ctype == 2) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n // else console.log(\"tRNS for unsupported color type\",out.ctype, len);\n } else if (type == 'gAMA') out.tabs[type] = bin.readUint(data, offset) / 100000;\n else if (type == 'sRGB') out.tabs[type] = data[offset];\n else if (type == 'bKGD') {\n if (out.ctype == 0 || out.ctype == 4) out.tabs[type] = [rUs(data, offset)];\n else if (out.ctype == 2 || out.ctype == 6) out.tabs[type] = [rUs(data, offset), rUs(data, offset + 2), rUs(data, offset + 4)];\n else if (out.ctype == 3) out.tabs[type] = data[offset];\n } else if (type == 'IEND') {\n break;\n }\n // else { log(\"unknown chunk type\", type, len); }\n offset += len;\n const crc = bin.readUint(data, offset); offset += 4;\n }\n if (foff != 0) {\n var fr = out.frames[out.frames.length - 1];\n fr.data = UPNG.decode._decompress(out, fd.slice(0, foff), fr.rect.width, fr.rect.height); foff = 0;\n }\n out.data = UPNG.decode._decompress(out, dd, out.width, out.height);\n\n delete out.compress; delete out.interlace; delete out.filter;\n return out;\n};\n\nUPNG.decode._decompress = function (out, dd, w, h) {\n var time = Date.now();\n const bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n buff = new Uint8Array((bpl + 1 + out.interlace) * h);\n if (out.tabs.CgBI) dd = UPNG.inflateRaw(dd, buff);\n else dd = UPNG.decode._inflate(dd, buff);\n // console.log(dd.length, buff.length);\n // console.log(Date.now()-time);\n\n var time = Date.now();\n if (out.interlace == 0) dd = UPNG.decode._filterZero(dd, out, 0, w, h);\n else if (out.interlace == 1) dd = UPNG.decode._readInterlace(dd, out);\n // console.log(Date.now()-time);\n return dd;\n};\n\nUPNG.decode._inflate = function (data, buff) { const out = UPNG.inflateRaw(new Uint8Array(data.buffer, 2, data.length - 6), buff); return out; };\nUPNG.inflateRaw = (function () {\n const H = {}; H.H = {}; H.H.N = function (N, W) {\n const R = Uint8Array; let i = 0; let m = 0; let J = 0; let h = 0; let Q = 0; let X = 0; let u = 0; let w = 0; let d = 0; let v; let C;\n if (N[0] == 3 && N[1] == 0) return W || new R(0); const V = H.H; const n = V.b; const A = V.e; const l = V.R; const M = V.n; const I = V.A; const e = V.Z; const b = V.m; const Z = W == null;\n if (Z)W = new R(N.length >>> 2 << 5); while (i == 0) {\n i = n(N, d, 1); m = n(N, d + 1, 2); d += 3; if (m == 0) {\n if ((d & 7) != 0)d += 8 - (d & 7);\n const D = (d >>> 3) + 4; const q = N[D - 4] | N[D - 3] << 8; if (Z)W = H.H.W(W, w + q); W.set(new R(N.buffer, N.byteOffset + D, q), w); d = D + q << 3;\n w += q; continue;\n } if (Z)W = H.H.W(W, w + (1 << 17)); if (m == 1) { v = b.J; C = b.h; X = (1 << 9) - 1; u = (1 << 5) - 1; } if (m == 2) {\n J = A(N, d, 5) + 257;\n h = A(N, d + 5, 5) + 1; Q = A(N, d + 10, 4) + 4; d += 14; const E = d; let j = 1; for (var c = 0; c < 38; c += 2) { b.Q[c] = 0; b.Q[c + 1] = 0; } for (var c = 0;\n c < Q; c++) { const K = A(N, d + c * 3, 3); b.Q[(b.X[c] << 1) + 1] = K; if (K > j)j = K; }d += 3 * Q; M(b.Q, j); I(b.Q, j, b.u); v = b.w; C = b.d;\n d = l(b.u, (1 << j) - 1, J + h, N, d, b.v); const r = V.V(b.v, 0, J, b.C); X = (1 << r) - 1; const S = V.V(b.v, J, h, b.D); u = (1 << S) - 1; M(b.C, r);\n I(b.C, r, v); M(b.D, S); I(b.D, S, C);\n } while (!0) {\n const T = v[e(N, d) & X]; d += T & 15; const p = T >>> 4; if (p >>> 8 == 0) { W[w++] = p; } else if (p == 256) { break; } else {\n let z = w + p - 254;\n if (p > 264) { const _ = b.q[p - 257]; z = w + (_ >>> 3) + A(N, d, _ & 7); d += _ & 7; } const $ = C[e(N, d) & u]; d += $ & 15; const s = $ >>> 4; const Y = b.c[s]; const a = (Y >>> 4) + n(N, d, Y & 15);\n d += Y & 15; while (w < z) { W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; W[w] = W[w++ - a]; }w = z;\n }\n }\n } return W.length == w ? W : W.slice(0, w);\n };\n H.H.W = function (N, W) { const R = N.length; if (W <= R) return N; const V = new Uint8Array(R << 1); V.set(N, 0); return V; };\n H.H.R = function (N, W, R, V, n, A) {\n const l = H.H.e; const M = H.H.Z; let I = 0; while (I < R) {\n const e = N[M(V, n) & W]; n += e & 15; const b = e >>> 4;\n if (b <= 15) { A[I] = b; I++; } else {\n let Z = 0; let m = 0; if (b == 16) { m = 3 + l(V, n, 2); n += 2; Z = A[I - 1]; } else if (b == 17) {\n m = 3 + l(V, n, 3);\n n += 3;\n } else if (b == 18) { m = 11 + l(V, n, 7); n += 7; } const J = I + m; while (I < J) { A[I] = Z; I++; }\n }\n } return n;\n }; H.H.V = function (N, W, R, V) {\n let n = 0; let A = 0; const l = V.length >>> 1;\n while (A < R) { const M = N[A + W]; V[A << 1] = 0; V[(A << 1) + 1] = M; if (M > n)n = M; A++; } while (A < l) { V[A << 1] = 0; V[(A << 1) + 1] = 0; A++; } return n;\n };\n H.H.n = function (N, W) {\n const R = H.H.m; const V = N.length; let n; let A; let l; var M; let I; const e = R.j; for (var M = 0; M <= W; M++)e[M] = 0; for (M = 1; M < V; M += 2)e[N[M]]++;\n const b = R.K; n = 0; e[0] = 0; for (A = 1; A <= W; A++) { n = n + e[A - 1] << 1; b[A] = n; } for (l = 0; l < V; l += 2) {\n I = N[l + 1]; if (I != 0) {\n N[l] = b[I];\n b[I]++;\n }\n }\n }; H.H.A = function (N, W, R) {\n const V = N.length; const n = H.H.m; const A = n.r; for (let l = 0; l < V; l += 2) {\n if (N[l + 1] != 0) {\n const M = l >> 1; const I = N[l + 1]; const e = M << 4 | I; const b = W - I; let Z = N[l] << b; const m = Z + (1 << b);\n while (Z != m) { const J = A[Z] >>> 15 - W; R[J] = e; Z++; }\n }\n }\n }; H.H.l = function (N, W) {\n const R = H.H.m.r; const V = 15 - W; for (let n = 0; n < N.length;\n n += 2) { const A = N[n] << W - N[n + 1]; N[n] = R[A] >>> V; }\n }; H.H.M = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; };\n H.H.I = function (N, W, R) { R <<= (W & 7); const V = W >>> 3; N[V] |= R; N[V + 1] |= R >>> 8; N[V + 2] |= R >>> 16; }; H.H.e = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8) >>> (W & 7) & (1 << R) - 1; };\n H.H.b = function (N, W, R) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7) & (1 << R) - 1; }; H.H.Z = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16) >>> (W & 7); };\n H.H.i = function (N, W) { return (N[W >>> 3] | N[(W >>> 3) + 1] << 8 | N[(W >>> 3) + 2] << 16 | N[(W >>> 3) + 3] << 24) >>> (W & 7); }; H.H.m = (function () {\n const N = Uint16Array; const W = Uint32Array;\n return {\n K: new N(16), j: new N(16), X: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], S: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999], T: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0], q: new N(32), p: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535], z: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0], c: new W(32), J: new N(512), _: [], h: new N(32), $: [], w: new N(32768), C: [], v: [], d: new N(32768), D: [], u: new N(512), Q: [], r: new N(1 << 15), s: new W(286), Y: new W(30), a: new W(19), t: new W(15e3), k: new N(1 << 16), g: new N(1 << 15),\n };\n }());\n (function () {\n const N = H.H.m; const W = 1 << 15; for (var R = 0; R < W; R++) {\n let V = R; V = (V & 2863311530) >>> 1 | (V & 1431655765) << 1;\n V = (V & 3435973836) >>> 2 | (V & 858993459) << 2; V = (V & 4042322160) >>> 4 | (V & 252645135) << 4; V = (V & 4278255360) >>> 8 | (V & 16711935) << 8;\n N.r[R] = (V >>> 16 | V << 16) >>> 17;\n } function n(A, l, M) { while (l-- != 0)A.push(0, M); } for (var R = 0; R < 32; R++) {\n N.q[R] = N.S[R] << 3 | N.T[R];\n N.c[R] = N.p[R] << 4 | N.z[R];\n }n(N._, 144, 8); n(N._, 255 - 143, 9); n(N._, 279 - 255, 7); n(N._, 287 - 279, 8); H.H.n(N._, 9);\n H.H.A(N._, 9, N.J); H.H.l(N._, 9); n(N.$, 32, 5); H.H.n(N.$, 5); H.H.A(N.$, 5, N.h); H.H.l(N.$, 5); n(N.Q, 19, 0); n(N.C, 286, 0);\n n(N.D, 30, 0); n(N.v, 320, 0);\n }()); return H.H.N;\n}());\n\nUPNG.decode._readInterlace = function (data, out) {\n const w = out.width; const\n h = out.height;\n const bpp = UPNG.decode._getBPP(out); const cbpp = bpp >> 3; const\n bpl = Math.ceil(w * bpp / 8);\n const img = new Uint8Array(h * bpl);\n let di = 0;\n\n const starting_row = [0, 0, 4, 0, 2, 0, 1];\n const starting_col = [0, 4, 0, 2, 0, 1, 0];\n const row_increment = [8, 8, 8, 4, 4, 2, 2];\n const col_increment = [8, 8, 4, 4, 2, 2, 1];\n\n let pass = 0;\n while (pass < 7) {\n const ri = row_increment[pass]; const\n ci = col_increment[pass];\n let sw = 0; let\n sh = 0;\n let cr = starting_row[pass]; while (cr < h) { cr += ri; sh++; }\n let cc = starting_col[pass]; while (cc < w) { cc += ci; sw++; }\n const bpll = Math.ceil(sw * bpp / 8);\n UPNG.decode._filterZero(data, out, di, sw, sh);\n\n let y = 0; let\n row = starting_row[pass];\n while (row < h) {\n let col = starting_col[pass];\n let cdi = (di + y * bpll) << 3;\n\n while (col < w) {\n if (bpp == 1) {\n var val = data[cdi >> 3]; val = (val >> (7 - (cdi & 7))) & 1;\n img[row * bpl + (col >> 3)] |= (val << (7 - ((col & 7) << 0)));\n }\n if (bpp == 2) {\n var val = data[cdi >> 3]; val = (val >> (6 - (cdi & 7))) & 3;\n img[row * bpl + (col >> 2)] |= (val << (6 - ((col & 3) << 1)));\n }\n if (bpp == 4) {\n var val = data[cdi >> 3]; val = (val >> (4 - (cdi & 7))) & 15;\n img[row * bpl + (col >> 1)] |= (val << (4 - ((col & 1) << 2)));\n }\n if (bpp >= 8) {\n const ii = row * bpl + col * cbpp;\n for (let j = 0; j < cbpp; j++) img[ii + j] = data[(cdi >> 3) + j];\n }\n cdi += bpp; col += ci;\n }\n y++; row += ri;\n }\n if (sw * sh != 0) di += sh * (1 + bpll);\n pass += 1;\n }\n return img;\n};\n\nUPNG.decode._getBPP = function (out) {\n const noc = [1, null, 3, 1, 2, null, 4][out.ctype];\n return noc * out.depth;\n};\n\nUPNG.decode._filterZero = function (data, out, off, w, h) {\n let bpp = UPNG.decode._getBPP(out); const bpl = Math.ceil(w * bpp / 8); const\n paeth = UPNG.decode._paeth;\n bpp = Math.ceil(bpp / 8);\n\n let i = 0; let di = 1; let type = data[off]; let\n x = 0;\n\n if (type > 1) data[off] = [0, 0, 1][type - 2];\n if (type == 3) for (x = bpp; x < bpl; x++) data[x + 1] = (data[x + 1] + (data[x + 1 - bpp] >>> 1)) & 255;\n\n for (let y = 0; y < h; y++) {\n i = off + y * bpl; di = i + y + 1;\n type = data[di - 1]; x = 0;\n\n if (type == 0) for (; x < bpl; x++) data[i + x] = data[di + x];\n else if (type == 1) {\n for (; x < bpp; x++) data[i + x] = data[di + x];\n for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpp]);\n } else if (type == 2) { for (; x < bpl; x++) data[i + x] = (data[di + x] + data[i + x - bpl]); } else if (type == 3) {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + (data[i + x - bpl] >>> 1));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + ((data[i + x - bpl] + data[i + x - bpp]) >>> 1));\n } else {\n for (; x < bpp; x++) data[i + x] = (data[di + x] + paeth(0, data[i + x - bpl], 0));\n for (; x < bpl; x++) data[i + x] = (data[di + x] + paeth(data[i + x - bpp], data[i + x - bpl], data[i + x - bpp - bpl]));\n }\n }\n return data;\n};\n\nUPNG.decode._paeth = function (a, b, c) {\n const p = a + b - c; const pa = (p - a); const pb = (p - b); const\n pc = (p - c);\n if (pa * pa <= pb * pb && pa * pa <= pc * pc) return a;\n if (pb * pb <= pc * pc) return b;\n return c;\n};\n\nUPNG.decode._IHDR = function (data, offset, out) {\n const bin = UPNG._bin;\n out.width = bin.readUint(data, offset); offset += 4;\n out.height = bin.readUint(data, offset); offset += 4;\n out.depth = data[offset]; offset++;\n out.ctype = data[offset]; offset++;\n out.compress = data[offset]; offset++;\n out.filter = data[offset]; offset++;\n out.interlace = data[offset]; offset++;\n};\n\nUPNG._bin = {\n nextZero(data, p) { while (data[p] != 0) p++; return p; },\n readUshort(buff, p) { return (buff[p] << 8) | buff[p + 1]; },\n writeUshort(buff, p, n) { buff[p] = (n >> 8) & 255; buff[p + 1] = n & 255; },\n readUint(buff, p) { return (buff[p] * (256 * 256 * 256)) + ((buff[p + 1] << 16) | (buff[p + 2] << 8) | buff[p + 3]); },\n writeUint(buff, p, n) { buff[p] = (n >> 24) & 255; buff[p + 1] = (n >> 16) & 255; buff[p + 2] = (n >> 8) & 255; buff[p + 3] = n & 255; },\n readASCII(buff, p, l) { let s = ''; for (let i = 0; i < l; i++) s += String.fromCharCode(buff[p + i]); return s; },\n writeASCII(data, p, s) { for (let i = 0; i < s.length; i++) data[p + i] = s.charCodeAt(i); },\n readBytes(buff, p, l) { const arr = []; for (let i = 0; i < l; i++) arr.push(buff[p + i]); return arr; },\n pad(n) { return n.length < 2 ? `0${n}` : n; },\n readUTF8(buff, p, l) {\n let s = '';\n let ns;\n for (let i = 0; i < l; i++) s += `%${UPNG._bin.pad(buff[p + i].toString(16))}`;\n try { ns = decodeURIComponent(s); } catch (e) { return UPNG._bin.readASCII(buff, p, l); }\n return ns;\n },\n};\nUPNG._copyTile = function (sb, sw, sh, tb, tw, th, xoff, yoff, mode) {\n const w = Math.min(sw, tw); const\n h = Math.min(sh, th);\n let si = 0; let\n ti = 0;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n if (xoff >= 0 && yoff >= 0) { si = (y * sw + x) << 2; ti = ((yoff + y) * tw + xoff + x) << 2; } else { si = ((-yoff + y) * sw - xoff + x) << 2; ti = (y * tw + x) << 2; }\n\n if (mode == 0) { tb[ti] = sb[si]; tb[ti + 1] = sb[si + 1]; tb[ti + 2] = sb[si + 2]; tb[ti + 3] = sb[si + 3]; } else if (mode == 1) {\n var fa = sb[si + 3] * (1 / 255); var fr = sb[si] * fa; var fg = sb[si + 1] * fa; var\n fb = sb[si + 2] * fa;\n var ba = tb[ti + 3] * (1 / 255); var br = tb[ti] * ba; var bg = tb[ti + 1] * ba; var\n bb = tb[ti + 2] * ba;\n\n const ifa = 1 - fa; const oa = fa + ba * ifa; const\n ioa = (oa == 0 ? 0 : 1 / oa);\n tb[ti + 3] = 255 * oa;\n tb[ti + 0] = (fr + br * ifa) * ioa;\n tb[ti + 1] = (fg + bg * ifa) * ioa;\n tb[ti + 2] = (fb + bb * ifa) * ioa;\n } else if (mode == 2) {\t// copy only differences, otherwise zero\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) { tb[ti] = 0; tb[ti + 1] = 0; tb[ti + 2] = 0; tb[ti + 3] = 0; } else { tb[ti] = fr; tb[ti + 1] = fg; tb[ti + 2] = fb; tb[ti + 3] = fa; }\n } else if (mode == 3) {\t// check if can be blended\n var fa = sb[si + 3]; var fr = sb[si]; var fg = sb[si + 1]; var\n fb = sb[si + 2];\n var ba = tb[ti + 3]; var br = tb[ti]; var bg = tb[ti + 1]; var\n bb = tb[ti + 2];\n if (fa == ba && fr == br && fg == bg && fb == bb) continue;\n // if(fa!=255 && ba!=0) return false;\n if (fa < 220 && ba > 20) return false;\n }\n }\n }\n return true;\n};\n\nUPNG.encode = function (bufs, w, h, ps, dels, tabs, forbidPlte) {\n if (ps == null) ps = 0;\n if (forbidPlte == null) forbidPlte = false;\n\n const nimg = UPNG.encode.compress(bufs, w, h, ps, [false, false, false, 0, forbidPlte]);\n UPNG.encode.compressPNG(nimg, -1);\n\n return UPNG.encode._main(nimg, w, h, dels, tabs);\n};\n\nUPNG.encodeLL = function (bufs, w, h, cc, ac, depth, dels, tabs) {\n const nimg = { ctype: 0 + (cc == 1 ? 0 : 2) + (ac == 0 ? 0 : 4), depth, frames: [] };\n\n const time = Date.now();\n const bipp = (cc + ac) * depth; const\n bipl = bipp * w;\n for (let i = 0; i < bufs.length; i++) {\n nimg.frames.push({\n rect: {\n x: 0, y: 0, width: w, height: h,\n },\n img: new Uint8Array(bufs[i]),\n blend: 0,\n dispose: 1,\n bpp: Math.ceil(bipp / 8),\n bpl: Math.ceil(bipl / 8),\n });\n }\n\n UPNG.encode.compressPNG(nimg, 0, true);\n\n const out = UPNG.encode._main(nimg, w, h, dels, tabs);\n return out;\n};\n\nUPNG.encode._main = function (nimg, w, h, dels, tabs) {\n if (tabs == null) tabs = {};\n const { crc } = UPNG.crc;\n const wUi = UPNG._bin.writeUint;\n const wUs = UPNG._bin.writeUshort;\n const wAs = UPNG._bin.writeASCII;\n let offset = 8; const anim = nimg.frames.length > 1; let\n pltAlpha = false;\n\n let leng = 8 + (16 + 5 + 4) /* + (9+4) */ + (anim ? 20 : 0);\n if (tabs.sRGB != null) leng += 8 + 1 + 4;\n if (tabs.pHYs != null) leng += 8 + 9 + 4;\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n for (var i = 0; i < dl; i++) if ((nimg.plte[i] >>> 24) != 255) pltAlpha = true;\n leng += (8 + dl * 3 + 4) + (pltAlpha ? (8 + dl * 1 + 4) : 0);\n }\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) leng += 38;\n leng += fr.cimg.length + 12;\n if (j != 0) leng += 4;\n }\n leng += 12;\n\n const data = new Uint8Array(leng);\n const wr = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];\n for (var i = 0; i < 8; i++) data[i] = wr[i];\n\n wUi(data, offset, 13); offset += 4;\n wAs(data, offset, 'IHDR'); offset += 4;\n wUi(data, offset, w); offset += 4;\n wUi(data, offset, h); offset += 4;\n data[offset] = nimg.depth; offset++; // depth\n data[offset] = nimg.ctype; offset++; // ctype\n data[offset] = 0; offset++; // compress\n data[offset] = 0; offset++; // filter\n data[offset] = 0; offset++; // interlace\n wUi(data, offset, crc(data, offset - 17, 17)); offset += 4; // crc\n\n // 13 bytes to say, that it is sRGB\n if (tabs.sRGB != null) {\n wUi(data, offset, 1); offset += 4;\n wAs(data, offset, 'sRGB'); offset += 4;\n data[offset] = tabs.sRGB; offset++;\n wUi(data, offset, crc(data, offset - 5, 5)); offset += 4; // crc\n }\n if (tabs.pHYs != null) {\n wUi(data, offset, 9); offset += 4;\n wAs(data, offset, 'pHYs'); offset += 4;\n wUi(data, offset, tabs.pHYs[0]); offset += 4;\n wUi(data, offset, tabs.pHYs[1]); offset += 4;\n data[offset] = tabs.pHYs[2];\t\t\toffset++;\n wUi(data, offset, crc(data, offset - 13, 13)); offset += 4; // crc\n }\n\n if (anim) {\n wUi(data, offset, 8); offset += 4;\n wAs(data, offset, 'acTL'); offset += 4;\n wUi(data, offset, nimg.frames.length); offset += 4;\n wUi(data, offset, tabs.loop != null ? tabs.loop : 0); offset += 4;\n wUi(data, offset, crc(data, offset - 12, 12)); offset += 4; // crc\n }\n\n if (nimg.ctype == 3) {\n var dl = nimg.plte.length;\n wUi(data, offset, dl * 3); offset += 4;\n wAs(data, offset, 'PLTE'); offset += 4;\n for (var i = 0; i < dl; i++) {\n const ti = i * 3; const c = nimg.plte[i]; const r = (c) & 255; const g = (c >>> 8) & 255; const\n b = (c >>> 16) & 255;\n data[offset + ti + 0] = r; data[offset + ti + 1] = g; data[offset + ti + 2] = b;\n }\n offset += dl * 3;\n wUi(data, offset, crc(data, offset - dl * 3 - 4, dl * 3 + 4)); offset += 4; // crc\n\n if (pltAlpha) {\n wUi(data, offset, dl); offset += 4;\n wAs(data, offset, 'tRNS'); offset += 4;\n for (var i = 0; i < dl; i++) data[offset + i] = (nimg.plte[i] >>> 24) & 255;\n offset += dl;\n wUi(data, offset, crc(data, offset - dl - 4, dl + 4)); offset += 4; // crc\n }\n }\n\n let fi = 0;\n for (var j = 0; j < nimg.frames.length; j++) {\n var fr = nimg.frames[j];\n if (anim) {\n wUi(data, offset, 26); offset += 4;\n wAs(data, offset, 'fcTL'); offset += 4;\n wUi(data, offset, fi++); offset += 4;\n wUi(data, offset, fr.rect.width); offset += 4;\n wUi(data, offset, fr.rect.height); offset += 4;\n wUi(data, offset, fr.rect.x); offset += 4;\n wUi(data, offset, fr.rect.y); offset += 4;\n wUs(data, offset, dels[j]); offset += 2;\n wUs(data, offset, 1000); offset += 2;\n data[offset] = fr.dispose; offset++;\t// dispose\n data[offset] = fr.blend; offset++;\t// blend\n wUi(data, offset, crc(data, offset - 30, 30)); offset += 4; // crc\n }\n\n const imgd = fr.cimg; var\n dl = imgd.length;\n wUi(data, offset, dl + (j == 0 ? 0 : 4)); offset += 4;\n const ioff = offset;\n wAs(data, offset, (j == 0) ? 'IDAT' : 'fdAT'); offset += 4;\n if (j != 0) { wUi(data, offset, fi++); offset += 4; }\n data.set(imgd, offset);\n offset += dl;\n wUi(data, offset, crc(data, ioff, offset - ioff)); offset += 4; // crc\n }\n\n wUi(data, offset, 0); offset += 4;\n wAs(data, offset, 'IEND'); offset += 4;\n wUi(data, offset, crc(data, offset - 4, 4)); offset += 4; // crc\n\n return data.buffer;\n};\n\nUPNG.encode.compressPNG = function (out, filter, levelZero) {\n for (let i = 0; i < out.frames.length; i++) {\n const frm = out.frames[i]; const nw = frm.rect.width; const\n nh = frm.rect.height;\n const fdata = new Uint8Array(nh * frm.bpl + nh);\n frm.cimg = UPNG.encode._filterZero(frm.img, nh, frm.bpp, frm.bpl, fdata, filter, levelZero);\n }\n};\n\nUPNG.encode.compress = function (bufs, w, h, ps, prms) // prms: onlyBlend, minBits, forbidPlte\n{\n // var time = Date.now();\n const onlyBlend = prms[0]; const evenCrd = prms[1]; const forbidPrev = prms[2]; const minBits = prms[3]; const\n forbidPlte = prms[4];\n\n let ctype = 6; let depth = 8; let\n alphaAnd = 255;\n\n for (var j = 0; j < bufs.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n const img = new Uint8Array(bufs[j]); var\n ilen = img.length;\n for (var i = 0; i < ilen; i += 4) alphaAnd &= img[i + 3];\n }\n const gotAlpha = (alphaAnd != 255);\n\n // console.log(\"alpha check\", Date.now()-time); time = Date.now();\n\n // var brute = gotAlpha && forGIF;\t\t// brute : frames can only be copied, not \"blended\"\n const frms = UPNG.encode.framize(bufs, w, h, onlyBlend, evenCrd, forbidPrev);\n // console.log(\"framize\", Date.now()-time); time = Date.now();\n\n const cmap = {}; const plte = []; const\n inds = [];\n\n if (ps != 0) {\n const nbufs = []; for (var i = 0; i < frms.length; i++) nbufs.push(frms[i].img.buffer);\n\n const abuf = UPNG.encode.concatRGBA(nbufs); const\n qres = UPNG.quantize(abuf, ps); // console.log(qres);\n let cof = 0; const\n bb = new Uint8Array(qres.abuf);\n for (var i = 0; i < frms.length; i++) {\n var ti = frms[i].img; const\n bln = ti.length; inds.push(new Uint8Array(qres.inds.buffer, cof >> 2, bln >> 2));\n for (var j = 0; j < bln; j += 4) { ti[j] = bb[cof + j]; ti[j + 1] = bb[cof + j + 1]; ti[j + 2] = bb[cof + j + 2]; ti[j + 3] = bb[cof + j + 3]; } cof += bln;\n }\n\n for (var i = 0; i < qres.plte.length; i++) plte.push(qres.plte[i].est.rgba);\n // console.log(\"quantize\", Date.now()-time); time = Date.now();\n } else {\n // what if ps==0, but there are <=256 colors? we still need to detect, if the palette could be used\n for (var j = 0; j < frms.length; j++) { // when not quantized, other frames can contain colors, that are not in an initial frame\n var frm = frms[j]; const img32 = new Uint32Array(frm.img.buffer); var nw = frm.rect.width; var\n ilen = img32.length;\n const ind = new Uint8Array(ilen); inds.push(ind);\n for (var i = 0; i < ilen; i++) {\n const c = img32[i];\n if (i != 0 && c == img32[i - 1]) ind[i] = ind[i - 1];\n else if (i > nw && c == img32[i - nw]) ind[i] = ind[i - nw];\n else {\n let cmc = cmap[c];\n if (cmc == null) { cmap[c] = cmc = plte.length; plte.push(c); if (plte.length >= 300) break; }\n ind[i] = cmc;\n }\n }\n }\n // console.log(\"make palette\", Date.now()-time); time = Date.now();\n }\n\n const cc = plte.length; // console.log(\"colors:\",cc);\n if (cc <= 256 && forbidPlte == false) {\n if (cc <= 2) depth = 1; else if (cc <= 4) depth = 2; else if (cc <= 16) depth = 4; else depth = 8;\n depth = Math.max(depth, minBits);\n }\n\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; const nx = frm.rect.x; const ny = frm.rect.y; var nw = frm.rect.width; const\n nh = frm.rect.height;\n let cimg = frm.img; const\n cimg32 = new Uint32Array(cimg.buffer);\n let bpl = 4 * nw; let\n bpp = 4;\n if (cc <= 256 && forbidPlte == false) {\n bpl = Math.ceil(depth * nw / 8);\n var nimg = new Uint8Array(bpl * nh);\n const inj = inds[j];\n for (let y = 0; y < nh; y++) {\n var i = y * bpl; const\n ii = y * nw;\n if (depth == 8) for (var x = 0; x < nw; x++) nimg[i + (x)] = (inj[ii + x]);\n else if (depth == 4) for (var x = 0; x < nw; x++) nimg[i + (x >> 1)] |= (inj[ii + x] << (4 - (x & 1) * 4));\n else if (depth == 2) for (var x = 0; x < nw; x++) nimg[i + (x >> 2)] |= (inj[ii + x] << (6 - (x & 3) * 2));\n else if (depth == 1) for (var x = 0; x < nw; x++) nimg[i + (x >> 3)] |= (inj[ii + x] << (7 - (x & 7) * 1));\n }\n cimg = nimg; ctype = 3; bpp = 1;\n } else if (gotAlpha == false && frms.length == 1) {\t// some next \"reduced\" frames may contain alpha for blending\n var nimg = new Uint8Array(nw * nh * 3); const\n area = nw * nh;\n for (var i = 0; i < area; i++) {\n var ti = i * 3; const\n qi = i * 4; nimg[ti] = cimg[qi]; nimg[ti + 1] = cimg[qi + 1]; nimg[ti + 2] = cimg[qi + 2];\n }\n cimg = nimg; ctype = 2; bpp = 3; bpl = 3 * nw;\n }\n frm.img = cimg; frm.bpl = bpl; frm.bpp = bpp;\n }\n // console.log(\"colors => palette indices\", Date.now()-time); time = Date.now();\n\n return {\n ctype, depth, plte, frames: frms,\n };\n};\nUPNG.encode.framize = function (bufs, w, h, alwaysBlend, evenCrd, forbidPrev) {\n /* DISPOSE\n - 0 : no change\n - 1 : clear to transparent\n - 2 : retstore to content before rendering (previous frame disposed)\n BLEND\n - 0 : replace\n - 1 : blend\n */\n const frms = [];\n for (var j = 0; j < bufs.length; j++) {\n const cimg = new Uint8Array(bufs[j]); const\n cimg32 = new Uint32Array(cimg.buffer);\n var nimg;\n\n let nx = 0; let ny = 0; let nw = w; let nh = h; let\n blend = alwaysBlend ? 1 : 0;\n if (j != 0) {\n const tlim = (forbidPrev || alwaysBlend || j == 1 || frms[j - 2].dispose != 0) ? 1 : 2; let tstp = 0; let\n tarea = 1e9;\n for (let it = 0; it < tlim; it++) {\n var pimg = new Uint8Array(bufs[j - 1 - it]); const\n p32 = new Uint32Array(bufs[j - 1 - it]);\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n var i = y * w + x;\n if (cimg32[i] != p32[i]) {\n if (x < mix) mix = x; if (x > max) max = x;\n if (y < miy) miy = y; if (y > may) may = y;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n const sarea = (max - mix + 1) * (may - miy + 1);\n if (sarea < tarea) {\n tarea = sarea; tstp = it;\n nx = mix; ny = miy; nw = max - mix + 1; nh = may - miy + 1;\n }\n }\n\n // alwaysBlend: pokud zjistím, že blendit nelze, nastavím předchozímu snímku dispose=1. Zajistím, aby obsahoval můj obdélník.\n var pimg = new Uint8Array(bufs[j - 1 - tstp]);\n if (tstp == 1) frms[j - 1].dispose = 2;\n\n nimg = new Uint8Array(nw * nh * 4);\n UPNG._copyTile(pimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n\n blend = UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 3) ? 1 : 0;\n if (blend == 1) {\n UPNG.encode._prepareDiff(cimg, w, h, nimg, {\n x: nx, y: ny, width: nw, height: nh,\n });\n } else UPNG._copyTile(cimg, w, h, nimg, nw, nh, -nx, -ny, 0);\n // UPNG._copyTile(cimg,w,h, nimg,nw,nh, -nx,-ny, blend==1?2:0);\n } else nimg = cimg.slice(0);\t// img may be rewritten further ... don't rewrite input\n\n frms.push({\n rect: {\n x: nx, y: ny, width: nw, height: nh,\n },\n img: nimg,\n blend,\n dispose: 0,\n });\n }\n\n if (alwaysBlend) {\n for (var j = 0; j < frms.length; j++) {\n var frm = frms[j]; if (frm.blend == 1) continue;\n const r0 = frm.rect; const\n r1 = frms[j - 1].rect;\n const miX = Math.min(r0.x, r1.x); const\n miY = Math.min(r0.y, r1.y);\n const maX = Math.max(r0.x + r0.width, r1.x + r1.width); const\n maY = Math.max(r0.y + r0.height, r1.y + r1.height);\n const r = {\n x: miX, y: miY, width: maX - miX, height: maY - miY,\n };\n\n frms[j - 1].dispose = 1;\n if (j - 1 != 0) { UPNG.encode._updateFrame(bufs, w, h, frms, j - 1, r, evenCrd); }\n UPNG.encode._updateFrame(bufs, w, h, frms, j, r, evenCrd);\n }\n }\n let area = 0;\n if (bufs.length != 1) {\n for (var i = 0; i < frms.length; i++) {\n var frm = frms[i];\n area += frm.rect.width * frm.rect.height;\n // if(i==0 || frm.blend!=1) continue;\n // var ob = new Uint8Array(\n // console.log(frm.blend, frm.dispose, frm.rect);\n }\n }\n // if(area!=0) console.log(area);\n return frms;\n};\nUPNG.encode._updateFrame = function (bufs, w, h, frms, i, r, evenCrd) {\n const U8 = Uint8Array; const\n U32 = Uint32Array;\n const pimg = new U8(bufs[i - 1]); const pimg32 = new U32(bufs[i - 1]); const\n nimg = i + 1 < bufs.length ? new U8(bufs[i + 1]) : null;\n const cimg = new U8(bufs[i]); const\n cimg32 = new U32(cimg.buffer);\n\n let mix = w; let miy = h; let max = -1; let may = -1;\n for (let y = 0; y < r.height; y++) {\n for (let x = 0; x < r.width; x++) {\n const cx = r.x + x; const\n cy = r.y + y;\n const j = cy * w + cx; const\n cc = cimg32[j];\n // no need to draw transparency, or to dispose it. Or, if writing the same color and the next one does not need transparency.\n if (cc == 0 || (frms[i - 1].dispose == 0 && pimg32[j] == cc && (nimg == null || nimg[j * 4 + 3] != 0))/**/) {} else {\n if (cx < mix) mix = cx; if (cx > max) max = cx;\n if (cy < miy) miy = cy; if (cy > may) may = cy;\n }\n }\n }\n if (max == -1) mix = miy = max = may = 0;\n if (evenCrd) { if ((mix & 1) == 1)mix--; if ((miy & 1) == 1)miy--; }\n r = {\n x: mix, y: miy, width: max - mix + 1, height: may - miy + 1,\n };\n\n const fr = frms[i]; fr.rect = r; fr.blend = 1; fr.img = new Uint8Array(r.width * r.height * 4);\n if (frms[i - 1].dispose == 0) {\n UPNG._copyTile(pimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0);\n UPNG.encode._prepareDiff(cimg, w, h, fr.img, r);\n // UPNG._copyTile(cimg,w,h, fr.img,r.width,r.height, -r.x,-r.y, 2);\n } else { UPNG._copyTile(cimg, w, h, fr.img, r.width, r.height, -r.x, -r.y, 0); }\n};\nUPNG.encode._prepareDiff = function (cimg, w, h, nimg, rec) {\n UPNG._copyTile(cimg, w, h, nimg, rec.width, rec.height, -rec.x, -rec.y, 2);\n /*\n var n32 = new Uint32Array(nimg.buffer);\n var og = new Uint8Array(rec.width*rec.height*4), o32 = new Uint32Array(og.buffer);\n UPNG._copyTile(cimg,w,h, og,rec.width,rec.height, -rec.x,-rec.y, 0);\n for(var i=4; i>>2]==o32[(i>>>2)-1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n }\n for(var i=nimg.length-8; i>0; i-=4) {\n if(nimg[i+7]!=0 && nimg[i+3]==0 && o32[i>>>2]==o32[(i>>>2)+1]) {\n n32[i>>>2]=o32[i>>>2];\n //var j = i, c=p32[(i>>>2)-1];\n //while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n }\n } */\n};\n\nUPNG.encode._filterZero = function (img, h, bpp, bpl, data, filter, levelZero) {\n const fls = []; let\n ftry = [0, 1, 2, 3, 4];\n if (filter != -1) ftry = [filter];\n else if (h * bpl > 500000 || bpp == 1) ftry = [0];\n let opts; if (levelZero) opts = { level: 0 };\n\n // var CMPR = (data.length>10e6 && typeof UZIP !== 'undefined') ? UZIP : pako;\n const CMPR = UZIP;\n\n const time = Date.now();\n for (var i = 0; i < ftry.length; i++) {\n for (let y = 0; y < h; y++) UPNG.encode._filterLine(data, img, y, bpl, bpp, ftry[i]);\n // var nimg = new Uint8Array(data.length);\n // var sz = UZIP.F.deflate(data, nimg); fls.push(nimg.slice(0,sz));\n // var dfl = pako[\"deflate\"](data), dl=dfl.length-4;\n // var crc = (dfl[dl+3]<<24)|(dfl[dl+2]<<16)|(dfl[dl+1]<<8)|(dfl[dl+0]<<0);\n // console.log(crc, UZIP.adler(data,2,data.length-6));\n fls.push(CMPR.deflate(data, opts));\n }\n\n let ti; let\n tsize = 1e9;\n for (var i = 0; i < fls.length; i++) if (fls[i].length < tsize) { ti = i; tsize = fls[i].length; }\n return fls[ti];\n};\nUPNG.encode._filterLine = function (data, img, y, bpl, bpp, type) {\n const i = y * bpl; let di = i + y; const\n paeth = UPNG.decode._paeth;\n data[di] = type; di++;\n\n if (type == 0) {\n if (bpl < 500) for (var x = 0; x < bpl; x++) data[di + x] = img[i + x];\n else data.set(new Uint8Array(img.buffer, i, bpl), di);\n } else if (type == 1) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - img[i + x - bpp] + 256) & 255;\n } else if (y == 0) {\n for (var x = 0; x < bpp; x++) data[di + x] = img[i + x];\n\n if (type == 2) for (var x = bpp; x < bpl; x++) data[di + x] = img[i + x];\n if (type == 3) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - (img[i + x - bpp] >> 1) + 256) & 255;\n if (type == 4) for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] - paeth(img[i + x - bpp], 0, 0) + 256) & 255;\n } else {\n if (type == 2) { for (var x = 0; x < bpl; x++) data[di + x] = (img[i + x] + 256 - img[i + x - bpl]) & 255; }\n if (type == 3) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - (img[i + x - bpl] >> 1)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - ((img[i + x - bpl] + img[i + x - bpp]) >> 1)) & 255;\n }\n if (type == 4) {\n for (var x = 0; x < bpp; x++) data[di + x] = (img[i + x] + 256 - paeth(0, img[i + x - bpl], 0)) & 255;\n for (var x = bpp; x < bpl; x++) data[di + x] = (img[i + x] + 256 - paeth(img[i + x - bpp], img[i + x - bpl], img[i + x - bpp - bpl])) & 255;\n }\n }\n};\n\nUPNG.crc = {\n table: (function () {\n const tab = new Uint32Array(256);\n for (let n = 0; n < 256; n++) {\n let c = n;\n for (let k = 0; k < 8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c >>>= 1;\n }\n tab[n] = c;\n }\n return tab;\n }()),\n update(c, buf, off, len) {\n for (let i = 0; i < len; i++) c = UPNG.crc.table[(c ^ buf[off + i]) & 0xff] ^ (c >>> 8);\n return c;\n },\n crc(b, o, l) { return UPNG.crc.update(0xffffffff, b, o, l) ^ 0xffffffff; },\n};\n\nUPNG.quantize = function (abuf, ps) {\n const oimg = new Uint8Array(abuf); const nimg = oimg.slice(0); const\n nimg32 = new Uint32Array(nimg.buffer);\n\n const KD = UPNG.quantize.getKDtree(nimg, ps);\n const root = KD[0]; const\n leafs = KD[1];\n\n const { planeDst } = UPNG.quantize;\n const sb = oimg; const tb = nimg32; const\n len = sb.length;\n\n const inds = new Uint8Array(oimg.length >> 2); let\n nd;\n if (oimg.length < 20e6) // precise, but slow :(\n {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = UPNG.quantize.getNearest(root, r, g, b, a);\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n } else {\n for (var i = 0; i < len; i += 4) {\n var r = sb[i] * (1 / 255); var g = sb[i + 1] * (1 / 255); var b = sb[i + 2] * (1 / 255); var\n a = sb[i + 3] * (1 / 255);\n\n nd = root; while (nd.left) nd = (planeDst(nd.est, r, g, b, a) <= 0) ? nd.left : nd.right;\n inds[i >> 2] = nd.ind; tb[i >> 2] = nd.est.rgba;\n }\n }\n return { abuf: nimg.buffer, inds, plte: leafs };\n};\n\nUPNG.quantize.getKDtree = function (nimg, ps, err) {\n if (err == null) err = 0.0001;\n const nimg32 = new Uint32Array(nimg.buffer);\n\n const root = {\n i0: 0, i1: nimg.length, bst: null, est: null, tdst: 0, left: null, right: null,\n }; // basic statistic, extra statistic\n root.bst = UPNG.quantize.stats(nimg, root.i0, root.i1); root.est = UPNG.quantize.estats(root.bst);\n const leafs = [root];\n\n while (leafs.length < ps) {\n let maxL = 0; let\n mi = 0;\n for (var i = 0; i < leafs.length; i++) if (leafs[i].est.L > maxL) { maxL = leafs[i].est.L; mi = i; }\n if (maxL < err) break;\n const node = leafs[mi];\n\n const s0 = UPNG.quantize.splitPixels(nimg, nimg32, node.i0, node.i1, node.est.e, node.est.eMq255);\n const s0wrong = (node.i0 >= s0 || node.i1 <= s0);\n // console.log(maxL, leafs.length, mi);\n if (s0wrong) { node.est.L = 0; continue; }\n\n const ln = {\n i0: node.i0, i1: s0, bst: null, est: null, tdst: 0, left: null, right: null,\n }; ln.bst = UPNG.quantize.stats(nimg, ln.i0, ln.i1);\n ln.est = UPNG.quantize.estats(ln.bst);\n const rn = {\n i0: s0, i1: node.i1, bst: null, est: null, tdst: 0, left: null, right: null,\n }; rn.bst = { R: [], m: [], N: node.bst.N - ln.bst.N };\n for (var i = 0; i < 16; i++) rn.bst.R[i] = node.bst.R[i] - ln.bst.R[i];\n for (var i = 0; i < 4; i++) rn.bst.m[i] = node.bst.m[i] - ln.bst.m[i];\n rn.est = UPNG.quantize.estats(rn.bst);\n\n node.left = ln; node.right = rn;\n leafs[mi] = ln; leafs.push(rn);\n }\n leafs.sort((a, b) => b.bst.N - a.bst.N);\n for (var i = 0; i < leafs.length; i++) leafs[i].ind = i;\n return [root, leafs];\n};\n\nUPNG.quantize.getNearest = function (nd, r, g, b, a) {\n if (nd.left == null) { nd.tdst = UPNG.quantize.dist(nd.est.q, r, g, b, a); return nd; }\n const planeDst = UPNG.quantize.planeDst(nd.est, r, g, b, a);\n\n let node0 = nd.left; let\n node1 = nd.right;\n if (planeDst > 0) { node0 = nd.right; node1 = nd.left; }\n\n const ln = UPNG.quantize.getNearest(node0, r, g, b, a);\n if (ln.tdst <= planeDst * planeDst) return ln;\n const rn = UPNG.quantize.getNearest(node1, r, g, b, a);\n return rn.tdst < ln.tdst ? rn : ln;\n};\nUPNG.quantize.planeDst = function (est, r, g, b, a) { const { e } = est; return e[0] * r + e[1] * g + e[2] * b + e[3] * a - est.eMq; };\nUPNG.quantize.dist = function (q, r, g, b, a) {\n const d0 = r - q[0]; const d1 = g - q[1]; const d2 = b - q[2]; const\n d3 = a - q[3]; return d0 * d0 + d1 * d1 + d2 * d2 + d3 * d3;\n};\n\nUPNG.quantize.splitPixels = function (nimg, nimg32, i0, i1, e, eMq) {\n const { vecDot } = UPNG.quantize;\n i1 -= 4;\n const shfs = 0;\n while (i0 < i1) {\n while (vecDot(nimg, i0, e) <= eMq) i0 += 4;\n while (vecDot(nimg, i1, e) > eMq) i1 -= 4;\n if (i0 >= i1) break;\n\n const t = nimg32[i0 >> 2]; nimg32[i0 >> 2] = nimg32[i1 >> 2]; nimg32[i1 >> 2] = t;\n\n i0 += 4; i1 -= 4;\n }\n while (vecDot(nimg, i0, e) > eMq) i0 -= 4;\n return i0 + 4;\n};\nUPNG.quantize.vecDot = function (nimg, i, e) {\n return nimg[i] * e[0] + nimg[i + 1] * e[1] + nimg[i + 2] * e[2] + nimg[i + 3] * e[3];\n};\nUPNG.quantize.stats = function (nimg, i0, i1) {\n const R = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n const m = [0, 0, 0, 0];\n const N = (i1 - i0) >> 2;\n for (let i = i0; i < i1; i += 4) {\n const r = nimg[i] * (1 / 255); const g = nimg[i + 1] * (1 / 255); const b = nimg[i + 2] * (1 / 255); const\n a = nimg[i + 3] * (1 / 255);\n // var r = nimg[i], g = nimg[i+1], b = nimg[i+2], a = nimg[i+3];\n m[0] += r; m[1] += g; m[2] += b; m[3] += a;\n\n R[0] += r * r; R[1] += r * g; R[2] += r * b; R[3] += r * a;\n R[5] += g * g; R[6] += g * b; R[7] += g * a;\n R[10] += b * b; R[11] += b * a;\n R[15] += a * a;\n }\n R[4] = R[1]; R[8] = R[2]; R[9] = R[6]; R[12] = R[3]; R[13] = R[7]; R[14] = R[11];\n\n return { R, m, N };\n};\nUPNG.quantize.estats = function (stats) {\n const { R } = stats;\n const { m } = stats;\n const { N } = stats;\n\n // when all samples are equal, but N is large (millions), the Rj can be non-zero ( 0.0003.... - precission error)\n const m0 = m[0]; const m1 = m[1]; const m2 = m[2]; const m3 = m[3]; const\n iN = (N == 0 ? 0 : 1 / N);\n const Rj = [\n R[0] - m0 * m0 * iN, R[1] - m0 * m1 * iN, R[2] - m0 * m2 * iN, R[3] - m0 * m3 * iN,\n R[4] - m1 * m0 * iN, R[5] - m1 * m1 * iN, R[6] - m1 * m2 * iN, R[7] - m1 * m3 * iN,\n R[8] - m2 * m0 * iN, R[9] - m2 * m1 * iN, R[10] - m2 * m2 * iN, R[11] - m2 * m3 * iN,\n R[12] - m3 * m0 * iN, R[13] - m3 * m1 * iN, R[14] - m3 * m2 * iN, R[15] - m3 * m3 * iN,\n ];\n\n const A = Rj; const\n M = UPNG.M4;\n let b = [Math.random(), Math.random(), Math.random(), Math.random()]; let mi = 0; let\n tmi = 0;\n\n if (N != 0) {\n for (let i = 0; i < 16; i++) {\n b = M.multVec(A, b); tmi = Math.sqrt(M.dot(b, b)); b = M.sml(1 / tmi, b);\n if (i != 0 && Math.abs(tmi - mi) < 1e-9) break; mi = tmi;\n }\n }\n // b = [0,0,1,0]; mi=N;\n const q = [m0 * iN, m1 * iN, m2 * iN, m3 * iN];\n const eMq255 = M.dot(M.sml(255, q), b);\n\n return {\n Cov: Rj,\n q,\n e: b,\n L: mi,\n eMq255,\n eMq: M.dot(b, q),\n rgba: (((Math.round(255 * q[3]) << 24) | (Math.round(255 * q[2]) << 16) | (Math.round(255 * q[1]) << 8) | (Math.round(255 * q[0]) << 0)) >>> 0),\n };\n};\nUPNG.M4 = {\n multVec(m, v) {\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3] * v[3],\n m[4] * v[0] + m[5] * v[1] + m[6] * v[2] + m[7] * v[3],\n m[8] * v[0] + m[9] * v[1] + m[10] * v[2] + m[11] * v[3],\n m[12] * v[0] + m[13] * v[1] + m[14] * v[2] + m[15] * v[3],\n ];\n },\n dot(x, y) { return x[0] * y[0] + x[1] * y[1] + x[2] * y[2] + x[3] * y[3]; },\n sml(a, y) { return [a * y[0], a * y[1], a * y[2], a * y[3]]; },\n};\n\nUPNG.encode.concatRGBA = function (bufs) {\n let tlen = 0;\n for (var i = 0; i < bufs.length; i++) tlen += bufs[i].byteLength;\n const nimg = new Uint8Array(tlen); let\n noff = 0;\n for (var i = 0; i < bufs.length; i++) {\n const img = new Uint8Array(bufs[i]); const\n il = img.length;\n for (let j = 0; j < il; j += 4) {\n let r = img[j]; let g = img[j + 1]; let b = img[j + 2]; const\n a = img[j + 3];\n if (a == 0) r = g = b = 0;\n nimg[noff + j] = r; nimg[noff + j + 1] = g; nimg[noff + j + 2] = b; nimg[noff + j + 3] = a;\n }\n noff += il;\n }\n return nimg.buffer;\n};\n\nexport default UPNG;\n","export default {\n CHROME: 'CHROME',\n FIREFOX: 'FIREFOX',\n DESKTOP_SAFARI: 'DESKTOP_SAFARI',\n IE: 'IE',\n MOBILE_SAFARI: 'MOBILE_SAFARI',\n ETC: 'ETC',\n};\n","import UPNG from './UPNG';\nimport MAX_CANVAS_SIZE from './config/max-canvas-size';\nimport BROWSER_NAME from './config/browser-name';\n\nconst isBrowser = typeof window !== 'undefined'; // change browser environment to support SSR\n\n// add support for cordova-plugin-file\nconst moduleMapper = isBrowser && window.cordova && window.cordova.require && window.cordova.require('cordova/modulemapper');\nexport const CustomFile = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'File')) || (typeof window.File !== 'undefined' && File));\nexport const CustomFileReader = isBrowser && ((moduleMapper && moduleMapper.getOriginalSymbol(window, 'FileReader')) || (typeof window.FileReader !== 'undefined' && FileReader));\n\n/**\n * getFilefromDataUrl\n *\n * @param {string} dataUrl\n * @param {string} filename\n * @param {number} [lastModified=Date.now()]\n * @returns {Promise}\n */\nexport function getFilefromDataUrl(dataUrl, filename, lastModified = Date.now()) {\n return new Promise((resolve) => {\n const arr = dataUrl.split(',');\n const mime = arr[0].match(/:(.*?);/)[1];\n const bstr = globalThis.atob(arr[1]);\n let n = bstr.length;\n const u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n const file = new Blob([u8arr], { type: mime });\n file.name = filename;\n file.lastModified = lastModified;\n resolve(file);\n\n // Safari has issue with File constructor not being able to POST in FormData\n // https://github.com/Donaldcwl/browser-image-compression/issues/8\n // https://bugs.webkit.org/show_bug.cgi?id=165081\n // let file\n // try {\n // file = new File([u8arr], filename, { type: mime }) // Edge do not support File constructor\n // } catch (e) {\n // file = new Blob([u8arr], { type: mime })\n // file.name = filename\n // file.lastModified = lastModified\n // }\n // resolve(file)\n });\n}\n\n/**\n * getDataUrlFromFile\n *\n * @param {File | Blob} file\n * @returns {Promise}\n */\nexport function getDataUrlFromFile(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = () => resolve(reader.result);\n reader.onerror = (e) => reject(e);\n reader.readAsDataURL(file);\n });\n}\n\n/**\n * loadImage\n *\n * @param {string} src\n * @returns {Promise}\n */\nexport function loadImage(src) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onload = () => resolve(img);\n img.onerror = (e) => reject(e);\n img.src = src;\n });\n}\n\n/**\n * getBrowserName\n *\n * Extracts the browser name from the useragent.\n *\n * ref: https://stackoverflow.com/a/26358856\n *\n * @returns {string}\n */\nexport function getBrowserName() {\n if (getBrowserName.cachedResult !== undefined) {\n return getBrowserName.cachedResult;\n }\n let browserName = BROWSER_NAME.ETC;\n const { userAgent } = navigator;\n if (/Chrom(e|ium)/i.test(userAgent)) {\n browserName = BROWSER_NAME.CHROME;\n } else if (/iP(ad|od|hone)/i.test(userAgent) && /WebKit/i.test(userAgent) && !(/(CriOS|FxiOS|OPiOS|mercury)/i.test(userAgent))) {\n // see: https://stackoverflow.com/a/35813965\n browserName = BROWSER_NAME.MOBILE_SAFARI;\n } else if (/Safari/i.test(userAgent)) {\n browserName = BROWSER_NAME.DESKTOP_SAFARI;\n } else if (/Firefox/i.test(userAgent)) {\n browserName = BROWSER_NAME.FIREFOX;\n } else if (/MSIE/i.test(userAgent) || (!!document.documentMode) === true) { // IF IE > 10\n browserName = BROWSER_NAME.IE;\n }\n getBrowserName.cachedResult = browserName;\n return getBrowserName.cachedResult;\n}\n\n/**\n * approximateBelowCanvasMaximumSizeOfBrowser\n *\n * it uses binary search to converge below the browser's maximum Canvas size.\n *\n * @param {number} initWidth\n * @param {number} initHeight\n * @returns {object}\n */\nexport function approximateBelowMaximumCanvasSizeOfBrowser(initWidth, initHeight) {\n const browserName = getBrowserName();\n const maximumCanvasSize = MAX_CANVAS_SIZE[browserName];\n\n let width = initWidth;\n let height = initHeight;\n let size = width * height;\n const ratio = width > height ? height / width : width / height;\n\n while (size > maximumCanvasSize * maximumCanvasSize) {\n const halfSizeWidth = (maximumCanvasSize + width) / 2;\n const halfSizeHeight = (maximumCanvasSize + height) / 2;\n if (halfSizeWidth < halfSizeHeight) {\n height = halfSizeHeight;\n width = halfSizeHeight * ratio;\n } else {\n height = halfSizeWidth * ratio;\n width = halfSizeWidth;\n }\n\n size = width * height;\n }\n\n return {\n width, height,\n };\n}\n\n/**\n * get new Canvas and it's context\n * @param width\n * @param height\n * @returns {[HTMLCanvasElement | OffscreenCanvas, CanvasRenderingContext2D]}\n */\nexport function getNewCanvasAndCtx(width, height) {\n let canvas;\n let ctx;\n try {\n canvas = new OffscreenCanvas(width, height);\n ctx = canvas.getContext('2d');\n if (ctx === null) {\n throw new Error('getContext of OffscreenCanvas returns null');\n }\n } catch (e) {\n canvas = document.createElement('canvas');\n ctx = canvas.getContext('2d');\n }\n canvas.width = width;\n canvas.height = height;\n // ctx.fillStyle = '#fff'\n // ctx.fillRect(0, 0, width, height)\n return [canvas, ctx];\n}\n\n/**\n * drawImageInCanvas\n *\n * @param {HTMLImageElement} img\n * @param {string} [fileType=undefined]\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function drawImageInCanvas(img, fileType = undefined) {\n const { width, height } = approximateBelowMaximumCanvasSizeOfBrowser(img.width, img.height);\n const [canvas, ctx] = getNewCanvasAndCtx(width, height);\n if (fileType && /jpe?g/.test(fileType)) {\n ctx.fillStyle = 'white'; // to fill the transparent background with white color for png file in jpeg extension\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n return canvas;\n}\n\n/**\n * Detect IOS device\n * see: https://stackoverflow.com/a/9039885\n * @returns {boolean} isIOS device\n */\nexport function isIOS() {\n if (isIOS.cachedResult !== undefined) {\n return isIOS.cachedResult;\n }\n isIOS.cachedResult = [\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod',\n ].includes(navigator.platform)\n // iPad on iOS 13 detection\n || (navigator.userAgent.includes('Mac') && 'ontouchend' in document);\n return isIOS.cachedResult;\n}\n\n/**\n * drawFileInCanvas\n *\n * @param {File | Blob} file\n * @returns {Promise<[ImageBitmap | HTMLImageElement, HTMLCanvasElement | OffscreenCanvas]>}\n */\nexport async function drawFileInCanvas(file, options = {}) {\n let img;\n try {\n if (isIOS() || [BROWSER_NAME.DESKTOP_SAFARI, BROWSER_NAME.MOBILE_SAFARI].includes(getBrowserName())) {\n throw new Error('Skip createImageBitmap on IOS and Safari'); // see https://github.com/Donaldcwl/browser-image-compression/issues/118\n }\n img = await createImageBitmap(file);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n try {\n const dataUrl = await getDataUrlFromFile(file);\n img = await loadImage(dataUrl);\n } catch (e2) {\n if (process.env.BUILD === 'development') {\n console.error(e2);\n }\n throw e2;\n }\n }\n const canvas = drawImageInCanvas(img, options.fileType || file.type);\n return [img, canvas];\n}\n\n/**\n * canvasToFile\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {string} fileType\n * @param {string} fileName\n * @param {number} fileLastModified\n * @param {number} [quality]\n * @returns {Promise}\n */\nexport async function canvasToFile(canvas, fileType, fileName, fileLastModified, quality = 1) {\n let file;\n if (fileType === 'image/png') {\n const ctx = canvas.getContext('2d');\n const { data } = ctx.getImageData(0, 0, canvas.width, canvas.height);\n const png = UPNG.encode([data], canvas.width, canvas.height, 256 * quality);\n file = new Blob([png], { type: fileType });\n file.name = fileName;\n file.lastModified = fileLastModified;\n } else if (typeof OffscreenCanvas === 'function' && canvas instanceof OffscreenCanvas) { // checked on Win Chrome 83, MacOS Chrome 83\n file = await canvas.convertToBlob({ type: fileType, quality });\n file.name = fileName;\n file.lastModified = fileLastModified;\n // some browser do not support quality parameter, see: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob\n // } else if (typeof canvas.toBlob === 'function') {\n // file = await new Promise(resolve => canvas.toBlob(resolve, fileType, quality))\n } else { // checked on Win Edge 44, Win IE 11, Win Firefox 76, MacOS Firefox 77, MacOS Safari 13.1\n const dataUrl = canvas.toDataURL(fileType, quality);\n file = await getFilefromDataUrl(dataUrl, fileName, fileLastModified);\n }\n return file;\n}\n\n/**\n * clear Canvas memory\n * @param canvas\n * @returns null\n */\nexport function cleanupCanvasMemory(canvas) {\n // garbage clean canvas for safari\n // ref: https://bugs.webkit.org/show_bug.cgi?id=195325\n // eslint-disable-next-line no-param-reassign\n canvas.width = 0;\n // eslint-disable-next-line no-param-reassign\n canvas.height = 0;\n}\n\n// Check if browser supports automatic image orientation\n// see https://github.com/blueimp/JavaScript-Load-Image/blob/1e4df707821a0afcc11ea0720ee403b8759f3881/js/load-image-orientation.js#L37-L53\nexport async function isAutoOrientationInBrowser() {\n if (isAutoOrientationInBrowser.cachedResult !== undefined) return isAutoOrientationInBrowser.cachedResult;\n\n // black 2x1 JPEG, with the following meta information set:\n // EXIF Orientation: 6 (Rotated 90° CCW)\n const testImageURL = 'data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAA'\n + 'AAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA'\n + 'QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE'\n + 'BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/x'\n + 'ABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAA'\n + 'AAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==';\n const testImageFile = await getFilefromDataUrl(testImageURL, 'test.jpg', Date.now());\n\n const testImageCanvas = (await drawFileInCanvas(testImageFile))[1];\n const testImageFile2 = await canvasToFile(testImageCanvas, testImageFile.type, testImageFile.name, testImageFile.lastModified);\n cleanupCanvasMemory(testImageCanvas);\n const img = (await drawFileInCanvas(testImageFile2))[0];\n // console.log('img', img.width, img.height)\n\n isAutoOrientationInBrowser.cachedResult = img.width === 1 && img.height === 2;\n return isAutoOrientationInBrowser.cachedResult;\n}\n\n/**\n * getExifOrientation\n * get image exif orientation info\n * source: https://stackoverflow.com/a/32490603/10395024\n *\n * @param {File | Blob} file\n * @returns {Promise} - orientation id, see https://i.stack.imgur.com/VGsAj.gif\n */\nexport function getExifOrientation(file) {\n return new Promise((resolve, reject) => {\n const reader = new CustomFileReader();\n reader.onload = (e) => {\n const view = new DataView(e.target.result);\n if (view.getUint16(0, false) != 0xFFD8) {\n return resolve(-2);\n }\n const length = view.byteLength;\n let offset = 2;\n while (offset < length) {\n if (view.getUint16(offset + 2, false) <= 8) return resolve(-1);\n const marker = view.getUint16(offset, false);\n offset += 2;\n if (marker == 0xFFE1) {\n if (view.getUint32(offset += 2, false) != 0x45786966) {\n return resolve(-1);\n }\n\n const little = view.getUint16(offset += 6, false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n for (let i = 0; i < tags; i++) {\n if (view.getUint16(offset + (i * 12), little) == 0x0112) {\n return resolve(view.getUint16(offset + (i * 12) + 8, little));\n }\n }\n } else if ((marker & 0xFF00) != 0xFF00) {\n break;\n } else {\n offset += view.getUint16(offset, false);\n }\n }\n return resolve(-1);\n };\n reader.onerror = (e) => reject(e);\n reader.readAsArrayBuffer(file);\n });\n}\n\n/**\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param options\n * @returns {HTMLCanvasElement | OffscreenCanvas}\n */\nexport function handleMaxWidthOrHeight(canvas, options) {\n const { width } = canvas;\n const { height } = canvas;\n const { maxWidthOrHeight } = options;\n\n const needToHandle = isFinite(maxWidthOrHeight) && (width > maxWidthOrHeight || height > maxWidthOrHeight);\n\n let newCanvas = canvas;\n let ctx;\n\n if (needToHandle) {\n [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n if (width > height) {\n newCanvas.width = maxWidthOrHeight;\n newCanvas.height = (height / width) * maxWidthOrHeight;\n } else {\n newCanvas.width = (width / height) * maxWidthOrHeight;\n newCanvas.height = maxWidthOrHeight;\n }\n ctx.drawImage(canvas, 0, 0, newCanvas.width, newCanvas.height);\n\n cleanupCanvasMemory(canvas);\n }\n\n return newCanvas;\n}\n\n/**\n * followExifOrientation\n * source: https://stackoverflow.com/a/40867559/10395024\n *\n * @param {HTMLCanvasElement | OffscreenCanvas} canvas\n * @param {number} exifOrientation\n * @returns {HTMLCanvasElement | OffscreenCanvas} canvas\n */\nexport function followExifOrientation(canvas, exifOrientation) {\n const { width } = canvas;\n const { height } = canvas;\n\n const [newCanvas, ctx] = getNewCanvasAndCtx(width, height);\n\n // set proper canvas dimensions before transform & export\n if (exifOrientation > 4 && exifOrientation < 9) {\n newCanvas.width = height;\n newCanvas.height = width;\n } else {\n newCanvas.width = width;\n newCanvas.height = height;\n }\n\n // transform context before drawing image\n switch (exifOrientation) {\n case 2:\n ctx.transform(-1, 0, 0, 1, width, 0);\n break;\n case 3:\n ctx.transform(-1, 0, 0, -1, width, height);\n break;\n case 4:\n ctx.transform(1, 0, 0, -1, 0, height);\n break;\n case 5:\n ctx.transform(0, 1, 1, 0, 0, 0);\n break;\n case 6:\n ctx.transform(0, 1, -1, 0, height, 0);\n break;\n case 7:\n ctx.transform(0, -1, -1, 0, height, width);\n break;\n case 8:\n ctx.transform(0, -1, 1, 0, 0, width);\n break;\n default:\n break;\n }\n\n ctx.drawImage(canvas, 0, 0, width, height);\n\n cleanupCanvasMemory(canvas);\n\n return newCanvas;\n}\n","import {\n canvasToFile,\n cleanupCanvasMemory,\n drawFileInCanvas,\n followExifOrientation,\n getExifOrientation,\n getNewCanvasAndCtx,\n handleMaxWidthOrHeight,\n isAutoOrientationInBrowser,\n} from './utils';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} options\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @param {number} [options.initialQuality=1.0]\n * @param {number} previousProgress - for internal try catch rerunning start from previous progress\n * @returns {Promise}\n */\nexport default async function compress(file, options, previousProgress = 0) {\n let progress = previousProgress;\n\n function incProgress(inc = 5) {\n progress += inc;\n options.onProgress(Math.min(progress, 100));\n }\n\n function setProgress(p) {\n progress = Math.min(Math.max(p, progress), 100);\n options.onProgress(progress);\n }\n\n let remainingTrials = options.maxIteration || 10;\n\n const maxSizeByte = options.maxSizeMB * 1024 * 1024;\n\n incProgress();\n\n // drawFileInCanvas\n const [, origCanvas] = await drawFileInCanvas(file, options);\n\n incProgress();\n\n // handleMaxWidthOrHeight\n const maxWidthOrHeightFixedCanvas = handleMaxWidthOrHeight(origCanvas, options);\n\n incProgress();\n\n // exifOrientation\n const exifOrientation = options.exifOrientation || await getExifOrientation(file);\n incProgress();\n const orientationFixedCanvas = (await isAutoOrientationInBrowser()) ? maxWidthOrHeightFixedCanvas : followExifOrientation(maxWidthOrHeightFixedCanvas, exifOrientation);\n incProgress();\n\n let quality = options.initialQuality || 1.0;\n\n const outputFileType = options.fileType || file.type;\n\n const tempFile = await canvasToFile(orientationFixedCanvas, outputFileType, file.name, file.lastModified, quality);\n incProgress();\n\n const origExceedMaxSize = tempFile.size > maxSizeByte;\n const sizeBecomeLarger = tempFile.size > file.size;\n if (process.env.BUILD === 'development') {\n console.log('original file size', file.size);\n console.log('current file size', tempFile.size);\n }\n\n // check if we need to compress or resize\n if (!origExceedMaxSize && !sizeBecomeLarger) {\n // no need to compress\n if (process.env.BUILD === 'development') {\n console.log('no need to compress');\n }\n setProgress(100);\n return tempFile;\n }\n\n const sourceSize = file.size;\n const renderedSize = tempFile.size;\n let currentSize = renderedSize;\n let compressedFile;\n let newCanvas; let\n ctx;\n let canvas = orientationFixedCanvas;\n while (remainingTrials-- && (currentSize > maxSizeByte || currentSize > sourceSize)) {\n const newWidth = origExceedMaxSize ? canvas.width * 0.95 : canvas.width;\n const newHeight = origExceedMaxSize ? canvas.height * 0.95 : canvas.height;\n if (process.env.BUILD === 'development') {\n console.log('current width', newWidth);\n console.log('current height', newHeight);\n }\n [newCanvas, ctx] = getNewCanvasAndCtx(newWidth, newHeight);\n\n ctx.drawImage(canvas, 0, 0, newWidth, newHeight);\n\n quality *= 0.95;\n // eslint-disable-next-line no-await-in-loop\n compressedFile = await canvasToFile(newCanvas, outputFileType, file.name, file.lastModified, quality);\n\n cleanupCanvasMemory(canvas);\n\n canvas = newCanvas;\n\n currentSize = compressedFile.size;\n // console.log('currentSize', currentSize)\n setProgress(Math.min(99, Math.floor(((renderedSize - currentSize) / (renderedSize - maxSizeByte)) * 100)));\n }\n\n cleanupCanvasMemory(canvas);\n cleanupCanvasMemory(newCanvas);\n cleanupCanvasMemory(maxWidthOrHeightFixedCanvas);\n cleanupCanvasMemory(orientationFixedCanvas);\n cleanupCanvasMemory(origCanvas);\n\n setProgress(100);\n return compressedFile;\n}\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`\nvar documentCreateElement = require('../internals/document-create-element');\n\nvar classList = documentCreateElement('span').classList;\nvar DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;\n\nmodule.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar isConstructor = require('../internals/is-constructor');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var IS_CONSTRUCTOR = isConstructor(this);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = getIterator(O, iteratorMethod);\n next = iterator.next;\n result = IS_CONSTRUCTOR ? new this() : [];\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = IS_CONSTRUCTOR ? new this(length) : Array(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements -- TODO\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to , but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar $toString = require('../internals/to-string');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar nativeFetch = getBuiltIn('fetch');\nvar NativeRequest = getBuiltIn('Request');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (iteratorMethod) {\n iterator = getIterator(init, iteratorMethod);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: $toString(first.value), value: $toString(second.value) });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: $toString(init[key]) });\n } else {\n parseSearchParams(\n entries,\n typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : $toString(init)\n );\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: $toString(name), value: $toString(value) });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n } return init;\n };\n\n if (isCallable(nativeFetch)) {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestConstructor, 'Request');\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n\n $({ global: true, forced: true }, {\n Request: RequestConstructor\n });\n }\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar $toString = require('../internals/to-string');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\n// eslint-disable-next-line regexp/no-obscure-range -- safe\nvar ALPHANUMERIC = /[\\d+-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^0x/i;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n/* eslint-disable no-control-regex -- safe */\nvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/;\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/;\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g;\nvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\n/* eslint-enable no-control-regex -- safe */\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var chr = function () {\n return input.charAt(pointer);\n };\n\n if (chr() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (chr()) {\n if (pieceIndex == 8) return;\n if (chr() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(chr())) {\n value = value * 16 + parseInt(chr(), 16);\n pointer++;\n length++;\n }\n if (chr() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (chr()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (chr() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(chr())) return;\n while (DIGIT.test(chr())) {\n number = parseInt(chr(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (chr() == ':') {\n pointer++;\n if (!chr()) return;\n } else if (chr()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (chr, set) {\n var code = codeAt(chr, 0);\n return code > 0x20 && code < 0x7F && !has(set, chr) ? chr : encodeURIComponent(chr);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements -- TODO\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, chr, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n chr = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (chr && ALPHA.test(chr)) {\n buffer += chr.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (chr && (ALPHANUMERIC.test(chr) || chr == '+' || chr == '-' || chr == '.')) {\n buffer += chr.toLowerCase();\n } else if (chr == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && chr == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (chr == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (chr == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (chr == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '/' || (chr == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (chr == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (chr == '/' || chr == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (chr == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (chr != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (chr != '/' && chr != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (chr == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += chr;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (chr == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (chr == '[') seenBracket = true;\n else if (chr == ']') seenBracket = false;\n buffer += chr;\n } break;\n\n case PORT:\n if (DIGIT.test(chr)) {\n buffer += chr;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (chr == '/' || chr == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (chr == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (chr == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (chr == '/' || chr == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (chr == EOF || chr == '/' || chr == '\\\\' || chr == '?' || chr == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += chr;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (chr != '/' && chr != '\\\\') continue;\n } else if (!stateOverride && chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n state = PATH;\n if (chr != '/') continue;\n } break;\n\n case PATH:\n if (\n chr == EOF || chr == '/' ||\n (chr == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (chr == '?' || chr == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (chr != '/' && !(chr == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(chr, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n if (chr == \"'\" && isSpecial(url)) url.query += '%27';\n else if (chr == '#') url.query += '%23';\n else url.query += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = $toString(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, $toString(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URLConstructor(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = $toString(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, $toString(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom($toString(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, $toString(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = $toString(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, $toString(pathname), PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = $toString(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = $toString(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar DOMTokenListPrototype = require('../internals/dom-token-list-prototype');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n}\n\nhandlePrototype(DOMTokenListPrototype);\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.es/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar $startsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return $startsWith\n ? $startsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar fails = require('../internals/fails');\nvar anObject = require('../internals/an-object');\nvar isCallable = require('../internals/is-callable');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar getMethod = require('../internals/get-method');\nvar getSubstitution = require('../internals/get-substitution');\nvar regExpExec = require('../internals/regexp-exec-abstract');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar max = Math.max;\nvar min = Math.min;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive\n return ''.replace(re, '$') !== '7';\n});\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.es/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);\n return replacer\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(toString(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace\n function (string, replaceValue) {\n var rx = anObject(this);\n var S = toString(string);\n\n if (\n typeof replaceValue === 'string' &&\n replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1 &&\n replaceValue.indexOf('$<') === -1\n ) {\n var res = maybeCallNative(nativeReplace, rx, S, replaceValue);\n if (res.done) return res.value;\n }\n\n var functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = toString(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = toString(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = toString(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","import * as UZIP from 'uzip';\n// eslint-disable-next-line import/no-cycle\nimport lib from './index';\nimport compress from './image-compression';\nimport { getNewCanvasAndCtx, isIOS } from './utils';\nimport UPNG from './UPNG';\nimport MAX_CANVAS_SIZE from './config/max-canvas-size';\nimport BROWSER_NAME from './config/browser-name';\n\nlet cnt = 0;\nlet imageCompressionLibUrl;\nlet worker;\n\nfunction createWorker(script) {\n const blobArgs = [];\n if (typeof script === 'function') {\n blobArgs.push(`(${script})()`);\n } else {\n blobArgs.push(script);\n }\n return new Worker(URL.createObjectURL(new Blob(blobArgs)));\n}\n\nfunction createSourceObject(str) {\n // console.log('createSourceObject', str)\n return URL.createObjectURL(new Blob([str], { type: 'application/javascript' }));\n}\n\nfunction stringify(o) {\n return JSON.stringify(o, (key, value) => ((typeof value === 'function') ? `BIC_FN:::(function () { return ${value.toString()} })()` : value));\n}\n\nfunction parse(o) {\n if (typeof o === 'string') return o;\n const result = {};\n Object.entries(o).forEach(([key, value]) => {\n if (typeof value === 'string' && value.startsWith('BIC_FN:::')) {\n try {\n // eslint-disable-next-line no-eval\n result[key] = eval(value.replace(/^BIC_FN:::/, ''));\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(key, e);\n }\n throw e;\n }\n } else {\n result[key] = parse(value);\n }\n });\n return result;\n}\n\nfunction generateLib() {\n // prepare the lib to be used inside WebWorker\n return createSourceObject(`\n // reconstruct library\n function imageCompression (){return (${lib}).apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ${lib.getDataUrlFromFile}\n imageCompression.getFilefromDataUrl = ${lib.getFilefromDataUrl}\n imageCompression.loadImage = ${lib.loadImage}\n imageCompression.drawImageInCanvas = ${lib.drawImageInCanvas}\n imageCompression.drawFileInCanvas = ${lib.drawFileInCanvas}\n imageCompression.canvasToFile = ${lib.canvasToFile}\n imageCompression.getExifOrientation = ${lib.getExifOrientation}\n imageCompression.handleMaxWidthOrHeight = ${lib.handleMaxWidthOrHeight}\n imageCompression.followExifOrientation = ${lib.followExifOrientation}\n imageCompression.cleanupCanvasMemory = ${lib.cleanupCanvasMemory}\n imageCompression.isAutoOrientationInBrowser = ${lib.isAutoOrientationInBrowser}\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ${lib.approximateBelowMaximumCanvasSizeOfBrowser}\n imageCompression.getBrowserName = ${lib.getBrowserName}\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n isIOS = ${isIOS}\n \n getNewCanvasAndCtx = ${getNewCanvasAndCtx}\n CustomFileReader = FileReader\n CustomFile = File\n MAX_CANVAS_SIZE = ${JSON.stringify(MAX_CANVAS_SIZE)}\n BROWSER_NAME = ${JSON.stringify(BROWSER_NAME)}\n function compress (){return (${compress}).apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ${parse}\n const UPNG = {}\n UPNG.toRGBA8 = ${UPNG.toRGBA8}\n UPNG.toRGBA8.decodeImage = ${UPNG.toRGBA8.decodeImage}\n UPNG.decode = ${UPNG.decode}\n UPNG.decode._decompress = ${UPNG.decode._decompress}\n UPNG.decode._inflate = ${UPNG.decode._inflate}\n UPNG.decode._readInterlace = ${UPNG.decode._readInterlace}\n UPNG.decode._getBPP = ${UPNG.decode._getBPP} \n UPNG.decode._filterZero = ${UPNG.decode._filterZero}\n UPNG.decode._paeth = ${UPNG.decode._paeth}\n UPNG.decode._IHDR = ${UPNG.decode._IHDR}\n UPNG._bin = parse(${stringify(UPNG._bin)})\n UPNG._copyTile = ${UPNG._copyTile}\n UPNG.encode = ${UPNG.encode}\n UPNG.encodeLL = ${UPNG.encodeLL} \n UPNG.encode._main = ${UPNG.encode._main}\n UPNG.encode.compressPNG = ${UPNG.encode.compressPNG} \n UPNG.encode.compress = ${UPNG.encode.compress}\n UPNG.encode.framize = ${UPNG.encode.framize} \n UPNG.encode._updateFrame = ${UPNG.encode._updateFrame} \n UPNG.encode._prepareDiff = ${UPNG.encode._prepareDiff} \n UPNG.encode._filterZero = ${UPNG.encode._filterZero} \n UPNG.encode._filterLine = ${UPNG.encode._filterLine}\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.crc = parse(${stringify(UPNG.crc)})\n UPNG.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ${UPNG.quantize} \n UPNG.quantize.getKDtree = ${UPNG.quantize.getKDtree} \n UPNG.quantize.getNearest = ${UPNG.quantize.getNearest} \n UPNG.quantize.planeDst = ${UPNG.quantize.planeDst} \n UPNG.quantize.dist = ${UPNG.quantize.dist} \n UPNG.quantize.splitPixels = ${UPNG.quantize.splitPixels} \n UPNG.quantize.vecDot = ${UPNG.quantize.vecDot} \n UPNG.quantize.stats = ${UPNG.quantize.stats} \n UPNG.quantize.estats = ${UPNG.quantize.estats}\n UPNG.M4 = parse(${stringify(UPNG.M4)})\n UPNG.encode.concatRGBA = ${UPNG.encode.concatRGBA}\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\n while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n \n const UZIP = {}\n UZIP[\"parse\"] = ${UZIP.parse}\n UZIP._readLocal = ${UZIP._readLocal}\n UZIP.inflateRaw = ${UZIP.inflateRaw}\n UZIP.inflate = ${UZIP.inflate}\n UZIP.deflate = ${UZIP.deflate}\n UZIP.deflateRaw = ${UZIP.deflateRaw}\n UZIP.encode = ${UZIP.encode}\n UZIP._noNeed = ${UZIP._noNeed}\n UZIP._writeHeader = ${UZIP._writeHeader}\n UZIP.crc = parse(${stringify(UZIP.crc)})\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ${UZIP.adler}\n UZIP.bin = parse(${stringify(UZIP.bin)})\n UZIP.F = {}\n UZIP.F.deflateRaw = ${UZIP.F.deflateRaw}\n UZIP.F._bestMatch = ${UZIP.F._bestMatch}\n UZIP.F._howLong = ${UZIP.F._howLong}\n UZIP.F._hash = ${UZIP.F._hash}\n UZIP.saved = ${UZIP.saved}\n UZIP.F._writeBlock = ${UZIP.F._writeBlock}\n UZIP.F._copyExact = ${UZIP.F._copyExact}\n UZIP.F.getTrees = ${UZIP.F.getTrees}\n UZIP.F.getSecond = ${UZIP.F.getSecond}\n UZIP.F.nonZero = ${UZIP.F.nonZero}\n UZIP.F.contSize = ${UZIP.F.contSize}\n UZIP.F._codeTiny = ${UZIP.F._codeTiny} \n UZIP.F._lenCodes = ${UZIP.F._lenCodes} \n UZIP.F._hufTree = ${UZIP.F._hufTree} \n UZIP.F.setDepth = ${UZIP.F.setDepth} \n UZIP.F.restrictDepth = ${UZIP.F.restrictDepth}\n UZIP.F._goodIndex = ${UZIP.F._goodIndex} \n UZIP.F._writeLit = ${UZIP.F._writeLit} \n UZIP.F.inflate = ${UZIP.F.inflate} \n UZIP.F._check = ${UZIP.F._check} \n UZIP.F._decodeTiny = ${UZIP.F._decodeTiny} \n UZIP.F._copyOut = ${UZIP.F._copyOut} \n UZIP.F.makeCodes = ${UZIP.F.makeCodes} \n UZIP.F.codes2map = ${UZIP.F.codes2map} \n UZIP.F.revCodes = ${UZIP.F.revCodes} \n\n // used only in deflate\n UZIP.F._putsE = ${UZIP.F._putsE}\n UZIP.F._putsF = ${UZIP.F._putsF}\n \n UZIP.F._bitsE = ${UZIP.F._bitsE}\n UZIP.F._bitsF = ${UZIP.F._bitsF}\n\n UZIP.F._get17 = ${UZIP.F._get17}\n UZIP.F._get25 = ${UZIP.F._get25}\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n `);\n}\n\nfunction generateWorkerScript() {\n // code to be run in the WebWorker\n return createWorker(`\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\\\n' + e.stack, id })\n }\n })\n `);\n}\n\nexport default function compressOnWebWorker(file, options) {\n return new Promise((resolve, reject) => {\n cnt += 1;\n const id = cnt;\n\n if (!imageCompressionLibUrl) {\n imageCompressionLibUrl = generateLib();\n }\n\n if (!worker) {\n worker = generateWorkerScript();\n }\n\n function handler(e) {\n if (e.data.id === id) {\n if (e.data.progress !== undefined) {\n options.onProgress(e.data.progress);\n return;\n }\n worker.removeEventListener('message', handler);\n if (e.data.error) {\n reject(new Error(e.data.error));\n }\n resolve(e.data.file);\n }\n }\n\n worker.addEventListener('message', handler);\n worker.addEventListener('error', reject);\n\n worker.postMessage({\n file,\n id,\n imageCompressionLibUrl,\n options: { ...options, onProgress: undefined },\n });\n });\n}\n","import './polyfill';\n\nimport compress from './image-compression';\nimport {\n canvasToFile,\n drawFileInCanvas,\n drawImageInCanvas,\n getDataUrlFromFile,\n getFilefromDataUrl,\n loadImage,\n getExifOrientation,\n handleMaxWidthOrHeight,\n followExifOrientation,\n CustomFile,\n cleanupCanvasMemory,\n isAutoOrientationInBrowser,\n approximateBelowMaximumCanvasSizeOfBrowser,\n getBrowserName,\n} from './utils';\n// eslint-disable-next-line import/no-cycle\nimport compressOnWebWorker from './web-worker';\n\n/**\n * Compress an image file.\n *\n * @param {File} file\n * @param {Object} opts - { maxSizeMB=Number.POSITIVE_INFINITY, maxWidthOrHeight, useWebWorker=false, maxIteration = 10, exifOrientation, fileType }\n * @param {number} [options.maxSizeMB=Number.POSITIVE_INFINITY]\n * @param {number} [options.maxWidthOrHeight=undefined]\n * @param {boolean} [options.useWebWorker=false]\n * @param {number} [options.maxIteration=10]\n * @param {number} [options.exifOrientation] - default to be the exif orientation from the image file\n * @param {Function} [options.onProgress] - a function takes one progress argument (progress from 0 to 100)\n * @param {string} [options.fileType] - default to be the original mime type from the image file\n * @returns {Promise}\n */\nasync function imageCompression(file, options) {\n const opts = { ...options };\n\n let compressedFile;\n let progress = 0;\n const { onProgress } = opts;\n\n opts.maxSizeMB = opts.maxSizeMB || Number.POSITIVE_INFINITY;\n const useWebWorker = typeof opts.useWebWorker === 'boolean' ? opts.useWebWorker : true;\n delete opts.useWebWorker;\n opts.onProgress = (aProgress) => {\n progress = aProgress;\n if (typeof onProgress === 'function') {\n onProgress(progress);\n }\n };\n\n if (!(file instanceof Blob || file instanceof CustomFile)) {\n throw new Error('The file given is not an instance of Blob or File');\n } else if (!/^image/.test(file.type)) {\n throw new Error('The file given is not an image');\n }\n\n // try run in web worker, fall back to run in main thread\n // eslint-disable-next-line no-undef, no-restricted-globals\n const inWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n\n if (process.env.BUILD === 'development') {\n if ((useWebWorker && typeof Worker === 'function') || inWebWorker) {\n console.log('run compression in web worker');\n } else {\n console.log('run compression in main thread');\n }\n }\n\n if (useWebWorker && typeof Worker === 'function' && !inWebWorker) {\n try {\n // \"compressOnWebWorker\" is kind of like a recursion to call \"imageCompression\" again inside web worker\n compressedFile = await compressOnWebWorker(file, opts);\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.warn('Run compression in web worker failed:', e, ', fall back to main thread');\n }\n compressedFile = await compress(file, opts);\n }\n } else {\n compressedFile = await compress(file, opts);\n }\n\n try {\n compressedFile.name = file.name;\n compressedFile.lastModified = file.lastModified;\n } catch (e) {\n if (process.env.BUILD === 'development') {\n console.error(e);\n }\n }\n\n return compressedFile;\n}\n\nimageCompression.getDataUrlFromFile = getDataUrlFromFile;\nimageCompression.getFilefromDataUrl = getFilefromDataUrl;\nimageCompression.loadImage = loadImage;\nimageCompression.drawImageInCanvas = drawImageInCanvas;\nimageCompression.drawFileInCanvas = drawFileInCanvas;\nimageCompression.canvasToFile = canvasToFile;\nimageCompression.getExifOrientation = getExifOrientation;\n\nimageCompression.handleMaxWidthOrHeight = handleMaxWidthOrHeight;\nimageCompression.followExifOrientation = followExifOrientation;\nimageCompression.cleanupCanvasMemory = cleanupCanvasMemory;\nimageCompression.isAutoOrientationInBrowser = isAutoOrientationInBrowser;\nimageCompression.approximateBelowMaximumCanvasSizeOfBrowser = approximateBelowMaximumCanvasSizeOfBrowser;\nimageCompression.getBrowserName = getBrowserName;\nimageCompression.version = __buildVersion__;\n\nexport default imageCompression;\n"],"names":["check","it","Math","isPure","toObject","argument","has","Object","hasOwn","key","id","postfix","random","isCallable","aFunction","process","Deno","versions","match","userAgent","version","fails","WellKnownSymbolsStore","name","NATIVE_SYMBOL","TO_STRING_TAG","wellKnownSymbol","test","EXISTS","isObject","document","createElement","tryToString","func","V","P","val","toPrimitive","input","exoticToPrim","getMethod","isSymbol","toPropertyKey","createPropertyDescriptor","definePropertyModule","f","object","value","store","inspectSource","functionToString","hiddenKeys","OBJECT_ALREADY_INITIALIZED","set","get","NATIVE_WEAK_MAP","wmhas","call","STATE","FunctionPrototype","prototype","DESCRIPTORS","redefine","getInternalState","InternalStateModule","unsafe","simple","CONFIGURABLE_FUNCTION_NAME","toString","arguments","tryGet","$propertyIsEnumerable","getOwnPropertyDescriptor","NASHORN_BUG","split","ceil","floor","toInteger","max","IS_INCLUDES","$this","el","fromIndex","O","toIndexedObject","length","i","copyConstructorProperties","keys","descriptor","target","src","setPrototypeOf","proto","setToStringTag","TAG","STATIC","anInstance","Constructor","TypeError","iterators","ArrayPrototype","Array","a","usingIterator","innerResult","innerError","anObject","iterate","iterable","unboundFunction","options","AS_ENTRIES","bind","INTERRUPTED","fn","IS_ITERATOR","ITERATOR","constructorRegExp","INCORRECT_TO_STRING","isConstructorLegacy","speciesConstructor","defaultConstructor","global","setImmediate","MessageChannel","counter","ONREADYSTATECHANGE","queue","hasOwnProperty","event","location","protocol","host","args","now","runner","macrotask","promise","then","flush","PromiseCapability","C","resolve","console","perform","engineIsBrowser","SPECIES","PROMISE","NativePromisePrototype","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","SUBCLASSING","GLOBAL_CORE_JS_PROMISE","IS_BROWSER","INCORRECT_ITERATION","notify","state","reaction","DISPATCH_EVENT","rejection","IS_NODE","isUnhandled","UNHANDLED","HANDLED","onHandleUnhandled","REJECTED","internalReject","type","NativePromise","PromiseConstructorPrototype","forced","Promise","GT","LT","iframe","style","display","String","iframeDocument","write","scriptTag","F","activeXDocument","whitespaces","ltrim","RegExp","first","third","radix","maxCode","digits","index","code","FUNCTION_NAME_EXISTS","FunctionPrototypeToString","assign","B","symbol","chr","getOwnPropertySymbols","getOwnPropertySymbolsModule","re","$RegExp","exec","regexpUnsupportedDotAll","regexpUnsupportedNcg","nativeExec","nativeReplace","patchedExec","this","raw","strCopy","str","flags","replace","indexOf","lastIndex","UPDATES_LAST_INDEX_WRONG","MATCH","S","requireObjectCoercible","CONVERT_TO_STRING","undefined","charAt","require$$0","R","fixRegExpWellKnownSymbolLogic","SPLIT","nativeSplit","maybeCallNative","lastLastIndex","arrayPush","string","internalSplit","unicodeMatching","rx","unicode","ignoreCase","multiline","UNSUPPORTED_Y","regexp","matcher","UNSCOPABLES","configurable","objectGetPrototypeOf","PrototypeOfArrayIteratorPrototype","CurrentIteratorPrototype","returnThis","arrayBufferNative","Int8Array","Uint8ClampedArrayPrototype","Uint8ClampedArray","TypedArray","TYPED_ARRAY_CONSTRUCTOR","Prototype","Int32Array","BigIntArrayConstructorsList","BigInt64Array","klass","isTypedArray","aTypedArray","isPrototypeOf","TypedArrayPrototype","KEY","createNonEnumerableProperty","NAME","number","abs","pow","log","LN2","pack","exponentLength","exponent","c","unpack","buffer","nBits","eMax","mantissa","sign","mantissaLength","getOwnPropertyNames","defineProperty","require$$1","PROPER_FUNCTION_NAME","FunctionName","PROPER","setInternalState","$DataViewPrototype","$DataView","PROTOTYPE","intIndex","toIndex","count","byteLength","WRONG_INDEX","bytes","isLittleEndian","conversion","DataView","DATA_VIEW","byteOffset","packFloat32","aTypedArrayConstructor","typedArrayFrom","aConstructor","constructor","arraySpeciesCreate","originalArray","IS_SOME","IS_EVERY","IS_FIND_INDEX","TYPE","self","toLength","push","typedArrayConstructor","commonjsHelpers.createCommonjsModule","module","forEach","nativeGetOwnPropertyDescriptor","getOwnPropertyDescriptorModule","ArrayBufferModule","fromList","result","isArrayBuffer","isTypedArrayIndex","wrappedDefineProperty","wrapper","CLAMPED","CONSTRUCTOR_NAME","offset","BYTES","$len","Uint8Array","data","init","len","to","toAbsoluteIndex","end","from","arrayFromConstructorAndList","ArrayBufferViewCore","$filter","filter","arrayKeys","ArrayIterators","arrayEntries","exportTypedArrayMethod","nativeTypedArrayIterator","PROPER_ARRAY_VALUES_NAME","arrayMethodIsStrict","STRICT_METHOD","$map","map","IS_RIGHT","that","callbackfn","mergeSort","comparefn","array","j","right","Uint16Array","nativeSort","sort","STABLE_SORT","FF","WEBKIT","mod","$toLocaleString","FORCED","Uint8ArrayPrototype","arrayToString","arrayJoin","join","$includes","notARegexp","METHOD_NAME","Uint32Array","TO_STRING","RegExpPrototype","nativeToString","NOT_GENERIC","k","FAILS_ON_UNDEFINED","x","u32","UZIP","eocd","rUi","_readLocal","roff","out","csize","usize","onlyNames","rUs","nlen","buf","adler","crc","level","deflateRaw","p","cpr","zpd","file","bin","sizeUTF8","tot","o","_writeHeader","ioff","wUi","ext","obj","n","off","table","buff","charCodeAt","_goodIndex","_hash","putsE","_putsE","dlen","li","mch","lits","dst","lgi","dgi","lc","cvrd","ci","cl","U","pos","l0","BTYPE","o0","makeCodes","dtree","itree","si","dxb","p8","dset","b","tree","lz","l","_hufTree","list","hl","hst","l2","slice","maxl","MAXL","lit","bCost","MD","dbt","arr","v","ch","ltree","u8","noBuf","HLIT","HDIST","HCLEN","ML","bitsE","ttree","mx1","dmap","ebs","ldef","_check","lmap","LL","_bitsE","_copyOut","bl_count","MAX_BITS","dt","flmap","u16","fdmap","strt","rev15","sv","exb","w","height","h","img","frames","fh","frm","dispose","bpp","area","bf32","ctype","depth","tabs","tRNS","ts","ti","ap","y","bf","qi","cj","t0","di","gr","al","tr","readASCII","doff","num_frames","num_plays","del","fd","readUint","text","keyw","readUTF8","pl","PLTE","foff","bpl","interlace","CgBI","UPNG","inflateRaw","decode","_inflate","dd","_filterZero","_readInterlace","H","N","m","Z","W","A","u","r","D","X","Y","e","I","M","starting_row","row_increment","pass","cr","cc","row","starting_col","bpll","col","cbpp","sh","_paeth","pa","pc","s","fb","ifa","tb","fr","fg","mode","fa","sb","ba","bufs","nimg","encode","_main","ac","_bin","wUs","wAs","dl","anim","leng","sRGB","pHYs","loop","cimg","imgd","nh","onlyBlend","inds","nbufs","cof","bln","ind","ilen","img32","inj","gotAlpha","frms","nx","tlim","forbidPrev","alwaysBlend","pimg","mix","evenCrd","sarea","min","miY","r0","miX","_updateFrame","rect","width","U8","pimg32","cx","miy","blend","rec","ftry","opts","paeth","oimg","nimg32","KD","quantize","getKDtree","root","nd","err","i0","maxL","splitPixels","i1","node","left","planeDst","ln","rn","getNearest","q","d0","d1","d2","g","stats","m0","Rj","m1","iN","m3","Cov","round","M4","noff","isBrowser","window","cordova","CustomFileReader","reader","onload","readAsDataURL","Image","CHROME","browserName","BROWSER_NAME","approximateBelowMaximumCanvasSizeOfBrowser","maximumCanvasSize","drawImageInCanvas","canvas","png","Blob","fileLastModified","$await_11","testImageCanvas","$await_13","cachedResult","view","getUint32","little","maxWidthOrHeight","maxSizeByte","classList","documentCreateElement","CollectionPrototype","searchParams","IS_CONSTRUCTOR","argumentsLength","mapfn","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexNonASCII","regexSeparators","OVERFLOW_ERROR","baseMinusTMin","stringFromCharCode","extra","digitToBasic","adapt","delta","numPoints","nativeFetch","getBuiltIn","NativeRequest","percentSequence","sequences","attribute","entries","query","URLSearchParamsIterator","createIteratorConstructor","Iterator","params","kind","entry","URLSearchParams","URLSearchParamsConstructor","URL_SEARCH_PARAMS","parseSearchParams","getInternalParamsState","entriesIndex","boundFunction","codeAt","NativeURL","getInternalSearchParamsState","getInternalURLState","getterFor","INVALID_AUTHORITY","INVALID_SCHEME","INVALID_PORT","ALPHA","DIGIT","HEX_START","OCT","DEC","LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE","INVALID_HOST","url","codePoints","C0ControlPercentEncodeSet","parseIPv4","parts","numbers","pieceIndex","ipv4Piece","maxLength","currLength","percentEncode","specialSchemes","https","ws","wss","isSpecial","includesCredentials","username","password","cannotHaveUsernamePasswordPort","isWindowsDriveLetter","second","path","segment","toLowerCase","SCHEME_START","PATH_OR_AUTHORITY","AUTHORITY","CANNOT_BE_A_BASE_URL_PATH","stateOverride","TAB_AND_NEW_LINE","arrayFrom","pointer","scheme","failure","fragment","searchParamsState","getPathname","URLPrototype","output","getProtocol","port","updateSearchParams","$toString","search","$forEach","propertyIsEnumerable","objectKeys","$startsWith","namedCaptures","position","maybeToString","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","REPLACE","searchValue","res","replaceValue","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","cnt","worker","script","blobArgs","Worker","createSourceObject","imageCompression","getDataUrlFromFile","getFilefromDataUrl","loadImage","drawFileInCanvas","canvasToFile","getExifOrientation","handleMaxWidthOrHeight","followExifOrientation","cleanupCanvasMemory","isAutoOrientationInBrowser","getBrowserName"],"mappings":"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"} \ No newline at end of file