diff --git a/skilltreetest/favicon.ico b/skilltreetest/favicon.ico index a11777cc..53dff0bf 100644 Binary files a/skilltreetest/favicon.ico and b/skilltreetest/favicon.ico differ diff --git a/skilltreetest/index.html b/skilltreetest/index.html index 2b644679..6c6d1fda 100644 --- a/skilltreetest/index.html +++ b/skilltreetest/index.html @@ -1 +1 @@ -React App
\ No newline at end of file +Skill Tree Test
\ No newline at end of file diff --git a/skilltreetest/logo192.png b/skilltreetest/logo192.png index fc44b0a3..858b86da 100644 Binary files a/skilltreetest/logo192.png and b/skilltreetest/logo192.png differ diff --git a/skilltreetest/logo512.png b/skilltreetest/logo512.png index a4e47a65..0614ace1 100644 Binary files a/skilltreetest/logo512.png and b/skilltreetest/logo512.png differ diff --git a/skilltreetest/manifest.json b/skilltreetest/manifest.json index 080d6c77..2c23e813 100644 --- a/skilltreetest/manifest.json +++ b/skilltreetest/manifest.json @@ -4,7 +4,7 @@ "icons": [ { "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", + "sizes": "64x64 48x48 32x32 24x24 16x16", "type": "image/x-icon" }, { diff --git a/skilltreetest/static/css/main.e720c86e.chunk.css b/skilltreetest/static/css/main.e720c86e.chunk.css deleted file mode 100644 index d5c49e32..00000000 --- a/skilltreetest/static/css/main.e720c86e.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -.tooltip{position:absolute;background:#000;padding:0;transform:translate(-50%,calc(-100% - 12px));font-size:large;border-radius:8px;opacity:0;transition:opacity .25s,padding .25s cubic-bezier(.68,-.55,.27,2.5);pointer-events:none;min-width:40px}.tooltip.active{opacity:1;padding:8px}.tooltip:before{content:"";display:block;width:0;height:0;position:absolute;border-left:12px solid transparent;border-right:12px solid transparent;border-top:12px solid #000;left:calc(50% - 12px);top:100%}.points-display{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);font-size:xx-large;background:#242a33;padding:10px;border-radius:2px;box-shadow:3px 4px 5px #000}.editor{height:calc(100% - 16px);position:relative;background:#333c4a;padding:8px;transition:flex-basis .2s,margin .2s;flex:0 0;margin-right:-20px;overflow-x:hidden;display:flex;flex-direction:column}.editor.open{flex-basis:33vw;margin:0}.editor>*{width:calc(33vw - 16px)}.editor dl{width:100%}.editor .texture-preview{display:inline-flex;align-items:center;width:150px;margin-top:8px}.editor .texture-preview span{flex-grow:1}.editor .texture-preview img{background-color:transparent;background-color:initial;width:60px;height:60px}.editor textarea{background:#242a33;border-radius:4px;flex-grow:1000000;min-height:50%;font-family:"Roboto Mono"}.editor button{padding:8px;text-align:center;margin:10px 0}.editor .spacer{flex-grow:1}.editor ul{padding:0;display:inline;font-weight:700;list-style:none;text-align:center}.editor ul:not(.browser-default){padding-left:0;list-style-type:none}.editor ul:not(.browser-default) li{list-style-type:none}.editor ul li{vertical-align:middle;white-space:nowrap;padding-right:8px;padding-left:8px;display:inline}.editor-toggle{position:absolute;top:10px;right:10px;background:#242a33;padding:10px;border-radius:2px;box-shadow:3px 4px 5px #000;color:#ffab40;cursor:pointer;white-space:nowrap;width:unset;transition:right .2s}.editor.open~.editor-toggle{right:calc(33vw + 26px)}:root{--foreground:#b4bdcb;--background:#242a33;--far-background:#111924;--raised:#2a323d;--highlight:#333c4a;--focus:#a3c9ef;--inactive:#697a96;--disabled:grey;--warning:#71262f}html{background-color:#111924;background-color:var(--far-background);color:#b4bdcb;color:var(--foreground);font-family:"Roboto",sans-serif;-webkit-user-select:none;-ms-user-select:none;user-select:none}body,html{height:100%}body{background:transparent;margin:0;padding:0;overflow:hidden}a{color:#ffab40;cursor:pointer;text-decoration:none}a:focus{outline:none}.checkbox-label,input{margin-bottom:8px;margin-top:8px;font-size:16px}input[type=number],input[type=password],input[type=search],input[type=text],select{background:none;border:none;border-bottom:2px solid #697a96;border-bottom:2px solid var(--inactive);color:#b4bdcb;color:var(--foreground);transition:border .3s;width:100%}input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=text]:focus,select:focus{border-bottom:2px solid #b4bdcb;border-bottom:2px solid var(--foreground);outline:none}input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;height:10px;width:10px;margin-bottom:3px;padding:1px;background:-webkit-linear-gradient(-45deg,transparent,transparent 45%,var(--foreground) 0,var(--foreground) 56%,transparent 0,transparent),-webkit-linear-gradient(45deg,transparent,transparent 45%,var(--foreground) 0,var(--foreground) 56%,transparent 0,transparent);cursor:pointer}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;background:#111924;background:var(--far-background);outline:none;border-radius:4px;min-width:40px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:12px;height:12px;cursor:pointer;background:#242a33;background:var(--background);border:2px solid #111924;border:2px solid var(--far-background);border-radius:50%}input[type=range]::-webkit-slider-thumb:hover{background:#333c4a;background:var(--highlight)}input[type=color]{-webkit-appearance:none;border:2px solid #697a96;border:2px solid var(--inactive);outline:none;padding:0}input[type=color]:focus{border-color:#b4bdcb;border-color:var(--foreground)}input[type=color]:disabled{border-color:grey;border-color:var(--disabled)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none}button{background:#333c4a;background:var(--highlight);border:none;color:#ffab40;cursor:pointer;font-size:16px;margin:10px;text-align:left;transition:background-color .1s ease-in;border-radius:10px}button:focus{color:#a3c9ef;color:var(--focus);outline:none}button:hover{background-color:#2a323d;background-color:var(--raised)}select option{color:#000}button:disabled,input:disabled,select:disabled{color:grey;color:var(--disabled)}h4{border-bottom:solid #b4bdcb;border-bottom:solid var(--foreground);text-align:center;width:50%;margin:.25em auto .5em}textarea{font-family:sans-serif;font-size:16px;resize:none;background:none;border:none;border-bottom:2px solid #969696;color:#b4bdcb;color:var(--foreground);transition:border .3s}textarea:focus{border-bottom:2px solid #c9c9c9;outline:none}img{position:relative;overflow:hidden;background-color:#242a33;background-color:var(--background)}img:after{background-color:inherit;display:block;position:absolute;z-index:2;top:0;left:0;width:100%;height:100%;content:""}::-webkit-scrollbar{height:28px;width:14px}::-webkit-scrollbar-thumb{border:8px solid transparent;background-clip:padding-box;-webkit-border-radius:20px;background-color:rgba(0,0,0,.6)}#root,.App{width:100%;height:100%}.App{display:flex} -/*# sourceMappingURL=main.e720c86e.chunk.css.map */ \ No newline at end of file diff --git a/skilltreetest/static/css/main.e720c86e.chunk.css.map b/skilltreetest/static/css/main.e720c86e.chunk.css.map deleted file mode 100644 index 83070788..00000000 --- a/skilltreetest/static/css/main.e720c86e.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://D:/projects/kronos/src/components/ui/tooltip.css","webpack://D:/projects/kronos/src/components/skills/skills.css","webpack://D:/projects/kronos/src/components/editor/editor.css","webpack://D:/projects/kronos/src/index.css"],"names":[],"mappings":"AAAA,SACC,iBAAkB,CACf,eAAiB,CACjB,SAAU,CACV,4CAA8C,CAC9C,eAAgB,CAChB,iBAAkB,CAClB,SAAU,CACV,mEAA4E,CAC5E,mBAAoB,CACpB,cACJ,CAEA,gBACI,SAAU,CACV,WACJ,CAEA,gBACI,UAAW,CACX,aAAc,CACd,OAAQ,CACR,QAAS,CACT,iBAAkB,CAClB,kCAAmC,CACnC,mCAAoC,CACpC,0BAA4B,CAC5B,qBAAsB,CACtB,QACJ,CC7BA,gBACI,iBAAkB,CAClB,WAAY,CACZ,QAAS,CACT,0BAA2B,CAC3B,kBAAmB,CACnB,kBAAmB,CACnB,YAAa,CACb,iBAAkB,CAClB,2BACJ,CCVA,QACI,wBAAyB,CACzB,iBAAkB,CAClB,kBAAmB,CACnB,WAAY,CACZ,oCAAsC,CACtC,QAAW,CACX,kBAAmB,CACnB,iBAAkB,CAClB,YAAa,CACb,qBACJ,CAEA,aACI,eAAgB,CAChB,QACJ,CAEA,UACI,uBACJ,CAEA,WACI,UACJ,CAEA,yBACI,mBAAoB,CACpB,kBAAmB,CACnB,WAAY,CACZ,cACJ,CAEA,8BACI,WACJ,CAEA,6BACI,4BAAyB,CAAzB,wBAAyB,CACzB,UAAW,CACX,WACJ,CAEA,iBACI,kBAAmB,CACnB,iBAAkB,CAClB,iBAAkB,CAClB,cAAe,CACf,yBACJ,CAEA,eACI,WAAY,CACZ,iBAAkB,CAClB,aACJ,CAEA,gBACI,WACJ,CAEA,WACI,SAAU,CACV,cAAe,CACf,eAAiB,CACjB,eAAgB,CAChB,iBACJ,CAEA,iCACI,cAAe,CACf,oBACJ,CAEA,oCACI,oBACJ,CAEA,cACI,qBAAsB,CACtB,kBAAmB,CACnB,iBAAkB,CAClB,gBAAiB,CACjB,cACJ,CAEA,eACI,iBAAkB,CAClB,QAAS,CACT,UAAW,CACX,kBAAmB,CACnB,YAAa,CACb,iBAAkB,CAClB,2BAA6B,CAC7B,aAAc,CACd,cAAe,CACf,kBAAmB,CACnB,WAAY,CACZ,oBACJ,CAEA,4BACI,uBACJ,CCvGA,MACI,oBAAqB,CACrB,oBAAqB,CACrB,wBAAyB,CACzB,gBAAiB,CACjB,mBAAoB,CACpB,eAAgB,CAChB,kBAAmB,CACnB,eAAmB,CACnB,iBACJ,CAEA,KACI,wBAAuC,CAAvC,sCAAuC,CACvC,aAAwB,CAAxB,uBAAwB,CAC3B,+BAAiC,CAE9B,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACJ,CAEA,UAJI,WAUJ,CANA,KACI,sBAAuB,CAEvB,QAAS,CACT,SAAU,CACV,eACJ,CAEA,EACI,aAAc,CACd,cAAe,CACf,oBACJ,CAEA,QACI,YACJ,CAEA,sBACI,iBAAkB,CAClB,cAAe,CACf,cACJ,CAEA,mFACI,eAAgB,CAEhB,WAAwC,CAAxC,+BAAwC,CAAxC,uCAAwC,CACxC,aAAwB,CAAxB,uBAAwB,CACxB,qBAAuB,CACvB,UACJ,CAEA,iHACI,+BAA0C,CAA1C,yCAA0C,CAC1C,YACJ,CAEA,iDACI,uBAAwB,CACxB,WAAY,CACZ,UAAW,CACX,iBAAkB,CAClB,WAAY,CACZ,yQAA+S,CAC/S,cACJ,CAEA,kBACI,uBAAgB,CAAhB,oBAAgB,CAAhB,eAAgB,CAChB,UAAW,CACX,kBAAiC,CAAjC,gCAAiC,CACjC,YAAa,CACb,iBAAkB,CAClB,cACJ,CAEA,wCACI,uBAAgB,CAAhB,eAAgB,CAChB,UAAW,CACX,WAAY,CACZ,cAAe,CACf,kBAA6B,CAA7B,4BAA6B,CAC7B,wBAAuC,CAAvC,sCAAuC,CACvC,iBACJ,CAEA,8CACI,kBAA4B,CAA5B,2BACJ,CAEA,kBACI,uBAAwB,CACxB,wBAAiC,CAAjC,gCAAiC,CACjC,YAAa,CACb,SACJ,CAEA,wBACI,oBAA+B,CAA/B,8BACJ,CAEA,2BACI,iBAA6B,CAA7B,4BACJ,CAEA,gDACI,SACJ,CAEA,wCACI,WACJ,CAEA,OACI,kBAA4B,CAA5B,2BAA4B,CAC5B,WAAY,CACZ,aAAc,CACd,cAAe,CACf,cAAe,CACf,WAAY,CACZ,eAAgB,CAChB,uCAAwC,CACxC,kBACJ,CAEA,aACI,aAAmB,CAAnB,kBAAmB,CACnB,YACJ,CAEA,aACI,wBAA+B,CAA/B,8BACJ,CAEA,cACI,UACJ,CAEA,+CACI,UAAsB,CAAtB,qBACJ,CAEA,GACI,2BAAsC,CAAtC,qCAAsC,CACtC,iBAAkB,CAClB,SAAU,CACV,sBACJ,CAEA,SACI,sBAAuB,CACvB,cAAe,CACf,WAAY,CACZ,eAAgB,CAEhB,WAAgC,CAAhC,+BAAgC,CAChC,aAAwB,CAAxB,uBAAwB,CACxB,qBACJ,CAEA,eACI,+BAAgC,CAChC,YACJ,CAEA,IACI,iBAAkB,CAClB,eAAgB,CAChB,wBAAmC,CAAnC,kCACJ,CAEA,UACI,wBAAyB,CACzB,aAAc,CACd,iBAAkB,CAClB,SAAU,CACV,KAAM,CACN,MAAO,CACP,UAAW,CACX,WAAY,CACZ,UACJ,CAEA,oBACI,WAAY,CACZ,UACJ,CAEA,0BACI,4BAAkC,CAClC,2BAA4B,CAC5B,0BAA2B,CAC3B,+BACJ,CAEA,WACC,UAAW,CACX,WACD,CAEA,KACI,YACJ","file":"main.e720c86e.chunk.css","sourcesContent":[".tooltip {\r\n\tposition: absolute;\r\n background: black;\r\n padding: 0;\r\n transform: translate(-50%, calc(-100% - 12px));\r\n font-size: large;\r\n border-radius: 8px;\r\n opacity: 0;\r\n transition: opacity 0.25s, padding .25s cubic-bezier(0.68, -0.55, 0.27, 2.5);\r\n pointer-events: none;\r\n min-width: 40px;\r\n}\r\n\r\n.tooltip.active {\r\n opacity: 1;\r\n padding: 8px;\r\n}\r\n\r\n.tooltip::before {\r\n content: '';\r\n display: block;\r\n width: 0;\r\n height: 0;\r\n position: absolute;\r\n border-left: 12px solid transparent;\r\n border-right: 12px solid transparent;\r\n border-top: 12px solid black;\r\n left: calc(50% - 12px);\r\n top: 100%;\r\n}\r\n",".points-display {\r\n position: absolute;\r\n bottom: 20px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n font-size: xx-large;\r\n background: #242a33;\r\n padding: 10px;\r\n border-radius: 2px;\r\n box-shadow: 3px 4px 5px black;\r\n}\r\n",".editor {\r\n height: calc(100% - 16px);\r\n position: relative;\r\n background: #333c4a;\r\n padding: 8px;\r\n transition: flex-basis .2s, margin .2s;\r\n flex: 0 0 0;\r\n margin-right: -20px;\r\n overflow-x: hidden; \r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.editor.open {\r\n flex-basis: 33vw;\r\n margin: 0;\r\n}\r\n\r\n.editor > * {\r\n width: calc(33vw - 16px);\r\n}\r\n\r\n.editor dl {\r\n width: 100%;\r\n}\r\n\r\n.editor .texture-preview {\r\n display: inline-flex;\r\n align-items: center;\r\n width: 150px;\r\n margin-top: 8px;\r\n}\r\n\r\n.editor .texture-preview span {\r\n flex-grow: 1;\r\n}\r\n\r\n.editor .texture-preview img {\r\n background-color: initial;\r\n width: 60px;\r\n height: 60px;\r\n}\r\n\r\n.editor textarea {\r\n background: #242a33;\r\n border-radius: 4px;\r\n flex-grow: 1000000;\r\n min-height: 50%;\r\n font-family: \"Roboto Mono\";\r\n}\r\n\r\n.editor button {\r\n padding: 8px;\r\n text-align: center;\r\n margin: 10px 0;\r\n}\r\n\r\n.editor .spacer {\r\n flex-grow: 1;\r\n}\r\n\r\n.editor ul {\r\n padding: 0;\r\n display: inline;\r\n font-weight: bold;\r\n list-style: none;\r\n text-align: center;\r\n}\r\n\r\n.editor ul:not(.browser-default) {\r\n padding-left: 0;\r\n list-style-type: none;\r\n}\r\n\r\n.editor ul:not(.browser-default) li {\r\n list-style-type: none;\r\n}\r\n\r\n.editor ul li {\r\n vertical-align: middle;\r\n white-space: nowrap;\r\n padding-right: 8px;\r\n padding-left: 8px;\r\n display: inline;\r\n}\r\n\r\n.editor-toggle {\r\n position: absolute;\r\n top: 10px;\r\n right: 10px;\r\n background: #242a33;\r\n padding: 10px;\r\n border-radius: 2px;\r\n box-shadow: 3px 4px 5px black;\r\n color: #ffab40;\r\n cursor: pointer;\r\n white-space: nowrap;\r\n width: unset;\r\n transition: right .2s;\r\n}\r\n\r\n.editor.open ~ .editor-toggle {\r\n right: calc(33vw + 16px + 10px);\r\n}\r\n",":root {\n --foreground: #b4bdcb;\n --background: #242a33;\n --far-background: #111924;\n --raised: #2a323d;\n --highlight: #333c4a;\n --focus: #a3c9ef;\n --inactive: #697a96;\n --disabled: #808080;\n --warning: #71262f;\n}\n\nhtml {\n background-color: var(--far-background);\n color: var(--foreground);\n\tfont-family: 'Roboto', sans-serif;\n height: 100%;\n user-select: none;\n}\n\nbody {\n background: transparent;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n\na {\n color: #ffab40;\n cursor: pointer;\n text-decoration: none;\n}\n\na:focus {\n outline: none;\n}\n\ninput, .checkbox-label {\n margin-bottom: 8px;\n margin-top: 8px;\n font-size: 16px;\n}\n\ninput[type=\"text\"], input[type=\"password\"], input[type=\"number\"], input[type=\"search\"], select {\n background: none;\n border: none;\n border-bottom: solid 2px var(--inactive);\n color: var(--foreground);\n transition: border 0.3s;\n width: 100%;\n}\n\ninput[type=\"text\"]:focus, input[type=\"password\"]:focus, input[type=\"number\"]:focus, input[type=\"search\"]:focus, select:focus {\n border-bottom: solid 2px var(--foreground);\n outline: none;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button {\n -webkit-appearance: none;\n height: 10px;\n width: 10px;\n margin-bottom: 3px;\n padding: 1px;\n background: -webkit-linear-gradient(-45deg, transparent 0%, transparent 45%, var(--foreground) 45%, var(--foreground) 56%,transparent 55%, transparent 100%), -webkit-linear-gradient(45deg, transparent 0%, transparent 45%, var(--foreground) 45%, var(--foreground) 56%,transparent 56%, transparent 100%);\n cursor: pointer;\n}\n\ninput[type=\"range\"] {\n appearance: none;\n height: 4px;\n background: var(--far-background);\n outline: none;\n border-radius: 4px;\n min-width: 40px;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n appearance: none;\n width: 12px;\n height: 12px;\n cursor: pointer;\n background: var(--background);\n border: solid 2px var(--far-background);\n border-radius: 50%;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb:hover {\n background: var(--highlight);\n}\n\ninput[type=\"color\"] {\n -webkit-appearance: none;\n border: solid 2px var(--inactive);\n outline: none;\n padding: 0;\n}\n\ninput[type=\"color\"]:focus {\n border-color: var(--foreground);\n}\n\ninput[type=\"color\"]:disabled {\n border-color: var(--disabled);\n}\n\ninput[type=\"color\"]::-webkit-color-swatch-wrapper {\n padding: 0;\n}\n\ninput[type=\"color\"]::-webkit-color-swatch {\n border: none;\n}\n\nbutton {\n background: var(--highlight);\n border: none;\n color: #ffab40;\n cursor: pointer;\n font-size: 16px;\n margin: 10px;\n text-align: left;\n transition: background-color .1s ease-in;\n border-radius: 10px;\n}\n\nbutton:focus {\n color: var(--focus);\n outline: none;\n}\n\nbutton:hover {\n background-color: var(--raised);\n}\n\nselect option {\n color: #000;\n}\n\nbutton:disabled, select:disabled, input:disabled {\n color: var(--disabled);\n}\n\nh4 {\n border-bottom: solid var(--foreground);\n text-align: center;\n width: 50%;\n margin: .25em auto .5em auto;\n}\n\ntextarea { \n font-family: sans-serif;\n font-size: 16px;\n resize: none;\n background: none;\n border: none;\n border-bottom: solid 2px #969696;\n color: var(--foreground);\n transition: border 0.3s;\n}\n\ntextarea:focus {\n border-bottom: solid 2px #c9c9c9;\n outline: none;\n}\n\nimg {\n position: relative;\n overflow: hidden;\n background-color: var(--background);\n}\n\nimg:after {\n background-color: inherit;\n display: block;\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n content: \"\";\n}\n\n::-webkit-scrollbar {\n height: 28px;\n width: 14px;\n}\n\n::-webkit-scrollbar-thumb {\n border: 8px solid rgba(0, 0, 0, 0);\n background-clip: padding-box;\n -webkit-border-radius: 20px;\n background-color: rgba(0, 0, 0, 0.6);\n}\n\n#root, .App {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.App {\n display: flex;\n}\n"]} \ No newline at end of file diff --git a/skilltreetest/static/js/2.307647ff.chunk.js b/skilltreetest/static/js/2.307647ff.chunk.js deleted file mode 100644 index af32df6d..00000000 --- a/skilltreetest/static/js/2.307647ff.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2.307647ff.chunk.js.LICENSE.txt */ -(this.webpackJsonpkronos=this.webpackJsonpkronos||[]).push([[2],[function(t,e,n){"use strict";n.r(e),n.d(e,"utils",(function(){return r})),n.d(e,"AccessibilityManager",(function(){return de})),n.d(e,"accessibleTarget",(function(){return fe})),n.d(e,"InteractionData",(function(){return ge})),n.d(e,"InteractionEvent",(function(){return _e})),n.d(e,"InteractionManager",(function(){return Se})),n.d(e,"InteractionTrackingData",(function(){return xe})),n.d(e,"interactiveTarget",(function(){return Te})),n.d(e,"Application",(function(){return jr})),n.d(e,"AbstractBatchRenderer",(function(){return Mr})),n.d(e,"AbstractRenderer",(function(){return Er})),n.d(e,"Attribute",(function(){return en})),n.d(e,"BaseRenderTexture",(function(){return qe})),n.d(e,"BaseTexture",(function(){return De})),n.d(e,"BatchDrawCall",(function(){return Cr})),n.d(e,"BatchGeometry",(function(){return Dr})),n.d(e,"BatchPluginFactory",(function(){return Fr})),n.d(e,"BatchRenderer",(function(){return Ur})),n.d(e,"BatchShaderGenerator",(function(){return Rr})),n.d(e,"BatchTextureArray",(function(){return Ar})),n.d(e,"Buffer",(function(){return rn})),n.d(e,"Filter",(function(){return tr})),n.d(e,"FilterState",(function(){return vn})),n.d(e,"Framebuffer",(function(){return Ye})),n.d(e,"GLFramebuffer",(function(){return xn})),n.d(e,"GLProgram",(function(){return dr})),n.d(e,"GLTexture",(function(){return _r})),n.d(e,"Geometry",(function(){return cn})),n.d(e,"IGLUniformData",(function(){return pr})),n.d(e,"MaskData",(function(){return On})),n.d(e,"ObjectRenderer",(function(){return yn})),n.d(e,"Program",(function(){return $n})),n.d(e,"Quad",(function(){return hn})),n.d(e,"QuadUv",(function(){return fn})),n.d(e,"RenderTexture",(function(){return Je})),n.d(e,"RenderTexturePool",(function(){return tn})),n.d(e,"Renderer",(function(){return Sr})),n.d(e,"Shader",(function(){return Zn})),n.d(e,"SpriteMaskFilter",(function(){return rr})),n.d(e,"State",(function(){return Jn})),n.d(e,"System",(function(){return Ge})),n.d(e,"Texture",(function(){return $e})),n.d(e,"TextureMatrix",(function(){return nr})),n.d(e,"TextureUvs",(function(){return Ke})),n.d(e,"UniformGroup",(function(){return dn})),n.d(e,"ViewableBuffer",(function(){return kr})),n.d(e,"autoDetectRenderer",(function(){return Pr})),n.d(e,"checkMaxIfStatementsInShader",(function(){return qn})),n.d(e,"defaultFilterVertex",(function(){return Ir})),n.d(e,"defaultVertex",(function(){return Or})),n.d(e,"resources",(function(){return We})),n.d(e,"systems",(function(){return wr})),n.d(e,"uniformParsers",(function(){return Hn})),n.d(e,"Extract",(function(){return Hr})),n.d(e,"AppLoaderPlugin",(function(){return di})),n.d(e,"Loader",(function(){return pi})),n.d(e,"LoaderResource",(function(){return ci})),n.d(e,"TextureLoader",(function(){return fi})),n.d(e,"ParticleContainer",(function(){return bi})),n.d(e,"ParticleRenderer",(function(){return xi})),n.d(e,"BasePrepare",(function(){return So})),n.d(e,"CountLimiter",(function(){return yo})),n.d(e,"Prepare",(function(){return Co})),n.d(e,"TimeLimiter",(function(){return Ao})),n.d(e,"Spritesheet",(function(){return ko})),n.d(e,"SpritesheetLoader",(function(){return Mo})),n.d(e,"TilingSprite",(function(){return Lo})),n.d(e,"TilingSpriteRenderer",(function(){return jo})),n.d(e,"BitmapFont",(function(){return ta})),n.d(e,"BitmapFontData",(function(){return Ko})),n.d(e,"BitmapFontLoader",(function(){return ia})),n.d(e,"BitmapText",(function(){return ra})),n.d(e,"Ticker",(function(){return me})),n.d(e,"TickerPlugin",(function(){return ye})),n.d(e,"UPDATE_PRIORITY",(function(){return pe})),n.d(e,"ALPHA_MODES",(function(){return B})),n.d(e,"BLEND_MODES",(function(){return M})),n.d(e,"BUFFER_BITS",(function(){return k})),n.d(e,"CLEAR_MODES",(function(){return z})),n.d(e,"DRAW_MODES",(function(){return R})),n.d(e,"ENV",(function(){return C})),n.d(e,"FORMATS",(function(){return D})),n.d(e,"GC_MODES",(function(){return H})),n.d(e,"MASK_TYPES",(function(){return W})),n.d(e,"MIPMAP_MODES",(function(){return j})),n.d(e,"MSAA_QUALITY",(function(){return G})),n.d(e,"PRECISION",(function(){return X})),n.d(e,"RENDERER_TYPE",(function(){return A})),n.d(e,"SCALE_MODES",(function(){return F})),n.d(e,"TARGETS",(function(){return N})),n.d(e,"TYPES",(function(){return L})),n.d(e,"WRAP_MODES",(function(){return U})),n.d(e,"Bounds",(function(){return oe})),n.d(e,"Container",(function(){return he})),n.d(e,"DisplayObject",(function(){return ue})),n.d(e,"TemporaryDisplayObject",(function(){return le})),n.d(e,"FillStyle",(function(){return Ti})),n.d(e,"GRAPHICS_CURVES",(function(){return wi})),n.d(e,"Graphics",(function(){return Zi})),n.d(e,"GraphicsData",(function(){return Gi})),n.d(e,"GraphicsGeometry",(function(){return qi})),n.d(e,"LINE_CAP",(function(){return gi})),n.d(e,"LINE_JOIN",(function(){return yi})),n.d(e,"LineStyle",(function(){return Ki})),n.d(e,"graphicsUtils",(function(){return Wi})),n.d(e,"Circle",(function(){return Xt})),n.d(e,"DEG_TO_RAD",(function(){return zt})),n.d(e,"Ellipse",(function(){return Wt})),n.d(e,"Matrix",(function(){return Kt})),n.d(e,"ObservablePoint",(function(){return qt})),n.d(e,"PI_2",(function(){return jt})),n.d(e,"Point",(function(){return Yt})),n.d(e,"Polygon",(function(){return Gt})),n.d(e,"RAD_TO_DEG",(function(){return Bt})),n.d(e,"Rectangle",(function(){return Ht})),n.d(e,"RoundedRectangle",(function(){return Vt})),n.d(e,"SHAPES",(function(){return Ut})),n.d(e,"Transform",(function(){return ie})),n.d(e,"groupD8",(function(){return re})),n.d(e,"Mesh",(function(){return Go})),n.d(e,"MeshBatchUvs",(function(){return Ho})),n.d(e,"MeshGeometry",(function(){return Yo})),n.d(e,"MeshMaterial",(function(){return Vo})),n.d(e,"NineSlicePlane",(function(){return Ya})),n.d(e,"PlaneGeometry",(function(){return Ha})),n.d(e,"RopeGeometry",(function(){return Xa})),n.d(e,"SimpleMesh",(function(){return Va})),n.d(e,"SimplePlane",(function(){return Ga})),n.d(e,"SimpleRope",(function(){return Wa})),n.d(e,"Runner",(function(){return Pe})),n.d(e,"Sprite",(function(){return ro})),n.d(e,"AnimatedSprite",(function(){return Ka})),n.d(e,"TEXT_GRADIENT",(function(){return to})),n.d(e,"Text",(function(){return vo})),n.d(e,"TextMetrics",(function(){return ho})),n.d(e,"TextStyle",(function(){return so})),n.d(e,"isMobile",(function(){return I})),n.d(e,"settings",(function(){return V})),n.d(e,"VERSION",(function(){return ts})),n.d(e,"filters",(function(){return es})),n.d(e,"useDeprecated",(function(){return Ja}));var r={};n.r(r),n.d(r,"isMobile",(function(){return I})),n.d(r,"EventEmitter",(function(){return q.a})),n.d(r,"earcut",(function(){return Q.a})),n.d(r,"url",(function(){return Z.a})),n.d(r,"BaseTextureCache",(function(){return It})),n.d(r,"CanvasRenderTarget",(function(){return kt})),n.d(r,"DATA_URI",(function(){return Dt})),n.d(r,"ProgramCache",(function(){return Pt})),n.d(r,"TextureCache",(function(){return Ot})),n.d(r,"clearTextureCache",(function(){return At})),n.d(r,"correctBlendMode",(function(){return lt})),n.d(r,"createIndicesForQuads",(function(){return pt})),n.d(r,"decomposeDataUri",(function(){return Nt})),n.d(r,"deprecation",(function(){return St})),n.d(r,"destroyTextureCache",(function(){return Ct})),n.d(r,"determineCrossOrigin",(function(){return Lt})),n.d(r,"getBufferType",(function(){return dt})),n.d(r,"getResolutionOfUrl",(function(){return Ft})),n.d(r,"hex2rgb",(function(){return it})),n.d(r,"hex2string",(function(){return ot})),n.d(r,"interleaveTypedArrays",(function(){return mt})),n.d(r,"isPow2",(function(){return gt})),n.d(r,"isWebGLSupported",(function(){return rt})),n.d(r,"log2",(function(){return bt})),n.d(r,"nextPow2",(function(){return yt})),n.d(r,"premultiplyBlendMode",(function(){return ut})),n.d(r,"premultiplyRgba",(function(){return ct})),n.d(r,"premultiplyTint",(function(){return ht})),n.d(r,"premultiplyTintToRgba",(function(){return ft})),n.d(r,"removeItems",(function(){return _t})),n.d(r,"rgb2hex",(function(){return st})),n.d(r,"sayHello",(function(){return nt})),n.d(r,"sign",(function(){return xt})),n.d(r,"skipHello",(function(){return et})),n.d(r,"string2hex",(function(){return at})),n.d(r,"trimCanvas",(function(){return Mt})),n.d(r,"uid",(function(){return Tt}));var i=n(43),o=n(20),a=n.n(o);window.Promise||(window.Promise=i.Polyfill),Object.assign||(Object.assign=a.a);if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!window.performance||!window.performance.now){var s=Date.now();window.performance||(window.performance={}),window.performance.now=function(){return Date.now()-s}}for(var u=Date.now(),l=["ms","moz","webkit","o"],c=0;c0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var f=/iPhone/i,p=/iPod/i,d=/iPad/i,v=/\biOS-universal(?:.+)Mac\b/i,m=/\bAndroid(?:.+)Mobile\b/i,y=/Android/i,g=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,b=/Silk/i,_=/Windows Phone/i,x=/\bWindows(?:.+)ARM\b/i,w=/BlackBerry/i,T=/BB10/i,E=/Opera Mini/i,S=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i,O=function(t){return"undefined"!==typeof t&&"MacIntel"===t.platform&&"number"===typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"===typeof MSStream};var I=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"===typeof navigator?"string"===typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=e.userAgent,r=n.split("[FBAN");"undefined"!==typeof r[1]&&(n=r[0]),"undefined"!==typeof(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(t){return function(e){return e.test(t)}}(n),o={apple:{phone:i(f)&&!i(_),ipod:i(p),tablet:!i(f)&&(i(d)||O(e))&&!i(_),universal:i(v),device:(i(f)||i(p)||i(d)||i(v)||O(e))&&!i(_)},amazon:{phone:i(g),tablet:!i(g)&&i(b),device:i(g)||i(b)},android:{phone:!i(_)&&i(g)||!i(_)&&i(m),tablet:!i(_)&&!i(g)&&!i(m)&&(i(b)||i(y)),device:!i(_)&&(i(g)||i(b)||i(m)||i(y))||i(/\bokhttp\b/i)},windows:{phone:i(_),tablet:i(x),device:i(_)||i(x)},other:{blackberry:i(w),blackberry10:i(T),opera:i(E),firefox:i(P),chrome:i(S),device:i(w)||i(T)||i(E)||i(P)||i(S)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator);var C,A,k,M,R,D,N,L,F,U,j,B,z,H,X,W,G,V={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(I.tablet||I.phone){var n;if(I.apple.device)if(n=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(n[1],10)<11&&(e=!1);if(I.android.device)if(n=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(n[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:I.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!I.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Y=n(35),q=n.n(Y),K=n(36),Q=n.n(K),$=n(21),Z=n.n($);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(C||(C={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(A||(A={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(k||(k={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(M||(M={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(R||(R={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(D||(D={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(N||(N={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.FLOAT=5126]="FLOAT",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(L||(L={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(F||(F={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(U||(U={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON"}(j||(j={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(B||(B={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(z||(z={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(H||(H={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(X||(X={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(W||(W={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(G||(G={})),V.RETINA_PREFIX=/@([0-9\.]+)x/,V.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var J,tt=!1;function et(){tt=!0}function nt(t){var e;if(!tt){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS 5.3.3 - \u2730 "+t+" \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=window.console).log.apply(e,n)}else window.console&&window.console.log("PixiJS 5.3.3 - "+t+" - http://www.pixijs.com/");tt=!0}}function rt(){return"undefined"===typeof J&&(J=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:V.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,r}catch(o){return!1}}()),J}function it(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function ot(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}function at(t){return"string"===typeof t&&"#"===t[0]&&(t=t.substr(1)),parseInt(t,16)}function st(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var ut=function(){for(var t=[],e=[],n=0;n<32;n++)t[n]=n,e[n]=n;t[M.NORMAL_NPM]=M.NORMAL,t[M.ADD_NPM]=M.ADD,t[M.SCREEN_NPM]=M.SCREEN,e[M.NORMAL]=M.NORMAL_NPM,e[M.ADD]=M.ADD_NPM,e[M.SCREEN]=M.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}();function lt(t,e){return ut[e?1:0][t]}function ct(t,e,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e):(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=e,n}function ht(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,i=255&t;return(255*e<<24)+((n=n*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(i=i*e+.5|0)}function ft(t,e,n,r){return(n=n||new Float32Array(4))[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n}function pt(t,e){void 0===e&&(e=null);var n=6*t;if((e=e||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+n);for(var r=0,i=0;r>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function gt(t){return!(t&t-1)&&!!t}function bt(t){var e=(t>65535?1:0)<<4,n=((t>>>=e)>255?1:0)<<3;return e|=n,e|=n=((t>>>=n)>15?1:0)<<2,(e|=n=((t>>>=n)>3?1:0)<<1)|(t>>>=n)>>1}function _t(t,e,n){var r,i=t.length;if(!(e>=i||0===n)){var o=i-(n=e+n>i?i-e:n);for(r=e;r=this.x&&t=this.y&&ee!==l>e&&t<(e-s)/(l-s)*(u-a)+a&&(n=!n)}return n},t}(),Vt=function(){function t(t,e,n,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=20),this.x=t,this.y=e,this.width=n,this.height=r,this.radius=i,this.type=Ut.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var n=t-(this.x+this.radius),r=e-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=t-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(n*n+(r=e-(this.y+this.height-this.radius))*r<=i)return!0;if((n=t-(this.x+this.radius))*n+r*r<=i)return!0}return!1},t}(),Yt=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t}(),qt=function(){function t(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),this._x=n,this._y=r,this.cb=t,this.scope=e}return t.prototype.clone=function(e,n){return void 0===e&&(e=this.cb),void 0===n&&(n=this.scope),new t(e,n,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),Kt=function(){function t(t,e,n,r,i,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,n,r,i,o){return this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(t,e){e=e||new Yt;var n=t.x,r=t.y;return e.x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new Yt;var n=1/(this.a*this.d+this.c*-this.b),r=t.x,i=t.y;return e.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=this.a,i=this.c,o=this.tx;return this.a=r*e-this.b*n,this.b=r*n+this.b*e,this.c=i*e-this.d*n,this.d=i*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},t.prototype.append=function(t){var e=this.a,n=this.b,r=this.c,i=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*r,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*n+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,n,r,i,o,a,s,u){return this.a=Math.cos(a+u)*i,this.b=Math.sin(a+u)*i,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=t-(n*this.a+r*this.c),this.ty=e-(n*this.b+r*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,r=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=-Math.atan2(-r,i),a=Math.atan2(n,e),s=Math.abs(o+a);return s<1e-5||Math.abs(jt-s)<1e-5?(t.rotation=a,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(r*r+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.tx,o=t*r-e*n;return this.a=r/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),Qt=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],$t=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Zt=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Jt=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],te=[],ee=[],ne=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];te.push(e);for(var n=0;n<16;n++)for(var r=ne(Qt[t]*Qt[n]+Zt[t]*$t[n]),i=ne($t[t]*Qt[n]+Jt[t]*$t[n]),o=ne(Qt[t]*Zt[n]+Zt[t]*Jt[n]),a=ne($t[t]*Zt[n]+Jt[t]*Jt[n]),s=0;s<16;s++)if(Qt[s]===r&&$t[s]===i&&Zt[s]===o&&Jt[s]===a){e.push(s);break}}for(t=0;t<16;t++){var u=new Kt;u.set(Qt[t],$t[t],Zt[t],Jt[t],0,0),ee.push(u)}}();var re={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return Qt[t]},uY:function(t){return $t[t]},vX:function(t){return Zt[t]},vY:function(t){return Jt[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return te[t][e]},sub:function(t,e){return te[t][re.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?re.S:re.N:2*Math.abs(e)<=Math.abs(t)?t>0?re.E:re.W:e>0?t>0?re.SE:re.SW:t>0?re.NE:re.NW},matrixAppendRotationInv:function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=ee[re.inv(e)];i.tx=n,i.ty=r,t.append(i)}},ie=function(){function t(){this.worldTransform=new Kt,this.localTransform=new Kt,this.position=new qt(this.onChange,this,0,0),this.scale=new qt(this.onChange,this,1,1),this.pivot=new qt(this.onChange,this,0,0),this.skew=new qt(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();V.SORTABLE_CHILDREN=!1;var oe=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Ht.EMPTY:((t=t||new Ht(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY,o=t[0],a=t[1];e=or?o:r,i=a>i?a:i,e=(o=t[2])r?o:r,i=a>i?a:i,e=(o=t[4])r?o:r,i=a>i?a:i,e=(o=t[6])r?o:r,i=a>i?a:i,this.minX=e,this.minY=n,this.maxX=r,this.maxY=i},t.prototype.addFrame=function(t,e,n,r,i){this.addFrameMatrix(t.worldTransform,e,n,r,i)},t.prototype.addFrameMatrix=function(t,e,n,r,i){var o=t.a,a=t.b,s=t.c,u=t.d,l=t.tx,c=t.ty,h=this.minX,f=this.minY,p=this.maxX,d=this.maxY,v=o*e+s*n+l,m=a*e+u*n+c;h=vp?v:p,d=m>d?m:d,h=(v=o*r+s*n+l)p?v:p,d=m>d?m:d,h=(v=o*e+s*i+l)p?v:p,d=m>d?m:d,h=(v=o*r+s*i+l)p?v:p,d=m>d?m:d,this.minX=h,this.minY=f,this.maxX=p,this.maxY=d},t.prototype.addVertexData=function(t,e,n){for(var r=this.minX,i=this.minY,o=this.maxX,a=this.maxY,s=e;so?u:o,a=l>a?l:a}this.minX=r,this.minY=i,this.maxX=o,this.maxY=a},t.prototype.addVertices=function(t,e,n,r){this.addVerticesMatrix(t.worldTransform,e,n,r)},t.prototype.addVerticesMatrix=function(t,e,n,r,i,o){void 0===i&&(i=0),void 0===o&&(o=i);for(var a=t.a,s=t.b,u=t.c,l=t.d,c=t.tx,h=t.ty,f=this.minX,p=this.minY,d=this.maxX,v=this.maxY,m=n;mr?t.maxX:r,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var n=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,i=t.maxXu?i:u,this.maxY=o>l?o:l}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var n=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,i=t.maxXu?i:u,this.maxY=o>l?o:l}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,n,r,i,o){t-=i,e-=o,n+=i,r+=o,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},t}(),ae=function(t,e){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function se(t,e){function n(){this.constructor=t}ae(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ue=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new ie,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new oe,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return se(e,t),e.mixin=function(t){for(var n=Object.keys(t),r=0;r1)for(var r=0;rthis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),r=this.getChildIndex(e);this.children[n]=e,this.children[r]=t,this.onChildrenChange(n=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(t);_t(this.children,n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,e=[],n=0;n1)for(var r=0;r0&&i<=e){n=this.children.splice(r,i);for(var o=0;o1&&this.children.sort(ce),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t title : "+t.title+"
tabIndex: "+t.tabIndex},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0),t.x+t.width>this.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2..toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData),e.dispatchEvent(t.target.displayObject,"pointertap",e.eventData),e.dispatchEvent(t.target.displayObject,"tap",e.eventData)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();V.TARGET_FPMS=.06,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(pe||(pe={}));var ve=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=0),void 0===r&&(r=!1),this.fn=t,this.context=e,this.priority=n,this.once=r,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),me=function(){function t(){var t=this;this._head=new ve(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/V.TARGET_FPMS,this.elapsedMS=1/V.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e,n){return void 0===n&&(n=pe.NORMAL),this._addListener(new ve(t,e,n))},t.prototype.addOnce=function(t,e,n){return void 0===n&&(n=pe.NORMAL),this._addListener(new ve(t,e,n,!0))},t.prototype._addListener=function(t){var e=this._head.next,n=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(n);break}n=e,e=e.next}t.previous||t.connect(n)}else t.connect(n);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var n=this._head.next;n;)n=n.match(t,e)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var n=t-this._lastFrame|0;if(n=0;c--){var h=l[c],f=this.recursiveFindHit(t,h,n,r,s);if(f){if(!h.parent)continue;s=!1,f&&(t.target&&(r=!1),a=!0)}}return i&&(r&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(a=!0),e.interactive&&(a&&!t.target&&(t.target=e),n&&n(t,e,!!a))),a},t.prototype.findHit=function(t,e,n,r){this.recursiveFindHit(t,e,n,r,!1)},t}(),Te={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};ue.mixin(Te);var Ee={target:null,data:{global:null}},Se=function(t){function e(e,n){var r=t.call(this)||this;return n=n||{},r.renderer=e,r.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new ge,r.mouse.identifier=1,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[1]=r.mouse,r.interactionDataPool=[],r.eventData=new _e,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!1,r.supportsTouchEvents="ontouchstart"in window,r.supportsPointerEvents=!!window.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:"inherit",pointer:"pointer"},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new we,r._tempDisplayObject=new le,r._useSystemTicker=void 0===n.useSystemTicker||n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return function(t,e){function n(){this.constructor=t}be(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(t,e){return Ee.target=null,Ee.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(Ee,e,null,!0),Ee.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(me.system.add(this.tickerUpdate,this,pe.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(me.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime8)throw new Error("max arguments reached");var u=this,l=u.name,c=u.items;this._aliasCount++;for(var h=0,f=c.length;h0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(Pe.prototype,{dispatch:{value:Pe.prototype.emit},run:{value:Pe.prototype.emit}}),V.PREFER_ENV=I.any?C.WEBGL:C.WEBGL2,V.STRICT_TEXTURE_CACHE=!1;var Oe=[];function Ie(t,e){if(!t)return null;var n="";if("string"===typeof t){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);r&&(n=r[1].toLowerCase())}for(var i=Oe.length-1;i>=0;--i){var o=Oe[i];if(o.test&&o.test(t,n))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var Ce=function(t,e){return(Ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function Ae(t,e){function n(){this.constructor=t}Ce(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ke=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new Pe("setRealSize"),this.onUpdate=new Pe("update"),this.onError=new Pe("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,n){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),Me=function(t){function e(e,n){var r=this,i=n||{},o=i.width,a=i.height;if(!o||!a)throw new Error("BufferResource width or height invalid");return(r=t.call(this,o,a)||this).data=e,r}return Ae(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===B.UNPACK),n.width===e.width&&n.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(n.width=e.width,n.height=e.height,r.texImage2D(e.target,0,n.internalFormat,e.width,e.height,0,e.format,n.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(ke),Re={scaleMode:F.NEAREST,format:D.RGBA,alphaMode:B.NPM},De=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this)||this,i=(n=n||{}).alphaMode,o=n.mipmap,a=n.anisotropicLevel,s=n.scaleMode,u=n.width,l=n.height,c=n.wrapMode,h=n.format,f=n.type,p=n.target,d=n.resolution,v=n.resourceOptions;return!e||e instanceof ke||((e=Ie(e,v)).internal=!0),r.width=u||0,r.height=l||0,r.resolution=d||V.RESOLUTION,r.mipmap=void 0!==o?o:V.MIPMAP_TEXTURES,r.anisotropicLevel=void 0!==a?a:V.ANISOTROPIC_LEVEL,r.wrapMode=c||V.WRAP_MODE,r.scaleMode=void 0!==s?s:V.SCALE_MODE,r.format=h||D.RGBA,r.type=f||L.UNSIGNED_BYTE,r.target=p||N.TEXTURE_2D,r.alphaMode=void 0!==i?i:B.UNPACK,void 0!==n.premultiplyAlpha&&(r.premultiplyAlpha=n.premultiplyAlpha),r.uid=Tt(),r.touched=0,r.isPowerOfTwo=!1,r._refreshPOT(),r._glTextures={},r.dirtyId=0,r.dirtyStyleId=0,r.cacheId=null,r.valid=u>0&&l>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(e),r}return Ae(e,t),Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,e){var n;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,n=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,n=!0),n&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,n){return this.resolution=n||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},e.prototype.setRealSize=function(t,e,n){return this.resolution=n||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=gt(this.realWidth)&>(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t||(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT()),this},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete It[this.cacheId],delete Ot[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,n,r){void 0===r&&(r=V.STRICT_TEXTURE_CACHE);var i="string"===typeof t,o=null;i?o=t:(t._pixiId||(t._pixiId="pixiid_"+Tt()),o=t._pixiId);var a=It[o];if(i&&r&&!a)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return a||((a=new e(t,n)).cacheId=o,e.addToCache(a,o)),a},e.fromBuffer=function(t,n,r,i){t=t||new Float32Array(n*r*4);var o=new Me(t,{width:n,height:r}),a=t instanceof Float32Array?L.FLOAT:L.UNSIGNED_BYTE;return new e(o,Object.assign(Re,i||{width:n,height:r,type:a}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),It[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),It[e]=t)},e.removeFromCache=function(t){if("string"===typeof t){var e=It[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete It[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r0){if(!t.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(t.resource,e)}else t.target=N.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this},e.prototype.upload=function(t,n,r){for(var i=this.itemDirtyIds,o=0;o]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(Fe),He=function(t){function e(n,r){var i=this;if(r=r||{},!(n instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"===typeof n&&(n=[n]);var a=n[0].src||n[0];Fe.crossOrigin(o,a,r.crossorigin);for(var s=0;s0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(me.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(me.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&me.shared.remove(this.update,this);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(me.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(me.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,n){return t instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(Fe),Xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ae(e,t),e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(Fe);Oe.push(Be,Xe,Ue,He,ze,Me,je,Le);var We={Resource:ke,BaseImageResource:Fe,INSTALLED:Oe,autoDetectResource:Ie,AbstractMultiResource:Ne,ArrayResource:Le,BufferResource:Me,CanvasResource:Ue,CubeResource:je,ImageResource:Be,SVGResource:ze,VideoResource:He,ImageBitmapResource:Xe},Ge=function(){function t(t){this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),Ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ae(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===B.UNPACK),n.width===e.width&&n.height===e.height?r.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(n.width=e.width,n.height=e.height,r.texImage2D(e.target,0,1===t.context.webGLVersion?r.DEPTH_COMPONENT:r.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(Me),Ye=function(){function t(t,e){this.width=Math.ceil(t||100),this.height=Math.ceil(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Pe("disposeFramebuffer"),this.multisample=G.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new De(null,{scaleMode:F.NEAREST,resolution:1,mipmap:j.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(t){return this.depthTexture=t||new De(new Ve(null,{width:this.width,height:this.height}),{scaleMode:F.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:j.OFF,format:D.DEPTH_COMPONENT,type:L.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&e.textureCacheIds.splice(n,1),delete Ot[t],e}}else if(t&&t.textureCacheIds){for(var r=0;rthis.baseTexture.width,a=n+i>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",u="X: "+e+" + "+r+" = "+(e+r)+" > "+this.baseTexture.width,l="Y: "+n+" + "+i+" = "+(n+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+u+" "+s+" "+l)}this.valid=r&&i&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(q.a);function Ze(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}$e.EMPTY=new $e(new De),Ze($e.EMPTY),Ze($e.EMPTY.baseTexture),$e.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new $e(new De(new Ue(t)))}(),Ze($e.WHITE),Ze($e.WHITE.baseTexture);var Je=function(t){function e(e,n){var r=this,i=null;if(!(e instanceof qe)){var o=arguments[1],a=arguments[2],s=arguments[3],u=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+a+") instead of the ctor directly."),i=arguments[0],n=null,e=new qe({width:o,height:a,scaleMode:s,resolution:u})}return(r=t.call(this,e,n)||this).legacyRenderer=i,r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Ae(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,n){void 0===n&&(n=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,n&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"===typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new qe(t))},e}($e),tn=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e){var n=new qe(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new Je(n)},t.prototype.getOptimalTexture=function(e,n,r){void 0===r&&(r=1);var i=t.SCREEN_KEY;e*=r,n*=r,this.enableFullScreen&&e===this._pixelsWidth&&n===this._pixelsHeight||(i=(65535&(e=yt(e)))<<16|65535&(n=yt(n))),this.texturePool[i]||(this.texturePool[i]=[]);var o=this.texturePool[i].pop();return o||(o=this.createTexture(e,n)),o.filterPoolKey=i,o.setResolution(r),o},t.prototype.getFilterTexture=function(t,e){var n=this.getOptimalTexture(t.width,t.height,e||t.resolution);return n.filterFrame=t.filterFrame,n},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var n=this.texturePool[e];if(n)for(var r=0;r0&&e.height>0,r)for(var i=0;i1){for(var l=0;l1&&this.renderer.framebuffer.blit(),1===n.length)n[0].apply(this,e.renderTexture,u.renderTexture,z.BLEND,e),this.returnFilterTexture(e.renderTexture);else{var l=e.renderTexture,c=this.getOptimalFilterTexture(l.width,l.height,e.resolution);c.filterFrame=l.filterFrame;var h=0;for(h=0;h=0;--r)t[r]=n[r]||null,t[r]&&(t[r]._batchLocation=r)},e.prototype.boundArray=function(t,e,n,r){for(var i=t.elements,o=t.ids,a=t.count,s=0,u=0;u=0&&c=C.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var e="WebGL2RenderingContext"in window&&t instanceof window.WebGL2RenderingContext||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=e,e||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},e}(Ge),xn=function(t){this.framebuffer=t,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=G.NONE,this.msaaBuffer=null,this.blitFramebuffer=null},wn=new Ht,Tn=function(t){function e(e){var n=t.call(this,e)||this;return n.managedFramebuffers=[],n.unknownFramebuffer=new Ye(10,10),n.msaaSamples=null,n}return Ae(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ht,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;V.PREFER_ENV===C.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},e.prototype.bind=function(t,e){var n=this.gl;if(t){var r=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer)),r.dirtyId!==t.dirtyId&&(r.dirtyId=t.dirtyId,r.dirtyFormat!==t.dirtyFormat?(r.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):r.dirtySize!==t.dirtySize&&(r.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var i=0;i1&&(n.msaaBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,n.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.RGBA8,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,n.msaaBuffer));for(var i=[],o=0;o1)){var a=t.colorTextures[o],s=a.parentTextureArray||a;this.renderer.texture.bind(s,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+o,a.target,s._glTextures[this.CONTEXT_UID].texture,0),i.push(e.COLOR_ATTACHMENT0+o)}if((i.length>1&&e.drawBuffers(i),t.depthTexture)&&this.writeDepthTexture){var u=t.depthTexture;this.renderer.texture.bind(u,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,u._glTextures[this.CONTEXT_UID].texture,0)}n.stencil||!t.stencil&&!t.depth||(n.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,n.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,n.stencil))},e.prototype.detectSamples=function(t){var e=this.msaaSamples,n=G.NONE;if(t<=1||null===e)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),t.disposeRunner.remove(this),e||(r.deleteFramebuffer(n.framebuffer),n.stencil&&r.deleteRenderbuffer(n.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=r.data.byteLength)e.bufferSubData(o,0,r.data);else{var a=r.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;i.byteLength=r.data.byteLength,e.bufferData(o,r.data,a)}}}},e.prototype.checkCompatibility=function(t,e){var n=t.attributes,r=e.attributeData;for(var i in r)if(!n[i])throw new Error('shader and geometry incompatible, geometry missing the "'+i+'" attribute')},e.prototype.getSignature=function(t,e){var n=t.attributes,r=e.attributeData,i=["g",t.id];for(var o in n)r[o]&&i.push(o);return i.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var n=this.gl,r=this.CONTEXT_UID,i=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],a=o[i];if(a)return o[e.id]=a,a;var s=t.buffers,u=t.attributes,l={},c={};for(var h in s)l[h]=0,c[h]=0;for(var h in u)!u[h].size&&e.attributeData[h]?u[h].size=e.attributeData[h].size:u[h].size||console.warn("PIXI Geometry attribute '"+h+"' size cannot be determined (likely the bound shader does not have the attribute)"),l[u[h].buffer]+=u[h].size*Sn[u[h].type];for(var h in u){var f=u[h],p=f.size;void 0===f.stride&&(l[f.buffer]===p*Sn[f.type]?f.stride=0:f.stride=l[f.buffer]),void 0===f.start&&(f.start=c[f.buffer],c[f.buffer]+=p*Sn[f.type])}a=n.createVertexArray(),n.bindVertexArray(a);for(var d=0;d=C.WEBGL2&&(e=t.getContext("webgl2",{})),e||((e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}))?e.getExtension("WEBGL_draw_buffers"):e=null),Dn=e}return Dn}function Ln(t,e,n){if("precision"!==t.substring(0,9)){var r=e;return e===X.HIGH&&n!==X.HIGH&&(r=X.MEDIUM),"precision "+r+" float;\n"+t}return n!==X.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var Fn={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Un(t){return Fn[t]}var jn=null,Bn={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function zn(t,e){if(!jn){var n=Object.keys(Bn);jn={};for(var r=0;r0&&(e+="\nelse "),ne.name?1:-1}));for(o=0;o0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,n=this.renderer.projection,r=n.transform,i=n.sourceFrame,o=n.destinationFrame,a=e?e.resolution:this.renderer.resolution,s=(t.x-i.x)*a+o.x,u=(t.y-i.y)*a+o.y,l=t.width*a,c=t.height*a;r&&(s+=r.tx*a,u+=r.ty*a),e||(u=this.renderer.height-c-u),this.renderer.gl.scissor(s,u,l,c)},e}(or),sr=function(t){function e(e){var n=t.call(this,e)||this;return n.glConst=WebGLRenderingContext.STENCIL_TEST,n}return Ae(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,n=this.renderer.gl,r=t._stencilCounter;0===r&&(this.renderer.framebuffer.forceStencil(),n.enable(n.STENCIL_TEST)),t._stencilCounter++,n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.EQUAL,r,this._getBitwiseMask()),n.stencilOp(n.KEEP,n.KEEP,n.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,n++;this.stateId=t.data}for(n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,n=!1,r=0;rthis.maxIdle&&(t.destroyTexture(i,!0),e[r]=null,n=!0)}if(n){var o=0;for(r=0;r=0;r--)this.unload(t.children[r])},e}(Ge),_r=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},xr=function(t){function e(e){var n=t.call(this,e)||this;return n.boundTextures=[],n.currentLocation=-1,n.managedTextures=[],n._unknownBoundTextures=!1,n.unknownTexture=new De,n}return Ae(e,t),e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var n=0;n=1:e.mipmap=!1,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=U.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,e){var n=this.gl;if(e.mipmap&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,e.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===F.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&t.anisotropicLevel>0&&t.scaleMode===F.LINEAR){var i=Math.min(t.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===F.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===F.LINEAR?n.LINEAR:n.NEAREST)},e}(Ge),wr={FilterSystem:mn,BatchSystem:gn,ContextSystem:_n,FramebufferSystem:Tn,GeometrySystem:Pn,MaskSystem:ir,ScissorSystem:ar,StencilSystem:sr,ProjectionSystem:ur,RenderTextureSystem:fr,ShaderSystem:yr,StateSystem:gr,TextureGCSystem:br,TextureSystem:xr},Tr=new Kt,Er=function(t){function e(e,n){void 0===e&&(e=A.UNKNOWN);var r=t.call(this)||this;return(n=Object.assign({},V.RENDER_OPTIONS,n)).roundPixels&&(V.ROUND_PIXELS=n.roundPixels,St("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),r.options=n,r.type=e,r.screen=new Ht(0,0,n.width,n.height),r.view=n.view||document.createElement("canvas"),r.resolution=n.resolution||V.RESOLUTION,r.transparent=n.transparent,r.autoDensity=n.autoDensity||n.autoResize||!1,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,0],r._backgroundColorString="#000000",r.backgroundColor=n.backgroundColor||r._backgroundColor,r._lastObjectRendered=null,r.plugins={},r}return Ae(e,t),e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px"),this.emit("resize",t,e)},e.prototype.generateTexture=function(t,e,n,r){0===(r=r||t.getLocalBounds(null,!0)).width&&(r.width=1),0===r.height&&(r.height=1);var i=Je.create({width:0|r.width,height:0|r.height,scaleMode:e,resolution:n});return Tr.tx=-r.x,Tr.ty=-r.y,this.render(t,i,!1,Tr,!!t.parent),i},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=A.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=ot(t),it(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),e}(q.a),Sr=function(t){function e(n){var r=t.call(this,A.WEBGL,n)||this;return n=r.options,r.gl=null,r.CONTEXT_UID=0,r.runners={destroy:new Pe("destroy"),contextChange:new Pe("contextChange"),reset:new Pe("reset"),update:new Pe("update"),postrender:new Pe("postrender"),prerender:new Pe("prerender"),resize:new Pe("resize")},r.globalUniforms=new dn({projectionMatrix:new Kt},!0),r.addSystem(ir,"mask").addSystem(_n,"context").addSystem(gr,"state").addSystem(yr,"shader").addSystem(xr,"texture").addSystem(Pn,"geometry").addSystem(Tn,"framebuffer").addSystem(ar,"scissor").addSystem(sr,"stencil").addSystem(ur,"projection").addSystem(br,"textureGC").addSystem(mn,"filter").addSystem(fr,"renderTexture").addSystem(gn,"batch"),r.initPlugins(e.__plugins),n.context?r.context.initFromContext(n.context):r.context.initFromOptions({alpha:!!r.transparent,antialias:n.antialias,premultipliedAlpha:r.transparent&&"notMultiplied"!==r.transparent,stencil:!0,preserveDrawingBuffer:n.preserveDrawingBuffer,powerPreference:r.options.powerPreference}),r.renderingToScreen=!0,nt(2===r.context.webGLVersion?"WebGL 2":"WebGL 1"),r.resize(r.options.width,r.options.height),r}return Ae(e,t),e.create=function(t){if(rt())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.addSystem=function(t,e){e||(e=t.name);var n=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var r in this[e]=n,this.runners)this.runners[r].add(n);return this},e.prototype.render=function(t,e,n,r,i){if(this.renderingToScreen=!e,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=r,!this.context.isLost){if(e||(this._lastObjectRendered=t),!i){var o=t.enableTempParent();t.updateTransform(),t.disableTempParent(o)}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==n?n:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.resize=function(e,n){t.prototype.resize.call(this,e,n),this.runners.resize.emit(e,n)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(e){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,e),this.gl=null},e.registerPlugin=function(t,n){e.__plugins=e.__plugins||{},e.__plugins[t]=n},e}(Er);function Pr(t){return Sr.create(t)}var Or="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Ir="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",Cr=function(){this.texArray=null,this.blend=0,this.type=R.TRIANGLES,this.start=0,this.size=0,this.data=null},Ar=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,n=this.MAX_TEXTURES,r=e._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,a=this.renderer.textureGC.count,s=++De._globalBatch,u=0,l=r[0],c=0;i.copyBoundTextures(o,n);for(var h=0;h=n&&(i.boundArray(l,o,s,n),this.buildDrawCalls(l,c,h),c=h,l=r[++u],++s),f._batchEnabled=s,f.touched=a,l.elements[l.count++]=f)}l.count>0&&(i.boundArray(l,o,s,n),this.buildDrawCalls(l,c,this._bufferSize),++u,++s);for(h=0;h0&&(e+="\nelse "),n0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2===(r/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=t.TYPE.JSON}catch(a){return void this.abort("Error trying to parse loaded json: "+a)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(n,"text/xml")}else{var o=document.createElement("div");o.innerHTML=n,this.data=o}this.type=t.TYPE.XML}catch(a){return void this.abort("Error trying to parse loaded xml: "+a)}else this.data=e.response||n;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},e._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";e=e||window.location,ei||(ei=document.createElement("a")),ei.href=t;var n=!(t=Wr()(ei.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&n&&r===e.protocol?"":"anonymous"},e._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},e._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},e._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var r=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(r>-1?r:t.length,i>-1?i:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},e._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},Jr(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();function ii(t,e,n){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=n)}function oi(t){return t.toString().replace("object ","")}ri.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},ri.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},ri.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},ri.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},ri._loadTypeMap={gif:ri.LOAD_TYPE.IMAGE,png:ri.LOAD_TYPE.IMAGE,bmp:ri.LOAD_TYPE.IMAGE,jpg:ri.LOAD_TYPE.IMAGE,jpeg:ri.LOAD_TYPE.IMAGE,tif:ri.LOAD_TYPE.IMAGE,tiff:ri.LOAD_TYPE.IMAGE,webp:ri.LOAD_TYPE.IMAGE,tga:ri.LOAD_TYPE.IMAGE,svg:ri.LOAD_TYPE.IMAGE,"svg+xml":ri.LOAD_TYPE.IMAGE,mp3:ri.LOAD_TYPE.AUDIO,ogg:ri.LOAD_TYPE.AUDIO,wav:ri.LOAD_TYPE.AUDIO,mp4:ri.LOAD_TYPE.VIDEO,webm:ri.LOAD_TYPE.VIDEO},ri._xhrTypeMap={xhtml:ri.XHR_RESPONSE_TYPE.DOCUMENT,html:ri.XHR_RESPONSE_TYPE.DOCUMENT,htm:ri.XHR_RESPONSE_TYPE.DOCUMENT,xml:ri.XHR_RESPONSE_TYPE.DOCUMENT,tmx:ri.XHR_RESPONSE_TYPE.DOCUMENT,svg:ri.XHR_RESPONSE_TYPE.DOCUMENT,tsx:ri.XHR_RESPONSE_TYPE.DOCUMENT,gif:ri.XHR_RESPONSE_TYPE.BLOB,png:ri.XHR_RESPONSE_TYPE.BLOB,bmp:ri.XHR_RESPONSE_TYPE.BLOB,jpg:ri.XHR_RESPONSE_TYPE.BLOB,jpeg:ri.XHR_RESPONSE_TYPE.BLOB,tif:ri.XHR_RESPONSE_TYPE.BLOB,tiff:ri.XHR_RESPONSE_TYPE.BLOB,webp:ri.XHR_RESPONSE_TYPE.BLOB,tga:ri.XHR_RESPONSE_TYPE.BLOB,json:ri.XHR_RESPONSE_TYPE.JSON,text:ri.XHR_RESPONSE_TYPE.TEXT,txt:ri.XHR_RESPONSE_TYPE.TEXT,ttf:ri.XHR_RESPONSE_TYPE.BUFFER,otf:ri.XHR_RESPONSE_TYPE.BUFFER},ri.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var ai=window.URL||window.webkitURL;var si={caching:function(t,e){var n=this;$r[t.url]?(t.data=$r[t.url],t.complete()):t.onComplete.once((function(){return $r[n.url]=n.data})),e()},parsing:function(t,e){if(t.data){if(t.xhr&&t.xhrType===ri.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!==typeof t.data){if(0===t.data.type.indexOf("image")){var n=ai.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=n,t.type=ri.TYPE.IMAGE,void(t.data.onload=function(){ai.revokeObjectURL(n),t.data.onload=null,e()})}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+function(t){for(var e="",n=0;n>2,i[1]=(3&r[0])<<4|r[1]>>4,i[2]=(15&r[1])<<2|r[2]>>6,i[3]=63&r[2],n-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(var a=0;a16384&&(r=16384),o._properties=[!1,!0,!1,!1,!1],o._maxSize=e,o._batchSize=r,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=M.NORMAL,o.autoResize=i,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return mi(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,it(t,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",(function(){return e.onChildrenChange(0)}))),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthn&&!t.autoResize&&(o=n);var a=t._buffers;a||(a=t._buffers=this.generateBuffers(t));var s=e[0]._texture.baseTexture;this.state.blendMode=lt(t.blendMode,s.alphaMode),i.state.set(this.state);var u=i.gl,l=t.worldTransform.copyTo(this.tempMatrix);l.prepend(i.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=l.toArray(!0),this.shader.uniforms.uColor=ct(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,s.alphaMode),this.shader.uniforms.uSampler=s,this.renderer.shader.bind(this.shader);for(var c=!1,h=0,f=0;hr&&(p=r),f>=a.length&&a.push(this._generateOneMoreBuffer(t));var d=a[f];d.uploadDynamic(e,h,p);var v=t._bufferUpdateIDs[f]||0;(c=c||d._updateID0,l=s.alpha,c=l<1&&u?ht(s._tintRGB,l):s._tintRGB+(255*l<<24);r[o]=c,r[o+i]=c,r[o+2*i]=c,r[o+3*i]=c,o+=4*i}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(yn);!function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(yi||(yi={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(gi||(gi={}));var wi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var n=Math.ceil(t/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}},Ti=function(){function t(){this.color=16777215,this.alpha=1,this.texture=$e.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=$e.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),Ei=function(t,e){return(Ei=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function Si(t,e){function n(){this.constructor=t}Ei(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Pi={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var n=t.points,r=t.holes,i=e.points,o=e.indices;if(n.length>=6){for(var a=[],s=0;sh&&(h+=2*Math.PI);var f=c,p=h-c,d=Math.abs(p),v=Math.sqrt(u*u+l*l),m=1+(15*d*Math.sqrt(v)/Math.PI>>0),y=p/m;if(f+=y,s){a.push(t,e),a.push(n,r);for(var g=1,b=f;gg?(j?(f.push(G,V),f.push(x+S*M,w+P*M),f.push(G,V),f.push(x+O*M,w+I*M)):(f.push(x-S*k,w-P*k),f.push(Y,q),f.push(x-O*k,w-I*k),f.push(Y,q)),d+=2):o.join===yi.ROUND?j?(f.push(G,V),f.push(x+S*M,w+P*M),d+=Ri(x,w,x+S*M,w+P*M,x+O*M,w+I*M,f,!0)+4,f.push(G,V),f.push(x+O*M,w+I*M)):(f.push(x-S*k,w-P*k),f.push(Y,q),d+=Ri(x,w,x-S*k,w-P*k,x-O*k,w-I*k,f,!1)+4,f.push(x-O*k,w-I*k),f.push(Y,q)):(f.push(G,V),f.push(Y,q))}}b=r[2*(p-2)],_=r[2*(p-2)+1],x=r[2*(p-1)],S=-(_-(w=r[2*(p-1)+1])),P=b-x,S/=C=Math.sqrt(S*S+P*P),P/=C,S*=m,P*=m,f.push(x-S*k,w-P*k),f.push(x+S*M,w+P*M),u||(o.cap===gi.ROUND?d+=Ri(x-S*(k-M)*.5,w-P*(k-M)*.5,x-S*k,w-P*k,x+S*M,w+P*M,f,!1)+2:o.cap===gi.SQUARE&&(d+=Mi(x,w,S,P,k,M,!1,f)));var K=e.indices,Q=wi.epsilon*wi.epsilon;for(R=v;Rc*s}},t.arc=function(t,e,n,r,i,o,a,s,u){for(var l=a-o,c=wi._segmentsCount(Math.abs(l)*i,40*Math.ceil(Math.abs(l)/jt)),h=l/(2*c),f=2*h,p=Math.cos(h),d=Math.sin(h),v=c-1,m=v%1/v,y=0;y<=v;++y){var g=h+o+f*(y+m*y),b=Math.cos(g),_=-Math.sin(g);u.push((p*b+d*_)*i+n,(p*-_+d*b)*i+r)}},t}(),Ui=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o,a,s){for(var u=0,l=0,c=0,h=0,f=0,p=0,d=0,v=0,m=0,y=0,g=0,b=t,_=e,x=1;x<=10;++x)y=b-(v=(d=(p=(f=1-(l=x/10))*f)*f)*t+3*p*l*n+3*f*(c=l*l)*i+(h=c*l)*a),g=_-(m=d*e+3*p*l*r+3*f*c*o+h*s),b=v,_=m,u+=Math.sqrt(y*y+g*g);return u},t.curveTo=function(e,n,r,i,o,a,s){var u=s[s.length-2],l=s[s.length-1];s.length-=2;var c=wi._segmentsCount(t.curveLength(u,l,e,n,r,i,o,a)),h=0,f=0,p=0,d=0,v=0;s.push(u,l);for(var m=1,y=0;m<=c;++m)p=(f=(h=1-(y=m/c))*h)*h,v=(d=y*y)*y,s.push(p*u+3*f*y*e+3*h*d*r+v*o,p*l+3*f*y*n+3*h*d*i+v*a)},t}(),ji=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o){var a=t-2*n+i,s=e-2*r+o,u=2*n-2*t,l=2*r-2*e,c=4*(a*a+s*s),h=4*(a*u+s*l),f=u*u+l*l,p=2*Math.sqrt(c+h+f),d=Math.sqrt(c),v=2*c*d,m=2*Math.sqrt(f),y=h/d;return(v*p+d*h*(p-m)+(4*f*c-h*h)*Math.log((2*d+y+p)/(y+m)))/(4*v)},t.curveTo=function(e,n,r,i,o){for(var a=o[o.length-2],s=o[o.length-1],u=wi._segmentsCount(t.curveLength(a,s,e,n,r,i)),l=0,c=0,h=1;h<=u;++h){var f=h/u;l=a+(e-a)*f,c=s+(n-s)*f,o.push(l+(e+(r-e)*f-l)*f,c+(n+(i-n)*f-c)*f)}},t}(),Bi=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,n){this.reset(),this.style=t,this.start=e,this.attribStart=n},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),zi=((Ni={})[Ut.POLY]=Pi,Ni[Ut.CIRC]=Oi,Ni[Ut.ELIP]=Oi,Ni[Ut.RECT]=Ii,Ni[Ut.RREC]=ki,Ni),Hi=[],Xi=[],Wi={buildPoly:Pi,buildCircle:Oi,buildRectangle:Ii,buildRoundedRectangle:ki,FILL_COMMANDS:zi,BATCH_POOL:Hi,DRAW_CALL_POOL:Xi,buildLine:Di,Star:Li,ArcUtils:Fi,BezierUtils:Ui,QuadraticUtils:ji,BatchPart:Bi},Gi=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=n,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),Vi=new Yt,Yi=new oe,qi=function(t){function e(){var e=t.call(this)||this;return e.uvsFloat32=null,e.indicesUint16=null,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.dirty=0,e.batchDirty=-1,e.cacheDirty=-1,e.clearDirty=0,e.drawCalls=[],e.batches=[],e.shapeIndex=0,e._bounds=new oe,e.boundsDirty=-1,e.boundsPadding=0,e.batchable=!1,e.indicesUint16=null,e.uvsFloat32=null,e.closePointEps=1e-4,e}return Si(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null);var i=new Gi(t,e,n,r);return this.graphicsData.push(i),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var n=new Gi(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e0&&(i=(r=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o65535&&t;this.indicesUint16=y?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native===!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t131070)return!1;for(var t=this.batches,n=0;n0&&((i=Xi.pop())||((i=new Cr).texArray=new Ar),this.drawCalls.push(i)),i.start=c,i.size=0,i.texArray.count=0,i.type=l),p.touched=1,p._batchEnabled=t,p._batchLocation=o,p.wrapMode=10497,i.texArray.elements[i.texArray.count++]=p,o++)),i.size+=h.size,c+=h.size,s=p._batchLocation,this.addColors(n,f.color,f.alpha,h.attribSize),this.addTextureIds(r,s,h.attribSize)}De._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(3*t.length*4),o=new Float32Array(i),a=new Uint32Array(i),s=0,u=0;u>16)+(65280&e)+((255&e)<<16),n);r-- >0;)t.push(i)},e.prototype.addTextureIds=function(t,e,n){for(;n-- >0;)t.push(e)},e.prototype.addUvs=function(t,e,n,r,i,o){void 0===o&&(o=null);for(var a=0,s=e.length,u=n.frame;a0&&t.alpha>0;return l?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:l},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new Gt,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new Gt,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return r===t&&i===e||n.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,n,r){this._initCurve();var i=this.currentPath.points;return 0===i.length&&this.moveTo(0,0),ji.curveTo(t,e,n,r,i),this},e.prototype.bezierCurveTo=function(t,e,n,r,i,o){return this._initCurve(),Ui.curveTo(t,e,n,r,i,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,n,r,i){this._initCurve(t,e);var o=this.currentPath.points,a=Fi.curveTo(t,e,n,r,i,o);if(a){var s=a.cx,u=a.cy,l=a.radius,c=a.startAngle,h=a.endAngle,f=a.anticlockwise;this.arc(s,u,l,c,h,f)}return this},e.prototype.arc=function(t,e,n,r,i,o){if(void 0===o&&(o=!1),r===i)return this;if(!o&&i<=r?i+=jt:o&&r<=i&&(r+=jt),0===i-r)return this;var a=t+Math.cos(r)*n,s=e+Math.sin(r)*n,u=this._geometry.closePointEps,l=this.currentPath?this.currentPath.points:null;if(l){var c=Math.abs(l[l.length-2]-a),h=Math.abs(l[l.length-1]-s);c0;return a?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:a},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,n,r){return this.drawShape(new Ht(t,e,n,r))},e.prototype.drawRoundedRect=function(t,e,n,r,i){return this.drawShape(new Vt(t,e,n,r,i))},e.prototype.drawCircle=function(t,e,n){return this.drawShape(new Xt(t,e,n))},e.prototype.drawEllipse=function(t,e,n,r){return this.drawShape(new Wt(t,e,n,r))},e.prototype.drawPolygon=function(){for(var t,e=arguments,n=[],r=0;r>16&255)/255*i,o.tint[1]=(r>>8&255)/255*i,o.tint[2]=(255&r)/255*i,o.tint[3]=i,t.shader.bind(e),t.geometry.bind(n,e),t.state.set(this.state);for(var s=0,u=a.length;s>16)+(65280&i)+((255&i)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,n=e.a,r=e.b,i=e.c,o=e.d,a=e.tx,s=e.ty,u=this._geometry.points,l=this.vertexData,c=0,h=0;h=r&&eo.x=i&&eo.y>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||$e.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(he),io=function(t,e){return(io=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};!function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(to||(to={}));var oo={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:to.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},ao=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],so=function(){function t(t){this.styleID=0,this.reset(),co(this,t,t)}return t.prototype.clone=function(){var e={};return co(e,this,oo),new t(e)},t.prototype.reset=function(){co(this,oo,oo)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=lo(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=lo(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var n=0;n=0;n--){var r=e[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&ao.indexOf(r)<0&&(r='"'+r+'"'),e[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function uo(t){return"number"===typeof t?ot(t):("string"===typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function lo(t){if(Array.isArray(t)){for(var e=0;ed)if(""!==a&&(s+=t.addLine(a),a="",o=0),t.canBreakWords(y,n.breakWords))for(var x=t.wordWrapSplit(y),w=0;wd&&(s+=t.addLine(a),p=!1,a="",o=0),a+=T,o+=O}else{a.length>0&&(s+=t.addLine(a),a="",o=0);var I=m===v.length-1;s+=t.addLine(y,!I),p=!1,a="",o=0}else _+o>d&&(p=!1,s+=t.addLine(a),a="",o=0),(a.length>0||!t.isBreakingSpace(y)||p)&&(a+=y,o+=_)}return s+=t.addLine(a,!1)},t.addLine=function(e,n){return void 0===n&&(n=!0),e=t.trimRight(e),e=n?e+"\n":e},t.getFromCache=function(t,e,n,r){var i=n[t];if(void 0===i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!==typeof e)return"";for(var n=e.length-1;n>=0;n--){var r=e[n];if(!t.isBreakingSpace(r))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"===typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e){return"string"===typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var n=[],r="";if("string"!==typeof e)return n;for(var i=0;is;--f){for(v=0;v0},t}();function go(t,e){var n=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r=0;e--)this.add(t.children[e]);return this},t.prototype.destroy=function(){this.ticking&&me.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();function Po(t,e){return e instanceof De&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function Oo(t,e){if(!(e instanceof Zi))return!1;var n=e.geometry;e.finishPoly(),n.updateBatches();for(var r=n.batches,i=0;i=r&&No.x=i&&No.y>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;ft(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(Zn),Yo=function(t){function e(e,n,r){var i=t.call(this)||this,o=new rn(e),a=new rn(n,!0),s=new rn(r,!0,!0);return i.addAttribute("aVertexPosition",o,2,!1,L.FLOAT).addAttribute("aTextureCoord",a,2,!1,L.FLOAT).addIndex(s),i._updateId=-1,i}return zo(e,t),Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(cn),qo=function(t,e){return(qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ko=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]},Qo=[function(){function t(){}return t.test=function(t){return"string"===typeof t&&0===t.indexOf("info face=")},t.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[]};for(var r in e){var i=e[r].match(/^[a-z]+/gm)[0],o=e[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),a={};for(var s in o){var u=o[s].split("="),l=u[0],c=u[1].replace(/"/gm,""),h=parseFloat(c),f=isNaN(h)?c:h;a[l]=f}n[i].push(a)}var p=new Ko;return n.info.forEach((function(t){return p.info.push({face:t.face,size:parseInt(t.size,10)})})),n.common.forEach((function(t){return p.common.push({lineHeight:parseInt(t.lineHeight,10)})})),n.page.forEach((function(t){return p.page.push({id:parseInt(t.id,10),file:t.file})})),n.char.forEach((function(t){return p.char.push({id:parseInt(t.id,10),page:parseInt(t.page,10),x:parseInt(t.x,10),y:parseInt(t.y,10),width:parseInt(t.width,10),height:parseInt(t.height,10),xoffset:parseInt(t.xoffset,10),yoffset:parseInt(t.yoffset,10),xadvance:parseInt(t.xadvance,10)})})),n.kerning.forEach((function(t){return p.kerning.push({first:parseInt(t.first,10),second:parseInt(t.second,10),amount:parseInt(t.amount,10)})})),p},t}(),function(){function t(){}return t.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face")},t.parse=function(t){for(var e=new Ko,n=t.getElementsByTagName("info"),r=t.getElementsByTagName("common"),i=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),a=t.getElementsByTagName("kerning"),s=0;s=l-E*s){if(0===g)throw new Error("[BitmapFont] textureHeight "+l+"px is too small for "+h.fontSize+"px fonts");--x,d=null,v=null,m=null,g=0,y=0,b=0}else if(b=Math.max(E+w.fontProperties.descent,b),S*s+y>=f)--x,g+=b*s,g=Math.ceil(g),y=0,b=0;else{Jo(d,v,w,y,g,s,h);var P=w.text.charCodeAt(0);p.char.push({id:P,page:_.length-1,x:y/s,y:g/s,width:S,height:E,xoffset:0,yoffset:0,xadvance:Math.ceil(T-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0))}),y+=(S+2*a)*s,y=Math.ceil(y)}}var O=new t(p,_);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=O,O},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),ea=[],na=[],ra=function(t){function e(n,r){void 0===r&&(r={});var i=t.call(this)||this;i._tint=16777215,r.font&&(St("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),i._upgradeStyle(r));var o=Object.assign({},e.styleDefaults,r),a=o.align,s=o.tint,u=o.maxWidth,l=o.letterSpacing,c=o.fontName,h=o.fontSize;if(!ta.available[c])throw new Error('Missing BitmapFont "'+c+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=a,i._tint=s,i._fontName=c,i._fontSize=h||ta.available[c].size,i._text=n,i._maxWidth=u,i._maxLineHeight=0,i._letterSpacing=l,i._anchor=new qt((function(){i.dirty=!0}),i,0,0),i.roundPixels=V.ROUND_PIXELS,i.dirty=!0,i}return function(t,e){function n(){this.constructor=t}qo(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.updateText=function(){for(var t,e=ta.available[this._fontName],n=this._fontSize/e.size,r=new Yt,i=[],o=[],a=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",s=a.length,u=this._maxWidth*e.size/this._fontSize,l=null,c=0,h=0,f=0,p=-1,d=0,v=0,m=0,y=0;y0&&r.x>u&&(_t(i,1+p-++v,1+y-p),y=p,p=-1,o.push(d),h=Math.max(h,d),f++,r.x=0,r.y+=e.lineHeight,l=null)}}else o.push(c),h=Math.max(h,c),++f,++v,r.x=0,r.y+=e.lineHeight,l=null}var w=a.charAt(a.length-1);"\r"!==w&&"\n"!==w&&(/(?:\s)/.test(w)&&(c=d),o.push(c),h=Math.max(h,c));var T=[];for(y=0;y<=f;y++){var E=0;"right"===this._align?E=h-o[y]:"center"===this._align&&(E=(h-o[y])/2),T.push(E)}var S=i.length,P={},O=[],I=this._activePagesMeshData;for(y=0;y6*M&&!(B.vertices.length<2*Go.BATCHABLE_SIZE)||(B.vertices=new Float32Array(8*M),B.uvs=new Float32Array(8*M),B.indices=new Uint16Array(6*M)),B.mesh.size=6*M}for(y=0;y=2&&(t.fontSize=parseInt(e[0],10))}else t.fontName=t.font.name,t.fontSize="number"===typeof t.font.size?t.font.size:parseInt(t.font.size,10)},e.registerFont=function(t,e){return St("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),ta.install(t,e)},Object.defineProperty(e,"fonts",{get:function(){return St("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),ta.available},enumerable:!1,configurable:!0}),e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},e}(he),ia=function(){function t(){}return t.add=function(){ci.setExtensionXhrType("fnt",ci.XHR_RESPONSE_TYPE.DOCUMENT)},t.use=function(e,n){var r=$o(e.data);if(r)for(var i=t.getBaseUrl(this,e),o=r.parse(e.data),a={},s=function(t){a[t.metadata.pageFile]=t.texture,Object.keys(a).length===o.page.length&&(e.bitmapFont=ta.install(o,a),n())},u=0;u=r&&(e=t-a-1),o+=s=s.replace("%value%",n[e].toString()),o+="\n"}return(i=i.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(a=t.call(this,s,u)||this).horizontal=e,a.resolution=i,a._quality=0,a.quality=r,a.blur=n,a}return ua(e,t),e.prototype.apply=function(t,e,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/e.width):this.uniforms.strength=1/n.height*(n.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{var i=t.getFilterTexture(),o=t.renderer,a=e,s=i;this.state.blend=!1,t.applyFilter(this,a,s,xa.CLEAR);for(var u=1;u 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",n)||this).alpha=1,e}return function(t,e){function n(){this.constructor=t}Aa(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var n=t;e&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19]+e[4],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19]+e[9],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19]+e[14],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),i=1/3,o=(0,Math.sqrt)(i),a=[n+(1-n)*i,i*(1-n)-o*r,i*(1-n)+o*r,0,0,i*(1-n)+o*r,n+i*(1-n),i*(1-n)-o*r,0,0,i*(1-n)-o*r,i*(1-n)+o*r,n+i*(1-n),0,0,0,0,0,1,0];this._loadMatrix(a,e)},e.prototype.contrast=function(t,e){var n=(t||0)+1,r=-.5*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var n=2*t/3+1,r=-.5*(n-1),i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,n,r,i){var o=((n=n||16770432)>>16&255)/255,a=(n>>8&255)/255,s=(255&n)/255,u=((r=r||3375104)>>16&255)/255,l=(r>>8&255)/255,c=(255&r)/255,h=[.3,.59,.11,0,0,o,a,s,t=t||.2,0,u,l,c,e=e||.15,0,o-u,a-l,s-c,0,0];this._loadMatrix(h,i)},e.prototype.night=function(t,e){var n=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.predator=function(t,e){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(tr);ka.prototype.grayscale=ka.prototype.greyscale;var Ma=function(t,e){return(Ma=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ra=function(t){function e(e,n){var r=this,i=new Kt;return e.renderable=!1,(r=t.call(this,"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,r.maskMatrix=i,null!==n&&void 0!==n||(n=20),r.scale=new Yt(n,n),r}return function(t,e){function n(){this.constructor=t}Ma(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.apply=function(t,e,n,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var i=this.maskSprite.worldTransform,o=Math.sqrt(i.a*i.a+i.b*i.b),a=Math.sqrt(i.c*i.c+i.d*i.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=i.a/o,this.uniforms.rotation[1]=i.b/o,this.uniforms.rotation[2]=i.c/a,this.uniforms.rotation[3]=i.d/a),t.applyFilter(this,e,n,r)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(tr),Da=function(t,e){return(Da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Na=function(t){function e(){return t.call(this,"\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n')||this}return function(t,e){function n(){this.constructor=t}Da(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(tr),La=function(t,e){return(La=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Fa=function(t){function e(e,n){void 0===e&&(e=.5),void 0===n&&(n=Math.random());var r=t.call(this,Ir,"precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",{uNoise:0,uSeed:0})||this;return r.noise=e,r.seed=n,r}return function(t,e){function n(){this.constructor=t}La(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t},enumerable:!1,configurable:!0}),e}(tr),Ua=new Kt;ue.prototype._cacheAsBitmap=!1,ue.prototype._cacheData=null;var ja=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(ue.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new ja),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),ue.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},ue.prototype._initCachedDisplayObject=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var n=this.getLocalBounds(null,!0).clone();if(this.filters){var r=this.filters[0].padding;n.pad(r)}n.ceil(V.RESOLUTION);var i=t.renderTexture.current,o=t.renderTexture.sourceFrame.clone(),a=t.projection.transform,s=Je.create({width:n.width,height:n.height}),u="cacheAsBitmap_"+Tt();this._cacheData.textureCacheId=u,De.addToCache(s.baseTexture,u),$e.addToCache(s,u);var l=this.transform.localTransform.copyTo(Ua).invert().translate(-n.x,-n.y);this.render=this._cacheData.originalRender,t.render(this,s,!0,l,!1),t.projection.transform=a,t.renderTexture.bind(i,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var c=new ro(s);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-n.x/n.width,c.anchor.y=-n.y/n.height,c.alpha=e,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=c.containsPoint.bind(c)}},ue.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},ue.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var r=t.context,i=t._projTransform;e.ceil(V.RESOLUTION);var o=Je.create({width:e.width,height:e.height}),a="cacheAsBitmap_"+Tt();this._cacheData.textureCacheId=a,De.addToCache(o.baseTexture,a),$e.addToCache(o,a);var s=Ua;this.transform.localTransform.copyTo(s),s.invert(),s.tx-=e.x,s.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,o,!0,s,!1),t.context=r,t._projTransform=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var u=new ro(o);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-e.x/e.width,u.anchor.y=-e.y/e.height,u.alpha=n,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)}},ue.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},ue.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},ue.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,De.removeFromCache(this._cacheData.textureCacheId),$e.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},ue.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},ue.prototype.name=null,he.prototype.getChildByName=function(t,e){for(var n=0,r=this.children.length;n0){var f=s.x-t[c].x,p=s.y-t[c].y,d=Math.sqrt(f*f+p*p);s=t[c],a+=d/u}else a=c/(l-1);i[h]=a,i[h+1]=0,i[h+2]=a,i[h+3]=1}var v=0;for(c=0;c0?this.textureScale*this._width/2:this._width/2;r/=c,i/=c,r*=h,i*=h,o[l]=u.x+r,o[l+1]=u.y+i,o[l+2]=u.x-r,o[l+3]=u.y-i,n=u}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Yo),Wa=function(t){function e(e,n,r){void 0===r&&(r=0);var i=this,o=new Xa(e.height,n,r),a=new Vo(e);return r>0&&(e.baseTexture.wrapMode=U.REPEAT),(i=t.call(this,o,a)||this).autoUpdate=!0,i}return za(e,t),e.prototype._render=function(e){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,e)},e}(Go),Ga=function(t){function e(e,n,r){var i=this,o=new Ha(e.width,e.height,n,r),a=new Vo($e.WHITE);return(i=t.call(this,o,a)||this).texture=e,i}return za(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry;t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build()},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e}(Go),Va=function(t){function e(e,n,r,i,o){void 0===e&&(e=$e.EMPTY);var a=this,s=new Yo(n,r,i);s.getBuffer("aVertexPosition").static=!1;var u=new Vo(e);return(a=t.call(this,s,u,null,o)||this).autoUpdate=!0,a}return za(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(Go),Ya=function(t){function e(e,n,r,i,o){void 0===n&&(n=10),void 0===r&&(r=10),void 0===i&&(i=10),void 0===o&&(o=10);var a=t.call(this,$e.WHITE,4,4)||this;return a._origWidth=e.orig.width,a._origHeight=e.orig.height,a._width=a._origWidth,a._height=a._origHeight,a._leftWidth=n,a._rightWidth=i,a._topHeight=r,a._bottomHeight=o,a.texture=e,a}return za(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,n=this._topHeight+this._bottomHeight,r=this._height>n?1:this._height/n;return Math.min(e,r)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var n=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},e}(Ga),qa=function(t,e){return(qa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var Ka=function(t){function e(e,n){void 0===n&&(n=!0);var r=t.call(this,e[0]instanceof $e?e[0]:e[0].texture)||this;return r._textures=null,r._durations=null,r._autoUpdate=n,r._isConnectedToTicker=!1,r.animationSpeed=1,r.loop=!0,r.updateAnchor=!1,r.onComplete=null,r.onFrameChange=null,r.onLoop=null,r._currentTime=0,r._playing=!1,r._previousFrame=null,r.textures=e,r}return function(t,e){function n(){this.constructor=t}qa(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(me.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(me.shared.add(this.update,this,pe.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){var e=this.animationSpeed*t,n=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):n!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramen)&&this.onLoop(),this.updateTexture())},e.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var n=[],r=0;r=0||(i[n]=t[n]);return i}var p=n(29),d=n.n(p),v=n(27),m="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect,y=[],g=[null,null];function b(t,e){var n=t[1];return[e.payload,n+1]}function _(t,e,n){m((function(){return t.apply(void 0,e)}),n)}function x(t,e,n,r,i,o,a){t.current=r,e.current=i,n.current=!1,o.current&&(o.current=null,a())}function w(t,e,n,r,i,o,a,s,u,l){if(t){var c=!1,h=null,f=function(){if(!c){var t,n,f=e.getState();try{t=r(f,i.current)}catch(p){n=p,h=p}n||(h=null),t===o.current?a.current||u():(o.current=t,s.current=t,a.current=!0,l({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}}var T=function(){return[null,0]};function E(t,e){void 0===e&&(e={});var n=e,a=n.getDisplayName,s=void 0===a?function(t){return"ConnectAdvanced("+t+")"}:a,u=n.methodName,c=void 0===u?"connectAdvanced":u,p=n.renderCountProp,m=void 0===p?void 0:p,E=n.shouldHandleStateChanges,S=void 0===E||E,P=n.storeKey,O=void 0===P?"store":P,I=(n.withRef,n.forwardRef),C=void 0!==I&&I,A=n.context,k=void 0===A?o:A,M=f(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),R=k;return function(e){var n=e.displayName||e.name||"Component",o=s(n),a=h({},M,{getDisplayName:s,methodName:c,renderCountProp:m,shouldHandleStateChanges:S,storeKey:O,displayName:o,wrappedComponentName:n,WrappedComponent:e}),u=M.pure;var p=u?r.useMemo:function(t){return t()};function E(n){var o=Object(r.useMemo)((function(){var t=n.reactReduxForwardedRef,e=f(n,["reactReduxForwardedRef"]);return[n.context,t,e]}),[n]),s=o[0],u=o[1],c=o[2],d=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(v.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:R}),[s,R]),m=Object(r.useContext)(d),E=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(m)&&Boolean(m.store);var P=E?n.store:m.store,O=Object(r.useMemo)((function(){return function(e){return t(e.dispatch,a)}(P)}),[P]),I=Object(r.useMemo)((function(){if(!S)return g;var t=new l(P,E?null:m.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[P,E,m]),C=I[0],A=I[1],k=Object(r.useMemo)((function(){return E?m:h({},m,{subscription:C})}),[E,m,C]),M=Object(r.useReducer)(b,y,T),D=M[0][0],N=M[1];if(D&&D.error)throw D.error;var L=Object(r.useRef)(),F=Object(r.useRef)(c),U=Object(r.useRef)(),j=Object(r.useRef)(!1),B=p((function(){return U.current&&c===F.current?U.current:O(P.getState(),c)}),[P,D,c]);_(x,[F,L,j,c,B,U,A]),_(w,[S,P,C,O,F,L,j,U,A,N],[P,C,O]);var z=Object(r.useMemo)((function(){return i.a.createElement(e,h({},B,{ref:u}))}),[u,e,B]);return Object(r.useMemo)((function(){return S?i.a.createElement(d.Provider,{value:k},z):z}),[d,z,k])}var P=u?i.a.memo(E):E;if(P.WrappedComponent=e,P.displayName=o,C){var I=i.a.forwardRef((function(t,e){return i.a.createElement(P,h({},t,{reactReduxForwardedRef:e}))}));return I.displayName=o,I.WrappedComponent=e,d()(I,e)}return d()(P,e)}}function S(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function P(t,e){if(S(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function j(t,e){return t===e}function B(t){var e=void 0===t?{}:t,n=e.connectHOC,r=void 0===n?E:n,i=e.mapStateToPropsFactories,o=void 0===i?M:i,a=e.mapDispatchToPropsFactories,s=void 0===a?k:a,u=e.mergePropsFactories,l=void 0===u?D:u,c=e.selectorFactory,p=void 0===c?F:c;return function(t,e,n,i){void 0===i&&(i={});var a=i,u=a.pure,c=void 0===u||u,d=a.areStatesEqual,v=void 0===d?j:d,m=a.areOwnPropsEqual,y=void 0===m?P:m,g=a.areStatePropsEqual,b=void 0===g?P:g,_=a.areMergedPropsEqual,x=void 0===_?P:_,w=f(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),T=U(t,o,"mapStateToProps"),E=U(e,s,"mapDispatchToProps"),S=U(n,l,"mergeProps");return r(p,h({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:T,initMapDispatchToProps:E,initMergeProps:S,pure:c,areStatesEqual:v,areOwnPropsEqual:y,areStatePropsEqual:b,areMergedPropsEqual:x},w))}}var z=B();var H,X=n(12);H=X.unstable_batchedUpdates,a=H},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(22);function i(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?u(t)+e:e}function c(){return!0}function h(t,e,n){return(0===t&&!v(t)||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function f(t,e){return d(t,e,0)}function p(t,e){return d(t,e,e)}function d(t,e,n){return void 0===t?n:v(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function v(t){return t<0||0===t&&1/t===-1/0}var m="@@__IMMUTABLE_ITERABLE__@@";function y(t){return Boolean(t&&t[m])}var g="@@__IMMUTABLE_KEYED__@@";function b(t){return Boolean(t&&t[g])}var _="@@__IMMUTABLE_INDEXED__@@";function x(t){return Boolean(t&&t[_])}function w(t){return b(t)||x(t)}var T=function(t){return y(t)?t:V(t)},E=function(t){function e(t){return b(t)?t:Y(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T),S=function(t){function e(t){return x(t)?t:q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T),P=function(t){function e(t){return y(t)&&!w(t)?t:K(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(T);T.Keyed=E,T.Indexed=S,T.Set=P;var O="@@__IMMUTABLE_SEQ__@@";function I(t){return Boolean(t&&t[O])}var C="@@__IMMUTABLE_RECORD__@@";function A(t){return Boolean(t&&t[C])}function k(t){return y(t)||A(t)}var M="@@__IMMUTABLE_ORDERED__@@";function R(t){return Boolean(t&&t[M])}var D="function"===typeof Symbol&&Symbol.iterator,N="@@iterator",L=D||N,F=function(t){this.next=t};function U(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function j(){return{value:void 0,done:!0}}function B(t){return!!X(t)}function z(t){return t&&"function"===typeof t.next}function H(t){var e=X(t);return e&&e.call(t)}function X(t){var e=t&&(D&&t[D]||t["@@iterator"]);if("function"===typeof e)return e}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=0,F.VALUES=1,F.ENTRIES=2,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[L]=function(){return this};var W=Object.prototype.hasOwnProperty;function G(t){return!(!Array.isArray(t)&&"string"!==typeof t)||t&&"object"===typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var V=function(t){function e(t){return null===t||void 0===t?tt():k(t)?t.toSeq():function(t){var e=rt(t);if(e)return e;if("object"===typeof t)return new $(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[e?r-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var n=this._cache;if(n){var r=n.length,i=0;return new F((function(){if(i===r)return{value:void 0,done:!0};var o=n[e?r-++i:i++];return U(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(T),Y=function(t){function e(t){return null===t||void 0===t?tt().toKeyedSeq():y(t)?b(t)?t.toSeq():t.fromEntrySeq():A(t)?t.toSeq():et(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(V),q=function(t){function e(t){return null===t||void 0===t?tt():y(t)?b(t)?t.entrySeq():t.toIndexedSeq():A(t)?t.toSeq().entrySeq():nt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(V),K=function(t){function e(t){return(y(t)&&!w(t)?t:q(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(V);V.isSeq=I,V.Keyed=Y,V.Set=K,V.Indexed=q,V.prototype[O]=!0;var Q=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[l(this,t)]:e},e.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length,i=0;i!==r;){var o=e?r-++i:i++;if(!1===t(n[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var n=this._array,r=n.length,i=0;return new F((function(){if(i===r)return{value:void 0,done:!0};var o=e?r-++i:i++;return U(t,o,n[o])}))},e}(q),$=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return W.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[e?i-++o:o++];if(!1===t(n[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length,o=0;return new F((function(){if(o===i)return{value:void 0,done:!0};var a=r[e?i-++o:o++];return U(t,a,n[a])}))},e}(Y);$.prototype[M]=!0;var Z,J=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=H(this._collection),r=0;if(z(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=H(this._collection);if(!z(n))return new F(j);var r=0;return new F((function(){var e=n.next();return e.done?e:U(t,r++,e.value)}))},e}(q);function tt(){return Z||(Z=new Q([]))}function et(t){var e=Array.isArray(t)?new Q(t):B(t)?new J(t):void 0;if(e)return e.fromEntrySeq();if("object"===typeof t)return new $(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function nt(t){var e=rt(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function rt(t){return G(t)?new Q(t):B(t)?new J(t):void 0}var it="@@__IMMUTABLE_MAP__@@";function ot(t){return Boolean(t&&t[it])}function at(t){return ot(t)&&R(t)}function st(t){return Boolean(t&&"function"===typeof t.equals&&"function"===typeof t.hashCode)}function ut(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"===typeof t.valueOf&&"function"===typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(st(t)&&st(e)&&t.equals(e))}var lt="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function ct(t){return t>>>1&1073741824|3221225471&t}var ht=Object.prototype.valueOf;function ft(t){switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return function(t){if(t!==t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return ct(e)}(t);case"string":return t.length>_t?function(t){var e=Tt[t];void 0===e&&(e=pt(t),wt===xt&&(wt=0,Tt={}),wt++,Tt[t]=e);return e}(t):pt(t);case"object":case"function":return null===t?1108378658:"function"===typeof t.hashCode?ct(t.hashCode(t)):(t.valueOf!==ht&&"function"===typeof t.valueOf&&(t=t.valueOf(t)),function(t){var e;if(yt&&void 0!==(e=mt.get(t)))return e;if(void 0!==(e=t[bt]))return e;if(!vt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[bt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++gt,1073741824>&&(gt=0);if(yt)mt.set(t,e);else{if(void 0!==dt&&!1===dt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(vt)Object.defineProperty(t,bt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[bt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[bt]=e}}return e}(t));case"undefined":return 1108378659;default:if("function"===typeof t.toString)return pt(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function pt(t){for(var e=0,n=0;n=0&&(c.get=function(e,n){return(e=l(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return r||1===e||t.done?t:U(e,u-1,0===e?void 0:t.value[1],t)}))},c}function Rt(t,e,n,r){var i=Xt(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,l){if(!s||!(s=e.call(n,t,o,l)))return u++,i(t,r?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),u=!0,l=0;return new F((function(){var t,o,c;do{if((t=s.next()).done)return r||1===i?t:U(i,l++,0===i?void 0:t.value[1],t);var h=t.value;o=h[0],c=h[1],u&&(u=e.call(n,c,o,a))}while(u);return 2===i?t:U(i,o,c,t)}))},i}function Dt(t,e){var n=b(t),r=[t].concat(e).map((function(t){return y(t)?n&&(t=E(t)):t=n?et(t):nt(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&b(i)||x(t)&&x(i))return i}var o=new Q(r);return n?o=o.toKeyedSeq():x(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=r.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),o}function Nt(t,e,n){var r=Xt(t);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,l){u.__iterate((function(o,u){return(!e||l0}function jt(t,e,n,r){var i=Xt(t),o=new Q(n).map((function(t){return t.size}));return i.size=r?o.max():o.min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=n.map((function(t){return t=T(t),H(i?t.reverse():t)})),a=0,s=!1;return new F((function(){var n;return s||(n=o.map((function(t){return t.next()})),s=r?n.every((function(t){return t.done})):n.some((function(t){return t.done}))),s?{value:void 0,done:!0}:U(t,a++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Bt(t,e){return t===e?t:I(t)?e:t.constructor(e)}function zt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ht(t){return b(t)?E:x(t)?S:P}function Xt(t){return Object.create((b(t)?Y:x(t)?q:K).prototype)}function Wt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function Gt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[n]=arguments[n+1];if("function"!==typeof t)throw new TypeError("Invalid merger function: "+t);return ve(this,e,t)}function ve(t,e,n){for(var r=[],i=0;i0;)e[n]=arguments[n+1];return xe(t,e)}function ye(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return xe(e,n,t)}function ge(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return _e(t,e)}function be(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return _e(e,n,t)}function _e(t,e,n){return xe(t,e,function(t){function e(n,r,i){return $t(n)&&$t(r)?xe(n,[r],e):t?t(n,r,i):r}return e}(n))}function xe(t,e,n){if(!$t(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(k(t))return"function"===typeof n&&t.mergeWith?t.mergeWith.apply(t,[n].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var r=Array.isArray(t),i=t,o=r?S:E,a=r?function(e){i===t&&(i=ee(i)),i.push(e)}:function(e,r){var o=W.call(i,r),a=o&&n?n(i[r],e,r):e;o&&a===i[r]||(i===t&&(i=ee(i)),i[r]=a)},s=0;s0;)e[n]=arguments[n+1];return _e(this,e,t)}function Ee(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ie(this,t,He(),(function(t){return xe(t,e)}))}function Se(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return ie(this,t,He(),(function(t){return _e(t,e)}))}function Pe(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Oe(){return this.__ownerID?this:this.__ensureOwner(new s)}function Ie(){return this.__ensureOwner()}function Ce(){return this.__altered}St.prototype.cacheResult=Et.prototype.cacheResult=Pt.prototype.cacheResult=Ot.prototype.cacheResult=Wt;var Ae=function(t){function e(e){return null===e||void 0===e?He():ot(e)&&!R(e)?e:He().withMutations((function(n){var r=t(e);qt(r.size),r.forEach((function(t,e){return n.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return He().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Xe(this,t,e)},e.prototype.remove=function(t){return Xe(this,t,o)},e.prototype.deleteAll=function(t){var e=T(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):He()},e.prototype.sort=function(t){return vn(Lt(this,t))},e.prototype.sortBy=function(t,e){return vn(Lt(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(n){n.forEach((function(r,i){n.set(i,t.call(e,r,i,n))}))}))},e.prototype.__iterator=function(t,e){return new Ue(this,t,e)},e.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?ze(this.size,this._root,t,this.__hash):0===this.size?He():(this.__ownerID=t,this.__altered=!1,this)},e}(E);Ae.isMap=ot;var ke=Ae.prototype;ke[it]=!0,ke.delete=ke.remove,ke.removeAll=ke.deleteAll,ke.setIn=se,ke.removeIn=ke.deleteIn=le,ke.update=he,ke.updateIn=fe,ke.merge=ke.concat=pe,ke.mergeWith=de,ke.mergeDeep=we,ke.mergeDeepWith=Te,ke.mergeIn=Ee,ke.mergeDeepIn=Se,ke.withMutations=Pe,ke.wasAltered=Ce,ke.asImmutable=Ie,ke["@@transducer/init"]=ke.asMutable=Oe,ke["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},ke["@@transducer/result"]=function(t){return t.asImmutable()};var Me=function(t,e){this.ownerID=t,this.entries=e};Me.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o=Ke)return function(t,e,n,r){t||(t=new s);for(var i=new Le(t,ft(n),[n,r]),o=0;o>>t)&i),a=this.bitmap;return 0===(a&o)?r:this.nodes[Ye(a&o-1)].get(t+5,e,n,r)},Re.prototype.update=function(t,e,n,a,s,u,l){void 0===n&&(n=ft(a));var c=(0===e?n:n>>>e)&i,h=1<=Qe)return function(t,e,n,i,o){for(var a=0,s=new Array(r),u=0;0!==n;u++,n>>>=1)s[u]=1&n?e[a++]:void 0;return s[i]=o,new De(t,a+1,s)}(t,v,f,c,y);if(p&&!y&&2===v.length&&Ge(v[1^d]))return v[1^d];if(p&&y&&1===v.length&&Ge(y))return y;var g=t&&t===this.ownerID,b=p?y?f:f^h:f|h,_=p?y?qe(v,d,y,g):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;a>>t)&i,a=this.nodes[o];return a?a.get(t+5,e,n,r):r},De.prototype.update=function(t,e,n,r,a,s,u){void 0===n&&(n=ft(r));var l=(0===e?n:n>>>e)&i,c=a===o,h=this.nodes,f=h[l];if(c&&!f)return this;var p=We(f,t,e+5,n,r,a,s,u);if(p===f)return this;var d=this.count;if(f){if(!p&&--d<$e)return function(t,e,n,r){for(var i=0,o=0,a=new Array(n),s=0,u=1,l=e.length;s>>n)&i,u=(0===n?r:r>>>n)&i,l=s===u?[Ve(t,e,n+5,r,o)]:(a=new Le(e,r,o),s>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function qe(t,e,n,r){var i=r?t:Vt(t);return i[e]=n,i}var Ke=8,Qe=16,$e=8,Ze="@@__IMMUTABLE_LIST__@@";function Je(t){return Boolean(t&&t[Ze])}var tn=function(t){function e(e){var n=un();if(null===e||void 0===e)return n;if(Je(e))return e;var i=t(e),o=i.size;return 0===o?n:(qt(o),o>0&&o=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?fn(t,e).set(0,n):fn(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o={value:!1};e>=pn(t._capacity)?r=ln(r,t.__ownerID,0,e,n,o):i=ln(i,t.__ownerID,t._level,e,n,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t;return sn(t._origin,t._capacity,t._level,i,r)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):un()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){fn(n,0,e+t.length);for(var r=0;r>>e&i;if(r>=this.array.length)return new nn([],t);var o,a=0===r;if(e>0){var s=this.array[r];if((o=s&&s.removeBefore(t,e-5,n))===s&&a)return this}if(a&&!o)return this;var u=cn(this,t);if(!a)for(var l=0;l>>e&i;if(o>=this.array.length)return this;if(e>0){var a=this.array[o];if((r=a&&a.removeAfter(t,e-5,n))===a&&o===this.array.length-1)return this}var s=cn(this,t);return s.array.splice(o+1),r&&(s.array[o]=r),s};var rn,on={};function an(t,e){var n=t._origin,i=t._capacity,o=pn(i),a=t._tail;return s(t._root,t._level,0);function s(t,u,l){return 0===u?function(t,s){var u=s===o?a&&a.array:t&&t.array,l=s>n?0:n-s,c=i-s;c>r&&(c=r);return function(){if(l===c)return on;var t=e?--c:l++;return u&&u[t]}}(t,l):function(t,o,a){var u,l=t&&t.array,c=a>n?0:n-a>>o,h=1+(i-a>>o);h>r&&(h=r);return function(){for(;;){if(u){var t=u();if(t!==on)return t;u=null}if(c===h)return on;var n=e?--h:c++;u=s(l&&l[n],o-5,a+(n<>>n&i,c=t&&l0){var h=t&&t.array[l],f=ln(h,e,n-5,r,o,s);return f===h?t:((u=cn(t,e)).array[l]=f,u)}return c&&t.array[l]===o?t:(s&&a(s),u=cn(t,e),void 0===o&&l===u.array.length-1?u.array.pop():u.array[l]=o,u)}function cn(t,e){return e&&t&&e===t.ownerID?t:new nn(t?t.array.slice():[],e)}function hn(t,e){if(e>=pn(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&i],r-=5;return n}}function fn(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new s,o=t._origin,a=t._capacity,u=o+e,l=void 0===n?a:n<0?a+n:o+n;if(u===o&&l===a)return t;if(u>=l)return t.clear();for(var c=t._level,h=t._root,f=0;u+f<0;)h=new nn(h&&h.array.length?[void 0,h]:[],r),f+=1<<(c+=5);f&&(u+=f,o+=f,l+=f,a+=f);for(var p=pn(a),d=pn(l);d>=1<p?new nn([],r):v;if(v&&d>p&&u5;g-=5){var b=p>>>g&i;y=y.array[b]=cn(y.array[b],r)}y.array[p>>>5&i]=v}if(l=d)u-=d,l-=d,c=5,h=null,m=m&&m.removeBefore(r,0,u);else if(u>o||d>>c&i;if(_!==d>>>c&i)break;_&&(f+=(1<o&&(h=h.removeBefore(r,c,u-f)),h&&d>>5<<5}var dn,vn=function(t){function e(t){return null===t||void 0===t?yn():at(t)?t:yn().withMutations((function(e){var n=E(t);qt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):yn()},e.prototype.set=function(t,e){return gn(this,t,e)},e.prototype.remove=function(t){return gn(this,t,o)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?mn(e,n,t,this.__hash):0===this.size?yn():(this.__ownerID=t,this._map=e,this._list=n,this)},e}(Ae);function mn(t,e,n,r){var i=Object.create(vn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function yn(){return dn||(dn=mn(He(),un()))}function gn(t,e,n){var i,a,s=t._map,u=t._list,l=s.get(e),c=void 0!==l;if(n===o){if(!c)return t;u.size>=r&&u.size>=2*s.size?(i=(a=u.filter((function(t,e){return void 0!==t&&l!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(i.__ownerID=a.__ownerID=t.__ownerID)):(i=s.remove(e),a=l===u.size-1?u.pop():u.set(l,void 0))}else if(c){if(n===u.get(l)[1])return t;i=s,a=u.set(l,[e,n])}else i=s.set(e,u.size),a=u.set(u.size,[e,n]);return t.__ownerID?(t.size=i.size,t._map=i,t._list=a,t.__hash=void 0,t):mn(i,a)}vn.isOrderedMap=at,vn.prototype[M]=!0,vn.prototype.delete=vn.prototype.remove;var bn="@@__IMMUTABLE_STACK__@@";function _n(t){return Boolean(t&&t[bn])}var xn=function(t){function e(t){return null===t||void 0===t?Sn():_n(t)?t:Sn().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var n=this._head;for(t=l(this,t);n&&t--;)n=n.next;return n?n.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:t[r],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):En(e,n)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&_n(e))return e;qt(e.size);var n=this.size,r=this._head;return e.__iterate((function(t){n++,r={value:t,next:r}}),!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):En(n,r)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Sn()},e.prototype.slice=function(e,n){if(h(e,n,this.size))return this;var r=f(e,this.size);if(p(n,this.size)!==this.size)return t.prototype.slice.call(this,e,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):En(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?En(this.size,this._head,t,this.__hash):0===this.size?Sn():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var n=this;if(e)return new Q(this.toArray()).__iterate((function(e,r){return t(e,r,n)}),e);for(var r=0,i=this._head;i&&!1!==t(i.value,r++,this);)i=i.next;return r},e.prototype.__iterator=function(t,e){if(e)return new Q(this.toArray()).__iterator(t,e);var n=0,r=this._head;return new F((function(){if(r){var e=r.value;return r=r.next,U(t,n++,e)}return{value:void 0,done:!0}}))},e}(S);xn.isStack=_n;var wn,Tn=xn.prototype;function En(t,e,n,r){var i=Object.create(Tn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Sn(){return wn||(wn=En(0))}Tn[bn]=!0,Tn.shift=Tn.pop,Tn.unshift=Tn.push,Tn.unshiftAll=Tn.pushAll,Tn.withMutations=Pe,Tn.wasAltered=Ce,Tn.asImmutable=Ie,Tn["@@transducer/init"]=Tn.asMutable=Oe,Tn["@@transducer/step"]=function(t,e){return t.unshift(e)},Tn["@@transducer/result"]=function(t){return t.asImmutable()};var Pn="@@__IMMUTABLE_SET__@@";function On(t){return Boolean(t&&t[Pn])}function In(t){return On(t)&&R(t)}function Cn(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||b(t)!==b(e)||x(t)!==x(e)||R(t)!==R(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!w(t);if(R(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&ut(i[1],t)&&(n||ut(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"===typeof t.cacheResult&&t.cacheResult();else{i=!0;var a=t;t=e,e=a}var s=!0,u=e.__iterate((function(e,r){if(n?!t.has(e):i?!ut(e,t.get(r,o)):!ut(t.get(r,o),e))return s=!1,!1}));return s&&t.size===u}function An(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function kn(t){if(!t||"object"!==typeof t)return t;if(!y(t)){if(!$t(t))return t;t=V(t)}if(b(t)){var e={};return t.__iterate((function(t,n){e[n]=kn(t)})),e}var n=[];return t.__iterate((function(t){n.push(kn(t))})),n}var Mn=function(t){function e(e){return null===e||void 0===e?Fn():On(e)&&!R(e)?e:Fn().withMutations((function(n){var r=t(e);qt(r.size),r.forEach((function(t){return n.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.intersect=function(t){return(t=T(t).toArray()).length?Dn.intersect.apply(e(t.pop()),t):Fn()},e.union=function(t){return(t=T(t).toArray()).length?Dn.union.apply(e(t.pop()),t):Fn()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Nn(this,this._map.set(t,t))},e.prototype.remove=function(t){return Nn(this,this._map.remove(t))},e.prototype.clear=function(){return Nn(this,this._map.clear())},e.prototype.map=function(t,e){var n=this,r=[],i=[];return this.forEach((function(o){var a=t.call(e,o,o,n);a!==o&&(r.push(o),i.push(a))})),this.withMutations((function(t){r.forEach((function(e){return t.remove(e)})),i.forEach((function(e){return t.add(e)}))}))},e.prototype.union=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(n){for(var r=0;r=0&&e=0&&n>>-15,461845907),e=lt(e<<13|e>>>-13,5),e=lt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=ct((e=lt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+tr(ft(t),ft(e))|0}:function(t,e){r=r+tr(ft(t),ft(e))|0}:e?function(t){r=31*r+ft(t)|0}:function(t){r=r+ft(t)|0}),r)}(this))}});var Wn=T.prototype;Wn[m]=!0,Wn[L]=Wn.values,Wn.toJSON=Wn.toArray,Wn.__toStringMapper=Zt,Wn.inspect=Wn.toSource=function(){return this.toString()},Wn.chain=Wn.flatMap,Wn.contains=Wn.includes,An(E,{flip:function(){return Bt(this,It(this))},mapEntries:function(t,e){var n=this,r=0;return Bt(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Bt(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var Gn=E.prototype;Gn[g]=!0,Gn[L]=Wn.entries,Gn.toJSON=Xn,Gn.__toStringMapper=function(t,e){return Zt(e)+": "+Zt(t)},An(S,{toKeyedSeq:function(){return new Et(this,!1)},filter:function(t,e){return Bt(this,kt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Bt(this,At(this,!1))},slice:function(t,e){return Bt(this,Mt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(e||0,0),0===n||2===n&&!e)return this;t=f(t,t<0?this.count():this.size);var r=this.slice(0,t);return Bt(this,1===n?r:r.concat(Vt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Bt(this,Nt(this,t,!1))},get:function(t,e){return(t=l(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=l(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function tr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Vn[_]=!0,Vn[M]=!0,An(P,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),P.prototype.has=Wn.includes,P.prototype.contains=P.prototype.includes,An(Y,E.prototype),An(q,S.prototype),An(K,P.prototype);var er=function(t){function e(t){return null===t||void 0===t?or():In(t)?t:or().withMutations((function(e){var n=P(t);qt(n.size),n.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(E(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Mn);er.isOrderedSet=In;var nr,rr=er.prototype;function ir(t,e){var n=Object.create(rr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function or(){return nr||(nr=ir(yn()))}rr[M]=!0,rr.zip=Vn.zip,rr.zipWith=Vn.zipWith,rr.__empty=or,rr.__make=ir;var ar=function(t,e){var n,r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var l=0;l2?[]:void 0,{"":t})}function vr(t,e,n,r,i,o){var a=Array.isArray(n)?q:Qt(n)?Y:null;if(a){if(~t.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");t.push(n),i&&""!==r&&i.push(r);var s=e.call(o,r,a(n).map((function(r,o){return vr(t,e,r,o,i,n)})),i&&i.slice());return t.pop(),i&&i.pop(),s}return n}function mr(t,e){return b(e)?e.toMap():e.toList()}var yr="4.0.0-rc.11",gr={version:yr,Collection:T,Iterable:T,Seq:V,Map:Ae,OrderedMap:vn,List:tn,Stack:xn,Set:Mn,OrderedSet:er,Record:ar,Range:jn,Repeat:pr,is:ut,fromJS:dr,hash:ft,isImmutable:k,isCollection:y,isKeyed:b,isIndexed:x,isAssociative:w,isOrdered:R,isValueObject:st,isSeq:I,isList:Je,isMap:ot,isOrderedMap:at,isStack:_n,isSet:On,isOrderedSet:In,isRecord:A,get:te,getIn:Bn,has:Jt,hasIn:Hn,merge:me,mergeDeep:ge,mergeWith:ye,mergeDeepWith:be,remove:ne,removeIn:ue,set:re,setIn:ae,update:ce,updateIn:ie},br=T;e.default=gr},function(t,e,n){"use strict";function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return s}));var r=n(30),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function a(t){if("object"!==typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function s(t,e,n){var i;if("function"===typeof e&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"===typeof e&&"undefined"===typeof n&&(n=e,e=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(t,e)}if("function"!==typeof t)throw new Error("Expected the reducer to be a function.");var u=t,l=e,c=[],h=c,f=!1;function p(){h===c&&(h=c.slice())}function d(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return l}function v(t){if("function"!==typeof t)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var e=!0;return p(),h.push(t),function(){if(e){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");e=!1,p();var n=h.indexOf(t);h.splice(n,1),c=null}}}function m(t){if(!a(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,l=u(l,t)}finally{f=!1}for(var e=c=h,n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=n(64);function b(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?R+="x":R+=M[D];if(!R.match(p)){var L=A.slice(0,O),F=A.slice(O+1),U=M.match(d);U&&(L.push(U[1]),F.unshift(U[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+j,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[w])for(O=0,k=c.length;O0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=T.slice(-1)[0],P=(n.host||t.host||T.length>1)&&("."===S||".."===S)||""===S,O=0,I=T.length;I>=0;I--)"."===(S=T[I])?T.splice(I,1):".."===S?(T.splice(I,1),O++):O&&(T.splice(I,1),O--);if(!x&&!w)for(;O--;O)T.unshift("..");!x||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),P&&"/"!==T.join("/").substr(-1)&&T.push("");var C,A=""===T[0]||T[0]&&"/"===T[0].charAt(0);E&&(n.hostname=n.host=A?"":T.length?T.shift():"",(C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=C.shift(),n.host=n.hostname=C.shift()));return(x=x||n.host&&T.length)&&!A&&T.unshift(""),T.length?n.pathname=T.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(18);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineReducers=void 0;var r,i=n(71),o=(r=i)&&r.__esModule?r:{default:r};e.combineReducers=o.default},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(14);function i(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){var r=n(26),i=n(75),o=n(77),a=Math.max,s=Math.min;t.exports=function(t,e,n){var u,l,c,h,f,p,d=0,v=!1,m=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=u,r=l;return u=l=void 0,d=e,h=t.apply(r,n)}function b(t){return d=t,f=setTimeout(x,e),v?g(t):h}function _(t){var n=t-p;return void 0===p||n>=e||n<0||m&&t-d>=c}function x(){var t=i();if(_(t))return w(t);f=setTimeout(x,function(t){var n=e-(t-p);return m?s(n,c-(t-d)):n}(t))}function w(t){return f=void 0,y&&u?g(t):(u=l=void 0,h)}function T(){var t=i(),n=_(t);if(u=arguments,l=this,p=t,n){if(void 0===f)return b(p);if(m)return clearTimeout(f),f=setTimeout(x,e),g(p)}return void 0===f&&(f=setTimeout(x,e)),h}return e=o(e)||0,r(n)&&(v=!!n.leading,c=(m="maxWait"in n)?a(o(n.maxWait)||0,e):c,y="trailing"in n?!!n.trailing:y),T.cancel=function(){void 0!==f&&clearTimeout(f),d=0,u=p=l=f=void 0},T.flush=function(){return void 0===f?h:w(i())},T}},function(t,e,n){"use strict";var r=n(27),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=c(n);h&&(a=a.concat(h(n)));for(var s=u(e),v=u(n),m=0;m80*n){r=u=t[0],s=l=t[1];for(var _=n;_u&&(u=c),p>l&&(l=p);d=0!==(d=Math.max(u-r,l-s))?1/d:0}return a(g,b,n,r,s,d),b}function i(t,e,n,r,i){var o,a;if(i===I(t,e,n,r)>0)for(o=e;o=e;o-=r)a=S(o,t[o],t[o+1],a);return a&&b(a,a.next)&&(P(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(P(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function a(t,e,n,r,i,h,f){if(t){!f&&h&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,a,s,u,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,l*=2}while(a>1)}(i)}(t,r,i,h);for(var p,v,m=t;t.prev!==t.next;)if(p=t.prev,v=t.next,h?u(t,r,i,h):s(t))e.push(p.i/n),e.push(t.i/n),e.push(v.i/n),P(t),t=v.next,m=v.next;else if((t=v)===m){f?1===f?a(t=l(o(t),e,n),e,n,r,i,h,2):2===f&&c(t,e,n,r,i,h):a(o(t),e,n,r,i,h,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(g(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(g(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=d(s,u,e,n,r),f=d(l,c,e,n,r),p=t.prevZ,v=t.nextZ;p&&p.z>=h&&v&&v.z<=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&g(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=f;){if(v!==t.prev&&v!==t.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,n){var r=t;do{var i=r.prev,a=r.next.next;!b(i,a)&&_(i,r,r.next,a)&&T(i,a)&&T(a,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(a.i/n),P(r),P(r.next),r=t=a),r=r.next}while(r!==t);return o(r)}function c(t,e,n,r,i,s){var u=t;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&y(u,l)){var c=E(u,l);return u=o(u,u.next),c=o(c,c.next),a(u,e,n,r,i,s),void a(c,e,n,r,i,s)}l=l.next}u=u.next}while(u!==t)}function h(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=c&&i!==r.x&&m(on.x||r.x===n.x&&p(n,r)))&&(n=r,f=u)),r=r.next}while(r!==l);return n}(t,e)){var n=E(e,t);o(e,e.next),o(n,n.next)}}function p(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function v(t){var e=t,n=t;do{(e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&_(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||b(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function b(t,e){return t.x===e.x&&t.y===e.y}function _(t,e,n,r){var i=w(g(t,e,n)),o=w(g(t,e,r)),a=w(g(n,r,t)),s=w(g(n,r,e));return i!==o&&a!==s||(!(0!==i||!x(t,n,e))||(!(0!==o||!x(t,r,e))||(!(0!==a||!x(n,t,r))||!(0!==s||!x(n,e,r)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function E(t,e){var n=new O(t.i,t.x,t.y),r=new O(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function S(t,e,n,r){var i=new O(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function P(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function O(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t&&"@@redux/INIT"===t.type?"initialState argument passed to createStore":"previous state received by the reducer"},t.exports=e.default},function(t,e,n){var r=n(76),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(38).Symbol;t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"===typeof i?i(n,r,t):e(i)}}}}var i=r();i.withExtraArgument=r,e.a=i},function(t,e,n){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e=this.viewport.threshold}},{key:"move",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.plugins.move(t);if(this.clickedAvailable){var n=t.data.global.x-this.last.x,r=t.data.global.y-this.last.y;(this.checkThreshold(n)||this.checkThreshold(r))&&(this.clickedAvailable=!1)}e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"up",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){"mouse"===t.data.pointerType&&(this.isMouseDown=!1),"mouse"!==t.data.pointerType&&this.remove(t.data.pointerId);var e=this.viewport.plugins.up(t);this.clickedAvailable&&0===this.count()&&(this.viewport.emit("clicked",{event:t,screen:this.last,world:this.viewport.toWorld(this.last),viewport:this}),this.clickedAvailable=!1),e&&this.viewport.options.stopPropagation&&t.stopPropagation()}}},{key:"getPointerPosition",value:function(t){var e=new f.Point;return this.viewport.options.interaction?this.viewport.options.interaction.mapPositionToPoint(e,t.clientX,t.clientY):(e.x=t.clientX,e.y=t.clientY),e}},{key:"handleWheel",value:function(t){if(!this.viewport.pause&&this.viewport.worldVisible){var e=this.viewport.toLocal(this.getPointerPosition(t));if(this.viewport.left<=e.x&&e.x<=this.viewport.right&&this.viewport.top<=e.y&&e.y<=this.viewport.bottom)this.viewport.plugins.wheel(t)&&!this.viewport.options.passiveWheel&&t.preventDefault()}}},{key:"pause",value:function(){this.touches=[],this.isMouseDown=!1}},{key:"get",value:function(t){var e,n=Object(l.a)(this.touches);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.id===t)return r}}catch(i){n.e(i)}finally{n.f()}return null}},{key:"remove",value:function(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:d.length;this.plugins[t]=e;var r=d.indexOf(t);-1!==r&&d.splice(r,1),d.splice(n,0,t),this.sort()}},{key:"get",value:function(t,e){return e&&"undefined"!==typeof this.plugins[t]&&this.plugins[t].paused?null:this.plugins[t]}},{key:"update",value:function(t){var e,n=Object(l.a)(this.list);try{for(n.s();!(e=n.n()).done;){e.value.update(t)}}catch(r){n.e(r)}finally{n.f()}}},{key:"resize",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.resize()}}catch(n){e.e(n)}finally{e.f()}}},{key:"reset",value:function(){var t,e=Object(l.a)(this.list);try{for(e.s();!(t=e.n()).done;){t.value.reset()}}catch(n){e.e(n)}finally{e.f()}}},{key:"remove",value:function(t){this.plugins[t]&&(this.plugins[t]=null,this.viewport.emit(t+"-remove"),this.sort())}},{key:"pause",value:function(t){this.plugins[t]&&this.plugins[t].pause()}},{key:"resume",value:function(t){this.plugins[t]&&this.plugins[t].resume()}},{key:"sort",value:function(){this.list=[];var t,e=Object(l.a)(d);try{for(e.s();!(t=e.n()).done;){var n=t.value;this.plugins[n]&&this.list.push(this.plugins[n])}}catch(r){e.e(r)}finally{e.f()}}},{key:"down",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.down(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"move",value:function(t){var e,n=!1,r=Object(l.a)(this.viewport.plugins.list);try{for(r.s();!(e=r.n()).done;){e.value.move(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"up",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.up(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}},{key:"wheel",value:function(t){var e,n=!1,r=Object(l.a)(this.list);try{for(r.s();!(e=r.n()).done;){e.value.wheel(t)&&(n=!0)}}catch(i){r.e(i)}finally{r.f()}return n}}]),t}(),m=function(){function t(e){Object(c.a)(this,t),this.parent=e,this.paused=!1}return Object(h.a)(t,[{key:"destroy",value:function(){}},{key:"down",value:function(){return!1}},{key:"move",value:function(){return!1}},{key:"up",value:function(){return!1}},{key:"wheel",value:function(){return!1}},{key:"update",value:function(){}},{key:"resize",value:function(){}},{key:"reset",value:function(){}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}}]),t}(),y={direction:"all",pressDrag:!0,wheel:!0,wheelScroll:1,reverse:!1,clampWheel:!1,underflow:"center",factor:1,mouseButtons:"all",keyToPress:null,ignoreKeyToPressOnTouch:!1},g=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},y,i),r.moved=!1,r.reverse=r.options.reverse?1:-1,r.xDirection=!r.options.direction||"all"===r.options.direction||"x"===r.options.direction,r.yDirection=!r.options.direction||"all"===r.options.direction||"y"===r.options.direction,r.keyIsPressed=!1,r.parseUnderflow(),r.mouseButtons(r.options.mouseButtons),r.options.keyToPress&&r.handleKeyPresses(r.options.keyToPress),r}return Object(h.a)(n,[{key:"handleKeyPresses",value:function(t){var e=this;parent.addEventListener("keydown",(function(n){t.includes(n.code)&&(e.keyIsPressed=!0)})),parent.addEventListener("keyup",(function(n){t.includes(n.code)&&(e.keyIsPressed=!1)}))}},{key:"mouseButtons",value:function(t){this.mouse=t&&"all"!==t?[-1!==t.indexOf("left"),-1!==t.indexOf("middle"),-1!==t.indexOf("right")]:[!0,!0,!0]}},{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"checkButtons",value:function(t){var e="mouse"===t.data.pointerType,n=this.parent.input.count();return!(!(1===n||n>1&&!this.parent.plugins.get("pinch",!0))||e&&!this.mouse[t.data.button])}},{key:"checkKeyPress",value:function(t){return!!(!this.options.keyToPress||this.keyIsPressed||this.options.ignoreKeyToPressOnTouch&&"touch"===t.data.pointerType)}},{key:"down",value:function(t){if(!this.paused&&this.options.pressDrag)return this.checkButtons(t)&&this.checkKeyPress(t)?(this.last={x:t.data.global.x,y:t.data.global.y},this.current=t.data.pointerId,!0):void(this.last=null)}},{key:"move",value:function(t){if(!this.paused&&this.options.pressDrag&&this.last&&this.current===t.data.pointerId){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.count();if(1===r||r>1&&!this.parent.plugins.get("pinch",!0)){var i=e-this.last.x,o=n-this.last.y;if(this.moved||this.xDirection&&this.parent.input.checkThreshold(i)||this.yDirection&&this.parent.input.checkThreshold(o)){var a={x:e,y:n};return this.xDirection&&(this.parent.x+=(a.x-this.last.x)*this.options.factor),this.yDirection&&(this.parent.y+=(a.y-this.last.y)*this.options.factor),this.last=a,this.moved||this.parent.emit("drag-start",{event:t,screen:new f.Point(this.last.x,this.last.y),world:this.parent.toWorld(new f.Point(this.last.x,this.last.y)),viewport:this.parent}),this.moved=!0,this.parent.emit("moved",{viewport:this.parent,type:"drag"}),!0}}else this.moved=!1}}},{key:"up",value:function(t){if(!this.paused){var e=this.parent.input.touches;if(1===e.length){var n=e[0];return n.last&&(this.last={x:n.last.x,y:n.last.y},this.current=n.id),this.moved=!1,!0}if(this.last&&this.moved){var r=new f.Point(this.last.x,this.last.y);return this.parent.emit("drag-end",{event:t,screen:r,world:this.parent.toWorld(r),viewport:this.parent}),this.last=null,this.moved=!1,!0}}}},{key:"wheel",value:function(t){if(!this.paused&&this.options.wheel){var e=this.parent.plugins.get("wheel",!0);if(!e)return this.xDirection&&(this.parent.x+=t.deltaX*this.options.wheelScroll*this.reverse),this.yDirection&&(this.parent.y+=t.deltaY*this.options.wheelScroll*this.reverse),this.options.clampWheel&&this.clamp(),this.parent.emit("wheel-scroll",this.parent),this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.options.passiveWheel||t.preventDefault(),!0}}},{key:"resume",value:function(){this.last=null,this.paused=!1}},{key:"clamp",value:function(){var t=this.parent.plugins.get("decelerate",!0)||{};if("y"!==this.options.clampWheel)if(this.parent.screenWorldWidththis.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,t.x=0);if("x"!==this.options.clampWheel)if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,t.y=0)}},{key:"active",get:function(){return this.moved}}]),n}(m),b={noDrag:!1,percent:1,center:null,factor:1},_=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},b,i),r}return Object(h.a)(n,[{key:"down",value:function(){if(this.parent.input.count()>=2)return this.active=!0,!0}},{key:"move",value:function(t){if(!this.paused&&this.active){var e=t.data.global.x,n=t.data.global.y,r=this.parent.input.touches;if(r.length>=2){var i=r[0],o=r[1],a=i.last&&o.last?Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)):null;if(i.id===t.data.pointerId?i.last={x:e,y:n,data:t.data}:o.id===t.data.pointerId&&(o.last={x:e,y:n,data:t.data}),a){var s,u={x:i.last.x+(o.last.x-i.last.x)/2,y:i.last.y+(o.last.y-i.last.y)/2};this.options.center||(s=this.parent.toLocal(u));var l=Math.sqrt(Math.pow(o.last.x-i.last.x,2)+Math.pow(o.last.y-i.last.y,2)),c=(1-a/(l=0===l?l=1e-10:l))*this.options.percent*this.parent.scale.x;this.parent.scale.x+=c,this.parent.scale.y+=c,this.parent.emit("zoomed",{viewport:this.parent,type:"pinch",center:u});var h=this.parent.plugins.get("clamp-zoom",!0);if(h&&h.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var f=this.parent.toGlobal(s);this.parent.x+=(u.x-f.x)*this.options.factor,this.parent.y+=(u.y-f.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})}!this.options.noDrag&&this.lastCenter&&(this.parent.x+=(u.x-this.lastCenter.x)*this.options.factor,this.parent.y+=(u.y-this.lastCenter.y)*this.options.factor,this.parent.emit("moved",{viewport:this.parent,type:"pinch"})),this.lastCenter=u,this.moved=!0}else this.pinching||(this.parent.emit("pinch-start",this.parent),this.pinching=!0);return!0}}}},{key:"up",value:function(){if(this.pinching&&this.parent.input.touches.length<=1)return this.active=!1,this.lastCenter=null,this.pinching=!1,this.moved=!1,this.parent.emit("pinch-end",this.parent),!0}}]),n}(m),x={left:!1,right:!1,top:!1,bottom:!1,direction:null,underflow:"center"},w=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},x,i),r.options.direction&&(r.options.left="x"===r.options.direction||"all"===r.options.direction||null,r.options.right="x"===r.options.direction||"all"===r.options.direction||null,r.options.top="y"===r.options.direction||"all"===r.options.direction||null,r.options.bottom="y"===r.options.direction||"all"===r.options.direction||null),r.parseUnderflow(),r.last={x:null,y:null,scaleX:null,scaleY:null},r.update(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"none"===t?this.noUnderflow=!0:"center"===t?(this.underflowX=this.underflowY=0,this.noUnderflow=!1):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0,this.noUnderflow=!1)}},{key:"move",value:function(){return this.update(),!1}},{key:"update",value:function(){if(!this.paused&&(this.parent.x!==this.last.x||this.parent.y!==this.last.y||this.parent.scale.x!==this.last.scaleX||this.parent.scale.y!==this.last.scaleY)){var t={x:this.parent.x,y:this.parent.y},e=this.parent.plugins.decelerate||{};if(null!==this.options.left||null!==this.options.right){var n=!1;if(this.parent.screenWorldWidth(!0===this.options.right?this.parent.worldWidth:this.options.right)&&(this.parent.x=-(!0===this.options.right?this.parent.worldWidth:this.options.right)*this.parent.scale.x+this.parent.screenWidth,e.x=0,n=!0);n&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-x"})}if(null!==this.options.top||null!==this.options.bottom){var r=!1;if(this.parent.screenWorldHeight(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)&&(this.parent.y=-(!0===this.options.bottom?this.parent.worldHeight:this.options.bottom)*this.parent.scale.y+this.parent.screenHeight,e.y=0,r=!0);r&&this.parent.emit("moved",{viewport:this.parent,original:t,type:"clamp-y"})}this.last.x=this.parent.x,this.last.y=this.parent.y,this.last.scaleX=this.parent.scale.x,this.last.scaleY=this.parent.scale.y}}},{key:"reset",value:function(){this.update()}}]),n}(m),T={minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,minScale:null,maxScale:null},E=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},T,i),r.clamp(),r}return Object(h.a)(n,[{key:"resize",value:function(){this.clamp()}},{key:"clamp",value:function(){if(!this.paused)if(this.options.minWidth||this.options.minHeight||this.options.maxWidth||this.options.maxHeight){var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight;if(null!==this.options.minWidth&&tthis.options.maxWidth){var r=this.parent.scale.x;this.parent.fitWidth(this.options.maxWidth,!1,!1,!0),this.parent.scale.y*=this.parent.scale.x/r,t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}if(null!==this.options.minHeight&&ethis.options.maxHeight){var o=this.parent.scale.y;this.parent.fitHeight(this.options.maxHeight,!1,!1,!0),this.parent.scale.x*=this.parent.scale.y/o,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})}}else{var a=this.parent.scale.x;null!==this.options.minScale&&athis.options.maxScale&&(a=this.options.maxScale),a!==this.parent.scale.x&&(this.parent.scale.set(a),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"}))}}},{key:"reset",value:function(){this.clamp()}}]),n}(m),S={friction:.95,bounce:.8,minSpeed:.01},P=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},S,i),r.saved=[],r.reset(),r.parent.on("moved",(function(t){return r.moved(t)})),r}return Object(h.a)(n,[{key:"destroy",value:function(){this.parent}},{key:"down",value:function(){this.saved=[],this.x=this.y=!1}},{key:"isActive",value:function(){return this.x||this.y}},{key:"move",value:function(){if(!this.paused){var t=this.parent.input.count();(1===t||t>1&&!this.parent.plugins.get("pinch",!0))&&(this.saved.push({x:this.parent.x,y:this.parent.y,time:performance.now()}),this.saved.length>60&&this.saved.splice(0,30))}}},{key:"moved",value:function(t){if(this.saved.length){var e=this.saved[this.saved.length-1];"clamp-x"===t.type?e.x===t.original.x&&(e.x=this.parent.x):"clamp-y"===t.type&&e.y===t.original.y&&(e.y=this.parent.y)}}},{key:"up",value:function(){if(0===this.parent.input.count()&&this.saved.length){var t,e=performance.now(),n=Object(l.a)(this.saved);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.time>=e-100){var i=e-r.time;this.x=(this.parent.x-r.x)/i,this.y=(this.parent.y-r.y)/i,this.percentChangeX=this.percentChangeY=this.options.friction;break}}}catch(o){n.e(o)}finally{n.f()}}}},{key:"activate",value:function(t){"undefined"!==typeof(t=t||{}).x&&(this.x=t.x,this.percentChangeX=this.options.friction),"undefined"!==typeof t.y&&(this.y=t.y,this.percentChangeY=this.options.friction)}},{key:"update",value:function(t){var e;this.paused||(this.x&&(this.parent.x+=this.x*t,this.x*=this.percentChangeX,Math.abs(this.x)1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},A,i),r.ease=C(r.options.ease,"easeInOutSine"),r.options.sides&&("all"===r.options.sides?r.top=r.bottom=r.left=r.right=!0:"horizontal"===r.options.sides?r.right=r.left=!0:"vertical"===r.options.sides?r.top=r.bottom=!0:(r.top=-1!==r.options.sides.indexOf("top"),r.bottom=-1!==r.options.sides.indexOf("bottom"),r.left=-1!==r.options.sides.indexOf("left"),r.right=-1!==r.options.sides.indexOf("right"))),r.parseUnderflow(),r.last={},r.reset(),r}return Object(h.a)(n,[{key:"parseUnderflow",value:function(){var t=this.options.underflow.toLowerCase();"center"===t?(this.underflowX=0,this.underflowY=0):(this.underflowX=-1!==t.indexOf("left")?-1:-1!==t.indexOf("right")?1:0,this.underflowY=-1!==t.indexOf("top")?-1:-1!==t.indexOf("bottom")?1:0)}},{key:"isActive",value:function(){return null!==this.toX||null!==this.toY}},{key:"down",value:function(){this.toX=this.toY=null}},{key:"up",value:function(){this.bounce()}},{key:"update",value:function(t){if(!this.paused){if(this.bounce(),this.toX){var e=this.toX;e.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-x"}),e.time>=this.options.time?(this.parent.x=e.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(e.time,e.start,e.delta,this.options.time)}if(this.toY){var n=this.toY;n.time+=t,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),n.time>=this.options.time?(this.parent.y=n.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(n.time,n.start,n.delta,this.options.time)}}}},{key:"calcUnderflowX",value:function(){var t;switch(this.underflowX){case-1:t=0;break;case 1:t=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:t=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return t}},{key:"calcUnderflowY",value:function(){var t;switch(this.underflowY){case-1:t=0;break;case 1:t=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:t=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return t}},{key:"oob",value:function(){var t=this.options.bounceBox;if(t){var e="undefined"===typeof t.x?0:t.x,n="undefined"===typeof t.y?0:t.y,r="undefined"===typeof t.width?this.parent.worldWidth:t.width,i="undefined"===typeof t.height?this.parent.worldHeight:t.height;return{left:this.parent.leftr,top:this.parent.topi,topLeft:new f.Point(e*this.parent.scale.x,n*this.parent.scale.y),bottomRight:new f.Point(r*this.parent.scale.x-this.parent.screenWidth,i*this.parent.scale.y-this.parent.screenHeight)}}return{left:this.parent.left<0,right:this.parent.right>this.parent.worldWidth,top:this.parent.top<0,bottom:this.parent.bottom>this.parent.worldHeight,topLeft:new f.Point(0,0),bottomRight:new f.Point(this.parent.worldWidth*this.parent.scale.x-this.parent.screenWidth,this.parent.worldHeight*this.parent.scale.y-this.parent.screenHeight)}}},{key:"bounce",value:function(){if(!this.paused){var t,e=this.parent.plugins.get("decelerate",!0);e&&(e.x||e.y)&&(e.x&&e.percentChangeX===e.options.friction||e.y&&e.percentChangeY===e.options.friction)&&(((t=this.oob()).left&&this.left||t.right&&this.right)&&(e.percentChangeX=this.options.friction),(t.top&&this.top||t.bottom&&this.bottom)&&(e.percentChangeY=this.options.friction));var n=this.parent.plugins.get("drag",!0)||{},r=this.parent.plugins.get("pinch",!0)||{};if(e=e||{},!n.active&&!r.active&&(!this.toX||!this.toY)&&(!e.x||!e.y)){var i=(t=t||this.oob()).topLeft,o=t.bottomRight;if(!this.toX&&!e.x){var a=null;t.left&&this.left?a=this.parent.screenWorldWidth3&&void 0!==arguments[3]?arguments[3]:{};return Object(c.a)(this,n),(o=e.call(this,t)).options=Object.assign({},M,a),o.ease=C(a.ease,"easeInOutSine"),o.x=r,o.y=i,o.options.forceStart&&o.snapStart(),o}return Object(h.a)(n,[{key:"snapStart",value:function(){this.percent=0,this.snapping={time:0};var t=this.options.topLeft?this.parent.corner:this.parent.center;this.deltaX=this.x-t.x,this.deltaY=this.y-t.y,this.startX=t.x,this.startY=t.y,this.parent.emit("snap-start",this.parent)}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap"):this.options.interrupt&&(this.snapping=null)}},{key:"up",value:function(){if(0===this.parent.input.count()){var t=this.parent.plugins.get("decelerate",!0);t&&(t.x||t.y)&&(t.percentChangeX=t.percentChangeY=this.options.friction)}}},{key:"update",value:function(t){if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.snapping){var e,n,r,i=this.snapping;if(i.time+=t,i.time>this.options.time)e=!0,n=this.startX+this.deltaX,r=this.startY+this.deltaY;else{var o=this.ease(i.time,0,1,this.options.time);n=this.startX+this.deltaX*o,r=this.startY+this.deltaY*o}this.options.topLeft?this.parent.moveCorner(n,r):this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),e&&(this.options.removeOnComplete&&this.parent.plugins.remove("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)}else{var a=this.options.topLeft?this.parent.corner:this.parent.center;a.x===this.x&&a.y===this.y||this.snapStart()}}}]),n}(m),D={width:0,height:0,time:1e3,ease:"easeInOutSine",center:null,interrupt:!0,removeOnComplete:!1,removeOnInterrupts:!1,forceStart:!1,noMove:!1},N=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},D,i),r.ease=C(r.options.ease),r.options.width>0&&(r.xScale=t.screenWidth/r.options.width),r.options.height>0&&(r.yScale=t.screenHeight/r.options.height),r.xIndependent=!!r.xScale,r.yIndependent=!!r.yScale,r.xScale=r.xIndependent?r.xScale:r.yScale,r.yScale=r.yIndependent?r.yScale:r.xScale,0===r.options.time?(t.container.scale.x=r.xScale,t.container.scale.y=r.yScale,r.options.removeOnComplete&&r.parent.plugins.remove("snap-zoom")):i.forceStart&&r.createSnapping(),r}return Object(h.a)(n,[{key:"createSnapping",value:function(){this.parent.scale;var t=this.parent.worldScreenWidth,e=this.parent.worldScreenHeight,n=this.parent.screenWidth/this.xScale,r=this.parent.screenHeight/this.yScale;this.snapping={time:0,startX:t,startY:e,deltaX:n-t,deltaY:r-e},this.parent.emit("snap-zoom-start",this.parent)}},{key:"resize",value:function(){this.snapping=null,this.options.width>0&&(this.xScale=this.parent.screenWidth/this.options.width),this.options.height>0&&(this.yScale=this.parent.screenHeight/this.options.height),this.xScale=this.xIndependent?this.xScale:this.yScale,this.yScale=this.yIndependent?this.yScale:this.xScale}},{key:"wheel",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("snap-zoom")}},{key:"down",value:function(){this.options.removeOnInterrupt?this.parent.plugins.remove("snap-zoom"):this.options.interrupt&&(this.snapping=null)}},{key:"update",value:function(t){var e;if(!this.paused&&(!this.options.interrupt||0===this.parent.input.count()))if(this.options.center||this.options.noMove||(e=this.parent.center),this.snapping){if(this.snapping){var n=this.snapping;if(n.time+=t,n.time>=this.options.time)this.parent.scale.set(this.xScale,this.yScale),this.options.removeOnComplete&&this.parent.plugins.remove("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null;else{var r=this.snapping,i=this.ease(r.time,r.startX,r.deltaX,this.options.time),o=this.ease(r.time,r.startY,r.deltaY,this.options.time);this.parent.scale.x=this.parent.screenWidth/i,this.parent.scale.y=this.parent.screenHeight/o}var a=this.parent.plugins.get("clamp-zoom",!0);a&&a.clamp(),this.options.noMove||(this.options.center?this.parent.moveCenter(this.options.center):this.parent.moveCenter(e))}}else this.parent.scale.x===this.xScale&&this.parent.scale.y===this.yScale||this.createSnapping()}},{key:"resume",value:function(){this.snapping=null,Object(o.a)(Object(a.a)(n.prototype),"resume",this).call(this)}}]),n}(m),L={speed:0,acceleration:null,radius:null},F=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(c.a)(this,n),(i=e.call(this,t)).target=r,i.options=Object.assign({},L,o),i.velocity={x:0,y:0},i}return Object(h.a)(n,[{key:"update",value:function(t){if(!this.paused){var e=this.parent.center,n=this.target.x,r=this.target.y;if(this.options.radius){if(!(Math.sqrt(Math.pow(this.target.y-e.y,2)+Math.pow(this.target.x-e.x,2))>this.options.radius))return;var i=Math.atan2(this.target.y-e.y,this.target.x-e.x);n=this.target.x-Math.cos(i)*this.options.radius,r=this.target.y-Math.sin(i)*this.options.radius}var o=n-e.x,a=r-e.y;if(o||a)if(this.options.speed)if(this.options.acceleration){var s=Math.atan2(r-e.y,n-e.x),u=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));if(u){var l=(Math.pow(this.velocity.x,2)+Math.pow(this.velocity.y,2))/(2*this.options.acceleration);this.velocity=u>l?{x:Math.min(this.velocity.x+this.options.acceleration*t,this.options.speed),y:Math.min(this.velocity.y+this.options.acceleration*t,this.options.speed)}:{x:Math.max(this.velocity.x-this.options.acceleration*this.options.speed,0),y:Math.max(this.velocity.y-this.options.acceleration*this.options.speed,0)};var c=Math.cos(s)*this.velocity.x,h=Math.sin(s)*this.velocity.y,f=Math.abs(c)>Math.abs(o)?n:e.x+c,p=Math.abs(h)>Math.abs(a)?r:e.y+h;this.parent.moveCenter(f,p),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}else{var d=Math.atan2(r-e.y,n-e.x),v=Math.cos(d)*this.options.speed,m=Math.sin(d)*this.options.speed,y=Math.abs(v)>Math.abs(o)?n:e.x+v,g=Math.abs(m)>Math.abs(a)?r:e.y+m;this.parent.moveCenter(y,g),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}else this.parent.moveCenter(n,r),this.parent.emit("moved",{viewport:this.parent,type:"follow"})}}}]),n}(m),U={percent:.1,smooth:!1,interrupt:!0,reverse:!1,center:null,lineHeight:20},j=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},U,i),r}return Object(h.a)(n,[{key:"down",value:function(){this.options.interrupt&&(this.smoothing=null)}},{key:"update",value:function(){if(this.smoothing){var t,e=this.smoothingCenter,n=this.smoothing;this.options.center||(t=this.parent.toLocal(e)),this.parent.scale.x+=n.x,this.parent.scale.y+=n.y,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var r=this.parent.plugins.get("clamp-zoom",!0);if(r&&r.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var i=this.parent.toGlobal(t);this.parent.x+=e.x-i.x,this.parent.y+=e.y-i.y}this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.smoothingCount++,this.smoothingCount>=this.options.smooth&&(this.smoothing=null)}}},{key:"wheel",value:function(t){if(!this.paused){var e=this.parent.input.getPointerPosition(t),n=(this.options.reverse?-1:1)*-t.deltaY*(t.deltaMode?this.options.lineHeight:1)/500,r=Math.pow(2,(1+this.options.percent)*n);if(this.options.smooth){var i={x:this.smoothing?this.smoothing.x*(this.options.smooth-this.smoothingCount):0,y:this.smoothing?this.smoothing.y*(this.options.smooth-this.smoothingCount):0};this.smoothing={x:((this.parent.scale.x+i.x)*r-this.parent.scale.x)/this.options.smooth,y:((this.parent.scale.y+i.y)*r-this.parent.scale.y)/this.options.smooth},this.smoothingCount=0,this.smoothingCenter=e}else{var o;this.options.center||(o=this.parent.toLocal(e)),this.parent.scale.x*=r,this.parent.scale.y*=r,this.parent.emit("zoomed",{viewport:this.parent,type:"wheel"});var a=this.parent.plugins.get("clamp-zoom",!0);if(a&&a.clamp(),this.options.center)this.parent.moveCenter(this.options.center);else{var s=this.parent.toGlobal(o);this.parent.x+=e.x-s.x,this.parent.y+=e.y-s.y}}return this.parent.emit("moved",{viewport:this.parent,type:"wheel"}),this.parent.emit("wheel",{wheel:{dx:t.deltaX,dy:t.deltaY,dz:t.deltaZ},event:t,viewport:this.parent}),!this.parent.options.passiveWheel||void 0}}}]),n}(m),B={radius:null,distance:null,top:null,bottom:null,left:null,right:null,speed:8,reverse:!1,noDecelerate:!1,linear:!1,allowButtons:!1},z=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},B,i),r.reverse=r.options.reverse?1:-1,r.radiusSquared=Math.pow(r.options.radius,2),r.resize(),r}return Object(h.a)(n,[{key:"resize",value:function(){var t=this.options.distance;null!==t?(this.left=t,this.top=t,this.right=this.parent.worldScreenWidth-t,this.bottom=this.parent.worldScreenHeight-t):this.radius||(this.left=this.options.left,this.top=this.options.top,this.right=null===this.options.right?null:this.parent.worldScreenWidth-this.options.right,this.bottom=null===this.options.bottom?null:this.parent.worldScreenHeight-this.options.bottom)}},{key:"down",value:function(){this.paused||this.options.allowButtons||(this.horizontal=this.vertical=null)}},{key:"move",value:function(t){if(!this.paused&&!("mouse"!==t.data.pointerType&&1!==t.data.identifier||!this.options.allowButtons&&0!==t.data.buttons)){var e=t.data.global.x,n=t.data.global.y;if(this.radiusSquared){var r=this.parent.toScreen(this.parent.center);if(Math.pow(r.x-e,2)+Math.pow(r.y-n,2)>=this.radiusSquared){var i=Math.atan2(r.y-n,r.x-e);this.options.linear?(this.horizontal=Math.round(Math.cos(i))*this.options.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(i))*this.options.speed*this.reverse*.06):(this.horizontal=Math.cos(i)*this.options.speed*this.reverse*.06,this.vertical=Math.sin(i)*this.options.speed*this.reverse*.06)}else this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0}else null!==this.left&&ethis.right?this.horizontal=-1*this.reverse*this.options.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),null!==this.top&&nthis.bottom?this.vertical=-1*this.reverse*this.options.speed*.06:(this.decelerateVertical(),this.vertical=0)}}},{key:"decelerateHorizontal",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.horizontal&&t&&!this.options.noDecelerate&&t.activate({x:this.horizontal*this.options.speed*this.reverse/(1e3/60)})}},{key:"decelerateVertical",value:function(){var t=this.parent.plugins.get("decelerate",!0);this.vertical&&t&&!this.options.noDecelerate&&t.activate({y:this.vertical*this.options.speed*this.reverse/(1e3/60)})}},{key:"up",value:function(){this.paused||(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null)}},{key:"update",value:function(){if(!this.paused&&(this.horizontal||this.vertical)){var t=this.parent.center;this.horizontal&&(t.x+=this.horizontal*this.options.speed),this.vertical&&(t.y+=this.vertical*this.options.speed),this.parent.moveCenter(t),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"})}}}]),n}(m),H={removeOnInterrupt:!1,ease:"linear",time:1e3},X=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)(this,n),(r=e.call(this,t)).options=Object.assign({},H,i),r.options.ease=C(r.options.ease),r.setupPosition(),r.setupZoom(),r}return Object(h.a)(n,[{key:"setupPosition",value:function(){"undefined"!==typeof this.options.position?(this.startX=this.parent.center.x,this.startY=this.parent.center.y,this.deltaX=this.options.position.x-this.parent.center.x,this.deltaY=this.options.position.y-this.parent.center.y,this.keepCenter=!1):this.keepCenter=!0}},{key:"setupZoom",value:function(){this.width=null,this.height=null,"undefined"!==typeof this.options.scale?this.width=this.parent.screenWidth/this.options.scale:"undefined"!==typeof this.options.scaleX||"undefined"!==typeof this.options.scaleY?("undefined"!==typeof this.options.scaleX&&(this.width=this.parent.screenWidth/this.options.scaleX),"undefined"!==typeof this.options.scaleY&&(this.height=this.parent.screenHeight/this.options.scaleY)):("undefined"!==typeof this.options.width&&(this.width=this.options.width),"undefined"!==typeof this.options.height&&(this.height=this.options.height)),null!==typeof this.width&&(this.startWidth=this.parent.screenWidthInWorldPixels,this.deltaWidth=this.width-this.startWidth),null!==typeof this.height&&(this.startHeight=this.parent.screenHeightInWorldPixels,this.deltaHeight=this.height-this.startHeight),this.time=0}},{key:"down",value:function(){this.options.removeOnInterrupt&&this.parent.plugins.remove("animate")}},{key:"complete",value:function(){this.parent.plugins.remove("animate"),null!==this.width&&this.parent.fitWidth(this.width,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.height,this.keepCenter,null===this.width),this.keepCenter||this.parent.moveCenter(this.options.position.x,this.options.position.y),this.parent.emit("animate-end",this.parent),this.options.callbackOnComplete&&this.options.callbackOnComplete(this.parent)}},{key:"update",value:function(t){if(!this.paused)if(this.time+=t,this.time>=this.options.time)this.complete();else{var e=new f.Point(this.parent.scale.x,this.parent.scale.y),n=this.options.ease(this.time,0,1,this.options.time);if(null!==this.width&&this.parent.fitWidth(this.startWidth+this.deltaWidth*n,this.keepCenter,null===this.height),null!==this.height&&this.parent.fitHeight(this.startHeight+this.deltaHeight*n,this.keepCenter,null===this.width),null===this.width?this.parent.scale.x=this.parent.scale.y:null===this.height&&(this.parent.scale.y=this.parent.scale.x),!this.keepCenter){var r=new f.Point(this.parent.x,this.parent.y);this.parent.moveCenter(this.startX+this.deltaX*n,this.startY+this.deltaY*n),this.parent.emit("moved",{viewport:this.parent,original:r,type:"animate"})}(this.width||this.height)&&this.parent.emit("zoomed",{viewport:this.parent,original:e,type:"animate"}),this.keepCenter}}}]),n}(m),W={screenWidth:window.innerWidth,screenHeight:window.innerHeight,worldWidth:null,worldHeight:null,threshold:5,passiveWheel:!0,stopPropagation:!1,forceHitArea:null,noTicker:!1,interaction:null,disableOnContextMenu:!1},G=function(t){Object(s.a)(n,t);var e=Object(u.a)(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(c.a)(this,n),(t=e.call(this)).options=Object.assign({},W,i),i.ticker)t.options.ticker=i.ticker;else{var o,a=f;o=parseInt(/^(\d+)\./.exec(f.VERSION)[1])<5?a.ticker.shared:a.Ticker.shared,t.options.ticker=i.ticker||o}return t.screenWidth=t.options.screenWidth,t.screenHeight=t.options.screenHeight,t._worldWidth=t.options.worldWidth,t._worldHeight=t.options.worldHeight,t.forceHitArea=t.options.forceHitArea,t.threshold=t.options.threshold,t.options.divWheel=t.options.divWheel||document.body,t.options.disableOnContextMenu&&(t.options.divWheel.oncontextmenu=function(t){return t.preventDefault()}),t.options.noTicker||(t.tickerFunction=function(){return t.update(t.options.ticker.elapsedMS)},t.options.ticker.add(t.tickerFunction)),t.input=new p(Object(r.a)(t)),t.plugins=new v(Object(r.a)(t)),t}return Object(h.a)(n,[{key:"destroy",value:function(t){this.options.noTicker||this.options.ticker.remove(this.tickerFunction),this.input.destroy(),Object(o.a)(Object(a.a)(n.prototype),"destroy",this).call(this,t)}},{key:"update",value:function(t){this.pause||(this.plugins.update(t),this.lastViewport&&(this.lastViewport.x!==this.x||this.lastViewport.y!==this.y?this.moving=!0:this.moving&&(this.emit("moved-end",this),this.moving=!1),this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y?this.zooming=!0:this.zooming&&(this.emit("zoomed-end",this),this.zooming=!1)),this.forceHitArea||(this._hitAreaDefault=new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight),this.hitArea=this._hitAreaDefault),this._dirty=this._dirty||!this.lastViewport||this.lastViewport.x!==this.x||this.lastViewport.y!==this.y||this.lastViewport.scaleX!==this.scale.x||this.lastViewport.scaleY!==this.scale.y,this.lastViewport={x:this.x,y:this.y,scaleX:this.scale.x,scaleY:this.scale.y},this.emit("frame-end",this))}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.innerWidth,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerHeight,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.screenWidth=t,this.screenHeight=e,"undefined"!==typeof n&&(this._worldWidth=n),"undefined"!==typeof r&&(this._worldHeight=r),this.plugins.resize(),this.dirty=!0}},{key:"getVisibleBounds",value:function(){return new f.Rectangle(this.left,this.top,this.worldScreenWidth,this.worldScreenHeight)}},{key:"toWorld",value:function(t,e){return 2===arguments.length?this.toLocal(new f.Point(t,e)):this.toLocal(t)}},{key:"toScreen",value:function(t,e){return 2===arguments.length?this.toGlobal(new f.Point(t,e)):this.toGlobal(t)}},{key:"moveCenter",value:function(){var t,e;return isNaN(arguments[0])?(t=arguments[0].x,e=arguments[0].y):(t=arguments[0],e=arguments[1]),this.position.set((this.worldScreenWidth/2-t)*this.scale.x,(this.worldScreenHeight/2-e)*this.scale.y),this.plugins.reset(),this.dirty=!0,this}},{key:"moveCorner",value:function(t,e){return 1===arguments.length?this.position.set(-t.x*this.scale.x,-t.y*this.scale.y):this.position.set(-t*this.scale.x,-e*this.scale.y),this.plugins.reset(),this}},{key:"findFitWidth",value:function(t){return this.screenWidth/t}},{key:"findFitHeight",value:function(t){return this.screenHeight/t}},{key:"findFit",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.min(n,r)}},{key:"findCover",value:function(t,e){var n=this.screenWidth/t,r=this.screenHeight/e;return Math.max(n,r)}},{key:"fitWidth",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.x=this.screenWidth/t,r&&(this.scale.y=this.scale.x);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitHeight",value:function(t,e){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;e&&(n=this.center),this.scale.y=this.screenHeight/t,r&&(this.scale.x=this.scale.y);var o=this.plugins.get("clamp-zoom",!0);return!i&&o&&o.clamp(),e&&this.moveCenter(n),this}},{key:"fitWorld",value:function(t){var e;t&&(e=this.center),this.scale.x=this.screenWidth/this.worldWidth,this.scale.y=this.screenHeight/this.worldHeight,this.scale.x1&&void 0!==arguments[1]?arguments[1]:this.worldWidth,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.worldHeight;t&&(e=this.center),this.scale.x=this.screenWidth/n,this.scale.y=this.screenHeight/r,this.scale.xthis.worldWidth,top:this.top<0,bottom:this.bottom>this._worldHeight,cornerPoint:new f.Point(this.worldWidth*this.scale.x-this.screenWidth,this.worldHeight*this.scale.y-this.screenHeight)}}},{key:"drag",value:function(t){return this.plugins.add("drag",new g(this,t)),this}},{key:"clamp",value:function(t){return this.plugins.add("clamp",new w(this,t)),this}},{key:"decelerate",value:function(t){return this.plugins.add("decelerate",new P(this,t)),this}},{key:"bounce",value:function(t){return this.plugins.add("bounce",new k(this,t)),this}},{key:"pinch",value:function(t){return this.plugins.add("pinch",new _(this,t)),this}},{key:"snap",value:function(t,e,n){return this.plugins.add("snap",new R(this,t,e,n)),this}},{key:"follow",value:function(t,e){return this.plugins.add("follow",new F(this,t,e)),this}},{key:"wheel",value:function(t){return this.plugins.add("wheel",new j(this,t)),this}},{key:"animate",value:function(t){return this.plugins.add("animate",new X(this,t)),this}},{key:"clampZoom",value:function(t){return this.plugins.add("clamp-zoom",new E(this,t)),this}},{key:"mouseEdges",value:function(t){return this.plugins.add("mouse-edges",new z(this,t)),this}},{key:"ensureVisible",value:function(t,e,n,r,i){i&&(n>this.worldScreenWidth||r>this.worldScreenHeight)&&(this.fit(!0,n,r),this.emit("zoomed",{viewport:this,type:"ensureVisible"}));var o=!1;tthis.right&&(this.right=t+n,o=!0),ethis.bottom&&(this.bottom=e+r,o=!0),o&&this.emit("moved",{viewport:this,type:"ensureVisible"})}},{key:"worldWidth",get:function(){return this._worldWidth?this._worldWidth:this.width/this.scale.x},set:function(t){this._worldWidth=t,this.plugins.resize()}},{key:"worldHeight",get:function(){return this._worldHeight?this._worldHeight:this.height/this.scale.y},set:function(t){this._worldHeight=t,this.plugins.resize()}},{key:"worldScreenWidth",get:function(){return this.screenWidth/this.scale.x}},{key:"worldScreenHeight",get:function(){return this.screenHeight/this.scale.y}},{key:"screenWorldWidth",get:function(){return this.worldWidth*this.scale.x}},{key:"screenWorldHeight",get:function(){return this.worldHeight*this.scale.y}},{key:"center",get:function(){return new f.Point(this.worldScreenWidth/2-this.x/this.scale.x,this.worldScreenHeight/2-this.y/this.scale.y)},set:function(t){this.moveCenter(t)}},{key:"corner",get:function(){return new f.Point(-this.x/this.scale.x,-this.y/this.scale.y)},set:function(t){this.moveCorner(t)}},{key:"screenWidthInWorldPixels",get:function(){return this.screenWidth/this.scale.x}},{key:"screenHeightInWorldPixels",get:function(){return this.screenHeight/this.scale.y}},{key:"visible",set:function(t){t||this.input.clear(),Object(i.a)(Object(a.a)(n.prototype),"visible",t,this,!0)}},{key:"scaled",set:function(t){this.setZoom(t,!0)},get:function(){return this.scale.x}},{key:"right",get:function(){return-this.x/this.scale.x+this.worldScreenWidth},set:function(t){this.x=-t*this.scale.x+this.screenWidth,this.plugins.reset()}},{key:"left",get:function(){return-this.x/this.scale.x},set:function(t){this.x=-t*this.scale.x,this.plugins.reset()}},{key:"top",get:function(){return-this.y/this.scale.y},set:function(t){this.y=-t*this.scale.y,this.plugins.reset()}},{key:"bottom",get:function(){return-this.y/this.scale.y+this.worldScreenHeight},set:function(t){this.y=-t*this.scale.y+this.screenHeight,this.plugins.reset()}},{key:"dirty",get:function(){return this._dirty},set:function(t){this._dirty=t}},{key:"forceHitArea",get:function(){return this._forceHitArea},set:function(t){t?(this._forceHitArea=t,this.hitArea=t):(this._forceHitArea=null,this.hitArea=new f.Rectangle(0,0,this.worldWidth,this.worldHeight))}},{key:"pause",get:function(){return this._pause},set:function(t){this._pause=t,this.lastViewport=null,this.moving=!1,this.zooming=!1,t&&this.input.pause()}}]),n}(f.Container)}).call(this,n(11))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(25),i=n(23);function o(t,e,n,a){return(o="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(t,e,n,o){var a,s=Object(r.a)(t,e);if(s){if((a=Object.getOwnPropertyDescriptor(s,e)).set)return a.set.call(o,n),!0;if(!a.writable)return!1}if(a=Object.getOwnPropertyDescriptor(o,e)){if(!a.writable)return!1;a.value=n,Object.defineProperty(o,e,a)}else Object(i.a)(o,e,n);return!0})(t,e,n,a)}function a(t,e,n,r,i){if(!o(t,e,n,r||t)&&i)throw new Error("failed to set property");return n}},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),x="undefined"!==typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var T="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:w;e.a=T}).call(this,n(11))},function(t,e,n){var r=n(28),i=n(26);t.exports=function(t,e,n){var o=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(t,e,{leading:o,maxWait:e,trailing:a})}},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(1),i=60103;if(e.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var r,o={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(c=e.ref),e)s.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:l,ref:c,props:o,_owner:a.current}}e.jsx=l,e.jsxs=l},function(t,e,n){"use strict";var r=n(20),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,v=i?Symbol.for("react.lazy"):60116,m="function"===typeof Symbol&&Symbol.iterator;function y(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;nA.length&&A.push(t)}function R(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var s=!1;if(null===t)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case o:case a:s=!0}}if(s)return n(r,t,""===e?"."+N(t,0):e),1;if(s=0,e=""===e?".":e+":",Array.isArray(t))for(var u=0;u