rubyfox-server 2.19.2.0 → 2.20.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubyfox/server/data/config/admin/descriptors/config_cluster.txt +331 -0
- data/lib/rubyfox/server/data/config/admin/descriptors/config_room.txt +1 -9
- data/lib/rubyfox/server/data/config/admin/descriptors/config_server.txt +115 -13
- data/lib/rubyfox/server/data/config/admin/descriptors/config_zone.txt +3 -2
- data/lib/rubyfox/server/data/config/admin/descriptors/runtime_zone.txt +1 -1
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/bootstrap.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/catalina-tasks.xml +39 -39
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/catalina.bat +16 -7
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/catalina.sh +14 -3
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/commons-daemon-native.tar.gz +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/commons-daemon.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/setclasspath.bat +14 -3
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/setclasspath.sh +21 -3
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/tomcat-juli.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/tomcat-native.tar.gz +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/tool-wrapper.bat +1 -1
- data/lib/rubyfox/server/data/lib/apache-tomcat/bin/tool-wrapper.sh +7 -5
- data/lib/rubyfox/server/data/lib/apache-tomcat/conf/Catalina/localhost/rewrite.config +1 -1
- data/lib/rubyfox/server/data/lib/apache-tomcat/conf/catalina.properties +13 -2
- data/lib/rubyfox/server/data/lib/apache-tomcat/conf/context.xml +1 -1
- data/lib/rubyfox/server/data/lib/apache-tomcat/conf/logging.properties +9 -12
- data/lib/rubyfox/server/data/lib/apache-tomcat/conf/server.xml +465 -177
- data/lib/rubyfox/server/data/lib/apache-tomcat/conf/tomcat-users.xml +7 -3
- data/lib/rubyfox/server/data/lib/apache-tomcat/conf/web.xml +55 -12
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/annotations-api.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-ant.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-ha.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-ssi.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-storeconfig.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina-tribes.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/catalina.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/el-api.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jasper-el.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jasper.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jaspic-api.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/jsp-api.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/servlet-api.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/sfs2x-ws-helper.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-api.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-coyote-ffm.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-coyote.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-dbcp.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-cs.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-de.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-es.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-fr.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-ja.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-ko.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-pt-BR.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-ru.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-i18n-zh-CN.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-jdbc.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-jni.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-util-scan.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-util.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/tomcat-websocket.jar +0 -0
- data/lib/rubyfox/server/data/lib/apache-tomcat/lib/websocket-api.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-admin.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-core.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-lib.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-util.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x.jar +0 -0
- data/lib/rubyfox/server/data/www/BlueBox.war +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/_changes-to-default-themes_.txt +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/bootstrap.min.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/custom-bootstrap.min.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/css/all.min.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-brands-400.eot +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-brands-400.svg +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-brands-400.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-regular-400.eot +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-regular-400.svg +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-regular-400.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-solid-900.eot +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-solid-900.svg +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-solid-900.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/fonts.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/jquery.scrolling-tabs.min.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/kendo.custom-bootstrap-v4.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/reset.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/css/style.css +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/data/countries.geo.json +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/FreeMono.otf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/FreeMono.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/FreeMono.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/FreeMono.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-300.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-300.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-300.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-300italic.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-300italic.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-300italic.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-600.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-600.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-600.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-600italic.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-600italic.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-600italic.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-700.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-700.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-700.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-700italic.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-700italic.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-700italic.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-800.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-800.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-800.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-800italic.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-800italic.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-800italic.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-italic.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-italic.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-italic.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-regular.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-regular.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/open-sans-v15-cyrillic_greek_cyrillic-ext_vietnamese_latin_latin-ext_greek-ext-regular.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/roboto-condensed-v16-latin-300.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/roboto-condensed-v16-latin-300.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/roboto-condensed-v16-latin-300.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/roboto-condensed-v16-latin-700.ttf +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/roboto-condensed-v16-latin-700.woff +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/fonts/roboto-condensed-v16-latin-700.woff2 +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/compare.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/demographicsChart.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/demographicsCompare.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/demographicsFilter.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/demographicsMap.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/demographicsTable.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/technologyChart.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/technologyCompare.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/technologyFilter.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/analytics-adv/technologyTable.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/apple-touch-icon-180x180.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/favicon-16x16.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/favicon-32x32.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/favicon-64x64.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/images/logo.png +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/application.bundle.js +2 -2246
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/application.bundle.js.LICENSE.txt +1 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/29.bundle.js +2 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/576.bundle.js +2 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/75.bundle.js +2 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/836.bundle.js +2 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/941.bundle.js +2 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-0.bundle.js +2 -7662
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-1.bundle.js +2 -1021
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-10.bundle.js +2 -799
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-11.bundle.js +2 -607
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-12.bundle.js +2 -1221
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-13.bundle.js +2 -845
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-14.bundle.js +2 -764
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-15.bundle.js +2 -71
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-16.bundle.js +2 -1787
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-17.bundle.js +2 -3383
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-3.bundle.js +2 -280
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-4.bundle.js +2 -234
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-5.bundle.js +2 -2094
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-6.bundle.js +2 -531
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-7.bundle.js +2 -1132
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-8.bundle.js +2 -2673
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-9.bundle.js +2 -768
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/bootstrap.min.js +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/jquery-3.3.1.min.js +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/jquery.scrolling-tabs.min.js +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/js.cookie.min.js +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/kendo.all.min.js +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/popper.min.js +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/sfs2x-api-1.8.4.js +3 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/versions-readme.txt +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/index.html +1 -1
- data/lib/rubyfox/server/data/www/ROOT/admin/manifest.json +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/analytics.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/ban-manager.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/blue-box-monitor.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/cluster-configurator.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/cluster-monitor.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/cluster-updater.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/console.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/dashboard.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/extension-deployer.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/extension-manager.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/license-manager.html +5 -2
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/log-viewer.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/server-configurator.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/servlet-manager.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/template.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/zone-configurator.html +0 -0
- data/lib/rubyfox/server/data/www/ROOT/admin/modules/zone-monitor.html +0 -0
- data/lib/rubyfox/server/version.rb +1 -1
- metadata +11 -13
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/endors~mod-0~mod-1~mod-11~mod-12~mod-17~mod-6~mod-7~mod-8~mod-9.bundle.js +0 -17357
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-12~module-15~module-16~module-4.bundle.js +0 -2665
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/module-13~module-16~module-17~module-4.bundle.js +0 -2665
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~mod-0~mod-1~mod-10~mod-11~mod-16~mod-5~mod-6~mod-7~mod-8.bundle.js +0 -17357
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~mod-0~mod-1~mod-11~mod-12~mod-17~mod-5~mod-6~mod-7~mod-8~mod-9.bundle.js +0 -17357
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~mod-0~mod-1~mod-11~mod-12~mod-17~mod-5~mod-7~mod-8~mod-9.bundle.js +0 -17357
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~module-0.bundle.js +0 -3240
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~module-1.bundle.js +0 -983
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~module-12.bundle.js +0 -807
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/core/modules/vendors~module-13.bundle.js +0 -807
- data/lib/rubyfox/server/data/www/ROOT/admin/assets/js/libs/sfs2x-api-1.7.15.js +0 -8
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see sfs2x-api-1.8.4.js.LICENSE.txt */
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SFS2X=e():t.SFS2X=e()}(this,(()=>(()=>{var t={314:function(){(function(){"use strict";function t(t){throw t}var e=void 0,n=!0,r=this;function o(t,n){var o,i=t.split("."),s=r;!(i[0]in s)&&s.execScript&&s.execScript("var "+i[0]);for(;i.length&&(o=i.shift());)i.length||n===e?s=s[o]?s[o]:s[o]={}:s[o]=n}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function s(e,n){this.index="number"==typeof n?n:0,this.i=0,this.buffer=e instanceof(i?Uint8Array:Array)?e:new(i?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&t(Error("invalid index")),this.buffer.length<=this.index&&this.f()}s.prototype.f=function(){var t,e=this.buffer,n=e.length,r=new(i?Uint8Array:Array)(n<<1);if(i)r.set(e);else for(t=0;t<n;++t)r[t]=e[t];return this.buffer=r},s.prototype.d=function(t,e,n){var r,o=this.buffer,i=this.index,s=this.i,a=o[i];if(n&&1<e&&(t=8<e?(y[255&t]<<24|y[t>>>8&255]<<16|y[t>>>16&255]<<8|y[t>>>24&255])>>32-e:y[t]>>8-e),8>e+s)a=a<<e|t,s+=e;else for(r=0;r<e;++r)a=a<<1|t>>e-r-1&1,8==++s&&(s=0,o[i++]=y[a],a=0,i===o.length&&(o=this.f()));o[i]=a,this.buffer=o,this.i=s,this.index=i},s.prototype.finish=function(){var t,e=this.buffer,n=this.index;return 0<this.i&&(e[n]<<=8-this.i,e[n]=y[e[n]],n++),i?t=e.subarray(0,n):(e.length=n,t=e),t};var a,u=new(i?Uint8Array:Array)(256);for(a=0;256>a;++a){for(var c=l=a,f=7,l=l>>>1;l;l>>>=1)c<<=1,c|=1&l,--f;u[a]=(c<<f&255)>>>0}var y=u;function h(t){this.buffer=new(i?Uint16Array:Array)(2*t),this.length=0}function p(t){var e,n,r,o,s,a,u,c,f,l,y=t.length,h=0,p=Number.POSITIVE_INFINITY;for(c=0;c<y;++c)t[c]>h&&(h=t[c]),t[c]<p&&(p=t[c]);for(e=1<<h,n=new(i?Uint32Array:Array)(e),r=1,o=0,s=2;r<=h;){for(c=0;c<y;++c)if(t[c]===r){for(a=0,u=o,f=0;f<r;++f)a=a<<1|1&u,u>>=1;for(l=r<<16|c,f=a;f<e;f+=s)n[f]=l;++o}++r,o<<=1,s<<=1}return[n,h,p]}function _(t,e){this.h=d,this.w=0,this.input=i&&t instanceof Array?new Uint8Array(t):t,this.b=0,e&&(e.lazy&&(this.w=e.lazy),"number"==typeof e.compressionType&&(this.h=e.compressionType),e.outputBuffer&&(this.a=i&&e.outputBuffer instanceof Array?new Uint8Array(e.outputBuffer):e.outputBuffer),"number"==typeof e.outputIndex&&(this.b=e.outputIndex)),this.a||(this.a=new(i?Uint8Array:Array)(32768))}h.prototype.getParent=function(t){return 2*((t-2)/4|0)},h.prototype.push=function(t,e){var n,r,o,i=this.buffer;for(n=this.length,i[this.length++]=e,i[this.length++]=t;0<n&&(r=this.getParent(n),i[n]>i[r]);)o=i[n],i[n]=i[r],i[r]=o,o=i[n+1],i[n+1]=i[r+1],i[r+1]=o,n=r;return this.length},h.prototype.pop=function(){var t,e,n,r,o,i=this.buffer;for(e=i[0],t=i[1],this.length-=2,i[0]=i[this.length],i[1]=i[this.length+1],o=0;!((r=2*o+2)>=this.length)&&(r+2<this.length&&i[r+2]>i[r]&&(r+=2),i[r]>i[o]);)n=i[o],i[o]=i[r],i[r]=n,n=i[o+1],i[o+1]=i[r+1],i[r+1]=n,o=r;return{index:t,value:e,length:this.length}};var b,d=2,v={NONE:0,r:1,k:d,O:3},m=[];for(b=0;288>b;b++)switch(n){case 143>=b:m.push([b+48,8]);break;case 255>=b:m.push([b-144+400,9]);break;case 279>=b:m.push([b-256+0,7]);break;case 287>=b:m.push([b-280+192,8]);break;default:t("invalid literal: "+b)}function g(t,e){this.length=t,this.H=e}_.prototype.j=function(){var r,o,a,u,c=this.input;switch(this.h){case 0:for(a=0,u=c.length;a<u;){var f,l,y,h=o=i?c.subarray(a,a+65535):c.slice(a,a+65535),p=(a+=o.length)===u,_=e,b=e,v=this.a,g=this.b;if(i){for(v=new Uint8Array(this.a.buffer);v.length<=g+h.length+5;)v=new Uint8Array(v.length<<1);v.set(this.a)}if(f=p?1:0,v[g++]=0|f,y=65536+~(l=h.length)&65535,v[g++]=255&l,v[g++]=l>>>8&255,v[g++]=255&y,v[g++]=y>>>8&255,i)v.set(h,g),g+=h.length,v=v.subarray(0,g);else{for(_=0,b=h.length;_<b;++_)v[g++]=h[_];v.length=g}this.b=g,this.a=v}break;case 1:var E=new s(i?new Uint8Array(this.a.buffer):this.a,this.b);E.d(1,1,n),E.d(1,2,n);var O,R,I,T=S(this,c);for(O=0,R=T.length;O<R;O++)if(I=T[O],s.prototype.d.apply(E,m[I]),256<I)E.d(T[++O],T[++O],n),E.d(T[++O],5),E.d(T[++O],T[++O],n);else if(256===I)break;this.a=E.finish(),this.b=this.a.length;break;case d:var k,j,P,M,N,U,Y,B,L,D,C,F,K,x,V,G=new s(i?new Uint8Array(this.a.buffer):this.a,this.b),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=Array(19);for(k=d,G.d(1,1,n),G.d(k,2,n),j=S(this,c),Y=A(U=w(this.M,15)),L=A(B=w(this.L,7)),P=286;257<P&&0===U[P-1];P--);for(M=30;1<M&&0===B[M-1];M--);var H,X,J,W,$,Q,Z=P,tt=M,et=new(i?Uint32Array:Array)(Z+tt),nt=new(i?Uint32Array:Array)(316),rt=new(i?Uint8Array:Array)(19);for(H=X=0;H<Z;H++)et[X++]=U[H];for(H=0;H<tt;H++)et[X++]=B[H];if(!i)for(H=0,W=rt.length;H<W;++H)rt[H]=0;for(H=$=0,W=et.length;H<W;H+=X){for(X=1;H+X<W&&et[H+X]===et[H];++X);if(J=X,0===et[H])if(3>J)for(;0<J--;)nt[$++]=0,rt[0]++;else for(;0<J;)(Q=138>J?J:138)>J-3&&Q<J&&(Q=J-3),10>=Q?(nt[$++]=17,nt[$++]=Q-3,rt[17]++):(nt[$++]=18,nt[$++]=Q-11,rt[18]++),J-=Q;else if(nt[$++]=et[H],rt[et[H]]++,3>--J)for(;0<J--;)nt[$++]=et[H],rt[et[H]]++;else for(;0<J;)(Q=6>J?J:6)>J-3&&Q<J&&(Q=J-3),nt[$++]=16,nt[$++]=Q-3,rt[16]++,J-=Q}for(r=i?nt.subarray(0,$):nt.slice(0,$),D=w(rt,7),x=0;19>x;x++)z[x]=D[q[x]];for(N=19;4<N&&0===z[N-1];N--);for(C=A(D),G.d(P-257,5,n),G.d(M-1,5,n),G.d(N-4,4,n),x=0;x<N;x++)G.d(z[x],3,n);for(x=0,V=r.length;x<V;x++)if(F=r[x],G.d(C[F],D[F],n),16<=F){switch(x++,F){case 16:K=2;break;case 17:K=3;break;case 18:K=7;break;default:t("invalid code: "+F)}G.d(r[x],K,n)}var ot,it,st,at,ut,ct,ft,lt,yt=[Y,U],ht=[L,B];for(ut=yt[0],ct=yt[1],ft=ht[0],lt=ht[1],ot=0,it=j.length;ot<it;++ot)if(st=j[ot],G.d(ut[st],ct[st],n),256<st)G.d(j[++ot],j[++ot],n),at=j[++ot],G.d(ft[at],lt[at],n),G.d(j[++ot],j[++ot],n);else if(256===st)break;this.a=G.finish(),this.b=this.a.length;break;default:t("invalid compression type")}return this.a};var E=function(){function e(e){switch(n){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:t("invalid length: "+e)}}var r,o,i=[];for(r=3;258>=r;r++)o=e(r),i[r]=o[2]<<24|o[1]<<16|o[0];return i}(),O=i?new Uint32Array(E):E;function S(r,o){function s(e,r){var o,i,s,a,u=e.H,c=[],f=0;switch(o=O[e.length],c[f++]=65535&o,c[f++]=o>>16&255,c[f++]=o>>24,n){case 1===u:i=[0,u-1,0];break;case 2===u:i=[1,u-2,0];break;case 3===u:i=[2,u-3,0];break;case 4===u:i=[3,u-4,0];break;case 6>=u:i=[4,u-5,1];break;case 8>=u:i=[5,u-7,1];break;case 12>=u:i=[6,u-9,2];break;case 16>=u:i=[7,u-13,2];break;case 24>=u:i=[8,u-17,3];break;case 32>=u:i=[9,u-25,3];break;case 48>=u:i=[10,u-33,4];break;case 64>=u:i=[11,u-49,4];break;case 96>=u:i=[12,u-65,5];break;case 128>=u:i=[13,u-97,5];break;case 192>=u:i=[14,u-129,6];break;case 256>=u:i=[15,u-193,6];break;case 384>=u:i=[16,u-257,7];break;case 512>=u:i=[17,u-385,7];break;case 768>=u:i=[18,u-513,8];break;case 1024>=u:i=[19,u-769,8];break;case 1536>=u:i=[20,u-1025,9];break;case 2048>=u:i=[21,u-1537,9];break;case 3072>=u:i=[22,u-2049,10];break;case 4096>=u:i=[23,u-3073,10];break;case 6144>=u:i=[24,u-4097,11];break;case 8192>=u:i=[25,u-6145,11];break;case 12288>=u:i=[26,u-8193,12];break;case 16384>=u:i=[27,u-12289,12];break;case 24576>=u:i=[28,u-16385,13];break;case 32768>=u:i=[29,u-24577,13];break;default:t("invalid distance")}for(o=i,c[f++]=o[0],c[f++]=o[1],c[f++]=o[2],s=0,a=c.length;s<a;++s)d[v++]=c[s];g[c[0]]++,E[c[3]]++,m=e.length+r-1,p=null}var a,u,c,f,l,y,h,p,_,b={},d=i?new Uint16Array(2*o.length):[],v=0,m=0,g=new(i?Uint32Array:Array)(286),E=new(i?Uint32Array:Array)(30),S=r.w;if(!i){for(c=0;285>=c;)g[c++]=0;for(c=0;29>=c;)E[c++]=0}for(g[256]=1,a=0,u=o.length;a<u;++a){for(c=l=0,f=3;c<f&&a+c!==u;++c)l=l<<8|o[a+c];if(b[l]===e&&(b[l]=[]),y=b[l],!(0<m--)){for(;0<y.length&&32768<a-y[0];)y.shift();if(a+3>=u){for(p&&s(p,-1),c=0,f=u-a;c<f;++c)_=o[a+c],d[v++]=_,++g[_];break}0<y.length?(h=R(o,a,y),p?p.length<h.length?(_=o[a-1],d[v++]=_,++g[_],s(h,0)):s(p,-1):h.length<S?p=h:s(h,0)):p?s(p,-1):(_=o[a],d[v++]=_,++g[_])}y.push(a)}return d[v++]=256,g[256]++,r.M=g,r.L=E,i?d.subarray(0,v):d}function R(t,e,n){var r,o,i,s,a,u,c=0,f=t.length;s=0,u=n.length;t:for(;s<u;s++){if(r=n[u-s-1],i=3,3<c){for(a=c;3<a;a--)if(t[r+a-1]!==t[e+a-1])continue t;i=c}for(;258>i&&e+i<f&&t[r+i]===t[e+i];)++i;if(i>c&&(o=r,c=i),258===i)break}return new g(c,e-o)}function w(t,e){var n,r,o,s,a,u=t.length,c=new h(572),f=new(i?Uint8Array:Array)(u);if(!i)for(s=0;s<u;s++)f[s]=0;for(s=0;s<u;++s)0<t[s]&&c.push(s,t[s]);if(n=Array(c.length/2),r=new(i?Uint32Array:Array)(c.length/2),1===n.length)return f[c.pop().index]=1,f;for(s=0,a=c.length/2;s<a;++s)n[s]=c.pop(),r[s]=n[s].value;for(o=function(t,e,n){function r(t){var n=p[t][_[t]];n===e?(r(t+1),r(t+1)):--y[n],++_[t]}var o,s,a,u,c,f=new(i?Uint16Array:Array)(n),l=new(i?Uint8Array:Array)(n),y=new(i?Uint8Array:Array)(e),h=Array(n),p=Array(n),_=Array(n),b=(1<<n)-e,d=1<<n-1;for(f[n-1]=e,s=0;s<n;++s)b<d?l[s]=0:(l[s]=1,b-=d),b<<=1,f[n-2-s]=(f[n-1-s]/2|0)+e;for(f[0]=l[0],h[0]=Array(f[0]),p[0]=Array(f[0]),s=1;s<n;++s)f[s]>2*f[s-1]+l[s]&&(f[s]=2*f[s-1]+l[s]),h[s]=Array(f[s]),p[s]=Array(f[s]);for(o=0;o<e;++o)y[o]=n;for(a=0;a<f[n-1];++a)h[n-1][a]=t[a],p[n-1][a]=a;for(o=0;o<n;++o)_[o]=0;for(1===l[n-1]&&(--y[0],++_[n-1]),s=n-2;0<=s;--s){for(u=o=0,c=_[s+1],a=0;a<f[s];a++)(u=h[s+1][c]+h[s+1][c+1])>t[o]?(h[s][a]=u,p[s][a]=e,c+=2):(h[s][a]=t[o],p[s][a]=o,++o);_[s]=0,1===l[s]&&r(s)}return y}(r,r.length,e),s=0,a=n.length;s<a;++s)f[n[s].index]=o[s];return f}function A(t){var e,n,r,o,s=new(i?Uint16Array:Array)(t.length),a=[],u=[],c=0;for(e=0,n=t.length;e<n;e++)a[t[e]]=1+(0|a[t[e]]);for(e=1,n=16;e<=n;e++)u[e]=c,c+=0|a[e],c<<=1;for(e=0,n=t.length;e<n;e++)for(c=u[t[e]],u[t[e]]+=1,r=s[e]=0,o=t[e];r<o;r++)s[e]=s[e]<<1|1&c,c>>>=1;return s}function I(e,n){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=i?new Uint8Array(e):e,this.s=!1,this.n=k,this.C=!1,!n&&(n={})||(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.C=n.resize)),this.n){case T:this.b=32768,this.a=new(i?Uint8Array:Array)(32768+this.m+258);break;case k:this.b=0,this.a=new(i?Uint8Array:Array)(this.m),this.f=this.K,this.t=this.I,this.o=this.J;break;default:t(Error("invalid inflate mode"))}}var T=0,k=1,j={F:T,D:k};I.prototype.p=function(){for(;!this.s;){var r=J(this,3);switch(1&r&&(this.s=n),r>>>=1){case 0:var o=this.input,s=this.c,a=this.a,u=this.b,c=o.length,f=e,l=a.length,y=e;switch(this.e=this.g=0,s+1>=c&&t(Error("invalid uncompressed block header: LEN")),f=o[s++]|o[s++]<<8,s+1>=c&&t(Error("invalid uncompressed block header: NLEN")),f===~(o[s++]|o[s++]<<8)&&t(Error("invalid uncompressed block header: length verify")),s+f>o.length&&t(Error("input buffer is broken")),this.n){case T:for(;u+f>a.length;){if(f-=y=l-u,i)a.set(o.subarray(s,s+y),u),u+=y,s+=y;else for(;y--;)a[u++]=o[s++];this.b=u,a=this.f(),u=this.b}break;case k:for(;u+f>a.length;)a=this.f({v:2});break;default:t(Error("invalid inflate mode"))}if(i)a.set(o.subarray(s,s+f),u),u+=f,s+=f;else for(;f--;)a[u++]=o[s++];this.c=s,this.b=u,this.a=a;break;case 1:this.o(z,X);break;case 2:$(this);break;default:t(Error("unknown BTYPE: "+r))}}return this.t()};var P,M,N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=i?new Uint16Array(N):N,Y=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],B=i?new Uint16Array(Y):Y,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],D=i?new Uint8Array(L):L,C=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],F=i?new Uint16Array(C):C,K=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=i?new Uint8Array(K):K,V=new(i?Uint8Array:Array)(288);for(P=0,M=V.length;P<M;++P)V[P]=143>=P?8:255>=P?9:279>=P?7:8;var G,q,z=p(V),H=new(i?Uint8Array:Array)(30);for(G=0,q=H.length;G<q;++G)H[G]=5;var X=p(H);function J(e,n){for(var r,o=e.g,i=e.e,s=e.input,a=e.c,u=s.length;i<n;)a>=u&&t(Error("input buffer is broken")),o|=s[a++]<<i,i+=8;return r=o&(1<<n)-1,e.g=o>>>n,e.e=i-n,e.c=a,r}function W(t,e){for(var n,r,o=t.g,i=t.e,s=t.input,a=t.c,u=s.length,c=e[0],f=e[1];i<f&&!(a>=u);)o|=s[a++]<<i,i+=8;return r=(n=c[o&(1<<f)-1])>>>16,t.g=o>>r,t.e=i-r,t.c=a,65535&n}function $(t){function e(t,e,n){var r,o,i,s=this.z;for(i=0;i<t;)switch(r=W(this,e),r){case 16:for(o=3+J(this,2);o--;)n[i++]=s;break;case 17:for(o=3+J(this,3);o--;)n[i++]=0;s=0;break;case 18:for(o=11+J(this,7);o--;)n[i++]=0;s=0;break;default:s=n[i++]=r}return this.z=s,n}var n,r,o,s,a=J(t,5)+257,u=J(t,5)+1,c=J(t,4)+4,f=new(i?Uint8Array:Array)(U.length);for(s=0;s<c;++s)f[U[s]]=J(t,3);if(!i)for(s=c,c=f.length;s<c;++s)f[U[s]]=0;n=p(f),r=new(i?Uint8Array:Array)(a),o=new(i?Uint8Array:Array)(u),t.z=0,t.o(p(e.call(t,a,n,r)),p(e.call(t,u,n,o)))}function Q(t){if("string"==typeof t){var e,n,r=t.split("");for(e=0,n=r.length;e<n;e++)r[e]=(255&r[e].charCodeAt(0))>>>0;t=r}for(var o,i=1,s=0,a=t.length,u=0;0<a;){a-=o=1024<a?1024:a;do{s+=i+=t[u++]}while(--o);i%=65521,s%=65521}return(s<<16|i)>>>0}function Z(e,n){var r,o;this.input=e,this.c=0,!n&&(n={})||(n.index&&(this.c=n.index),n.verify&&(this.N=n.verify)),r=e[this.c++],o=e[this.c++],(15&r)===tt?this.method=tt:t(Error("unsupported compression method")),0!=((r<<8)+o)%31&&t(Error("invalid fcheck flag:"+((r<<8)+o)%31)),32&o&&t(Error("fdict flag is not supported")),this.B=new I(e,{index:this.c,bufferSize:n.bufferSize,bufferType:n.bufferType,resize:n.resize})}I.prototype.o=function(t,e){var n=this.a,r=this.b;this.u=t;for(var o,i,s,a,u=n.length-258;256!==(o=W(this,t));)if(256>o)r>=u&&(this.b=r,n=this.f(),r=this.b),n[r++]=o;else for(a=B[i=o-257],0<D[i]&&(a+=J(this,D[i])),o=W(this,e),s=F[o],0<x[o]&&(s+=J(this,x[o])),r>=u&&(this.b=r,n=this.f(),r=this.b);a--;)n[r]=n[r++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=r},I.prototype.J=function(t,e){var n=this.a,r=this.b;this.u=t;for(var o,i,s,a,u=n.length;256!==(o=W(this,t));)if(256>o)r>=u&&(u=(n=this.f()).length),n[r++]=o;else for(a=B[i=o-257],0<D[i]&&(a+=J(this,D[i])),o=W(this,e),s=F[o],0<x[o]&&(s+=J(this,x[o])),r+a>u&&(u=(n=this.f()).length);a--;)n[r]=n[r++-s];for(;8<=this.e;)this.e-=8,this.c--;this.b=r},I.prototype.f=function(){var t,e,n=new(i?Uint8Array:Array)(this.b-32768),r=this.b-32768,o=this.a;if(i)n.set(o.subarray(32768,n.length));else for(t=0,e=n.length;t<e;++t)n[t]=o[t+32768];if(this.l.push(n),this.q+=n.length,i)o.set(o.subarray(r,r+32768));else for(t=0;32768>t;++t)o[t]=o[r+t];return this.b=32768,o},I.prototype.K=function(t){var e,n,r,o=this.input.length/this.c+1|0,s=this.input,a=this.a;return t&&("number"==typeof t.v&&(o=t.v),"number"==typeof t.G&&(o+=t.G)),n=2>o?(r=(s.length-this.c)/this.u[2]/2*258|0)<a.length?a.length+r:a.length<<1:a.length*o,i?(e=new Uint8Array(n)).set(a):e=a,this.a=e},I.prototype.t=function(){var t,e,n,r,o,s=0,a=this.a,u=this.l,c=new(i?Uint8Array:Array)(this.q+(this.b-32768));if(0===u.length)return i?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(e=0,n=u.length;e<n;++e)for(r=0,o=(t=u[e]).length;r<o;++r)c[s++]=t[r];for(e=32768,n=this.b;e<n;++e)c[s++]=a[e];return this.l=[],this.buffer=c},I.prototype.I=function(){var t,e=this.b;return i?this.C?(t=new Uint8Array(e)).set(this.a.subarray(0,e)):t=this.a.subarray(0,e):(this.a.length>e&&(this.a.length=e),t=this.a),this.buffer=t},Z.prototype.p=function(){var e,n=this.input;return e=this.B.p(),this.c=this.B.c,this.N&&(n[this.c++]<<24|n[this.c++]<<16|n[this.c++]<<8|n[this.c++])>>>0!==Q(e)&&t(Error("invalid adler-32 checksum")),e};var tt=8;function et(t,e){this.input=t,this.a=new(i?Uint8Array:Array)(32768),this.h=nt.k;var n,r={};for(n in!e&&(e={})||"number"!=typeof e.compressionType||(this.h=e.compressionType),e)r[n]=e[n];r.outputBuffer=this.a,this.A=new _(this.input,r)}var nt=v;function rt(t,e){var n,r,i,s;if(Object.keys)n=Object.keys(e);else for(r in n=[],i=0,e)n[i++]=r;for(i=0,s=n.length;i<s;++i)o(t+"."+(r=n[i]),e[r])}et.prototype.j=function(){var e,n,r,o,s,a,u,c=0;if(u=this.a,(e=tt)===tt?n=Math.LOG2E*Math.log(32768)-8:t(Error("invalid compression method")),r=n<<4|e,u[c++]=r,e===tt)switch(this.h){case nt.NONE:s=0;break;case nt.r:s=1;break;case nt.k:s=2;break;default:t(Error("unsupported compression type"))}else t(Error("invalid compression method"));return o=s<<6,u[c++]=o|31-(256*r+o)%31,a=Q(this.input),this.A.b=c,c=(u=this.A.j()).length,i&&((u=new Uint8Array(u.buffer)).length<=c+4&&(this.a=new Uint8Array(u.length+4),this.a.set(u),u=this.a),u=u.subarray(0,c+4)),u[c++]=a>>24&255,u[c++]=a>>16&255,u[c++]=a>>8&255,u[c++]=255&a,u},o("Zlib.Inflate",Z),o("Zlib.Inflate.prototype.decompress",Z.prototype.p),rt("Zlib.Inflate.BufferType",{ADAPTIVE:j.D,BLOCK:j.F}),o("Zlib.Deflate",et),o("Zlib.Deflate.compress",(function(t,e){return new et(t,e).j()})),o("Zlib.Deflate.prototype.compress",et.prototype.j),rt("Zlib.Deflate.CompressionType",{NONE:nt.NONE,FIXED:nt.r,DYNAMIC:nt.k})}).call(this)},500:function(){!function(t){"use strict";function e(t,e,n){return e<=t&&t<=n}function n(t,e){return Math.floor(t/e)}var r=-1,o=-1;function i(t){var e=0;this.get=function(){return e>=t.length?r:Number(t[e])},this.offset=function(n){if((e+=n)<0)throw new Error("Seeking past start of the buffer");if(e>t.length)throw new Error("Seeking past EOF")},this.match=function(n){if(n.length>e+t.length)return!1;var r;for(r=0;r<n.length;r+=1)if(Number(t[e+r])!==n[r])return!1;return!0}}function s(t){var e=0;this.emit=function(n){var o,i=r;for(o=0;o<arguments.length;++o)i=Number(arguments[o]),t[e++]=i;return i}}function a(t){var n=0,r=function(){for(var n=[],r=0,o=t.length;r<t.length;){var i=t.charCodeAt(r);if(e(i,55296,57343))if(e(i,56320,57343))n.push(65533);else if(r===o-1)n.push(65533);else{var s=t.charCodeAt(r+1);if(e(s,56320,57343)){var a=1023&i,u=1023&s;r+=1,n.push(65536+(a<<10)+u)}else n.push(65533)}else n.push(i);r+=1}return n}();this.offset=function(t){if((n+=t)<0)throw new Error("Seeking past start of the buffer");if(n>r.length)throw new Error("Seeking past EOF")},this.get=function(){return n>=r.length?o:r[n]}}function u(){var t="";this.string=function(){return t},this.emit=function(e){e<=65535?t+=String.fromCharCode(e):(e-=65536,t+=String.fromCharCode(55296+(e>>10&1023)),t+=String.fromCharCode(56320+(1023&e)))}}function c(t,e){if(t)throw new Error("EncodingError");return e||65533}function f(t){throw new Error("EncodingError")}function l(t){if(t=String(t).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(h,t))return h[t];throw new Error("EncodingError: Unknown encoding: "+t)}var y={},h={};function p(t,e){return(e||[])[t]||null}function _(t,e){var n=e.indexOf(t);return-1===n?null:n}[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"utf-8"}],heading:"The Encoding"},{encodings:[{labels:["cp864","ibm864"],name:"ibm864"},{labels:["cp866","ibm866"],name:"ibm866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso_8859-2","l2","latin2"],name:"iso-8859-2"},{labels:["csisolatin3","iso-8859-3","iso_8859-3","iso-ir-109","l3","latin3"],name:"iso-8859-3"},{labels:["csisolatin4","iso-8859-4","iso_8859-4","iso-ir-110","l4","latin4"],name:"iso-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso_8859-5","iso-ir-144"],name:"iso-8859-5"},{labels:["arabic","csisolatinarabic","ecma-114","iso-8859-6","iso_8859-6","iso-ir-127"],name:"iso-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso_8859-7","iso-ir-126"],name:"iso-8859-7"},{labels:["csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-i","iso-ir-138","iso_8859-8","visual"],name:"iso-8859-8"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","l6","latin6"],name:"iso-8859-10"},{labels:["iso-8859-13"],name:"iso-8859-13"},{labels:["iso-8859-14","iso8859-14"],name:"iso-8859-14"},{labels:["iso-8859-15","iso_8859-15"],name:"iso-8859-15"},{labels:["iso-8859-16"],name:"iso-8859-16"},{labels:["koi8-r","koi8_r"],name:"koi8-r"},{labels:["koi8-u"],name:"koi8-u"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["iso-8859-11","tis-620","windows-874"],name:"windows-874"},{labels:["windows-1250","x-cp1250"],name:"windows-1250"},{labels:["windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ascii","ansi_x3.4-1968","csisolatin1","iso-8859-1","iso8859-1","iso_8859-1","l1","latin1","us-ascii","windows-1252"],name:"windows-1252"},{labels:["cp1253","windows-1253"],name:"windows-1253"},{labels:["csisolatin5","iso-8859-9","iso-ir-148","l5","latin5","windows-1254"],name:"windows-1254"},{labels:["cp1255","windows-1255"],name:"windows-1255"},{labels:["cp1256","windows-1256"],name:"windows-1256"},{labels:["windows-1257"],name:"windows-1257"},{labels:["cp1258","windows-1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gbk","gb_2312","gb_2312-80","iso-ir-58","x-gbk"],name:"gbk"},{labels:["gb18030"],name:"gb18030"},{labels:["hz-gb-2312"],name:"hz-gb-2312"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"euc-jp"},{labels:["csiso2022jp","iso-2022-jp"],name:"iso-2022-jp"},{labels:["csshiftjis","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"shift_jis"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"euc-kr"},{labels:["csiso2022kr","iso-2022-kr"],name:"iso-2022-kr"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["utf-16","utf-16le"],name:"utf-16"},{labels:["utf-16be"],name:"utf-16be"}],heading:"Legacy utf-16 encodings"}].forEach((function(t){t.encodings.forEach((function(t){y[t.name]=t,t.labels.forEach((function(e){h[e]=t}))}))}));var b=t["encoding-indexes"]||{};function d(t){var n=t.fatal,i=0,s=0,a=0,u=0;this.decode=function(t){var f=t.get();if(f===r)return 0!==s?c(n):o;if(t.offset(1),0===s){if(e(f,0,127))return f;if(e(f,194,223))s=1,u=128,i=f-192;else if(e(f,224,239))s=2,u=2048,i=f-224;else{if(!e(f,240,244))return c(n);s=3,u=65536,i=f-240}return i*=Math.pow(64,s),null}if(!e(f,128,191))return i=0,s=0,a=0,u=0,t.offset(-1),c(n);if(a+=1,i+=(f-128)*Math.pow(64,s-a),a!==s)return null;var l=i,y=u;return i=0,s=0,a=0,u=0,e(l,y,1114111)&&!e(l,55296,57343)?l:c(n)}}function v(t){t.fatal,this.encode=function(t,i){var s,a,u=i.get();if(u===o)return r;if(i.offset(1),e(u,55296,57343))return f();if(e(u,0,127))return t.emit(u);e(u,128,2047)?(s=1,a=192):e(u,2048,65535)?(s=2,a=224):e(u,65536,1114111)&&(s=3,a=240);for(var c=t.emit(n(u,Math.pow(64,s))+a);s>0;){var l=n(u,Math.pow(64,s-1));c=t.emit(128+l%64),s-=1}return c}}function m(t,n){var i=n.fatal;this.decode=function(n){var s=n.get();if(s===r)return o;if(n.offset(1),e(s,0,127))return s;var a=t[s-128];return null===a?c(i):a}}function g(t,n){n.fatal,this.encode=function(n,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return n.emit(s);var a=_(s,t);return null===a&&f(),n.emit(a+128)}}function E(t,n){var i=n.fatal,s=0,a=0,u=0;this.decode=function(n){var f,l=n.get();if(l===r&&0===s&&0===a&&0===u)return o;if(l!==r||0===s&&0===a&&0===u||(s=0,a=0,u=0,c(i)),n.offset(1),0!==u)return f=null,e(l,48,57)&&(f=function(t){if(t>39419&&t<189e3||t>1237575)return null;var e,n=0,r=0,o=b.gb18030;for(e=0;e<o.length;++e){var i=o[e];if(!(i[0]<=t))break;n=i[0],r=i[1]}return r+t-n}(10*(126*(10*(s-129)+(a-48))+(u-129))+l-48)),s=0,a=0,u=0,null===f?(n.offset(-3),c(i)):f;if(0!==a)return e(l,129,254)?(u=l,null):(n.offset(-2),s=0,a=0,c(i));if(0!==s){if(e(l,48,57)&&t)return a=l,null;var y=s,h=null;s=0;var _=l<127?64:65;return(e(l,64,126)||e(l,128,254))&&(h=190*(y-129)+(l-_)),f=null===h?null:p(h,b.gbk),null===h&&n.offset(-1),null===f?c(i):f}return e(l,0,127)?l:128===l?8364:e(l,129,254)?(s=l,null):c(i)}}function O(t,i){i.fatal,this.encode=function(i,s){var a=s.get();if(a===o)return r;if(s.offset(1),e(a,0,127))return i.emit(a);var u=_(a,b.gbk);if(null!==u){var c=n(u,190)+129,l=u%190,y=l<63?64:65;return i.emit(c,l+y)}if(null===u&&!t)return f();u=function(t){var e,n=0,r=0,o=b.gb18030;for(e=0;e<o.length;++e){var i=o[e];if(!(i[1]<=t))break;n=i[1],r=i[0]}return r+t-n}(a);var h=n(n(n(u,10),126),10),p=n(n(u-=10*h*126*10,10),126),d=n(u-=10*p*126,10),v=u-10*d;return i.emit(h+129,p+48,d+129,v+48)}}function S(t){var n=t.fatal,i=!1,s=0;this.decode=function(t){var a=t.get();if(a===r&&0===s)return o;if(a===r&&0!==s)return s=0,c(n);if(t.offset(1),126===s)return s=0,123===a?(i=!0,null):125===a?(i=!1,null):126===a?126:10===a?null:(t.offset(-1),c(n));if(0!==s){var u=s;s=0;var f=null;return e(a,33,126)&&(f=p(190*(u-1)+(a+63),b.gbk)),10===a&&(i=!1),null===f?c(n):f}return 126===a?(s=126,null):i?e(a,32,127)?(s=a,null):(10===a&&(i=!1),c(n)):e(a,0,127)?a:c(n)}}function R(t){t.fatal;var i=!1;this.encode=function(t,s){var a=s.get();if(a===o)return r;if(s.offset(1),e(a,0,127)&&i)return s.offset(-1),i=!1,t.emit(126,125);if(126===a)return t.emit(126,126);if(e(a,0,127))return t.emit(a);if(!i)return s.offset(-1),i=!0,t.emit(126,123);var u=_(a,b.gbk);if(null===u)return f();var c=n(u,190)+1,l=u%190-63;return e(c,33,126)&&e(l,33,126)?t.emit(c,l):f()}}function w(t){var n=t.fatal,i=0,s=null;this.decode=function(t){if(null!==s){var a=s;return s=null,a}var u=t.get();if(u===r&&0===i)return o;if(u===r&&0!==i)return i=0,c(n);if(t.offset(1),0!==i){var f=i,l=null;i=0;var y=u<127?64:98;if((e(u,64,126)||e(u,161,254))&&(l=157*(f-129)+(u-y)),1133===l)return s=772,202;if(1135===l)return s=780,202;if(1164===l)return s=772,234;if(1166===l)return s=780,234;var h=null===l?null:p(l,b.big5);return null===l&&t.offset(-1),null===h?c(n):h}return e(u,0,127)?u:e(u,129,254)?(i=u,null):c(n)}}function A(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return t.emit(s);var a=_(s,b.big5);if(null===a)return f();var u=n(a,157)+129,c=a%157,l=c<63?64:98;return t.emit(u,c+l)}}function I(t){var n=t.fatal,i=0,s=0;this.decode=function(t){var a,u,f=t.get();return f===r?0===i&&0===s?o:(i=0,s=0,c(n)):(t.offset(1),0!==s?(a=s,s=0,u=null,e(a,161,254)&&e(f,161,254)&&(u=p(94*(a-161)+f-161,b.jis0212)),e(f,161,254)||t.offset(-1),null===u?c(n):u):142===i&&e(f,161,223)?(i=0,65377+f-161):143===i&&e(f,161,254)?(i=0,s=f,null):0!==i?(a=i,i=0,u=null,e(a,161,254)&&e(f,161,254)&&(u=p(94*(a-161)+f-161,b.jis0208)),e(f,161,254)||t.offset(-1),null===u?c(n):u):e(f,0,127)?f:142===f||143===f||e(f,161,254)?(i=f,null):c(n))}}function T(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(e(s,65377,65439))return t.emit(142,s-65377+161);var a=_(s,b.jis0208);if(null===a)return f();var u=n(a,94)+161,c=a%94+161;return t.emit(u,c)}}function k(t){var n=t.fatal,i=0,s=!1,a=0;this.decode=function(t){var u=t.get();switch(u!==r&&t.offset(1),i){default:case 0:return 27===u?(i=1,null):e(u,0,127)?u:u===r?o:c(n);case 1:return 36===u||40===u?(a=u,i=2,null):(u!==r&&t.offset(-1),i=0,c(n));case 2:var f=a;return a=0,36!==f||64!==u&&66!==u?36===f&&40===u?(i=3,null):40!==f||66!==u&&74!==u?40===f&&73===u?(i=6,null):(u===r?t.offset(-1):t.offset(-2),i=0,c(n)):(i=0,null):(s=!1,i=4,null);case 3:return 68===u?(s=!0,i=4,null):(u===r?t.offset(-2):t.offset(-3),i=0,c(n));case 4:return 10===u?(i=0,c(n,10)):27===u?(i=1,null):u===r?o:(a=u,i=5,null);case 5:if(i=4,u===r)return c(n);var l=null,y=94*(a-33)+u-33;return e(a,33,126)&&e(u,33,126)&&(l=p(y,!1===s?b.jis0208:b.jis0212)),null===l?c(n):l;case 6:return 27===u?(i=1,null):e(u,33,95)?65377+u-33:u===r?o:c(n)}}}function j(t){t.fatal;var i=0;this.encode=function(t,s){var a=s.get();if(a===o)return r;if(s.offset(1),(e(a,0,127)||165===a||8254===a)&&0!==i)return s.offset(-1),i=0,t.emit(27,40,66);if(e(a,0,127))return t.emit(a);if(165===a)return t.emit(92);if(8254===a)return t.emit(126);if(e(a,65377,65439)&&2!==i)return s.offset(-1),i=2,t.emit(27,40,73);if(e(a,65377,65439))return t.emit(a-65377-33);if(1!==i)return s.offset(-1),i=1,t.emit(27,36,66);var u=_(a,b.jis0208);if(null===u)return f();var c=n(u,94)+33,l=u%94+33;return t.emit(c,l)}}function P(t){var n=t.fatal,i=0;this.decode=function(t){var s=t.get();if(s===r&&0===i)return o;if(s===r&&0!==i)return i=0,c(n);if(t.offset(1),0!==i){var a=i;if(i=0,e(s,64,126)||e(s,128,252)){var u=p(188*(a-(a<160?129:193))+s-(s<127?64:65),b.jis0208);return null===u?c(n):u}return t.offset(-1),c(n)}return e(s,0,128)?s:e(s,161,223)?65377+s-161:e(s,129,159)||e(s,224,252)?(i=s,null):c(n)}}function M(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,128))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(e(s,65377,65439))return t.emit(s-65377+161);var a=_(s,b.jis0208);if(null===a)return f();var u=n(a,188),c=u<31?129:193,l=a%188,y=l<63?64:65;return t.emit(u+c,l+y)}}function N(t){var n=t.fatal,i=0;this.decode=function(t){var s=t.get();if(s===r&&0===i)return o;if(s===r&&0!==i)return i=0,c(n);if(t.offset(1),0!==i){var a=i,u=null;if(i=0,e(a,129,198)){var f=178*(a-129);e(s,65,90)?u=f+s-65:e(s,97,122)?u=f+26+s-97:e(s,129,254)&&(u=f+26+26+s-129)}e(a,199,253)&&e(s,161,254)&&(u=12460+94*(a-199)+(s-161));var l=null===u?null:p(u,b["euc-kr"]);return null===u&&t.offset(-1),null===l?c(n):l}return e(s,0,127)?s:e(s,129,253)?(i=s,null):c(n)}}function U(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return r;if(i.offset(1),e(s,0,127))return t.emit(s);var a,u,c=_(s,b["euc-kr"]);if(null===c)return f();if(c<12460){a=n(c,178)+129;var l=(u=c%178)<26?65:u<52?71:77;return t.emit(a,u+l)}return a=n(c-=12460,94)+199,u=c%94+161,t.emit(a,u)}}function Y(t){var n=t.fatal,i=0,s=0;this.decode=function(t){var a=t.get();switch(a!==r&&t.offset(1),i){default:case 0:return 14===a?(i=4,null):15===a?null:27===a?(i=1,null):e(a,0,127)?a:a===r?o:c(n);case 1:return 36===a?(i=2,null):(a!==r&&t.offset(-1),i=0,c(n));case 2:return 41===a?(i=3,null):(a===r?t.offset(-1):t.offset(-2),i=0,c(n));case 3:return 67===a?(i=0,null):(a===r?t.offset(-2):t.offset(-3),i=0,c(n));case 4:return 10===a?(i=0,c(n,10)):14===a?null:15===a?(i=0,null):a===r?o:(s=a,i=5,null);case 5:if(i=4,a===r)return c(n);var u=null;return e(s,33,70)&&e(a,33,126)?u=p(178*(s-1)+26+26+a-1,b["euc-kr"]):e(s,71,126)&&e(a,33,126)&&(u=p(12460+94*(s-71)+(a-33),b["euc-kr"])),null!==u?u:c(n)}}}function B(t){t.fatal;var i=!1,s=0;this.encode=function(t,a){var u=a.get();if(u===o)return r;if(i||(i=!0,t.emit(27,36,41,67)),a.offset(1),e(u,0,127)&&0!==s)return a.offset(-1),s=0,t.emit(15);if(e(u,0,127))return t.emit(u);if(1!==s)return a.offset(-1),s=1,t.emit(14);var c,l,y=_(u,b["euc-kr"]);return null===y?f():y<12460?(l=y%178-26-26+1,e(c=n(y,178)+1,33,70)&&e(l,33,126)?t.emit(c,l):f()):(l=(y-=12460)%94+33,e(c=n(y,94)+71,71,126)&&e(l,33,126)?t.emit(c,l):f())}}function L(t,n){var i=n.fatal,s=null,a=null;this.decode=function(n){var u,f=n.get();if(f===r&&null===s&&null===a)return o;if(f===r&&(null!==s||null!==a))return c(i);if(n.offset(1),null===s)return s=f,null;if(u=t?(s<<8)+f:(f<<8)+s,s=null,null!==a){var l=a;return a=null,e(u,56320,57343)?65536+1024*(l-55296)+(u-56320):(n.offset(-2),c(i))}return e(u,55296,56319)?(a=u,null):e(u,56320,57343)?c(i):u}}function D(t,i){i.fatal,this.encode=function(i,s){function a(e){var n=e>>8,r=255&e;return t?i.emit(n,r):i.emit(r,n)}var u=s.get();if(u===o)return r;if(s.offset(1),e(u,55296,57343)&&f(),u<=65535)return a(u);var c=(u-65536)%1024+56320;return a(n(u-65536,1024)+55296),a(c)}}y["utf-8"].getEncoder=function(t){return new v(t)},y["utf-8"].getDecoder=function(t){return new d(t)},["ibm864","ibm866","iso-8859-2","iso-8859-3","iso-8859-4","iso-8859-5","iso-8859-6","iso-8859-7","iso-8859-8","iso-8859-10","iso-8859-13","iso-8859-14","iso-8859-15","iso-8859-16","koi8-r","koi8-u","macintosh","windows-874","windows-1250","windows-1251","windows-1252","windows-1253","windows-1254","windows-1255","windows-1256","windows-1257","windows-1258","x-mac-cyrillic"].forEach((function(t){var e=y[t],n=b[t];e.getDecoder=function(t){return new m(n,t)},e.getEncoder=function(t){return new g(n,t)}})),y.gbk.getEncoder=function(t){return new O(!1,t)},y.gbk.getDecoder=function(t){return new E(!1,t)},y.gb18030.getEncoder=function(t){return new O(!0,t)},y.gb18030.getDecoder=function(t){return new E(!0,t)},y["hz-gb-2312"].getEncoder=function(t){return new R(t)},y["hz-gb-2312"].getDecoder=function(t){return new S(t)},y.big5.getEncoder=function(t){return new A(t)},y.big5.getDecoder=function(t){return new w(t)},y["euc-jp"].getEncoder=function(t){return new T(t)},y["euc-jp"].getDecoder=function(t){return new I(t)},y["iso-2022-jp"].getEncoder=function(t){return new j(t)},y["iso-2022-jp"].getDecoder=function(t){return new k(t)},y.shift_jis.getEncoder=function(t){return new M(t)},y.shift_jis.getDecoder=function(t){return new P(t)},y["euc-kr"].getEncoder=function(t){return new U(t)},y["euc-kr"].getDecoder=function(t){return new N(t)},y["iso-2022-kr"].getEncoder=function(t){return new B(t)},y["iso-2022-kr"].getDecoder=function(t){return new Y(t)},y["utf-16"].getEncoder=function(t){return new D(!1,t)},y["utf-16"].getDecoder=function(t){return new L(!1,t)},y["utf-16be"].getEncoder=function(t){return new D(!0,t)},y["utf-16be"].getDecoder=function(t){return new L(!0,t)};var C="utf-8";function F(e,n){return this&&this!==t?(e=e?String(e):C,n=Object(n),this._encoding=l(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(n.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this):new F(e,n)}function K(e,n){return this&&this!==t?(e=e?String(e):C,n=Object(n),this._encoding=l(e),this._streaming=!1,this._decoder=null,this._options={fatal:Boolean(n.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this):new K(e,n)}F.prototype={encode:function(t,e){t=t?String(t):"",e=Object(e),this._streaming||(this._encoder=this._encoding.getEncoder(this._options)),this._streaming=Boolean(e.stream);for(var n=[],i=new s(n),u=new a(t);u.get()!==o;)this._encoder.encode(i,u);if(!this._streaming){var c;do{c=this._encoder.encode(i,u)}while(c!==r);this._encoder=null}return new Uint8Array(n)}},K.prototype={decode:function(t,e){if(t&&!("buffer"in t&&"byteOffset"in t&&"byteLength"in t))throw new TypeError("Expected ArrayBufferView");t||(t=new Uint8Array(0)),e=Object(e),this._streaming||(this._decoder=this._encoding.getDecoder(this._options)),this._streaming=Boolean(e.stream);var n=new i(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),s=function(t,e){return e.match([255,254])?(e.offset(2),"utf-16"):e.match([254,255])?(e.offset(2),"utf-16be"):e.match([239,187,191])?(e.offset(3),"utf-8"):t}(this._encoding.name,n);if(l(s)!==this._encoding)throw new Error("BOM mismatch");for(var a,c=new u;n.get()!==r;)null!==(a=this._decoder.decode(n))&&a!==o&&c.emit(a);if(!this._streaming){do{null!==(a=this._decoder.decode(n))&&a!==o&&c.emit(a)}while(a!==o);this._decoder=null}return c.string()}},t.TextEncoder=t.TextEncoder||F,t.TextDecoder=t.TextDecoder||K}(this)},801:(t,e,n)=>{var r;t=n.nmd(t);var o=function(t,e,n){this._byteOffset=e||0,t instanceof ArrayBuffer?this.buffer=t:"object"==typeof t?(this.dataView=t,e&&(this._byteOffset+=e)):this.buffer=new ArrayBuffer(t||1),this.position=0,this.endianness=null==n?o.LITTLE_ENDIAN:n};o.prototype={},void 0===Uint8Array.prototype.BYTES_PER_ELEMENT&&(Uint8Array.prototype.BYTES_PER_ELEMENT=Uint8Array.BYTES_PER_ELEMENT,Int8Array.prototype.BYTES_PER_ELEMENT=Int8Array.BYTES_PER_ELEMENT,Uint8ClampedArray.prototype.BYTES_PER_ELEMENT=Uint8ClampedArray.BYTES_PER_ELEMENT,Uint16Array.prototype.BYTES_PER_ELEMENT=Uint16Array.BYTES_PER_ELEMENT,Int16Array.prototype.BYTES_PER_ELEMENT=Int16Array.BYTES_PER_ELEMENT,Uint32Array.prototype.BYTES_PER_ELEMENT=Uint32Array.BYTES_PER_ELEMENT,Int32Array.prototype.BYTES_PER_ELEMENT=Int32Array.BYTES_PER_ELEMENT,Float64Array.prototype.BYTES_PER_ELEMENT=Float64Array.BYTES_PER_ELEMENT),o.prototype.save=function(t){var e=new Blob(this.buffer),n=window.webkitURL||window.URL;if(!n||!n.createObjectURL)throw"DataStream.save: Can't create object URL.";var r=n.createObjectURL(e),o=document.createElement("a");o.setAttribute("href",r),o.setAttribute("download",t),o.click(),n.revokeObjectURL(r)},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._dynamicSize=!0,Object.defineProperty(o.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(t){t||this._trimAlloc(),this._dynamicSize=t}}),o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),o.prototype._realloc=function(t){if(this._dynamicSize){var e=this._byteOffset+this.position+t,n=this._buffer.byteLength;if(e<=n)e>this._byteLength&&(this._byteLength=e);else{for(n<1&&(n=1);e>n;)n*=2;var r=new ArrayBuffer(n),o=new Uint8Array(this._buffer);new Uint8Array(r,0,o.length).set(o),this.buffer=r,this._byteLength=e}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),n=new Uint8Array(this._buffer,0,e.length);e.set(n),this.buffer=t}},o.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},o.prototype.isEof=function(){return this.position>=this.byteLength},o.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var n=new Int32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=4*t,n},o.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var n=new Int16Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=2*t,n},o.prototype.mapInt8Array=function(t){this._realloc(1*t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},o.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var n=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=4*t,n},o.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var n=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=2*t,n},o.prototype.mapUint8Array=function(t){this._realloc(1*t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},o.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var n=new Float64Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=8*t,n},o.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var n=new Float32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(n,null==e?this.endianness:e),this.position+=4*t,n},o.prototype.readInt32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var n=new Int32Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readInt16Array=function(t,e){t=null==t?this.byteLength-this.position/2:t;var n=new Int16Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readInt8Array=function(t){t=null==t?this.byteLength-this.position:t;var e=new Int8Array(t);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readUint32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var n=new Uint32Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readUint16Array=function(t,e){t=null==t?this.byteLength-this.position/2:t;var n=new Uint16Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readUint8Array=function(t){t=null==t?this.byteLength-this.position:t;var e=new Uint8Array(t);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readFloat64Array=function(t,e){t=null==t?this.byteLength-this.position/8:t;var n=new Float64Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.readFloat32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var n=new Float32Array(t);return o.memcpy(n.buffer,0,this.buffer,this.byteOffset+this.position,t*n.BYTES_PER_ELEMENT),o.arrayToNative(n,null==e?this.endianness:e),this.position+=n.byteLength,n},o.prototype.writeInt32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Int32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt32Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeInt32(t[n],e)},o.prototype.writeInt16Array=function(t,e){if(this._realloc(2*t.length),t instanceof Int16Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt16Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeInt16(t[n],e)},o.prototype.writeInt8Array=function(t){if(this._realloc(1*t.length),t instanceof Int8Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt8Array(t.length);else for(var e=0;e<t.length;e++)this.writeInt8(t[e])},o.prototype.writeUint32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Uint32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint32Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeUint32(t[n],e)},o.prototype.writeUint16Array=function(t,e){if(this._realloc(2*t.length),t instanceof Uint16Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint16Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeUint16(t[n],e)},o.prototype.writeUint8Array=function(t){if(this._realloc(1*t.length),t instanceof Uint8Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint8Array(t.length);else for(var e=0;e<t.length;e++)this.writeUint8(t[e])},o.prototype.writeFloat64Array=function(t,e){if(this._realloc(8*t.length),t instanceof Float64Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapFloat64Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeFloat64(t[n],e)},o.prototype.writeFloat32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Float32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapFloat32Array(t.length,e);else for(var n=0;n<t.length;n++)this.writeFloat32(t[n],e)},o.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null==t?this.endianness:t);return this.position+=2,e},o.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},o.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null==t?this.endianness:t);return this.position+=2,e},o.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},o.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null==t?this.endianness:t);return this.position+=8,e},o.prototype.writeInt32=function(t,e){this._realloc(4),this._dataView.setInt32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeInt16=function(t,e){this._realloc(2),this._dataView.setInt16(this.position,t,null==e?this.endianness:e),this.position+=2},o.prototype.writeInt8=function(t){this._realloc(1),this._dataView.setInt8(this.position,t),this.position+=1},o.prototype.writeUint32=function(t,e){this._realloc(4),this._dataView.setUint32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeUint16=function(t,e){this._realloc(2),this._dataView.setUint16(this.position,t,null==e?this.endianness:e),this.position+=2},o.prototype.writeUint8=function(t){this._realloc(1),this._dataView.setUint8(this.position,t),this.position+=1},o.prototype.writeFloat32=function(t,e){this._realloc(4),this._dataView.setFloat32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeFloat64=function(t,e){this._realloc(8),this._dataView.setFloat64(this.position,t,null==e?this.endianness:e),this.position+=8},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(t,e,n,r,o){var i=new Uint8Array(t,e,o),s=new Uint8Array(n,r,o);i.set(s)},o.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},o.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},o.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),n=0;n<t.byteLength;n+=t.BYTES_PER_ELEMENT)for(var r=n+t.BYTES_PER_ELEMENT-1,o=n;r>o;r--,o++){var i=e[o];e[o]=e[r],e[r]=i}return t},o.createStringFromArray=function(t){for(var e=[],n=0;n<t.length;n+=32768)e.push(String.fromCharCode.apply(null,t.subarray(n,n+32768)));return e.join("")},o.prototype.failurePosition=0,o.prototype.readStruct=function(t){for(var e,n,r={},o=this.position,i=0;i<t.length;i+=2){if(e=t[i+1],null==(n=this.readType(e,r)))return 0==this.failurePosition&&(this.failurePosition=this.position),this.position=o,null;r[t[i]]=n}return r},o.prototype.readUCS2String=function(t,e){return o.createStringFromArray(this.readUint16Array(t,e))},o.prototype.writeUCS2String=function(t,e,n){null==n&&(n=t.length);for(var r=0;r<t.length&&r<n;r++)this.writeUint16(t.charCodeAt(r),e);for(;r<n;r++)this.writeUint16(0)},o.prototype.readString=function(t,e){return null==e||"ASCII"==e?o.createStringFromArray(this.mapUint8Array(null==t?this.byteLength-this.position:t)):new TextDecoder(e).decode(this.mapUint8Array(t))},o.prototype.writeString=function(t,e,n){if(null==e||"ASCII"==e)if(null!=n){var r=0,o=Math.min(t.length,n);for(r=0;r<o;r++)this.writeUint8(t.charCodeAt(r));for(;r<n;r++)this.writeUint8(0)}else for(r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));else this.writeUint8Array(new TextEncoder(e).encode(t.substring(0,n)))},o.prototype.readCString=function(t){var e=this.byteLength-this.position,n=new Uint8Array(this._buffer,this._byteOffset+this.position),r=e;null!=t&&(r=Math.min(t,e));for(var i=0;i<r&&0!=n[i];i++);var s=o.createStringFromArray(this.mapUint8Array(i));return null!=t?this.position+=r-i:i!=e&&(this.position+=1),s},o.prototype.writeCString=function(t,e){if(null!=e){var n=0,r=Math.min(t.length,e);for(n=0;n<r;n++)this.writeUint8(t.charCodeAt(n));for(;n<e;n++)this.writeUint8(0)}else{for(n=0;n<t.length;n++)this.writeUint8(t.charCodeAt(n));this.writeUint8(0)}},o.prototype.readType=function(t,e){if("function"==typeof t)return t(this,e);if(!("object"!=typeof t||t instanceof Array))return t.get(this,e);if(t instanceof Array&&3!=t.length)return this.readStruct(t,e);var n=null,r=null,i="ASCII",s=this.position;if("string"==typeof t&&/:/.test(t)){var a=t.split(":");t=a[0],r=null!=e[u=a[1]]?parseInt(e[u]):parseInt(a[1])}switch("string"==typeof t&&/,/.test(t)&&(a=t.split(","),t=a[0],i=parseInt(a[1])),t){case"uint8":n=this.readUint8();break;case"int8":n=this.readInt8();break;case"uint16":n=this.readUint16(this.endianness);break;case"int16":n=this.readInt16(this.endianness);break;case"uint32":n=this.readUint32(this.endianness);break;case"int32":n=this.readInt32(this.endianness);break;case"float32":n=this.readFloat32(this.endianness);break;case"float64":n=this.readFloat64(this.endianness);break;case"uint16be":n=this.readUint16(o.BIG_ENDIAN);break;case"int16be":n=this.readInt16(o.BIG_ENDIAN);break;case"uint32be":n=this.readUint32(o.BIG_ENDIAN);break;case"int32be":n=this.readInt32(o.BIG_ENDIAN);break;case"float32be":n=this.readFloat32(o.BIG_ENDIAN);break;case"float64be":n=this.readFloat64(o.BIG_ENDIAN);break;case"uint16le":n=this.readUint16(o.LITTLE_ENDIAN);break;case"int16le":n=this.readInt16(o.LITTLE_ENDIAN);break;case"uint32le":n=this.readUint32(o.LITTLE_ENDIAN);break;case"int32le":n=this.readInt32(o.LITTLE_ENDIAN);break;case"float32le":n=this.readFloat32(o.LITTLE_ENDIAN);break;case"float64le":n=this.readFloat64(o.LITTLE_ENDIAN);break;case"cstring":n=this.readCString(r);break;case"string":n=this.readString(r,i);break;case"u16string":n=this.readUCS2String(r,this.endianness);break;case"u16stringle":n=this.readUCS2String(r,o.LITTLE_ENDIAN);break;case"u16stringbe":n=this.readUCS2String(r,o.BIG_ENDIAN);break;default:if(3==t.length){var u,c=t[1],f=0;if(f="function"==typeof(u=t[2])?u(e,this,t):"string"==typeof u&&null!=e[u]?parseInt(e[u]):parseInt(u),"string"==typeof c){var l=c.replace(/(le|be)$/,""),y=null;switch(/le$/.test(c)?y=o.LITTLE_ENDIAN:/be$/.test(c)&&(y=o.BIG_ENDIAN),"*"==u&&(f=null),l){case"uint8":n=this.readUint8Array(f);break;case"uint16":n=this.readUint16Array(f,y);break;case"uint32":n=this.readUint32Array(f,y);break;case"int8":n=this.readInt8Array(f);break;case"int16":n=this.readInt16Array(f,y);break;case"int32":n=this.readInt32Array(f,y);break;case"float32":n=this.readFloat32Array(f,y);break;case"float64":n=this.readFloat64Array(f,y);break;case"cstring":case"utf16string":case"string":if(null==f)for(n=[];!this.isEof()&&null!=(b=this.readType(c,e));)n.push(b);else{n=new Array(f);for(var h=0;h<f;h++)n[h]=this.readType(c,e)}}}else if("*"==u)for(n=[],this.buffer;;){var p=this.position;try{var _=this.readType(c,e);if(null==_){this.position=p;break}n.push(_)}catch(t){this.position=p;break}}else for(n=new Array(f),h=0;h<f;h++){var b;if(null==(b=this.readType(c,e)))return null;n[h]=b}break}}return null!=r&&(this.position=s+r),n},o.prototype.writeStruct=function(t,e){for(var n=0;n<t.length;n+=2){var r=t[n+1];this.writeType(r,e[t[n]],e)}},o.prototype.writeType=function(t,e,n){if("function"==typeof t)return t(this,e);if("object"==typeof t&&!(t instanceof Array))return t.set(this,e,n);var r=null,i="ASCII",s=this.position;if("string"==typeof t&&/:/.test(t)){var a=t.split(":");t=a[0],r=parseInt(a[1])}switch("string"==typeof t&&/,/.test(t)&&(a=t.split(","),t=a[0],i=parseInt(a[1])),t){case"uint8":this.writeUint8(e);break;case"int8":this.writeInt8(e);break;case"uint16":this.writeUint16(e,this.endianness);break;case"int16":this.writeInt16(e,this.endianness);break;case"uint32":this.writeUint32(e,this.endianness);break;case"int32":this.writeInt32(e,this.endianness);break;case"float32":this.writeFloat32(e,this.endianness);break;case"float64":this.writeFloat64(e,this.endianness);break;case"uint16be":this.writeUint16(e,o.BIG_ENDIAN);break;case"int16be":this.writeInt16(e,o.BIG_ENDIAN);break;case"uint32be":this.writeUint32(e,o.BIG_ENDIAN);break;case"int32be":this.writeInt32(e,o.BIG_ENDIAN);break;case"float32be":this.writeFloat32(e,o.BIG_ENDIAN);break;case"float64be":this.writeFloat64(e,o.BIG_ENDIAN);break;case"uint16le":this.writeUint16(e,o.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(e,o.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(e,o.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(e,o.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(e,o.LITTLE_ENDIAN);break;case"float64le":this.writeFloat64(e,o.LITTLE_ENDIAN);break;case"cstring":this.writeCString(e,r);break;case"string":this.writeString(e,i,r);break;case"u16string":this.writeUCS2String(e,this.endianness,r);break;case"u16stringle":this.writeUCS2String(e,o.LITTLE_ENDIAN,r);break;case"u16stringbe":this.writeUCS2String(e,o.BIG_ENDIAN,r);break;default:if(3==t.length){for(var u=t[1],c=0;c<e.length;c++)this.writeType(u,e[c]);break}this.writeStruct(t,e)}null!=r&&(this.position=s,this._realloc(r),this.position=s+r)},void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r),t&&t.exports&&(t.exports=o)}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};return(()=>{"use strict";n.r(r),n.d(r,{AddBuddyRequest:()=>Ri,AdminMessageRequest:()=>Nr,BanMode:()=>Dn,BanUserRequest:()=>mu,BlockBuddyRequest:()=>Di,BoolMatch:()=>La,BuddyMessageRequest:()=>tc,ChangeRoomCapacityRequest:()=>_r,ChangeRoomNameRequest:()=>er,ChangeRoomPasswordStateRequest:()=>ur,ClientDisconnectionReason:()=>_,ClusterInviteUsersRequest:()=>as,ClusterJoinOrCreateRequest:()=>ps,ClusterRoomSettings:()=>Nn,ClusterTarget:()=>Fn,CreateRoomRequest:()=>Xn,CreateSFSGameRequest:()=>Iu,ExtensionRequest:()=>Is,FindRoomsRequest:()=>Do,FindUsersRequest:()=>qo,GoOnlineRequest:()=>qi,InitBuddyListRequest:()=>di,InvitationReply:()=>We,InvitationReplyRequest:()=>Uu,InviteUsersRequest:()=>Zo,JoinRoomInvitationRequest:()=>Ku,JoinRoomRequest:()=>mn,KickUserRequest:()=>yu,LeaveRoomRequest:()=>iu,LogLevel:()=>P,LoggerEvent:()=>M,LogicOperator:()=>Po,LoginRequest:()=>on,LogoutRequest:()=>yn,MD5:()=>$e,MMOItemVariable:()=>we,MMORoomSettings:()=>Mn,MapLimits:()=>Ln,MatchExpression:()=>jo,MessageRecipientMode:()=>Cn,ModeratorMessageRequest:()=>Mr,NumberMatch:()=>Da,ObjectMessageRequest:()=>kr,PasswordUtil:()=>qa,PlayerToSpectatorRequest:()=>Ro,PrivateMessageRequest:()=>Pr,PublicMessageRequest:()=>jr,QuickJoinGameRequest:()=>Ju,QuickJoinOrCreateRoomRequest:()=>Qa,RemoveBuddyRequest:()=>Pi,ReservedBuddyVariables:()=>Le,ReservedRoomVariables:()=>Mt,RoomEvents:()=>Yn,RoomExtension:()=>Bn,RoomPermissions:()=>Un,RoomProperties:()=>Fa,RoomSettings:()=>jn,SFSArray:()=>it,SFSBuddyEvent:()=>S,SFSBuddyVariable:()=>De,SFSClusterEvent:()=>R,SFSDataType:()=>nt,SFSErrorCodes:()=>vt,SFSEvent:()=>O,SFSGameSettings:()=>Pn,SFSObject:()=>ot,SFSRoom:()=>ne,SFSRoomVariable:()=>Nt,SFSUserVariable:()=>le,SetBuddyVariablesRequest:()=>Zi,SetRoomVariablesRequest:()=>Kr,SetUserPositionRequest:()=>fi,SetUserVariablesRequest:()=>Jr,SmartFox:()=>wa,SpectatorToPlayerRequest:()=>bo,StringMatch:()=>Ca,SubscribeRoomGroupRequest:()=>no,UnsubscribeRoomGroupRequest:()=>co,UserPrivileges:()=>ve,UserProperties:()=>Ka,VariableType:()=>St,Vec3D:()=>st});var t=n(801),e=n.n(t),o=n(500);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var c=Symbol(),f=Symbol(),l=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e!==f)throw"SFSDataSerializer is a singleton class; you can't instantiate it"}return n=t,i=[{key:"instance",get:function(){return this[c]||(this[c]=new t(f)),Object.seal(this[c])}}],(r=[{key:"object2binary",value:function(t){var n=new(e())(new ArrayBuffer(0),0,e().BIG_ENDIAN);return n.writeInt8(nt.SFS_OBJECT),n.writeInt16(t.size()),this.obj2bin(t,n),new Uint8Array(n.buffer)}},{key:"obj2bin",value:function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.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)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(t.keys());try{for(r.s();!(n=r.n()).done;){var o=n.value,i=t.getWrappedItem(o);this.encodeSFSObjectKey(e,o),this.encodeObject(e,i)}}catch(t){r.e(t)}finally{r.f()}}},{key:"array2binary",value:function(t){var n=new(e())(new ArrayBuffer(0),0,e().BIG_ENDIAN);return n.writeInt8(nt.SFS_ARRAY),n.writeInt16(t.size()),this.arr2bin(t,n),new Uint8Array(n.buffer)}},{key:"arr2bin",value:function(t,e){for(var n=0;n<t.size();n++){var r=t.getWrappedItem(n);this.encodeObject(e,r)}}},{key:"encodeSFSObjectKey",value:function(t,e){var n=new o.TextEncoder("utf-8").encode(e),r=n.length;if(r>255)throw new SFSError("Object key size: "+r+" bytes; expected max 255 bytes");t.writeInt16(r),t.writeUint8Array(n)}},{key:"encodeObject",value:function(t,e){var n=e.type;if(n===nt.NULL)this.binEncode_NULL(t,e);else if(n===nt.BOOL)this.binEncode_BOOL(t,e);else if(n===nt.BOOL_ARRAY)this.binEncode_BOOL_ARRAY(t,e);else if(n===nt.BYTE)this.binEncode_BYTE(t,e);else if(n===nt.BYTE_ARRAY)this.binEncode_BYTE_ARRAY(t,e);else if(n===nt.SHORT)this.binEncode_SHORT(t,e);else if(n===nt.SHORT_ARRAY)this.binEncode_SHORT_ARRAY(t,e);else if(n===nt.INT)this.binEncode_INT(t,e);else if(n===nt.INT_ARRAY)this.binEncode_INT_ARRAY(t,e);else if(n===nt.LONG)this.binEncode_LONG(t,e);else if(n===nt.LONG_ARRAY)this.binEncode_LONG_ARRAY(t,e);else if(n===nt.FLOAT)this.binEncode_FLOAT(t,e);else if(n===nt.FLOAT_ARRAY)this.binEncode_FLOAT_ARRAY(t,e);else if(n===nt.DOUBLE)this.binEncode_DOUBLE(t,e);else if(n===nt.DOUBLE_ARRAY)this.binEncode_DOUBLE_ARRAY(t,e);else if(n===nt.UTF_STRING)this.binEncode_UTF_STRING(t,e);else if(n===nt.TEXT)this.binEncode_TEXT(t,e);else if(n===nt.UTF_STRING_ARRAY)this.binEncode_UTF_STRING_ARRAY(t,e);else if(n===nt.SFS_ARRAY)t.writeUint8Array(this.array2binary(e.value));else{if(n!==nt.SFS_OBJECT)throw"Unknow SFSDataType ID: "+n;t.writeUint8Array(this.object2binary(e.value))}return t}},{key:"binEncode_NULL",value:function(t,e){t.writeUint8(e.type)}},{key:"binEncode_BOOL",value:function(t,e){t.writeUint8(e.type),t.writeUint8(e.value?1:0)}},{key:"binEncode_BOOL_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint16(n.length);for(var r=0;r<n.length;r++)t.writeUint8(n[r]?1:0)}},{key:"binEncode_BYTE",value:function(t,e){t.writeUint8(e.type),t.writeUint8(e.value)}},{key:"binEncode_BYTE_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint32(n.length),t.writeUint8Array(n)}},{key:"binEncode_SHORT",value:function(t,e){t.writeUint8(e.type),t.writeUint16(e.value)}},{key:"binEncode_SHORT_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint16(n.length);for(var r=0;r<n.length;r++)t.writeUint16(n[r])}},{key:"binEncode_INT",value:function(t,e){t.writeUint8(e.type),t.writeUint32(e.value)}},{key:"binEncode_INT_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint16(n.length);for(var r=0;r<n.length;r++)t.writeUint32(n[r])}},{key:"binEncode_LONG",value:function(t,e){var n=e.value,r=Math.floor(n/Math.pow(2,32)),o=n%Math.pow(2,32);t.writeUint8(e.type),t.writeInt32(r),t.writeInt32(o)}},{key:"binEncode_LONG_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint16(n.length);for(var r=0;r<n.length;r++){var o=n[r],i=Math.floor(o/Math.pow(2,32)),s=o%Math.pow(2,32);t.writeInt32(i),t.writeInt32(s)}}},{key:"binEncode_FLOAT",value:function(t,e){t.writeUint8(e.type),t.writeFloat32(e.value)}},{key:"binEncode_FLOAT_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint16(n.length);for(var r=0;r<n.length;r++)t.writeFloat32(n[r])}},{key:"binEncode_DOUBLE",value:function(t,e){t.writeUint8(e.type),t.writeFloat64(e.value)}},{key:"binEncode_DOUBLE_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint16(n.length);for(var r=0;r<n.length;r++)t.writeFloat64(n[r])}},{key:"binEncode_UTF_STRING",value:function(t,e){var n=new o.TextEncoder("utf-8").encode(e.value);t.writeUint8(e.type),t.writeUint16(n.length),t.writeUint8Array(n)}},{key:"binEncode_TEXT",value:function(t,e){var n=new o.TextEncoder("utf-8").encode(e.value);t.writeUint8(e.type),t.writeUint32(n.length),t.writeUint8Array(n)}},{key:"binEncode_UTF_STRING_ARRAY",value:function(t,e){var n=e.value;t.writeUint8(e.type),t.writeUint16(n.length);for(var r=0;r<n.length;r++){var i=new o.TextEncoder("utf-8").encode(n[r]);t.writeUint16(i.byteLength),t.writeUint8Array(i)}}},{key:"binary2object",value:function(t){if(t.byteLength<3)throw"Can't decode an SFSObject. Byte data is insufficient. Size: "+t.byteLength+" bytes";return this.decodeSFSObject(new(e())(t,0,e().BIG_ENDIAN))}},{key:"binary2array",value:function(t){if(t.byteLength<3)throw"Can't decode an SFSArray. Byte data is insufficient. Size: "+t.byteLength+" bytes";return this.decodeSFSArray(new(e())(t,0,e().BIG_ENDIAN))}},{key:"decodeSFSObject",value:function(t){var e=new ot,n=t.readUint8();if(n!==nt.SFS_OBJECT)throw"Invalid SFSDataType. Expected: "+nt.SFS_OBJECT+", found: "+n;var r=t.readUint16();if(r<0)throw"Can't decode SFSObject. Size is negative: "+r;try{for(var i=0;i<r;i++){var s=t.readUint16();if(s<0||s>255)throw"Invalid SFSObject key length. Found: "+s;var a=t.readUint8Array(s),u=new o.TextDecoder("utf-8").decode(a),c=this.decodeObject(t);if(null==c)throw"Could not decode value for key: "+u;e.put(u,c.value,c.type,!0)}}catch(t){throw t}return e}},{key:"decodeSFSArray",value:function(t){var e=new it,n=t.readUint8();if(n!==nt.SFS_ARRAY)throw"Invalid SFSDataType. Expected: "+nt.SFS_ARRAY+", found: "+n;var r=t.readInt16();if(r<0)throw"Can't decode SFSArray. Size is negative: "+r;try{for(var o=0;o<r;o++){var i=this.decodeObject(t);if(null==i)throw"Could not decode value for index: "+o;e.add(i.value,i.type,!0)}}catch(t){throw t}return e}},{key:"decodeObject",value:function(t){var e=null,n=t.readUint8();if(n===nt.NULL)e=this.binDecode_NULL(t);else if(n===nt.BOOL)e=this.binDecode_BOOL(t);else if(n===nt.BOOL_ARRAY)e=this.binDecode_BOOL_ARRAY(t);else if(n===nt.BYTE)e=this.binDecode_BYTE(t);else if(n===nt.BYTE_ARRAY)e=this.binDecode_BYTE_ARRAY(t);else if(n===nt.SHORT)e=this.binDecode_SHORT(t);else if(n===nt.SHORT_ARRAY)e=this.binDecode_SHORT_ARRAY(t);else if(n===nt.INT)e=this.binDecode_INT(t);else if(n===nt.INT_ARRAY)e=this.binDecode_INT_ARRAY(t);else if(n===nt.LONG)e=this.binDecode_LONG(t);else if(n===nt.LONG_ARRAY)e=this.binDecode_LONG_ARRAY(t);else if(n===nt.FLOAT)e=this.binDecode_FLOAT(t);else if(n===nt.FLOAT_ARRAY)e=this.binDecode_FLOAT_ARRAY(t);else if(n===nt.DOUBLE)e=this.binDecode_DOUBLE(t);else if(n===nt.DOUBLE_ARRAY)e=this.binDecode_DOUBLE_ARRAY(t);else if(n===nt.UTF_STRING)e=this.binDecode_UTF_STRING(t);else if(n===nt.TEXT)e=this.binDecode_TEXT(t);else if(n===nt.UTF_STRING_ARRAY)e=this.binDecode_UTF_STRING_ARRAY(t);else if(n===nt.SFS_ARRAY){t.seek(t.position-1);var r=this.decodeSFSArray(t);e=new rt(n,r)}else{if(n!==nt.SFS_OBJECT)throw"Unknow SFSDataType ID: "+n;t.seek(t.position-1);var o=this.decodeSFSObject(t);e=new rt(n,o)}return e}},{key:"binDecode_NULL",value:function(t){return new rt(nt.NULL,null)}},{key:"binDecode_BOOL",value:function(t){var e=t.readUint8(),n=null;if(0===e)n=!1;else{if(1!==e)throw"Error decoding Bool type. Illegal value: "+e;n=!0}return new rt(nt.BOOL,n)}},{key:"binDecode_BOOL_ARRAY",value:function(t){for(var e=this.getTypedArraySize(t),n=[],r=0;r<e;r++){var o=t.readUint8(),i=null;if(0===o)i=!1;else{if(1!==o)throw"Error decoding Bool type. Illegal value: "+o;i=!0}n.push(i)}return new rt(nt.BOOL_ARRAY,n)}},{key:"binDecode_BYTE",value:function(t){var e=t.readUint8();return new rt(nt.BYTE,e)}},{key:"binDecode_BYTE_ARRAY",value:function(t){var e=t.readInt32();if(e<0)throw"Error decoding typed array size. Negative size: "+e;for(var n=new Uint8Array(e),r=0;r<e;r++)n[r]=t.readUint8();return new rt(nt.BYTE_ARRAY,n)}},{key:"binDecode_SHORT",value:function(t){var e=t.readInt16();return new rt(nt.SHORT,e)}},{key:"binDecode_SHORT_ARRAY",value:function(t){for(var e=this.getTypedArraySize(t),n=[],r=0;r<e;r++)n.push(t.readInt16());return new rt(nt.SHORT_ARRAY,n)}},{key:"binDecode_INT",value:function(t){var e=t.readInt32();return new rt(nt.INT,e)}},{key:"binDecode_INT_ARRAY",value:function(t){for(var e=this.getTypedArraySize(t),n=[],r=0;r<e;r++)n.push(t.readInt32());return new rt(nt.INT_ARRAY,n)}},{key:"binDecode_LONG",value:function(t){var e=t.readInt32(),n=t.readUint32(),r=e*Math.pow(2,32)+n;return new rt(nt.LONG,r)}},{key:"binDecode_LONG_ARRAY",value:function(t){for(var e=this.getTypedArraySize(t),n=[],r=0;r<e;r++){var o=t.readInt32(),i=t.readUint32(),s=o*Math.pow(2,32)+i;n.push(s)}return new rt(nt.LONG_ARRAY,n)}},{key:"binDecode_FLOAT",value:function(t){var e=t.readFloat32();return new rt(nt.FLOAT,e)}},{key:"binDecode_FLOAT_ARRAY",value:function(t){for(var e=this.getTypedArraySize(t),n=[],r=0;r<e;r++)n.push(t.readFloat32());return new rt(nt.FLOAT_ARRAY,n)}},{key:"binDecode_DOUBLE",value:function(t){var e=t.readFloat64();return new rt(nt.DOUBLE,e)}},{key:"binDecode_DOUBLE_ARRAY",value:function(t){for(var e=this.getTypedArraySize(t),n=[],r=0;r<e;r++)n.push(t.readFloat64());return new rt(nt.DOUBLE_ARRAY,n)}},{key:"binDecode_UTF_STRING",value:function(t){var e=t.readInt16();if(e<0)throw"Error decoding UTF_STRING. Negative size: "+e;var n=t.readUint8Array(e),r=new o.TextDecoder("utf-8").decode(n);return new rt(nt.UTF_STRING,r)}},{key:"binDecode_UTF_STRING_ARRAY",value:function(t){for(var e=this.getTypedArraySize(t),n=[],r=0;r<e;r++){var i=t.readInt16();if(i<0)throw"Error decoding UTF_STRING. Negative size: "+i;var s=t.readUint8Array(i),a=new o.TextDecoder("utf-8").decode(s);n.push(a)}return new rt(nt.UTF_STRING_ARRAY,n)}},{key:"binDecode_TEXT",value:function(t){var e=t.readInt32();if(e<0)throw"Error decoding TEXT. Negative size: "+e;var n=t.readUint8Array(e),r=new o.TextDecoder("utf-8").decode(n);return new rt(nt.TEXT,r)}},{key:"getTypedArraySize",value:function(t){var e=t.readUint16();if(e<0)throw"Error decoding typed array size. Negative size: "+e;return e}}])&&a(n.prototype,r),i&&a(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}();function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function p(t){var e=function(t){if("object"!=y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:e+""}var _=Object.freeze({IDLE:"idle",KICK:"kick",BAN:"ban",MANUAL:"manual",UNKNOWN:"unknown",getReason:function(t){switch(t){case 0:return this.IDLE;case 1:return this.KICK;case 2:return this.BAN;case 3:return this.MANUAL;case 4:return this.UNKNOWN}}}),b=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"TOKEN_INDENT_OPEN",get:function(){return"{"}},{key:"TOKEN_INDENT_CLOSE",get:function(){return"}"}},{key:"TOKEN_DIVIDER",get:function(){return";"}},{key:"NEW_LINE",get:function(){return"\n"}},{key:"TAB",get:function(){return"\t"}},{key:"DOT",get:function(){return"."}},{key:"HEX_BYTES_PER_LINE",get:function(){return 16}},{key:"prettyPrintByteArray",value:function(t){return null==t?"Null":t.length<32?t.toString():"Byte["+t.length+"]"}},{key:"prettyPrintDump",value:function(t){for(var e="",n=0,r=0;r<t.length;r++){var o=t.charAt(r);if(o==this.TOKEN_INDENT_OPEN)n++,e+=this.NEW_LINE+this.getFormatTabs(n);else if(o==this.TOKEN_INDENT_CLOSE){if(--n<0)throw"DumpFormatter: the indentPos is negative. TOKENS ARE NOT BALANCED!";e+=this.NEW_LINE+this.getFormatTabs(n)}else o==this.TOKEN_DIVIDER?e+=this.NEW_LINE+this.getFormatTabs(n):e+=o}if(0!=n)throw"DumpFormatter: the indentPos is not === 0 ("+n+"). TOKENS ARE NOT BALANCED!";return e}},{key:"getFormatTabs",value:function(t){return this.strFill(this.TAB,t)}},{key:"strFill",value:function(t,e){for(var n="",r=0;r<e;r++)n+=t;return n}},{key:"hexDump",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;-1===e&&(e=this.HEX_BYTES_PER_LINE);var n="Binary size: "+t.byteLength+this.NEW_LINE,r="",o="",i=0,s=0,a=null;do{var u=(a=t[i]).toString(16).toUpperCase();1===u.length&&(u="0"+u),r+=u+" ",o+=a>=33&&a<=126?String.fromCharCode(a):this.DOT,++s===e&&(s=0,n+=r+this.TAB+o+this.NEW_LINE,r="",o="")}while(++i<t.length);if(0!==s){for(var c=e-s;c>0;--c)r+=" ",o+=" ";n+=r+this.TAB+o+this.NEW_LINE}return n}}],null&&h(t.prototype,null),e&&h(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function g(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}var E=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._listenersByEvent={}},(e=[{key:"addEventListener",value:function(t,e,n){this._listenersByEvent[t]||(this._listenersByEvent[t]=[]),this._listenersByEvent[t].push({callback:e,scope:n})}},{key:"removeEventListener",value:function(t,e){var n=this._listenersByEvent[t];if(n)for(var r=0;r<n.length;r++)if(n[r].callback===e){n.splice(r,1);break}}},{key:"dispatchEvent",value:function(t,e){var n=this._listenersByEvent[t];if(n){var r,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return v(t,e);var n={}.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)?v(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.callback.call(i.scope,e)}}catch(t){o.e(t)}finally{o.f()}}}}])&&m(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),O=Object.freeze({CONNECTION:"connection",CONNECTION_LOST:"connectionLost",LOGIN:"login",LOGIN_ERROR:"loginError",LOGOUT:"logout",ROOM_ADD:"roomAdd",ROOM_CREATION_ERROR:"roomCreationError",ROOM_REMOVE:"roomRemove",ROOM_JOIN:"roomJoin",ROOM_JOIN_ERROR:"roomJoinError",USER_ENTER_ROOM:"userEnterRoom",USER_EXIT_ROOM:"userExitRoom",USER_COUNT_CHANGE:"userCountChange",PROXIMITY_LIST_UPDATE:"proximityListUpdate",PLAYER_TO_SPECTATOR:"playerToSpectator",PLAYER_TO_SPECTATOR_ERROR:"playerToSpectatorError",SPECTATOR_TO_PLAYER:"spectatorToPlayer",SPECTATOR_TO_PLAYER_ERROR:"spectatorToPlayerError",ROOM_NAME_CHANGE:"roomNameChange",ROOM_NAME_CHANGE_ERROR:"roomNameChangeError",ROOM_PASSWORD_STATE_CHANGE:"roomPasswordStateChange",ROOM_PASSWORD_STATE_CHANGE_ERROR:"roomPasswordStateChangeError",ROOM_CAPACITY_CHANGE:"roomCapacityChange",ROOM_CAPACITY_CHANGE_ERROR:"roomCapacityChangeError",PUBLIC_MESSAGE:"publicMessage",PRIVATE_MESSAGE:"privateMessage",OBJECT_MESSAGE:"objectMessage",MODERATOR_MESSAGE:"moderatorMessage",ADMIN_MESSAGE:"adminMessage",EXTENSION_RESPONSE:"extensionResponse",ROOM_VARIABLES_UPDATE:"roomVariablesUpdate",USER_VARIABLES_UPDATE:"userVariablesUpdate",MMOITEM_VARIABLES_UPDATE:"mmoItemVariablesUpdate",ROOM_GROUP_SUBSCRIBE:"roomGroupSubscribe",ROOM_GROUP_SUBSCRIBE_ERROR:"roomGroupSubscribeError",ROOM_GROUP_UNSUBSCRIBE:"roomGroupUnsubscribe",ROOM_GROUP_UNSUBSCRIBE_ERROR:"roomGroupUnsubscribeError",ROOM_FIND_RESULT:"roomFindResult",USER_FIND_RESULT:"userFindResult",INVITATION:"invitation",INVITATION_REPLY:"invitationReply",INVITATION_REPLY_ERROR:"invitationReplyError",PING_PONG:"pingPong",SOCKET_ERROR:"socketError"}),S=Object.freeze({BUDDY_LIST_INIT:"buddyListInit",BUDDY_ADD:"buddyAdd",BUDDY_REMOVE:"buddyRemove",BUDDY_BLOCK:"buddyBlock",BUDDY_ERROR:"buddyError",BUDDY_ONLINE_STATE_CHANGE:"buddyOnlineStateChange",BUDDY_VARIABLES_UPDATE:"buddyVariablesUpdate",BUDDY_MESSAGE:"buddyMessage"}),R=Object.freeze({CONNECTION_REQUIRED:"connectionRequired",LOAD_BALANCER_ERROR:"loadBalancerError"});function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function A(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,I(r.key),r)}}function I(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}function T(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(T=function(){return!!t})()}function k(t){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},k(t)}function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},j(t,e)}var P=Object.freeze({DEBUG:0,INFO:1,WARN:2,ERROR:3,toString:function(t){return t===this.DEBUG?"DEBUG":t===this.INFO?"INFO":t===this.WARN?"WARN":t===this.ERROR?"ERROR":void 0}}),M=Object.freeze({DEBUG:"debug",INFO:"info",WARNING:"warn",ERROR:"error"}),N=Symbol(),U=Symbol(),Y=function(t){function e(t){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,n){return e=k(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,T()?Reflect.construct(e,n||[],k(t).constructor):e.apply(t,n))}(this,e),t!==U)throw"Logger is a singleton class; you can't instantiate it";return n._enableConsoleOutput=void 0!==console,n._enableEventDispatching=!1,n._level=P.INFO,n._useBasicLog=!0,void 0!==console&&(n._useBasicLog="function"!=typeof console.debug||"function"!=typeof console.info||"function"!=typeof console.warn||"function"!=typeof console.error),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(e,t),n=e,r=[{key:"level",get:function(){return this._level},set:function(t){this.isValidLevel(t)&&(this._level=t)}},{key:"enableConsoleOutput",get:function(){return this._enableConsoleOutput},set:function(t){void 0!==console&&(this._enableConsoleOutput=t)}},{key:"enableEventDispatching",get:function(){return this._enableEventDispatching},set:function(t){this._enableEventDispatching=t}},{key:"log",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(this.isValidLevel(t)&&t>=this._level){if(this._enableConsoleOutput){var i=function(t,n){e._useBasicLog&&(n=function(t){console.log(t)}),n("[ ".concat("SFS2X"," | ").concat(t," ] ").concat(r.join(" ")))};switch(t){case P.DEBUG:i("DEBUG",(function(t){console.debug(t)}));break;case P.INFO:i("INFO",(function(t){console.info(t)}));break;case P.WARN:i("WARN",(function(t){console.warn(t)}));break;case P.ERROR:i("ERROR",(function(t){console.error(t)}))}}this._enableEventDispatching&&this.dispatchEvent(P.toString(t).toLowerCase(),{message:r.join(" ")})}}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.log(P.DEBUG,e)}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.log(P.INFO,e)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.log(P.WARN,e)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.log(P.ERROR,e)}},{key:"isValidLevel",value:function(t){if(!Number.isInteger(t)||t<P.DEBUG||t>P.ERROR)throw"Logging level must be set to a valid value (see LogLevel class)";return!0}}],o=[{key:"instance",get:function(){return this[N]||(this[N]=new e(U)),Object.seal(this[N])}}],r&&A(n.prototype,r),o&&A(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(E);function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,C(r.key),r)}}function D(t,e,n){return e&&L(t.prototype,e),n&&L(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function C(t){var e=function(t){if("object"!=B(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==B(e)?e:e+""}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K(t,e,n){return e=z(e),function(t,e){if(e&&("object"==B(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,G()?Reflect.construct(e,n||[],z(t).constructor):e.apply(t,n))}function x(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&q(t,e)}function V(t){var e="function"==typeof Map?new Map:void 0;return V=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(G())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&q(o,n.prototype),o}(t,arguments,z(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),q(n,t)},V(t)}function G(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(G=function(){return!!t})()}function q(t,e){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},q(t,e)}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}var H=function(t){function e(t){var n;return F(this,e),(n=K(this,e,[t])).name="SFSError",n}return x(e,t),D(e)}(V(Error)),X=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return F(this,e),(n=K(this,e,[t])).name="SFSValidationError",n.errors=r,Object.setPrototypeOf(n,e.prototype),n}return x(e,t),D(e)}(H),J=function(t){function e(t){var n;return F(this,e),(n=K(this,e,[t])).name="SFSTypeError",n}return x(e,t),D(e)}(H);function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,tt(r.key),r)}}function Z(t,e,n){return e&&Q(t.prototype,e),n&&Q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function tt(t){var e=function(t){if("object"!=W(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==W(e)?e:e+""}function et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var nt=Object.freeze({NULL:0,BOOL:1,BYTE:2,SHORT:3,INT:4,LONG:5,FLOAT:6,DOUBLE:7,UTF_STRING:8,BOOL_ARRAY:9,BYTE_ARRAY:10,SHORT_ARRAY:11,INT_ARRAY:12,LONG_ARRAY:13,FLOAT_ARRAY:14,DOUBLE_ARRAY:15,UTF_STRING_ARRAY:16,SFS_ARRAY:17,SFS_OBJECT:18,TEXT:20,fromId:function(t){if("number"!=typeof t)return null;for(var e in this)if(this.hasOwnProperty(e)&&this[e]===t)return e},validate:function(t,e){if(null==this.fromId(t))throw new J("Invalid type passed; use one of the SFSDataType constants");var n=null;if(t===this.NULL&&null!=e&&(n="a null value"),t!==this.NULL&&null==e&&(n="a non-null value"),t!==this.BOOL||this.isBoolType(e)||(n="a boolean value"),t!==this.BYTE||this.isByteType(e)||(n="an integer number in this range: 0 <= value < 256"),t!==this.SHORT||this.isShortType(e)||(n="an integer number in this range: -32.768 <= value < +32.768"),t!==this.INT||this.isIntType(e)||(n="an integer number in this range: -2^31 <= value < +2^31"),t!==this.LONG||this.isLongType(e)||(n="an integer number in this range: -(2^53 - 1) <= value <= +(2^53 - 1)"),t!==this.FLOAT||this.isFloatType(e)||(n="a number in this range: -3.4028234663852886e+38 <= value <= 3.4028234663852886e+38"),t!==this.DOUBLE||this.isDoubleType(e)||(n="a finite number"),t!==this.UTF_STRING&&t!==this.TEXT||this.isStringType(e)||(n="a string value"),t!==this.BOOL_ARRAY||this.isArrayType(e,this.isBoolType)||(n="an array of boolean values"),t!==this.BYTE_ARRAY||e instanceof Uint8Array||(n="a Uint8Array"),t!==this.SHORT_ARRAY||this.isArrayType(e,this.isShortType)||(n="an array of integer numbers in this range: -32.768 <= value < +32.768"),t!==this.INT_ARRAY||this.isArrayType(e,this.isIntType)||(n="an array of integer numbers in this range: -2^31 <= value < +2^31"),t!==this.LONG_ARRAY||this.isArrayType(e,this.isLongType)||(n="an array of integer numbers in this range: -(2^53 - 1) <= value <= +(2^53 - 1)"),t!==this.FLOAT_ARRAY||this.isArrayType(e,this.isFloatType)||(n="an array of numbers in this range: -3.4028234663852886e+38 <= value <= 3.4028234663852886e+38"),t!==this.DOUBLE_ARRAY||this.isArrayType(e,this.isDoubleType)||(n="an array of finite numbers"),t!==this.UTF_STRING_ARRAY||this.isArrayType(e,this.isStringType)||(n="an array of string values"),t!==this.SFS_OBJECT||e instanceof ot||(n="a SFSObject instance"),t!==this.SFS_ARRAY||e instanceof it||(n="a SFSArray instance"),null!=n)throw new J("Invalid value passed; type SFSDataType."+this.fromId(t)+" requires "+n)},isBoolType:function(t){return"boolean"==typeof t},isByteType:function(t){return"number"==typeof t&&Math.floor(t)===t&&t>=0&&t<256},isShortType:function(t){return"number"==typeof t&&Math.floor(t)===t&&t>=-32768&&t<32768},isIntType:function(t){return"number"==typeof t&&Math.floor(t)===t&&t>=-2147483648&&t<2147483648},isLongType:function(t){return"number"==typeof t&&Math.floor(t)===t&&Number.isSafeInteger(t)},isFloatType:function(t){return"number"==typeof t&&t>=-34028234663852886e22&&t<=34028234663852886e22},isDoubleType:function(t){return"number"==typeof t&&isFinite(t)},isStringType:function(t){return"string"==typeof t},isArrayType:function(t,e){return t instanceof Array&&(!(t.length>0)||e(t[0]))}}),rt=Z((function t(e,n){et(this,t),this.type=e,this.value=n,Object.freeze(this)})),ot=function(){return Z((function t(){et(this,t),this._dataHolder=new Map,this._serializer=l.instance,Object.freeze(this)}),[{key:"toBinary",value:function(){return this._serializer.object2binary(this)}},{key:"keys",value:function(){return this._dataHolder.keys()}},{key:"getWrappedItem",value:function(t){return this._dataHolder.get(t)}},{key:"getKeysArray",value:function(){return Array.from(this.keys())}},{key:"size",value:function(){return this._dataHolder.size}},{key:"containsKey",value:function(t){return null!=this.getWrappedItem(t)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getWrappedItem(t);if(null!=n&&null!=e&&n.type!=e)throw new J("Requested value is not of type SFSDataType."+nt.fromId(e));return null!=n?n.value:null}},{key:"isNull",value:function(t){var e=this.getWrappedItem(t);return null==e||e.type==nt.NULL}},{key:"getBool",value:function(t){return this.get(t,nt.BOOL)}},{key:"getByte",value:function(t){return this.get(t,nt.BYTE)}},{key:"getShort",value:function(t){return this.get(t,nt.SHORT)}},{key:"getInt",value:function(t){return this.get(t,nt.INT)}},{key:"getLong",value:function(t){var e=this.get(t,nt.LONG);return Number.isSafeInteger(e)||Y.instance.warn("Long value contained in SFSObject is not safe"),e}},{key:"getFloat",value:function(t){return this.get(t,nt.FLOAT)}},{key:"getDouble",value:function(t){return this.get(t,nt.DOUBLE)}},{key:"getUtfString",value:function(t){return this.get(t,nt.UTF_STRING)}},{key:"getText",value:function(t){return this.get(t,nt.TEXT)}},{key:"getBoolArray",value:function(t){return this.get(t,nt.BOOL_ARRAY)}},{key:"getByteArray",value:function(t){return this.get(t,nt.BYTE_ARRAY)}},{key:"getShortArray",value:function(t){return this.get(t,nt.SHORT_ARRAY)}},{key:"getIntArray",value:function(t){return this.get(t,nt.INT_ARRAY)}},{key:"getLongArray",value:function(t){return this.get(t,nt.LONG_ARRAY)}},{key:"getFloatArray",value:function(t){return this.get(t,nt.FLOAT_ARRAY)}},{key:"getDoubleArray",value:function(t){return this.get(t,nt.DOUBLE_ARRAY)}},{key:"getUtfStringArray",value:function(t){return this.get(t,nt.UTF_STRING_ARRAY)}},{key:"getSFSObject",value:function(t){return this.get(t,nt.SFS_OBJECT)}},{key:"getSFSArray",value:function(t){return this.get(t,nt.SFS_ARRAY)}},{key:"put",value:function(t,e,n){if(!(arguments.length>3&&void 0!==arguments[3]&&arguments[3])){if("string"!=typeof t)throw"Invalid key passed; must be of type string";nt.validate(n,e)}this._dataHolder.set(t,new rt(n,e))}},{key:"putNull",value:function(t){this.put(t,null,nt.NULL)}},{key:"putBool",value:function(t,e){this.put(t,e,nt.BOOL)}},{key:"putByte",value:function(t,e){this.put(t,e,nt.BYTE)}},{key:"putShort",value:function(t,e){this.put(t,e,nt.SHORT)}},{key:"putInt",value:function(t,e){this.put(t,e,nt.INT)}},{key:"putLong",value:function(t,e){this.put(t,e,nt.LONG)}},{key:"putFloat",value:function(t,e){this.put(t,e,nt.FLOAT)}},{key:"putDouble",value:function(t,e){this.put(t,e,nt.DOUBLE)}},{key:"putUtfString",value:function(t,e){this.put(t,e,nt.UTF_STRING)}},{key:"putText",value:function(t,e){this.put(t,e,nt.TEXT)}},{key:"putBoolArray",value:function(t,e){this.put(t,e,nt.BOOL_ARRAY)}},{key:"putByteArray",value:function(t,e){this.put(t,e,nt.BYTE_ARRAY)}},{key:"putShortArray",value:function(t,e){this.put(t,e,nt.SHORT_ARRAY)}},{key:"putIntArray",value:function(t,e){this.put(t,e,nt.INT_ARRAY)}},{key:"putLongArray",value:function(t,e){this.put(t,e,nt.LONG_ARRAY)}},{key:"putFloatArray",value:function(t,e){this.put(t,e,nt.FLOAT_ARRAY)}},{key:"putDoubleArray",value:function(t,e){this.put(t,e,nt.DOUBLE_ARRAY)}},{key:"putUtfStringArray",value:function(t,e){this.put(t,e,nt.UTF_STRING_ARRAY)}},{key:"putSFSArray",value:function(t,e){this.put(t,e,nt.SFS_ARRAY)}},{key:"putSFSObject",value:function(t,e){this.put(t,e,nt.SFS_OBJECT)}},{key:"getDump",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return 0===this.size()?"[ Empty SFSObject ]":t?b.prettyPrintDump(this._dump()):this._dump()}},{key:"getHexDump",value:function(){return b.hexDump(this.toBinary())}},{key:"_dump",value:function(){var t,e=b.TOKEN_INDENT_OPEN,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return $(t,e);var n={}.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)?$(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value,o=this.getWrappedItem(r),i=nt.fromId(o.type);e+="(".concat(i.toLowerCase(),") ").concat(r,": "),o.type===nt.SFS_OBJECT||o.type===nt.SFS_ARRAY?e+=o.value.getDump(!1):o.type===nt.BYTE_ARRAY?e+=b.prettyPrintByteArray(o.value):e+=o.value,e+=b.TOKEN_DIVIDER}}catch(t){n.e(t)}finally{n.f()}return e+b.TOKEN_INDENT_CLOSE}}],[{key:"newFromBinaryData",value:function(t){return l.instance.binary2object(t)}}])}(),it=function(){function t(){et(this,t),this._dataHolder=[],this._serializer=l.instance,Object.freeze(this)}return Z(t,[{key:"toBinary",value:function(){return this._serializer.array2binary(this)}},{key:"getWrappedItem",value:function(t){return"number"!=typeof t||t>=this._dataHolder.length?null:this._dataHolder[t]}},{key:"size",value:function(){return this._dataHolder.length}},{key:"contains",value:function(e){if(e instanceof t||e instanceof ot)throw new H("SFSArray and SFSObject types are not supported by the SFSArray.contains method");for(var n=0;n<this.size();n++){var r=this.getWrappedItem(n);if(null!=r&&r.value==e)return!0}return!1}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("number"!=typeof t||t>=this._dataHolder.length)return null;var n=this.getWrappedItem(t);if(null!=n&&null!=e&&n.type!=e)throw new J("Requested value is not of type SFSDataType."+nt.fromId(e));return null!=n?n.value:null}},{key:"isNull",value:function(t){var e=this.getWrappedItem(t);return null==e||e.type==nt.NULL}},{key:"getBool",value:function(t){return this.get(t,nt.BOOL)}},{key:"getByte",value:function(t){return this.get(t,nt.BYTE)}},{key:"getShort",value:function(t){return this.get(t,nt.SHORT)}},{key:"getInt",value:function(t){return this.get(t,nt.INT)}},{key:"getLong",value:function(t){var e=this.get(t,nt.LONG);return Number.isSafeInteger(e)||Y.instance.warn("Long value contained in SFSObject is not safe"),e}},{key:"getFloat",value:function(t){return this.get(t,nt.FLOAT)}},{key:"getDouble",value:function(t){return this.get(t,nt.DOUBLE)}},{key:"getUtfString",value:function(t){return this.get(t,nt.UTF_STRING)}},{key:"getText",value:function(t){return this.get(t,nt.TEXT)}},{key:"getBoolArray",value:function(t){return this.get(t,nt.BOOL_ARRAY)}},{key:"getByteArray",value:function(t){return this.get(t,nt.BYTE_ARRAY)}},{key:"getShortArray",value:function(t){return this.get(t,nt.SHORT_ARRAY)}},{key:"getIntArray",value:function(t){return this.get(t,nt.INT_ARRAY)}},{key:"getLongArray",value:function(t){return this.get(t,nt.LONG_ARRAY)}},{key:"getFloatArray",value:function(t){return this.get(t,nt.FLOAT_ARRAY)}},{key:"getDoubleArray",value:function(t){return this.get(t,nt.DOUBLE_ARRAY)}},{key:"getUtfStringArray",value:function(t){return this.get(t,nt.UTF_STRING_ARRAY)}},{key:"getSFSObject",value:function(t){return this.get(t,nt.SFS_OBJECT)}},{key:"getSFSArray",value:function(t){return this.get(t,nt.SFS_ARRAY)}},{key:"add",value:function(t,e){arguments.length>2&&void 0!==arguments[2]&&arguments[2]||nt.validate(e,t),this._dataHolder.push(new rt(e,t))}},{key:"addNull",value:function(){this.add(null,nt.NULL)}},{key:"addBool",value:function(t){this.add(t,nt.BOOL)}},{key:"addByte",value:function(t){this.add(t,nt.BYTE)}},{key:"addShort",value:function(t){this.add(t,nt.SHORT)}},{key:"addInt",value:function(t){this.add(t,nt.INT)}},{key:"addLong",value:function(t){this.add(t,nt.LONG)}},{key:"addFloat",value:function(t){this.add(t,nt.FLOAT)}},{key:"addDouble",value:function(t){this.add(t,nt.DOUBLE)}},{key:"addUtfString",value:function(t){this.add(t,nt.UTF_STRING)}},{key:"addText",value:function(t){this.add(t,nt.TEXT)}},{key:"addBoolArray",value:function(t){this.add(t,nt.BOOL_ARRAY)}},{key:"addByteArray",value:function(t){this.add(t,nt.BYTE_ARRAY)}},{key:"addShortArray",value:function(t){this.add(t,nt.SHORT_ARRAY)}},{key:"addIntArray",value:function(t){this.add(t,nt.INT_ARRAY)}},{key:"addLongArray",value:function(t){this.add(t,nt.LONG_ARRAY)}},{key:"addFloatArray",value:function(t){this.add(t,nt.FLOAT_ARRAY)}},{key:"addDoubleArray",value:function(t){this.add(t,nt.DOUBLE_ARRAY)}},{key:"addUtfStringArray",value:function(t){this.add(t,nt.UTF_STRING_ARRAY)}},{key:"addSFSArray",value:function(t){this.add(t,nt.SFS_ARRAY)}},{key:"addSFSObject",value:function(t){this.add(t,nt.SFS_OBJECT)}},{key:"getDump",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return 0===this.size()?"[ Empty SFSArray ]":t?b.prettyPrintDump(this._dump()):this._dump()}},{key:"getHexDump",value:function(){return b.hexDump(this.toBinary())}},{key:"_dump",value:function(){for(var t=b.TOKEN_INDENT_OPEN,e=0;e<this.size();e++){var n=this.getWrappedItem(e),r=nt.fromId(n.type);t+="(".concat(r.toLowerCase(),") ").concat(e,": "),n.type===nt.SFS_OBJECT||n.type===nt.SFS_ARRAY?t+=n.value.getDump(!1):n.type===nt.BYTE_ARRAY?t+=b.prettyPrintByteArray(n.value):t+=n.value,t+=b.TOKEN_DIVIDER}return t+b.TOKEN_INDENT_CLOSE}}],[{key:"newFromBinaryData",value:function(t){return l.instance.binary2array(t)}}])}(),st=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];et(this,t),this.px=e,this.py=n,this.pz=r,this._useFloatCoordinates=o}return Z(t,[{key:"isFloat",get:function(){return this._useFloatCoordinates}},{key:"toString",value:function(){return"(".concat(this.px,",").concat(this.py,",").concat(this.pz,")")}},{key:"toArray",value:function(){return[this.px,this.py,this.pz]}}],[{key:"fromArray",value:function(e){return new t(e[0],e[1],e[2])}}])}();function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ct(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,lt(r.key),r)}}function ft(t,e,n){return e&&ct(t.prototype,e),n&&ct(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function lt(t){var e=function(t){if("object"!=at(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==at(e)?e:e+""}var yt=function(){return ft((function t(e){ut(this,t),this._reqObj=new ot,this._id=e,this._targetController=0,this._logger=Y.instance}),[{key:"id",get:function(){return this._id}},{key:"getMessage",value:function(){return new ht(this._id,this._targetController,this._reqObj)}},{key:"validate",value:function(){this._logger.error("BaseRequest.validate = no child-class implementation found!")}},{key:"execute",value:function(){this._logger.error("BaseRequest.execute = no child-class implementation found!")}}],[{key:"KEY_ERROR_CODE",get:function(){return"ec"}},{key:"KEY_ERROR_PARAMS",get:function(){return"ep"}}])}(),ht=function(){return ft((function t(e,n,r){ut(this,t),this._id=e,this._targetController=n,this._content=r,Object.freeze(this)}),[{key:"id",get:function(){return this._id}},{key:"targetController",get:function(){return this._targetController}},{key:"content",get:function(){return this._content}},{key:"dump",value:function(){return(pt.getNameFromId(this.id)+" ("+this.id+")").trim()+"\n"+this.content.getDump()}}])}(),pt=Object.freeze({Handshake:0,Login:1,Logout:2,JoinRoom:4,CreateRoom:6,GenericMessage:7,ChangeRoomName:8,ChangeRoomPassword:9,SetRoomVariables:11,SetUserVariables:12,CallExtension:13,LeaveRoom:14,SubscribeRoomGroup:15,UnsubscribeRoomGroup:16,SpectatorToPlayer:17,PlayerToSpectator:18,ChangeRoomCapacity:19,KickUser:24,BanUser:25,FindRooms:27,FindUsers:28,PingPong:29,SetUserPosition:30,QuickJoinOrCreateRoom:31,InitBuddyList:200,AddBuddy:201,BlockBuddy:202,RemoveBuddy:203,SetBuddyVariables:204,GoOnline:205,InviteUsers:300,InvitationReply:301,CreateSFSGame:302,QuickJoinGame:303,JoinRoomInvite:304,ClusterJoinOrCreateRequest:500,ClusterInviteUsers:502,GameServerConnectionRequired:600,getNameFromId:function(t){for(var e in this)if(this.hasOwnProperty(e)&&this[e]===t)return e;return""}});function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}function bt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dt(r.key),r)}}function dt(t){var e=function(t){if("object"!=_t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_t(e)?e:e+""}var vt=function(){return t=function t(){throw function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"Class SFSErrorCodes cannot be instantiated. Please check the documentation for more details on its usage"},e=[{key:"_errorsByCode",get:function(){return mt}},{key:"setErrorMessage",value:function(t,e){this._errorsByCode[t]=e}},{key:"getErrorMessage",value:function(t,e){return this.stringFormat(this._errorsByCode[t],e)}},{key:"stringFormat",value:function(t,e){if(null==t)return"";if(null!=e)for(var n=0;n<e.length;n++){var r="{"+n+"}";t=t.replace(r,e[n])}return t}}],null&&bt(t.prototype,null),e&&bt(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),mt=["Client API version is obsolete: {0}; required version: {1}","Requested Zone {0} does not exist","User name {0} is not recognized","Wrong password for user {0}","User {0} is banned","Zone {0} is full","User {0} is already logged in Zone {1}","The server is full","Zone {0} is currently inactive","User name {0} contains bad words; filtered: {1}","Guest users not allowed in Zone {0}","IP address {0} is banned","A Room with the same name already exists: {0}","Requested Group is not available - Room: {0}; Group: {1}","Bad Room name length - Min: {0}; max: {1}; passed name length: {2}","Room name contains bad words: {0}","Zone is full; can't add Rooms anymore","You have exceeded the number of Rooms that you can create per session: {0}","Room creation failed, wrong parameter: {0}","User {0} already joined in Room","Room {0} is full","Wrong password for Room {0}","Requested Room does not exist","Room {0} is locked","Group {0} is already subscribed","Group {0} does not exist","Group {0} is not subscribed","Group {0} does not exist","{0}","Room permission error; Room {0} cannot be renamed","Room permission error; Room {0} cannot change password state","Room permission error; Room {0} cannot change capacity","Switch user error; no player slots available in Room {0}","Switch user error; no spectator slots available in Room {0}","Switch user error; Room {0} is not a Game Room","Switch user error; you are not joined in Room {0}","Buddy Manager initialization error, could not load buddy list: {0}","Buddy Manager error, your buddy list is full; size is {0}","Buddy Manager error, was not able to block buddy {0} because offline","Buddy Manager error, you are attempting to set too many Buddy Variables; limit is {0}","Game {0} access denied, user does not match access criteria","QuickJoinGame action failed: no matching Rooms were found","Your previous invitation reply was invalid or arrived too late"];function gt(t){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(t)}function Et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ot(r.key),r)}}function Ot(t){var e=function(t){if("object"!=gt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gt(e)?e:e+""}var St=Object.freeze({NULL:0,BOOLEAN:1,INT:2,DOUBLE:3,STRING:4,SFSOBJECT:5,SFSARRAY:6,getTypeName:function(t){return["null","boolean","int","double","string","SFSObject","SFSArray"][t]}}),Rt=function(){return t=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._name=e,this._value=n,this._type=r>-1?r:this._evalType()},(e=[{key:"name",get:function(){return this._name}},{key:"value",get:function(){return this._value}},{key:"type",get:function(){return St.getTypeName(this._type)}},{key:"isNull",get:function(){return this._type===St.NULL}},{key:"toSFSArray",value:function(){var t=new it;return t.addUtfString(this.name),t.addByte(this._type),this._populateArrayWithValue(t),t}},{key:"_populateArrayWithValue",value:function(t){switch(this._type){case St.NULL:t.addNull();break;case St.BOOLEAN:t.addBool(this.value);break;case St.INT:t.addInt(this.value);break;case St.DOUBLE:t.addDouble(this.value);break;case St.STRING:t.addUtfString(this.value);break;case St.SFSOBJECT:t.addSFSObject(this.value);break;case St.SFSARRAY:t.addSFSArray(this.value)}}},{key:"_evalType",value:function(){if(null==this._value)return St.NULL;var t=gt(this._value);if("boolean"===t)return St.BOOLEAN;if("number"===t){var e=this._value;return e===+e&&e===(0|e)?St.INT:St.DOUBLE}return"string"===t?St.STRING:"object"===t?this._value instanceof it?St.SFSARRAY:St.SFSOBJECT:void 0}}])&&Et(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function At(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,It(r.key),r)}}function It(t){var e=function(t){if("object"!=wt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wt(e)?e:e+""}function Tt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tt=function(){return!!t})()}function kt(){return kt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jt(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},kt.apply(null,arguments)}function jt(t){return jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jt(t)}function Pt(t,e){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pt(t,e)}var Mt=Object.freeze({RV_GAME_STARTED:"$GS"}),Nt=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=jt(e),function(t,e){if(e&&("object"==wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tt()?Reflect.construct(e,n||[],jt(t).constructor):e.apply(t,n))}(this,e,[t,n,o])).isPrivate=!1,r.isPersistent=!1,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pt(t,e)}(e,t),n=e,r=[{key:"toString",value:function(){return"[RoomVar: ".concat(this.name,", Type: ").concat(this.type,", Value: ").concat(this.value,", Private: ").concat(this.isPrivate,"]")}},{key:"toSFSArray",value:function(){var t,n,r,o=(t=e,n=this,"function"==typeof(r=kt(jt(1&3?t.prototype:t),"toSFSArray",n))?function(t){return r.apply(n,t)}:r)([]);return o.addBool(this.isPrivate),o.addBool(this.isPersistent),o}}],o=[{key:"fromSFSArray",value:function(t){var n=new e(t.get(0),t.get(2),t.get(1));return n.isPrivate=t.get(3),n.isPersistent=t.get(4),n}}],r&&At(n.prototype,r),o&&At(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(Rt);function Ut(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Yt(t,e);var n={}.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)?Yt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Bt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bt=function(){return!!t})()}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function Dt(t,e){return Dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dt(t,e)}function Ct(t){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(t)}function Ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Vt(r.key),r)}}function xt(t,e,n){return e&&Kt(t.prototype,e),n&&Kt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vt(t){var e=function(t){if("object"!=Ct(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ct(e)?e:e+""}var Gt=function(){return xt((function t(e){Ft(this,t),this._sfs=e,this._usersById=new Map,this._usersByName=new Map}),[{key:"containsUserName",value:function(t){return this._usersByName.has(t)}},{key:"containsUserId",value:function(t){return this._usersById.has(t)}},{key:"containsUser",value:function(t){return this._usersById.has(t.id)}},{key:"getUserById",value:function(t){return this._usersById.get(t)}},{key:"getUserByName",value:function(t){return this._usersByName.get(t)}},{key:"getUserCount",value:function(){return this._usersById.size}},{key:"getUserList",value:function(){return Array.from(this._usersById.values())}},{key:"_addUser",value:function(t){this._usersByName.set(t.name,t),this._usersById.set(t.id,t)}},{key:"_removeUser",value:function(t){this._usersById.delete(t.id),this._usersByName.delete(t.name)}},{key:"_clearAll",value:function(){this._usersById.clear(),this._usersByName.clear()}}])}(),qt=function(t){function e(t){var n,r,o,i;return Ft(this,e),r=this,i=[t],o=Lt(o=e),n=function(t,e){if(e&&("object"==Ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(r,Bt()?Reflect.construct(o,i||[],Lt(r).constructor):o.apply(r,i)),Object.freeze(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dt(t,e)}(e,t),xt(e,[{key:"containsUserName",value:function(t){var e=!1,n=this._sfs.getJoinedRooms();if(null!=n){var r,o=Ut(n);try{for(o.s();!(r=o.n()).done;)if(r.value.getUserByName(t)){e=!0;break}}catch(t){o.e(t)}finally{o.f()}}return e}},{key:"containsUserId",value:function(t){var e=!1,n=this._sfs.getJoinedRooms();if(null!=n){var r,o=Ut(n);try{for(o.s();!(r=o.n()).done;)if(r.value.getUserById(t)){e=!0;break}}catch(t){o.e(t)}finally{o.f()}}return e}},{key:"containsUser",value:function(t){var e=!1,n=this._sfs.getJoinedRooms();if(null!=n){var r,o=Ut(n);try{for(o.s();!(r=o.n()).done;)if(r.value.containsUser(t)){e=!0;break}}catch(t){o.e(t)}finally{o.f()}}return e}},{key:"getUserById",value:function(t){if(this._sfs.mySelf.id==t)return this._sfs.mySelf;var e=null,n=this._sfs.getJoinedRooms();if(null!=n){var r,o=Ut(n);try{for(o.s();!(r=o.n()).done&&null==(e=r.value.getUserById(t)););}catch(t){o.e(t)}finally{o.f()}}return e}},{key:"getUserByName",value:function(t){if(this._sfs.mySelf.name==t)return this._sfs.mySelf;var e=null,n=this._sfs.getJoinedRooms();if(null!=n){var r,o=Ut(n);try{for(o.s();!(r=o.n()).done&&null==(e=r.value.getUserByName(t)););}catch(t){o.e(t)}finally{o.f()}}return e}},{key:"getUserList",value:function(){var t=this._sfs.getJoinedRooms();if(null==t||0==t.length){var e=[];return null!=this._sfs.mySelf&&e.push(this._sfs.mySelf),e}var n,r=new Set,o=Ut(t);try{for(o.s();!(n=o.n()).done;){var i=n.value,s=new Set(i.getUserList());r=r.union(s)}}catch(t){o.e(t)}finally{o.f()}return Array.from(r)}},{key:"getUserCount",value:function(){return getUserList().length}},{key:"_addUser",value:function(t){}},{key:"_removeUser",value:function(t){}}])}(Gt);function zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zt=function(){return!!t})()}function Ht(t){return Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ht(t)}function Xt(t,e){return Xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xt(t,e)}function Jt(t){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(t)}function Wt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return $t(t,e);var n={}.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)?$t(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ee(r.key),r)}}function te(t,e,n){return e&&Zt(t.prototype,e),n&&Zt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ee(t){var e=function(t){if("object"!=Jt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jt(e)?e:e+""}var ne=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default",o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Qt(this,t),this._id=e,this._name=n,this._groupId=r,this._isGame=!1,this._isHidden=!1,this._isJoined=!1,this._isPasswordProtected=!1,this._maxUsers=0,this._maxSpectators=0,this._userCount=0,this._specCount=0,this._isManaged=!0,this._variables=new Map,this._userManager=new Gt,this._roomManager=null,this.properties={},o&&Object.seal(this)}return te(t,[{key:"id",get:function(){return this._id}},{key:"name",get:function(){return this._name}},{key:"groupId",get:function(){return this._groupId}},{key:"isGame",get:function(){return this._isGame}},{key:"isHidden",get:function(){return this._isHidden}},{key:"isJoined",get:function(){return this._isJoined}},{key:"isPasswordProtected",get:function(){return this._isPasswordProtected}},{key:"maxUsers",get:function(){return this._maxUsers}},{key:"maxSpectators",get:function(){return this._maxSpectators}},{key:"userCount",get:function(){return this.isJoined?this.isGame?this.getPlayerList().length:this._userManager.getUserCount():this._userCount}},{key:"spectatorCount",get:function(){return this.isGame?this.isJoined?this.getSpectatorList().length:this._specCount:0}},{key:"capacity",get:function(){return this.maxUsers+this.maxSpectators}},{key:"toString",value:function(){return"[Room: ".concat(this.name,", Id: ").concat(this.id,", Group Id: ").concat(this.groupId,"]")}},{key:"getUserByName",value:function(t){return this._userManager.getUserByName(t)}},{key:"getUserById",value:function(t){return this._userManager.getUserById(t)}},{key:"containsUser",value:function(t){return this._userManager.containsUser(t)}},{key:"getUserList",value:function(){return this._userManager.getUserList()}},{key:"getPlayerList",value:function(){var t=this;return this._userManager.getUserList().filter((function(e){return e.isPlayerInRoom(t)}))}},{key:"getSpectatorList",value:function(){var t=this;return this._userManager.getUserList().filter((function(e){return e.isSpectatorInRoom(t)}))}},{key:"getVariable",value:function(t){return this._variables.get(t)}},{key:"containsVariable",value:function(t){return this._variables.has(t)}},{key:"getVariables",value:function(){return Array.from(this._variables.values())}},{key:"getRoomManager",value:function(){return this._roomManager}},{key:"_addUser",value:function(t){this._userManager._addUser(t)}},{key:"_removeUser",value:function(t){this._userManager._removeUser(t)}},{key:"_setVariables",value:function(t){var e,n=Wt(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this._setVariable(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_setVariable",value:function(t){t.isNull?this._variables.delete(t.name):this._variables.set(t.name,t)}},{key:"_setRoomManager",value:function(t){if(null!=this._roomManager)throw new H("Room Manager already assigned to "+this.toString());this._roomManager=t}},{key:"_merge",value:function(t){if(!this.isJoined){this._variables.clear();var e,n=Wt(t._variables.values());try{for(n.s();!(e=n.n()).done;){var r=e.value;this._setVariable(r)}}catch(t){n.e(t)}finally{n.f()}this._userManager._clearAll();var o,i=Wt(t.getUserList());try{for(i.s();!(o=i.n()).done;){var s=o.value;this._addUser(s)}}catch(t){i.e(t)}finally{i.f()}}}}],[{key:"fromSFSArray",value:function(e){var n,r=14===e.size();(n=r?new re(e.get(0),e.get(1),e.get(2)):new t(e.get(0),e.get(1),e.get(2)))._isGame=e.get(3),n._isHidden=e.get(4),n._isPasswordProtected=e.get(5),n._userCount=e.get(6),n._maxUsers=e.get(7);var o=e.get(8);if(null!=o)for(var i=0;i<o.size();i++){var s=Nt.fromSFSArray(o.get(i));n._setVariable(s)}return n._isGame&&(n._specCount=e.get(9),n._maxSpectators=e.get(10)),r&&(n._defaultAOI=st.fromArray(e.get(11)),null!=e.get(13)&&(n._lowerMapLimit=st.fromArray(e.get(12)),n._higherMapLimit=st.fromArray(e.get(13)))),n}}])}(),re=function(t){function e(t,n){var r,o,i,s,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default";return Qt(this,e),(o=this,i=e,s=[t,n,a,!1],i=Ht(i),r=function(t,e){if(e&&("object"==Jt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(o,zt()?Reflect.construct(i,s||[],Ht(o).constructor):i.apply(o,s)))._defaultAOI=null,r._lowerMapLimit=null,r._higherMapLimit=null,r._itemsById=new Map,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xt(t,e)}(e,t),te(e,[{key:"defaultAOI",get:function(){return this._defaultAOI}},{key:"lowerMapLimit",get:function(){return this._lowerMapLimit}},{key:"higherMapLimit",get:function(){return this._higherMapLimit}},{key:"getMMOItem",value:function(t){return this._itemsById.get(t)}},{key:"getMMOItems",value:function(){return Array.from(this._itemsById.values())}},{key:"_addMMOItem",value:function(t){this._itemsById.set(t.id,t)}},{key:"_removeItem",value:function(t){this._itemsById.delete(t)}}])}(ne);function oe(t){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(t)}function ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,se(r.key),r)}}function se(t){var e=function(t){if("object"!=oe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oe(e)?e:e+""}function ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ae=function(){return!!t})()}function ue(){return ue="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ce(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ue.apply(null,arguments)}function ce(t){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ce(t)}function fe(t,e){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fe(t,e)}var le=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=ce(e),function(t,e){if(e&&("object"==oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ae()?Reflect.construct(e,n||[],ce(t).constructor):e.apply(t,n))}(this,e,[t,n,o])).isPrivate=!1,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fe(t,e)}(e,t),n=e,r=[{key:"toString",value:function(){return"[UserVar: ".concat(this.name,", Type: ").concat(this.type,", Value: ").concat(this.value,", Private: ").concat(this.isPrivate,"]")}},{key:"toSFSArray",value:function(){var t,n,r,o=(t=e,n=this,"function"==typeof(r=ue(ce(1&3?t.prototype:t),"toSFSArray",n))?function(t){return r.apply(n,t)}:r)([]);return o.addBool(this.isPrivate),o}}],o=[{key:"fromSFSArray",value:function(t){var n=new e(t.get(0),t.get(2),t.get(1));return t.size()>3&&(n.isPrivate=t.get(3)),n}}],r&&ie(n.prototype,r),o&&ie(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(Rt);function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function he(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return pe(t,e);var n={}.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)?pe(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function pe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function _e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,be(r.key),r)}}function be(t){var e=function(t){if("object"!=ye(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ye(e)?e:e+""}var de=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._id=e,this._name=n,this._isItMe=r,this._privilegeId=0,this._aoiEntryPoint=null,this._variables=new Map,this._playerIdByRoomId=new Map,this._userManager=null,this.properties={},Object.seal(this)}return e=t,r=[{key:"fromSFSArray",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=new t(e.get(0),e.get(1));r._privilegeId=e.get(2),null!=n&&r._setPlayerId(e.get(3),n);var o=e.get(4);if(null!=o)for(var i=0;i<o.size();i++)r._setVariable(le.fromSFSArray(o.get(i)));return r}}],(n=[{key:"id",get:function(){return this._id}},{key:"name",get:function(){return this._name}},{key:"isItMe",get:function(){return this._isItMe}},{key:"privilegeId",get:function(){return this._privilegeId}},{key:"aoiEntryPoint",get:function(){return this._aoiEntryPoint}},{key:"isGuest",get:function(){return this._privilegeId===ve.GUEST}},{key:"isStandardUser",get:function(){return this._privilegeId===ve.STANDARD}},{key:"isModerator",get:function(){return this._privilegeId===ve.MODERATOR}},{key:"isAdmin",get:function(){return this.privilegeId===ve.ADMINISTRATOR}},{key:"isPlayer",get:function(){return this.isPlayerInRoom(this._userManager._sfs.lastJoinedRoom)}},{key:"isSpectator",get:function(){return this.isSpectatorInRoom(this._userManager._sfs.lastJoinedRoom)}},{key:"toString",value:function(){return"[User: ".concat(this.name,", Id: ").concat(this.id,", Is me: ").concat(this.isItMe,"]")}},{key:"isJoinedInRoom",value:function(t){return t.containsUser(this)}},{key:"getPlayerId",value:function(t){var e=this._playerIdByRoomId.get(t.id);return null!=e?e:0}},{key:"isPlayerInRoom",value:function(t){return!!t.isGame&&this.getPlayerId(t)>0}},{key:"isSpectatorInRoom",value:function(t){return!!t.isGame&&this.getPlayerId(t)<0}},{key:"getVariable",value:function(t){return this._variables.get(t)}},{key:"containsVariable",value:function(t){return this._variables.has(t)}},{key:"getVariables",value:function(){return Array.from(this._variables.values())}},{key:"getUserManager",value:function(){return this._userManager}},{key:"_setPlayerId",value:function(t,e){this._playerIdByRoomId.set(e.id,t)}},{key:"_removePlayerId",value:function(t){this._playerIdByRoomId.delete(t.id)}},{key:"_setVariables",value:function(t){var e,n=he(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this._setVariable(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_setVariable",value:function(t){t.isNull?this._variables.delete(t.name):this._variables.set(t.name,t)}},{key:"_setUserManager",value:function(t){if(null!=this._userManager)throw new H("User Manager already assigned to user "+this.toString());this._userManager=t}},{key:"_replaceVariables",value:function(t){var e=[];if(this.isItMe){var n,r=he(this._variables.values());try{for(r.s();!(n=r.n()).done;){var o=n.value;o.isPrivate&&e.push(o)}}catch(t){r.e(t)}finally{r.f()}}this._variables.clear(),e.length>0&&t.push.apply(t,e),this._setVariables(t)}}])&&_e(e.prototype,n),r&&_e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}(),ve=Object.freeze({GUEST:0,STANDARD:1,MODERATOR:2,ADMINISTRATOR:3});function me(t){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(t)}function ge(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ee(r.key),r)}}function Ee(t){var e=function(t){if("object"!=me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==me(e)?e:e+""}function Oe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oe=function(){return!!t})()}function Se(t){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Se(t)}function Re(t,e){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Re(t,e)}var we=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(t,e,n){return e=Se(e),function(t,e){if(e&&("object"==me(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oe()?Reflect.construct(e,n||[],Se(t).constructor):e.apply(t,n))}(this,e,[t,n,o]),Object.freeze(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Re(t,e)}(e,t),n=e,o=[{key:"fromSFSArray",value:function(t){return new e(t.get(0),t.get(2),t.get(1))}}],(r=[{key:"toString",value:function(){return"[ItemVar: ".concat(this.name,", Type: ").concat(this.type,", Value: ").concat(this.value,"]")}}])&&ge(n.prototype,r),o&&ge(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(Rt);function Ae(t){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ae(t)}function Ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Te(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ke(r.key),r)}}function ke(t){var e=function(t){if("object"!=Ae(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ae(e)?e:e+""}var je=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._id=e,this._aoiEntryPoint=null,this._variables=new Map,Object.seal(this)}return e=t,r=[{key:"fromSFSArray",value:function(e){var n=new t(e.get(0)),r=e.get(1);if(null!=r)for(var o=0;o<r.size();o++)n._setVariable(we.fromSFSArray(r.get(o)));return n}}],(n=[{key:"id",get:function(){return this._id}},{key:"aoiEntryPoint",get:function(){return this._aoiEntryPoint}},{key:"toString",value:function(){return"[Item: ".concat(this.id,"]")}},{key:"getVariable",value:function(t){return this._variables.get(t)}},{key:"containsVariable",value:function(t){return this._variables.has(t)}},{key:"getVariables",value:function(){return Array.from(this._variables.values())}},{key:"_setVariables",value:function(t){var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ie(t,e);var n={}.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)?Ie(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this._setVariable(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_setVariable",value:function(t){t.isNull?this._variables.delete(t.name):this._variables.set(t.name,t)}}])&&Te(e.prototype,n),r&&Te(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function Pe(t){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(t)}function Me(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ne(r.key),r)}}function Ne(t){var e=function(t){if("object"!=Pe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pe(e)?e:e+""}function Ue(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ue=function(){return!!t})()}function Ye(t){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ye(t)}function Be(t,e){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Be(t,e)}var Le=Object.freeze({BV_ONLINE:"$__BV_ONLINE__",BV_STATE:"$__BV_STATE__",BV_NICKNAME:"$__BV_NICKNAME__"}),De=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(t,e,n){return e=Ye(e),function(t,e){if(e&&("object"==Pe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ue()?Reflect.construct(e,n||[],Ye(t).constructor):e.apply(t,n))}(this,e,[t,n,o]),Object.freeze(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Be(t,e)}(e,t),n=e,o=[{key:"OFFLINE_PREFIX",get:function(){return"$"}},{key:"fromSFSArray",value:function(t){return new e(t.get(0),t.get(2),t.get(1))}}],(r=[{key:"isOffline",get:function(){return this._name.charAt(0)===e.OFFLINE_PREFIX}},{key:"toString",value:function(){return"[BuddyVar: ".concat(this.name,", Type: ").concat(this.type,", Value: ").concat(this.value,"]")}}])&&Me(n.prototype,r),o&&Me(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(Rt);function Ce(t){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ce(t)}function Fe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ke(t,e);var n={}.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)?Ke(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function Ke(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ve(r.key),r)}}function Ve(t){var e=function(t){if("object"!=Ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ce(e)?e:e+""}var Ge=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._id=e,this._name=n,this._isBlocked=r,this._isTemp=o,this._variables=new Map,Object.seal(this)}return e=t,r=[{key:"fromSFSArray",value:function(e){var n=new t(e.get(0),e.get(1),e.get(2),e.size()>3&&e.get(4)),r=e.get(3);if(null!=r)for(var o=0;o<r.size();o++)n._setVariable(De.fromSFSArray(r.get(o)));return n}}],(n=[{key:"id",get:function(){return this._id}},{key:"name",get:function(){return this._name}},{key:"isBlocked",get:function(){return this._isBlocked}},{key:"isTemp",get:function(){return this._isTemp}},{key:"isOnline",get:function(){var t=!0;return this.containsVariable(Le.BV_ONLINE)&&(t=this.getVariable(Le.BV_ONLINE).value),t&&this._id>-1}},{key:"state",get:function(){return this.containsVariable(Le.BV_STATE)?this.getVariable(Le.BV_STATE).value:null}},{key:"nickName",get:function(){return this.containsVariable(Le.BV_NICKNAME)?this.getVariable(Le.BV_NICKNAME).value:null}},{key:"toString",value:function(){return"[Buddy: ".concat(this.name,", Id: ").concat(this.id,"]")}},{key:"getVariable",value:function(t){return this._variables.get(t)}},{key:"containsVariable",value:function(t){return this._variables.has(t)}},{key:"getVariables",value:function(){return Array.from(this._variables.values())}},{key:"getOfflineVariables",value:function(){return this.getVariables().filter((function(t){return t.name.charAt(0)===De.OFFLINE_PREFIX}))}},{key:"getOnlineVariables",value:function(){return this.getVariables().filter((function(t){return t.name.charAt(0)!==De.OFFLINE_PREFIX}))}},{key:"_setVariables",value:function(t){var e,n=Fe(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this._setVariable(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_setVariable",value:function(t){t.isNull?this._variables.delete(t.name):this._variables.set(t.name,t)}},{key:"_removeVariable",value:function(t){this._variables.delete(t)}},{key:"_clearVolatileVariables",value:function(){var t,e=Fe(this.getOnlineVariables());try{for(e.s();!(t=e.n()).done;){var n=t.value;this._removeVariable(n.name)}}catch(t){e.e(t)}finally{e.f()}}}])&&xe(e.prototype,n),r&&xe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}(),qe=Object.freeze({ONLINE:0,OFFLINE:1,LEFT_THE_SERVER:2});function ze(t){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(t)}function He(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xe(r.key),r)}}function Xe(t){var e=function(t){if("object"!=ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ze(e)?e:e+""}var Je=function(){return t=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._id=-1,this._inviter=e,this._invitee=n,this._secondsForAnswer=r,this._params=o,Object.seal(this)},(e=[{key:"id",get:function(){return this._id}},{key:"inviter",get:function(){return this._inviter}},{key:"invitee",get:function(){return this._invitee}},{key:"secondsForAnswer",get:function(){return this._secondsForAnswer}},{key:"params",get:function(){return this._params}}])&&He(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),We=Object.freeze({ACCEPT:0,REFUSE:1,EXPIRED:255}),$e=function(){this.hexcase=0,this.b64pad=""};function Qe(t){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qe(t)}function Ze(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,tn(r.key),r)}}function tn(t){var e=function(t){if("object"!=Qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qe(e)?e:e+""}function en(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(en=function(){return!!t})()}function nn(t){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nn(t)}function rn(t,e){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rn(t,e)}$e.prototype={},$e.prototype.hex_md5=function(t){return this.rstr2hex(this.rstr_md5(this.str2rstr_utf8(t)))},$e.prototype.b64_md5=function(t){return this.rstr2b64(this.rstr_md5(this.str2rstr_utf8(t)))},$e.prototype.any_md5=function(t,e){return this.rstr2any(this.rstr_md5(this.str2rstr_utf8(t)),e)},$e.prototype.hex_hmac_md5=function(t,e){return this.rstr2hex(this.rstr_hmac_md5(this.str2rstr_utf8(t),this.str2rstr_utf8(e)))},$e.prototype.b64_hmac_md5=function(t,e){return this.rstr2b64(this.rstr_hmac_md5(this.str2rstr_utf8(t),this.str2rstr_utf8(e)))},$e.prototype.any_hmac_md5=function(t,e,n){return this.rstr2any(this.rstr_hmac_md5(this.str2rstr_utf8(t),this.str2rstr_utf8(e)),n)},$e.prototype.md5_vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"==this.hex_md5("abc").toLowerCase()},$e.prototype.rstr_md5=function(t){return this.binl2rstr(this.binl_md5(this.rstr2binl(t),8*t.length))},$e.prototype.rstr_hmac_md5=function(t,e){var n=this.rstr2binl(t);n.length>16&&(n=this.binl_md5(n,8*t.length));for(var r=Array(16),o=Array(16),i=0;i<16;i++)r[i]=909522486^n[i],o[i]=1549556828^n[i];var s=this.binl_md5(r.concat(this.rstr2binl(e)),512+8*e.length);return this.binl2rstr(this.binl_md5(o.concat(s),640))},$e.prototype.rstr2hex=function(t){try{this.hexcase}catch(t){this.hexcase=0}for(var e,n=this.hexcase?"0123456789ABCDEF":"0123456789abcdef",r="",o=0;o<t.length;o++)e=t.charCodeAt(o),r+=n.charAt(e>>>4&15)+n.charAt(15&e);return r},$e.prototype.rstr2b64=function(t){try{this.b64pad}catch(t){this.b64pad=""}for(var e="",n=t.length,r=0;r<n;r+=3)for(var o=t.charCodeAt(r)<<16|(r+1<n?t.charCodeAt(r+1)<<8:0)|(r+2<n?t.charCodeAt(r+2):0),i=0;i<4;i++)8*r+6*i>8*t.length?e+=this.b64pad:e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-i)&63);return e},$e.prototype.rstr2any=function(t,e){var n,r,o,i,s,a=e.length,u=Array(Math.ceil(t.length/2));for(n=0;n<u.length;n++)u[n]=t.charCodeAt(2*n)<<8|t.charCodeAt(2*n+1);var c=Math.ceil(8*t.length/(Math.log(e.length)/Math.log(2))),f=Array(c);for(r=0;r<c;r++){for(s=Array(),i=0,n=0;n<u.length;n++)i=(i<<16)+u[n],i-=(o=Math.floor(i/a))*a,(s.length>0||o>0)&&(s[s.length]=o);f[r]=i,u=s}var l="";for(n=f.length-1;n>=0;n--)l+=e.charAt(f[n]);return l},$e.prototype.str2rstr_utf8=function(t){for(var e,n,r="",o=-1;++o<t.length;)e=t.charCodeAt(o),n=o+1<t.length?t.charCodeAt(o+1):0,55296<=e&&e<=56319&&56320<=n&&n<=57343&&(e=65536+((1023&e)<<10)+(1023&n),o++),e<=127?r+=String.fromCharCode(e):e<=2047?r+=String.fromCharCode(192|e>>>6&31,128|63&e):e<=65535?r+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):e<=2097151&&(r+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return r},$e.prototype.str2rstr_utf16le=function(t){for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(255&t.charCodeAt(n),t.charCodeAt(n)>>>8&255);return e},$e.prototype.str2rstr_utf16be=function(t){for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(t.charCodeAt(n)>>>8&255,255&t.charCodeAt(n));return e},$e.prototype.rstr2binl=function(t){for(var e=Array(t.length>>2),n=0;n<e.length;n++)e[n]=0;for(n=0;n<8*t.length;n+=8)e[n>>5]|=(255&t.charCodeAt(n/8))<<n%32;return e},$e.prototype.binl2rstr=function(t){for(var e="",n=0;n<32*t.length;n+=8)e+=String.fromCharCode(t[n>>5]>>>n%32&255);return e},$e.prototype.binl_md5=function(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var a=n,u=r,c=o,f=i;n=this.md5_ff(n,r,o,i,t[s+0],7,-680876936),i=this.md5_ff(i,n,r,o,t[s+1],12,-389564586),o=this.md5_ff(o,i,n,r,t[s+2],17,606105819),r=this.md5_ff(r,o,i,n,t[s+3],22,-1044525330),n=this.md5_ff(n,r,o,i,t[s+4],7,-176418897),i=this.md5_ff(i,n,r,o,t[s+5],12,1200080426),o=this.md5_ff(o,i,n,r,t[s+6],17,-1473231341),r=this.md5_ff(r,o,i,n,t[s+7],22,-45705983),n=this.md5_ff(n,r,o,i,t[s+8],7,1770035416),i=this.md5_ff(i,n,r,o,t[s+9],12,-1958414417),o=this.md5_ff(o,i,n,r,t[s+10],17,-42063),r=this.md5_ff(r,o,i,n,t[s+11],22,-1990404162),n=this.md5_ff(n,r,o,i,t[s+12],7,1804603682),i=this.md5_ff(i,n,r,o,t[s+13],12,-40341101),o=this.md5_ff(o,i,n,r,t[s+14],17,-1502002290),r=this.md5_ff(r,o,i,n,t[s+15],22,1236535329),n=this.md5_gg(n,r,o,i,t[s+1],5,-165796510),i=this.md5_gg(i,n,r,o,t[s+6],9,-1069501632),o=this.md5_gg(o,i,n,r,t[s+11],14,643717713),r=this.md5_gg(r,o,i,n,t[s+0],20,-373897302),n=this.md5_gg(n,r,o,i,t[s+5],5,-701558691),i=this.md5_gg(i,n,r,o,t[s+10],9,38016083),o=this.md5_gg(o,i,n,r,t[s+15],14,-660478335),r=this.md5_gg(r,o,i,n,t[s+4],20,-405537848),n=this.md5_gg(n,r,o,i,t[s+9],5,568446438),i=this.md5_gg(i,n,r,o,t[s+14],9,-1019803690),o=this.md5_gg(o,i,n,r,t[s+3],14,-187363961),r=this.md5_gg(r,o,i,n,t[s+8],20,1163531501),n=this.md5_gg(n,r,o,i,t[s+13],5,-1444681467),i=this.md5_gg(i,n,r,o,t[s+2],9,-51403784),o=this.md5_gg(o,i,n,r,t[s+7],14,1735328473),r=this.md5_gg(r,o,i,n,t[s+12],20,-1926607734),n=this.md5_hh(n,r,o,i,t[s+5],4,-378558),i=this.md5_hh(i,n,r,o,t[s+8],11,-2022574463),o=this.md5_hh(o,i,n,r,t[s+11],16,1839030562),r=this.md5_hh(r,o,i,n,t[s+14],23,-35309556),n=this.md5_hh(n,r,o,i,t[s+1],4,-1530992060),i=this.md5_hh(i,n,r,o,t[s+4],11,1272893353),o=this.md5_hh(o,i,n,r,t[s+7],16,-155497632),r=this.md5_hh(r,o,i,n,t[s+10],23,-1094730640),n=this.md5_hh(n,r,o,i,t[s+13],4,681279174),i=this.md5_hh(i,n,r,o,t[s+0],11,-358537222),o=this.md5_hh(o,i,n,r,t[s+3],16,-722521979),r=this.md5_hh(r,o,i,n,t[s+6],23,76029189),n=this.md5_hh(n,r,o,i,t[s+9],4,-640364487),i=this.md5_hh(i,n,r,o,t[s+12],11,-421815835),o=this.md5_hh(o,i,n,r,t[s+15],16,530742520),r=this.md5_hh(r,o,i,n,t[s+2],23,-995338651),n=this.md5_ii(n,r,o,i,t[s+0],6,-198630844),i=this.md5_ii(i,n,r,o,t[s+7],10,1126891415),o=this.md5_ii(o,i,n,r,t[s+14],15,-1416354905),r=this.md5_ii(r,o,i,n,t[s+5],21,-57434055),n=this.md5_ii(n,r,o,i,t[s+12],6,1700485571),i=this.md5_ii(i,n,r,o,t[s+3],10,-1894986606),o=this.md5_ii(o,i,n,r,t[s+10],15,-1051523),r=this.md5_ii(r,o,i,n,t[s+1],21,-2054922799),n=this.md5_ii(n,r,o,i,t[s+8],6,1873313359),i=this.md5_ii(i,n,r,o,t[s+15],10,-30611744),o=this.md5_ii(o,i,n,r,t[s+6],15,-1560198380),r=this.md5_ii(r,o,i,n,t[s+13],21,1309151649),n=this.md5_ii(n,r,o,i,t[s+4],6,-145523070),i=this.md5_ii(i,n,r,o,t[s+11],10,-1120210379),o=this.md5_ii(o,i,n,r,t[s+2],15,718787259),r=this.md5_ii(r,o,i,n,t[s+9],21,-343485551),n=this.safe_add(n,a),r=this.safe_add(r,u),o=this.safe_add(o,c),i=this.safe_add(i,f)}return Array(n,r,o,i)},$e.prototype.md5_cmn=function(t,e,n,r,o,i){return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(e,t),this.safe_add(r,i)),o),n)},$e.prototype.md5_ff=function(t,e,n,r,o,i,s){return this.md5_cmn(e&n|~e&r,t,e,o,i,s)},$e.prototype.md5_gg=function(t,e,n,r,o,i,s){return this.md5_cmn(e&r|n&~r,t,e,o,i,s)},$e.prototype.md5_hh=function(t,e,n,r,o,i,s){return this.md5_cmn(e^n^r,t,e,o,i,s)},$e.prototype.md5_ii=function(t,e,n,r,o,i,s){return this.md5_cmn(n^(e|~r),t,e,o,i,s)},$e.prototype.safe_add=function(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n},$e.prototype.bit_rol=function(t,e){return t<<e|t>>>32-e};var on=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=nn(e),function(t,e){if(e&&("object"==Qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,en()?Reflect.construct(e,n||[],nn(t).constructor):e.apply(t,n))}(this,e,[pt.Login]))._userName=n,t._password=r,t._params=o,t._zoneName=i,Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rn(t,e)}(e,t),n=e,o=[{key:"KEY_ZONE_NAME",get:function(){return"zn"}},{key:"KEY_USER_NAME",get:function(){return"un"}},{key:"KEY_PASSWORD",get:function(){return"pw"}},{key:"KEY_PARAMS",get:function(){return"p"}},{key:"KEY_PRIVILEGE_ID",get:function(){return"pi"}},{key:"KEY_ID",get:function(){return"id"}},{key:"KEY_ROOMLIST",get:function(){return"rl"}},{key:"KEY_RECONNECTION_SECONDS",get:function(){return"rs"}}],(r=[{key:"validate",value:function(t){if(null!=t.mySelf)throw new X("LoginRequest error",["You are already logged in; logout before attempting a new login"]);var e=[],n=null!=t.config&&null!=t.config.zone?t.config.zone:null;if(null!=this._zoneName&&(n=this._zoneName),null==n||0===n.length?e.push("Missing Zone name"):this._zoneName=n,null==this._params||this._params instanceof ot||e.push("Custom parameters must be passed in a SFSObject"),e.length>0)throw new X("LoginRequest Error",e)}},{key:"execute",value:function(t){null==this._userName&&(this._userName=""),null==this._password&&(this._password=""),this._reqObj.putUtfString(e.KEY_ZONE_NAME,this._zoneName),this._reqObj.putUtfString(e.KEY_USER_NAME,this._userName),this._reqObj.putUtfString(e.KEY_PASSWORD,this._password.length>0?(new $e).hex_md5(t.sessionToken+this._password):""),null!=this._params&&this._reqObj.putSFSObject(e.KEY_PARAMS,this._params)}}])&&Ze(n.prototype,r),o&&Ze(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function sn(t){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(t)}function an(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,un(r.key),r)}}function un(t){var e=function(t){if("object"!=sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sn(e)?e:e+""}function cn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cn=function(){return!!t})()}function fn(t){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fn(t)}function ln(t,e){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ln(t,e)}var yn=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=function(t,e,n){return e=fn(e),function(t,e){if(e&&("object"==sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cn()?Reflect.construct(e,n||[],fn(t).constructor):e.apply(t,n))}(this,e,[pt.Logout]),Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ln(t,e)}(e,t),n=e,o=[{key:"KEY_ZONE_NAME",get:function(){return"zn"}}],(r=[{key:"validate",value:function(t){if(null==t.mySelf)throw new X("LogoutRequest error",["You are not logged in"])}},{key:"execute",value:function(t){}}])&&an(n.prototype,r),o&&an(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function hn(t){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(t)}function pn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_n(r.key),r)}}function _n(t){var e=function(t){if("object"!=hn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=hn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==hn(e)?e:e+""}function bn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bn=function(){return!!t})()}function dn(t){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dn(t)}function vn(t,e){return vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vn(t,e)}var mn=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,n){return e=dn(e),function(t,e){if(e&&("object"==hn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bn()?Reflect.construct(e,n||[],dn(t).constructor):e.apply(t,n))}(this,e,[pt.JoinRoom]),"string"==typeof t?n._rName=t:"number"==typeof t?n._rId=t:t instanceof ne&&(n._rId=t.id,n._rName=t.name),n._password=r,n._roomIdToLeave=o,n._asSpectator=i,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vn(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM",get:function(){return"r"}},{key:"KEY_USER_LIST",get:function(){return"ul"}},{key:"KEY_ROOM_NAME",get:function(){return"n"}},{key:"KEY_ROOM_ID",get:function(){return"i"}},{key:"KEY_PASS",get:function(){return"p"}},{key:"KEY_ROOM_TO_LEAVE",get:function(){return"rl"}},{key:"KEY_AS_SPECTATOR",get:function(){return"sp"}}],(r=[{key:"validate",value:function(t){if(null==this._rId&&null==this._rName)throw new X("JoinRoomRequest Error",["Missing Room id or name, please provide one of the two or an existing SFSRoom object"])}},{key:"execute",value:function(t){t._isJoining=!0,this._rId>=0?this._reqObj.putInt(e.KEY_ROOM_ID,this._rId):null!=this._rName&&this._reqObj.putUtfString(e.KEY_ROOM_NAME,this._rName),null!=this._password&&this._reqObj.putUtfString(e.KEY_PASS,this._password),null!=this._roomIdToLeave&&this._reqObj.putInt(e.KEY_ROOM_TO_LEAVE,this._roomIdToLeave),this._asSpectator&&this._reqObj.putBool(e.KEY_AS_SPECTATOR,this._asSpectator)}}])&&pn(n.prototype,r),o&&pn(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function gn(t){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(t)}function En(t,e,n){return e=Sn(e),function(t,e){if(e&&("object"==gn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,On()?Reflect.construct(e,n||[],Sn(t).constructor):e.apply(t,n))}function On(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(On=function(){return!!t})()}function Sn(t){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sn(t)}function Rn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wn(t,e)}function wn(t,e){return wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wn(t,e)}function An(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Tn(r.key),r)}}function In(t,e,n){return e&&An(t.prototype,e),n&&An(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Tn(t){var e=function(t){if("object"!=gn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gn(e)?e:e+""}function kn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var jn=In((function t(e){kn(this,t),this.name=e,this.password="",this.groupId="default",this.isGame=!1,this.maxUsers=10,this.maxSpectators=0,this.maxVariables=5,this.variables=[],this.permissions=null,this.events=null,this.extension=null,this.allowOwnerOnlyInvitation=!0})),Pn=function(t){function e(t){var n;return kn(this,e),(n=En(this,e,[t])).isPublic=!0,n.minPlayersToStartGame=2,n.invitedPlayers=null,n.searchableRooms=null,n.invitationExpiryTime=15,n.leaveLastJoinedRoom=!0,n.notifyGameStarted=!1,n.playerMatchExpression=null,n.spectatorMatchExpression=null,n.invitationParams=null,Object.seal(n),n}return Rn(e,t),In(e)}(jn),Mn=function(t){function e(t,n){var r;return kn(this,e),(r=En(this,e,[t])).defaultAOI=n,r.mapLimits=null,r.userMaxLimboSeconds=50,r.proximityListUpdateMillis=250,r.sendAOIEntryPoint=!0,Object.seal(r),r}return Rn(e,t),In(e)}(jn),Nn=function(t){function e(t){var n;return kn(this,e),(n=En(this,e,[t])).isPublic=!0,n.minPlayersToStartGame=2,n.invitedPlayers=null,n.invitationExpiryTime=30,n.notifyGameStarted=!1,n.invitationParams=null,Object.seal(n),n}return Rn(e,t),In(e)}(jn),Un=In((function t(){kn(this,t),this.allowNameChange=!1,this.allowPasswordStateChange=!1,this.allowPublicMessages=!0,this.allowResizing=!1,Object.seal(this)})),Yn=In((function t(){kn(this,t),this.allowUserCountChange=!1,this.allowUserEnter=!1,this.allowUserExit=!1,this.allowUserVariablesUpdate=!1,Object.seal(this)})),Bn=In((function t(e,n){kn(this,t),this.id=e,this.className=n,this.propertiesFile="",Object.seal(this)})),Ln=In((function t(e,n){if(kn(this,t),null==e||null==n)throw new H("Map limits arguments must be both non null!");this.lowerLimit=e,this.higherLimit=n,Object.seal(this)})),Dn=Object.freeze({BY_ADDRESS:0,BY_NAME:1}),Cn=function(){return In((function t(e,n){if(kn(this,t),e<t.TO_USER||e>t.TO_ZONE)throw new H("Illegal recipient mode: "+e);this._mode=e,this._target=n,Object.freeze(this)}),[{key:"mode",get:function(){return this._mode}},{key:"target",get:function(){return this._target}}],[{key:"TO_USER",get:function(){return 0}},{key:"TO_ROOM",get:function(){return 1}},{key:"TO_GROUP",get:function(){return 2}},{key:"TO_ZONE",get:function(){return 3}}])}(),Fn=function(){return In((function t(e,n){kn(this,t),this._nodeId=e,this._roomId=n,Object.freeze(this)}),[{key:"nodeId",get:function(){return this._nodeId}},{key:"roomId",get:function(){return this._roomId}}])}();function Kn(t){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(t)}function xn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Vn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Gn(r.key),r)}}function Gn(t){var e=function(t){if("object"!=Kn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kn(e)?e:e+""}function qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qn=function(){return!!t})()}function zn(t){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zn(t)}function Hn(t,e){return Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Hn(t,e)}var Xn=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=zn(e),function(t,e){if(e&&("object"==Kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qn()?Reflect.construct(e,n||[],zn(t).constructor):e.apply(t,n))}(this,e,[pt.CreateRoom]))._settings=t,n._autoJoin=r,n._roomToLeave=o,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hn(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM",get:function(){return"r"}},{key:"KEY_NAME",get:function(){return"n"}},{key:"KEY_PASSWORD",get:function(){return"p"}},{key:"KEY_GROUP_ID",get:function(){return"g"}},{key:"KEY_ISGAME",get:function(){return"ig"}},{key:"KEY_MAXUSERS",get:function(){return"mu"}},{key:"KEY_MAXSPECTATORS",get:function(){return"ms"}},{key:"KEY_MAXVARS",get:function(){return"mv"}},{key:"KEY_ROOMVARS",get:function(){return"rv"}},{key:"KEY_PERMISSIONS",get:function(){return"pm"}},{key:"KEY_EVENTS",get:function(){return"ev"}},{key:"KEY_EXTID",get:function(){return"xn"}},{key:"KEY_EXTCLASS",get:function(){return"xc"}},{key:"KEY_EXTPROP",get:function(){return"xp"}},{key:"KEY_AUTOJOIN",get:function(){return"aj"}},{key:"KEY_ROOM_TO_LEAVE",get:function(){return"rl"}},{key:"KEY_ALLOW_JOIN_INVITATION_BY_OWNER",get:function(){return"aji"}},{key:"KEY_MMO_DEFAULT_AOI",get:function(){return"maoi"}},{key:"KEY_MMO_MAP_LOW_LIMIT",get:function(){return"mllm"}},{key:"KEY_MMO_MAP_HIGH_LIMIT",get:function(){return"mlhm"}},{key:"KEY_MMO_USER_MAX_LIMBO_SECONDS",get:function(){return"muls"}},{key:"KEY_MMO_PROXIMITY_UPDATE_MILLIS",get:function(){return"mpum"}},{key:"KEY_MMO_SEND_ENTRY_POINT",get:function(){return"msep"}}],(r=[{key:"validate",value:function(t){if(!(this._settings instanceof jn))throw new X("CreateRoomRequest Error",["Room configuration must be an instance of RoomSettings class"]);var e=[];if(null!=this._settings.name&&0!==this._settings.name.length||e.push("Missing Room name"),this._settings.maxUsers<=0&&e.push("Max number of users must be > 0"),this._settings.maxSpectators<0&&e.push("Max number of spectators must be >= 0"),this._settings.maxVariables<0&&e.push("Max number of Room Variables must be >= 0"),null!=this._settings.variables&&(this._settings.variables instanceof Array?this._settings.variables.every((function(t){return t instanceof Nt}))||e.push("Each Room Variable must be an instance of SFSRoomVariable class"):e.push("Room Variables must be passed in an array")),null==this._settings.permissions||this._settings.permissions instanceof Un||e.push("Allowed room permissions must be an instance of RoomPermissions class"),null==this._settings.events||this._settings.events instanceof Yn||e.push("Allowed room events must be an instance of RoomEvents class"),null!=this._settings.extension&&(this._settings.extension instanceof Bn?(null!=this._settings.extension.className&&0!==this._settings.extension.className.length||e.push("Missing Room Extension class name"),null!=this._settings.extension.id&&0!==this._settings.extension.id.length||e.push("Missing Room Extension id")):e.push("Room Extension settings must be an instance of RoomExtension class")),this._settings instanceof Mn&&(null==this._settings.defaultAOI&&e.push("Missing MMORoom's default AoI (Area of Interest)"),this._settings.defaultAOI instanceof st||e.push("MMORoom's AoI (Area of Interest) must be an instance of Vec3D class"),null!=this._settings.mapLimits&&(this._settings.mapLimits instanceof Ln?(null!=this._settings.mapLimits.lowerLimit&&null!=this._settings.mapLimits.higherLimit||e.push("MMORoom's lower and higher map limits must be both set"),this._settings.mapLimits.lowerLimit instanceof st&&this._settings.mapLimits.higherLimit instanceof st||e.push("MMORoom's lower and higher map limits must be both instances of Vec3D class")):e.push("MMORoom's map limits must be set in an instance of MapLimits class"))),null==this._roomToLeave||this._roomToLeave instanceof ne||e.push("Room to leave must be an instance of SFSRoom class"),e.length>0)throw new X("CreateRoomRequest Error",e)}},{key:"execute",value:function(t){if(this._reqObj.putUtfString(e.KEY_NAME,this._settings.name),this._reqObj.putUtfString(e.KEY_GROUP_ID,this._settings.groupId),this._reqObj.putUtfString(e.KEY_PASSWORD,this._settings.password),this._reqObj.putBool(e.KEY_ISGAME,this._settings.isGame),this._reqObj.putShort(e.KEY_MAXUSERS,this._settings.maxUsers),this._reqObj.putShort(e.KEY_MAXSPECTATORS,this._settings.maxSpectators),this._reqObj.putShort(e.KEY_MAXVARS,this._settings.maxVariables),this._reqObj.putBool(e.KEY_ALLOW_JOIN_INVITATION_BY_OWNER,this._settings.allowOwnerOnlyInvitation),null!=this._settings.variables&&this._settings.variables.length>0){var n,r=new it,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return xn(t,e);var n={}.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)?xn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._settings.variables);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.addSFSArray(i.toSFSArray())}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putSFSArray(e.KEY_ROOMVARS,r)}if(null!=this._settings.permissions){var s=[];s.push(this._settings.permissions.allowNameChange),s.push(this._settings.permissions.allowPasswordStateChange),s.push(this._settings.permissions.allowPublicMessages),s.push(this._settings.permissions.allowResizing),this._reqObj.putBoolArray(e.KEY_PERMISSIONS,s)}if(null!=this._settings.events){var a=[];a.push(this._settings.events.allowUserEnter),a.push(this._settings.events.allowUserExit),a.push(this._settings.events.allowUserCountChange),a.push(this._settings.events.allowUserVariablesUpdate),this._reqObj.putBoolArray(e.KEY_EVENTS,a)}null!=this._settings.extension&&(this._reqObj.putUtfString(e.KEY_EXTID,this._settings.extension.id),this._reqObj.putUtfString(e.KEY_EXTCLASS,this._settings.extension.className),null!=this._settings.extension.propertiesFile&&this._settings.extension.propertiesFile.length>0&&this._reqObj.putUtfString(e.KEY_EXTPROP,this._settings.extension.propertiesFile)),this._settings instanceof Mn&&(this._settings.defaultAOI.isFloat?(this._reqObj.putFloatArray(e.KEY_MMO_DEFAULT_AOI,this._settings.defaultAOI.toArray()),null!=this._settings.mapLimits&&(this._reqObj.putFloatArray(e.KEY_MMO_MAP_LOW_LIMIT,this._settings.mapLimits.lowerLimit.toArray()),this._reqObj.putFloatArray(e.KEY_MMO_MAP_HIGH_LIMIT,this._settings.mapLimits.higherLimit.toArray()))):(this._reqObj.putIntArray(e.KEY_MMO_DEFAULT_AOI,this._settings.defaultAOI.toArray()),null!=this._settings.mapLimits&&(this._reqObj.putIntArray(e.KEY_MMO_MAP_LOW_LIMIT,this._settings.mapLimits.lowerLimit.toArray()),this._reqObj.putIntArray(e.KEY_MMO_MAP_HIGH_LIMIT,this._settings.mapLimits.higherLimit.toArray()))),this._reqObj.putShort(e.KEY_MMO_USER_MAX_LIMBO_SECONDS,this._settings.userMaxLimboSeconds),this._reqObj.putShort(e.KEY_MMO_PROXIMITY_UPDATE_MILLIS,this._settings.proximityListUpdateMillis),this._reqObj.putBool(e.KEY_MMO_SEND_ENTRY_POINT,this._settings.sendAOIEntryPoint)),this._reqObj.putBool(e.KEY_AUTOJOIN,this._autoJoin),null!=this._roomToLeave&&this._reqObj.putInt(e.KEY_ROOM_TO_LEAVE,this._roomToLeave.id)}}])&&Vn(n.prototype,r),o&&Vn(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Jn(t){return Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jn(t)}function Wn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$n(r.key),r)}}function $n(t){var e=function(t){if("object"!=Jn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jn(e)?e:e+""}function Qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qn=function(){return!!t})()}function Zn(t){return Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zn(t)}function tr(t,e){return tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tr(t,e)}var er=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Zn(e),function(t,e){if(e&&("object"==Jn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qn()?Reflect.construct(e,n||[],Zn(t).constructor):e.apply(t,n))}(this,e,[pt.ChangeRoomName]))._room=t,r._newName=n,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tr(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM",get:function(){return"r"}},{key:"KEY_NAME",get:function(){return"n"}}],(r=[{key:"validate",value:function(t){var e=[];if(this._room instanceof ne||e.push("Room must be an instance of SFSRoom class"),null!=this._newName&&0!==this._newName.length||e.push("New room name must be a non-null and non-empty string"),e.length>0)throw new X("ChangeRoomNameRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_ROOM,this._room.id),this._reqObj.putUtfString(e.KEY_NAME,this._newName)}}])&&Wn(n.prototype,r),o&&Wn(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function nr(t){return nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nr(t)}function rr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,or(r.key),r)}}function or(t){var e=function(t){if("object"!=nr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=nr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nr(e)?e:e+""}function ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ir=function(){return!!t})()}function sr(t){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sr(t)}function ar(t,e){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ar(t,e)}var ur=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=sr(e),function(t,e){if(e&&("object"==nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ir()?Reflect.construct(e,n||[],sr(t).constructor):e.apply(t,n))}(this,e,[pt.ChangeRoomPassword]))._room=t,r._newPass=n,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ar(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM",get:function(){return"r"}},{key:"KEY_PASS",get:function(){return"p"}}],(r=[{key:"validate",value:function(t){var e=[];if(this._room instanceof ne||e.push("Room must be an instance of SFSRoom class"),null==this._newPass&&e.push("New room password must be a non-null string (empty string to remove the password)"),e.length>0)throw new X("ChangeRoomPasswordStateRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_ROOM,this._room.id),this._reqObj.putUtfString(e.KEY_PASS,this._newPass)}}])&&rr(n.prototype,r),o&&rr(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function cr(t){return cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cr(t)}function fr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,lr(r.key),r)}}function lr(t){var e=function(t){if("object"!=cr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=cr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cr(e)?e:e+""}function yr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yr=function(){return!!t})()}function hr(t){return hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hr(t)}function pr(t,e){return pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pr(t,e)}var _r=function(t){function e(t,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=hr(e),function(t,e){if(e&&("object"==cr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yr()?Reflect.construct(e,n||[],hr(t).constructor):e.apply(t,n))}(this,e,[pt.ChangeRoomCapacity]))._room=t,o._newMaxUsers=n,o._newMaxSpect=r,Object.seal(o),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pr(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM",get:function(){return"r"}},{key:"KEY_USER_SIZE",get:function(){return"u"}},{key:"KEY_SPEC_SIZE",get:function(){return"s"}}],(r=[{key:"validate",value:function(t){var e=[];if(this._room instanceof ne||e.push("Room must be an instance of SFSRoom class"),e.length>0)throw new X("ChangeRoomCapacityRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_ROOM,this._room.id),this._reqObj.putInt(e.KEY_USER_SIZE,this._newMaxUsers),this._reqObj.putInt(e.KEY_SPEC_SIZE,this._newMaxSpect)}}])&&fr(n.prototype,r),o&&fr(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function br(t){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(t)}function dr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function vr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Er(r.key),r)}}function gr(t,e,n){return e&&mr(t.prototype,e),n&&mr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Er(t){var e=function(t){if("object"!=br(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==br(e)?e:e+""}function Or(t,e,n){return e=Rr(e),function(t,e){if(e&&("object"==br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Sr()?Reflect.construct(e,n||[],Rr(t).constructor):e.apply(t,n))}function Sr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Sr=function(){return!!t})()}function Rr(t){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rr(t)}function wr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ar(t,e)}function Ar(t,e){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ar(t,e)}var Ir=Object.freeze({PUBLIC_MSG:0,PRIVATE_MSG:1,MODERATOR_MSG:2,ADMING_MSG:3,OBJECT_MSG:4,BUDDY_MSG:5}),Tr=function(t){function e(){var t;return vr(this,e),(t=Or(this,e,[pt.GenericMessage]))._type=-1,t._room=null,t._user=null,t._message=null,t._params=null,t._recipient=null,t._sendMode=-1,Object.seal(t),t}return wr(e,t),gr(e,[{key:"validate",value:function(t){if(this._type<0)throw new X("GenericMessageRequest Error",["Unsupported message type: "+this._type]);var e=[];switch(this._type){case Ir.PUBLIC_MSG:this._validatePublicMessage(t,e);break;case Ir.PRIVATE_MSG:this._validatePrivateMessage(t,e);break;case Ir.OBJECT_MSG:this._validateObjectMessage(t,e);break;case Ir.BUDDY_MSG:this._validateBuddyMessage(t,e);break;default:this._validateSuperUserMessage(t,e)}if(e.length>0)throw new X("GenericMessageRequest Error",e)}},{key:"execute",value:function(t){switch(this._reqObj.putByte(e.KEY_MESSAGE_TYPE,this._type),this._type){case Ir.PUBLIC_MSG:this._executePublicMessage(t);break;case Ir.PRIVATE_MSG:this._executePrivateMessage(t);break;case Ir.OBJECT_MSG:this._executeObjectMessage(t);break;case Ir.BUDDY_MSG:this._executeBuddyMessage(t);break;default:this._executeSuperUserMessage(t)}}},{key:"_validatePublicMessage",value:function(t,e){null!=this._message&&0!==this._message.length||e.push("Public message is empty"),null==this._room&&(this._room=t.lastJoinedRoom),null==this._room?e.push("You must be joined in a Room to send a message"):this._room instanceof ne?t.getJoinedRooms().indexOf(this._room)<0&&e.push("You are not joined in the target Room: "+this._room):e.push("Target Room must be an instance of SFSRoom class"),null==this._params||this._params instanceof ot||e.push("Message parameters must be set in a SFSObject class instance")}},{key:"_validatePrivateMessage",value:function(t,e){null!=this._message&&0!==this._message.length||e.push("Private message is empty"),this._recipient<0&&e.push("Invalid recipient id: "+this._recipient),null==this._params||this._params instanceof ot||e.push("Message parameters must be set in a SFSObject class instance")}},{key:"_validateObjectMessage",value:function(t,e){null==this._params?e.push("Object message is null"):this._params instanceof ot||e.push("Message object must be an instance of SFSObject class"),null==this._room&&(this._room=t.lastJoinedRoom),null==this._room?e.push("You must be joined in a Room to send a message"):this._room instanceof ne?t.getJoinedRooms().indexOf(this._room)<0&&e.push("You are not joined in the target Room: "+this._room):e.push("Target Room must be an instance of SFSRoom class"),null!=this._recipient&&(this._recipient instanceof Array?this._recipient.every((function(t){return t instanceof de}))||e.push("Each message recipient must be an instance of SFSUser class"):e.push("Message recipients must be passed in an array"),this._recipient.length>this._room.capacity&&e.push("The number of recipients is bigger than the target Room capacity: "+this._recipient.length))}},{key:"_validateBuddyMessage",value:function(t,e){t.buddyManager.isInited||e.push("Buddy List not yet initialized; please send an InitBuddyRequest first"),!1===t.buddyManager.myOnlineState&&e.push("Can't send messages while you are offline in the Buddy List system"),null!=this._message&&0!==this._message.length||e.push("Buddy message is empty"),this._recipient<0&&e.push("Recipient is offline or not in your Buddy List"),null==this._params||this._params instanceof ot||e.push("Message parameters must be set in a SFSObject class instance")}},{key:"_validateSuperUserMessage",value:function(t,e){switch(null!=this._message&&0!==this._message.length||e.push("Moderator message is empty"),null==this._params||this._params instanceof ot||e.push("Message parameters must be set in a SFSObject class instance"),this._sendMode){case Cn.TO_USER:this._recipient instanceof de||e.push("Recipient must be an instance of SFSUser class");break;case Cn.TO_ROOM:this._recipient instanceof ne||e.push("Recipient must be an instance of SFSRoom class");break;case Cn.TO_GROUP:"string"!=typeof this._recipient&&e.push("Recipient must be a string (the groupId)")}}},{key:"_executePublicMessage",value:function(t){this._reqObj.putInt(e.KEY_ROOM_ID,this._room.id),this._reqObj.putInt(e.KEY_USER_ID,t.mySelf.id),this._reqObj.putUtfString(e.KEY_MESSAGE,this._message),null!=this._params&&this._reqObj.putSFSObject(e.KEY_XTRA_PARAMS,this._params)}},{key:"_executePrivateMessage",value:function(t){this._reqObj.putInt(e.KEY_RECIPIENT,this._recipient),this._reqObj.putUtfString(e.KEY_MESSAGE,this._message),null!=this._params&&this._reqObj.putSFSObject(e.KEY_XTRA_PARAMS,this._params)}},{key:"_executeBuddyMessage",value:function(t){this._reqObj.putInt(e.KEY_RECIPIENT,this._recipient),this._reqObj.putUtfString(e.KEY_MESSAGE,this._message),null!=this._params&&this._reqObj.putSFSObject(e.KEY_XTRA_PARAMS,this._params)}},{key:"_executeSuperUserMessage",value:function(t){switch(this._reqObj.putUtfString(e.KEY_MESSAGE,this._message),null!=this._params&&this._reqObj.putSFSObject(e.KEY_XTRA_PARAMS,this._params),this._reqObj.putInt(e.KEY_RECIPIENT_MODE,this._sendMode),this._sendMode){case Cn.TO_USER:case Cn.TO_ROOM:this._reqObj.putInt(e.KEY_RECIPIENT,this._recipient.id);break;case Cn.TO_GROUP:this._reqObj.putUtfString(e.KEY_RECIPIENT,this._recipient)}}},{key:"_executeObjectMessage",value:function(t){this._reqObj.putInt(e.KEY_ROOM_ID,this._room.id),this._reqObj.putSFSObject(e.KEY_XTRA_PARAMS,this._params);var n=new Set;if(null!=this._recipient){var r,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return dr(t,e);var n={}.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)?dr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._recipient);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.add(i.id)}}catch(t){o.e(t)}finally{o.f()}}n.size>0&&this._reqObj.putIntArray(e.KEY_RECIPIENT,Array.from(n))}}],[{key:"KEY_ROOM_ID",get:function(){return"r"}},{key:"KEY_USER_ID",get:function(){return"u"}},{key:"KEY_MESSAGE",get:function(){return"m"}},{key:"KEY_MESSAGE_TYPE",get:function(){return"t"}},{key:"KEY_RECIPIENT",get:function(){return"rc"}},{key:"KEY_RECIPIENT_MODE",get:function(){return"rm"}},{key:"KEY_XTRA_PARAMS",get:function(){return"p"}},{key:"KEY_SENDER_DATA",get:function(){return"sd"}}])}(yt),kr=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return vr(this,e),(n=Or(this,e))._type=Ir.OBJECT_MSG,n._params=t,n._room=r,n._recipient=o,Object.seal(n),n}return wr(e,t),gr(e)}(Tr),jr=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return vr(this,e),(n=Or(this,e))._type=Ir.PUBLIC_MSG,n._message=t,n._room=o,n._params=r,Object.seal(n),n}return wr(e,t),gr(e)}(Tr),Pr=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return vr(this,e),(r=Or(this,e))._type=Ir.PRIVATE_MSG,r._message=t,r._recipient=n,r._params=o,Object.seal(r),r}return wr(e,t),gr(e)}(Tr),Mr=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(vr(this,e),r=Or(this,e),null==n)throw new H("Recipient mode cannot be null");if(!(n instanceof Cn))throw new H("Recipient mode must be an instance of MessageRecipientMode class");return r._type=Ir.MODERATOR_MSG,r._message=t,r._params=o,r._recipient=n.target,r._sendMode=n.mode,Object.seal(r),r}return wr(e,t),gr(e)}(Tr),Nr=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(vr(this,e),r=Or(this,e),null==n)throw new H("Recipient mode cannot be null");if(!(n instanceof Cn))throw new H("Recipient mode must an instance of MessageRecipientMode class");return r._type=Ir.ADMING_MSG,r._message=t,r._params=o,r._recipient=n.target,r._sendMode=n.mode,Object.seal(r),r}return wr(e,t),gr(e)}(Tr);function Ur(t){return Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(t)}function Yr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Lr(r.key),r)}}function Lr(t){var e=function(t){if("object"!=Ur(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ur(e)?e:e+""}function Dr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Dr=function(){return!!t})()}function Cr(t){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cr(t)}function Fr(t,e){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fr(t,e)}var Kr=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Cr(e),function(t,e){if(e&&("object"==Ur(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Dr()?Reflect.construct(e,n||[],Cr(t).constructor):e.apply(t,n))}(this,e,[pt.SetRoomVariables]))._roomVariables=t,n._room=r,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fr(t,e)}(e,t),n=e,o=[{key:"KEY_VAR_ROOM",get:function(){return"r"}},{key:"KEY_VAR_LIST",get:function(){return"vl"}}],(r=[{key:"validate",value:function(t){var e=[];if(null==this._room&&(this._room=t.lastJoinedRoom),null==this._room?e.push("A Room was not specified and you don't seem joined in any other Room"):this._room instanceof ne||e.push("Target Room must be an instance of SFSRoom class"),null==this._roomVariables?e.push("No Room Variables specified"):this._roomVariables instanceof Array?0===this._roomVariables.length?e.push("No Room Variables specified"):this._roomVariables.every((function(t){return t instanceof Nt}))||e.push("Room Variables must be passed as instances of SFSRoomVariable class"):e.push("Room Variables must be passed in an array"),e.length>0)throw new X("SetRoomVariablesRequest Error",e)}},{key:"execute",value:function(t){var n,r=new it,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Yr(t,e);var n={}.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)?Yr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._roomVariables);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.addSFSArray(i.toSFSArray())}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putSFSArray(e.KEY_VAR_LIST,r),this._reqObj.putInt(e.KEY_VAR_ROOM,this._room.id)}}])&&Br(n.prototype,r),o&&Br(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function xr(t){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(t)}function Vr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Gr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qr(r.key),r)}}function qr(t){var e=function(t){if("object"!=xr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xr(e)?e:e+""}function zr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zr=function(){return!!t})()}function Hr(t){return Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hr(t)}function Xr(t,e){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xr(t,e)}var Jr=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Hr(e),function(t,e){if(e&&("object"==xr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zr()?Reflect.construct(e,n||[],Hr(t).constructor):e.apply(t,n))}(this,e,[pt.SetUserVariables]))._userVariables=t,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xr(t,e)}(e,t),n=e,o=[{key:"KEY_USER",get:function(){return"u"}},{key:"KEY_VAR_LIST",get:function(){return"vl"}}],(r=[{key:"validate",value:function(t){var e=[];if(null==this._userVariables?e.push("No User Variables specified"):this._userVariables instanceof Array?0===this._userVariables.length?e.push("No User Variables specified"):this._userVariables.every((function(t){return t instanceof le}))||e.push("User Variables must be passed as instances of SFSUserVariable class"):e.push("User Variables must be passed in an array"),e.length>0)throw new X("SetUserVariablesRequest Error",e)}},{key:"execute",value:function(t){var n,r=new it,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Vr(t,e);var n={}.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)?Vr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._userVariables);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.addSFSArray(i.toSFSArray())}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putSFSArray(e.KEY_VAR_LIST,r)}}])&&Gr(n.prototype,r),o&&Gr(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Wr(t){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(t)}function $r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Qr(r.key),r)}}function Qr(t){var e=function(t){if("object"!=Wr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wr(e)?e:e+""}function Zr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zr=function(){return!!t})()}function to(t){return to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},to(t)}function eo(t,e){return eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},eo(t,e)}var no=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=to(e),function(t,e){if(e&&("object"==Wr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zr()?Reflect.construct(e,n||[],to(t).constructor):e.apply(t,n))}(this,e,[pt.SubscribeRoomGroup]))._groupId=t,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eo(t,e)}(e,t),n=e,o=[{key:"KEY_GROUP_ID",get:function(){return"g"}},{key:"KEY_ROOM_LIST",get:function(){return"rl"}}],(r=[{key:"validate",value:function(t){var e=[];if(null!=this._groupId&&0!==this._groupId.length||e.push("Invalid group id passed; must be a string with at least one character"),e.length>0)throw new X("SubscribeGroupRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putUtfString(e.KEY_GROUP_ID,this._groupId)}}])&&$r(n.prototype,r),o&&$r(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function ro(t){return ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(t)}function oo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,io(r.key),r)}}function io(t){var e=function(t){if("object"!=ro(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ro(e)?e:e+""}function so(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(so=function(){return!!t})()}function ao(t){return ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ao(t)}function uo(t,e){return uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uo(t,e)}var co=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ao(e),function(t,e){if(e&&("object"==ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,so()?Reflect.construct(e,n||[],ao(t).constructor):e.apply(t,n))}(this,e,[pt.UnsubscribeRoomGroup]))._groupId=t,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uo(t,e)}(e,t),n=e,o=[{key:"KEY_GROUP_ID",get:function(){return"g"}}],(r=[{key:"validate",value:function(t){var e=[];if(null!=this._groupId&&0!==this._groupId.length||e.push("Invalid group id passed; must be a string with at least one character"),e.length>0)throw new X("UnsubscribeGroupRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putUtfString(e.KEY_GROUP_ID,this._groupId)}}])&&oo(n.prototype,r),o&&oo(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function fo(t){return fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fo(t)}function lo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yo(r.key),r)}}function yo(t){var e=function(t){if("object"!=fo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fo(e)?e:e+""}function ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ho=function(){return!!t})()}function po(t){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},po(t)}function _o(t,e){return _o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_o(t,e)}var bo=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=po(e),function(t,e){if(e&&("object"==fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ho()?Reflect.construct(e,n||[],po(t).constructor):e.apply(t,n))}(this,e,[pt.SpectatorToPlayer]))._room=n,Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_o(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM_ID",get:function(){return"r"}},{key:"KEY_USER_ID",get:function(){return"u"}},{key:"KEY_PLAYER_ID",get:function(){return"p"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.getJoinedRooms().length<1&&e.push("You are not joined in any Room"),null==this._room||this._room instanceof ne||e.push("Target Room must be an instance of SFSRoom class"),e.length>0)throw new X("SpectatorToPlayerRequest Error",e)}},{key:"execute",value:function(t){null==this._room&&(this._room=t.lastJoinedRoom),this._reqObj.putInt(e.KEY_ROOM_ID,this._room.id)}}])&&lo(n.prototype,r),o&&lo(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function vo(t){return vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(t)}function mo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,go(r.key),r)}}function go(t){var e=function(t){if("object"!=vo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vo(e)?e:e+""}function Eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Eo=function(){return!!t})()}function Oo(t){return Oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oo(t)}function So(t,e){return So=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},So(t,e)}var Ro=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Oo(e),function(t,e){if(e&&("object"==vo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Eo()?Reflect.construct(e,n||[],Oo(t).constructor):e.apply(t,n))}(this,e,[pt.PlayerToSpectator]))._room=n,Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&So(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM_ID",get:function(){return"r"}},{key:"KEY_USER_ID",get:function(){return"u"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.getJoinedRooms().length<1&&e.push("You are not joined in any Room"),null==this._room||this._room instanceof ne||e.push("Target Room must be an instance of SFSRoom class"),e.length>0)throw new X("PlayerToSpectatorRequest Error",e)}},{key:"execute",value:function(t){null==this._room&&(this._room=t.lastJoinedRoom),this._reqObj.putInt(e.KEY_ROOM_ID,this._room.id)}}])&&mo(n.prototype,r),o&&mo(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function wo(t){return wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(t)}function Ao(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Io(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ko(r.key),r)}}function To(t,e,n){return e&&Io(t.prototype,e),n&&Io(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ko(t){var e=function(t){if("object"!=wo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=wo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wo(e)?e:e+""}var jo=function(){function t(e,n,r){Ao(this,t),this._varName=e,this._condition=n,this._value=r,this._logicOp=null,this._next=null,this._parent=null,Object.seal(this)}return To(t,[{key:"varName",get:function(){return this._varName}},{key:"condition",get:function(){return this._condition}},{key:"value",get:function(){return this._value}},{key:"logicOp",get:function(){return this._logicOp}},{key:"next",get:function(){return this._next}},{key:"and",value:function(e,n,r){return this._next=t.chainedMatchExpression(e,n,r,Po.AND,this),this._next}},{key:"or",value:function(e,n,r){return this._next=t.chainedMatchExpression(e,n,r,Po.OR,this),this._next}},{key:"hasNext",value:function(){return null!=this._next}},{key:"rewind",value:function(){for(var t=this;null!=t._parent;)t=t._parent;return t}},{key:"toString",value:function(){for(var t=this.rewind(),e=t.asString();t.hasNext();)e+=(t=t.next).asString();return e}},{key:"asString",value:function(){var t="";null!=this._logicOp&&(t+=" ".concat(this._logicOp.id," "));var e="string"==typeof this._value?"' ".concat(this._value," '"):this._value;return t+"(".concat(this._varName," ").concat(this._condition.symbol," ").concat(e,")")}},{key:"toSFSArray",value:function(){var t=this.rewind(),e=new it;for(e.addSFSArray(t.expressionAsSFSArray());t.hasNext();)t=t.next,e.addSFSArray(t.expressionAsSFSArray());return e}},{key:"expressionAsSFSArray",value:function(){var t=new it;return null!=this._logicOp?t.addUtfString(this._logicOp.id):t.addNull(),t.addUtfString(this._varName),t.addByte(this._condition.type),t.addUtfString(this._condition.symbol),0===this._condition.type?t.addBool(this._value):1===this._condition.type?t.addDouble(this._value):t.addUtfString(this._value),t}}],[{key:"chainedMatchExpression",value:function(e,n,r,o,i){var s=new t(e,n,r);return s._logicOp=o,s._parent=i,s}}])}(),Po=function(){function t(e){Ao(this,t),this._id=e,Object.freeze(this)}return To(t,[{key:"id",get:function(){return this._id}}],[{key:"AND",get:function(){return new t("AND")}},{key:"OR",get:function(){return new t("OR")}}])}();function Mo(t){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(t)}function No(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Uo(r.key),r)}}function Uo(t){var e=function(t){if("object"!=Mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mo(e)?e:e+""}function Yo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Yo=function(){return!!t})()}function Bo(t){return Bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bo(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}var Do=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Bo(e),function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Yo()?Reflect.construct(e,n||[],Bo(t).constructor):e.apply(t,n))}(this,e,[pt.FindRooms]))._matchExpr=t,n._groupId=r,n._limit=o,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(e,t),n=e,o=[{key:"KEY_EXPRESSION",get:function(){return"e"}},{key:"KEY_GROUP",get:function(){return"g"}},{key:"KEY_LIMIT",get:function(){return"l"}},{key:"KEY_FILTERED_ROOMS",get:function(){return"fr"}}],(r=[{key:"validate",value:function(t){var e=[];if(null==this._matchExpr&&e.push("Missing match expression"),null==this._matchExpr||this._matchExpr instanceof jo||e.push("Match expression must be passed as an instance of MatchExpression class"),e.length>0)throw new X("FindRoomsRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putSFSArray(e.KEY_EXPRESSION,this._matchExpr.toSFSArray()),null!=this._groupId&&this._reqObj.putUtfString(e.KEY_GROUP,this._groupId),this._limit>0&&this._reqObj.putShort(e.KEY_LIMIT,this._limit)}}])&&No(n.prototype,r),o&&No(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Co(t){return Co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(t)}function Fo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ko(r.key),r)}}function Ko(t){var e=function(t){if("object"!=Co(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Co(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Co(e)?e:e+""}function xo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xo=function(){return!!t})()}function Vo(t){return Vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vo(t)}function Go(t,e){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Go(t,e)}var qo=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Vo(e),function(t,e){if(e&&("object"==Co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xo()?Reflect.construct(e,n||[],Vo(t).constructor):e.apply(t,n))}(this,e,[pt.FindUsers]))._matchExpr=t,n._target=r,n._limit=o,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Go(t,e)}(e,t),n=e,o=[{key:"KEY_EXPRESSION",get:function(){return"e"}},{key:"KEY_GROUP",get:function(){return"g"}},{key:"KEY_ROOM",get:function(){return"r"}},{key:"KEY_LIMIT",get:function(){return"l"}},{key:"KEY_FILTERED_USERS",get:function(){return"fu"}}],(r=[{key:"validate",value:function(t){var e=[];if(null==this._matchExpr&&e.push("Missing match expression"),null==this._matchExpr||this._matchExpr instanceof jo||e.push("Match expression must be passed as an instance of MatchExpression class"),e.length>0)throw new X("FindUsersRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putSFSArray(e.KEY_EXPRESSION,this._matchExpr.toSFSArray()),null!=this._target&&(this._target instanceof ne?this._reqObj.putInt(e.KEY_ROOM,this._target.id):"string"==typeof this._target?this._reqObj.putUtfString(e.KEY_GROUP,this._target):this._logger.warn("Unsupported target type for FindUsersRequest: "+this._target)),this._limit>0&&this._reqObj.putShort(e.KEY_LIMIT,this._limit)}}])&&Fo(n.prototype,r),o&&Fo(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function zo(t){return zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zo(t)}function Ho(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Xo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Jo(r.key),r)}}function Jo(t){var e=function(t){if("object"!=zo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zo(e)?e:e+""}function Wo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wo=function(){return!!t})()}function $o(t){return $o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$o(t)}function Qo(t,e){return Qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qo(t,e)}var Zo=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=$o(e),function(t,e){if(e&&("object"==zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wo()?Reflect.construct(e,n||[],$o(t).constructor):e.apply(t,n))}(this,e,[pt.InviteUsers]))._invitedUsers=t,r._secondsForAnswer=n,r._params=o,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qo(t,e)}(e,t),n=e,o=[{key:"KEY_USER",get:function(){return"u"}},{key:"KEY_USER_ID",get:function(){return"ui"}},{key:"KEY_INVITATION_ID",get:function(){return"ii"}},{key:"KEY_TIME",get:function(){return"t"}},{key:"KEY_PARAMS",get:function(){return"p"}},{key:"KEY_INVITEE_ID",get:function(){return"ee"}},{key:"KEY_INVITED_USERS",get:function(){return"iu"}},{key:"KEY_REPLY_ID",get:function(){return"ri"}},{key:"MAX_INVITATIONS_FROM_CLIENT_SIDE",get:function(){return 8}},{key:"MIN_EXPIRY_TIME",get:function(){return 5}},{key:"MAX_EXPIRY_TIME",get:function(){return 300}}],(r=[{key:"validate",value:function(t){var n=[];if(null==this._invitedUsers?n.push("No invited users"):this._invitedUsers instanceof Array?(this._invitedUsers.length<1&&n.push("No invited users"),this._invitedUsers.length>e.MAX_INVITATIONS_FROM_CLIENT_SIDE&&n.push("Too many invitations; "+e.MAX_INVITATIONS_FROM_CLIENT_SIDE+" max are allowed from client side"),this._invitedUsers.every((function(t){return t instanceof de||t instanceof Ge}))||n.push("Each invited user must be an instance of SFSUser or SFSBuddy class")):n.push("Invited users must be passed in an array"),(this._secondsForAnswer<e.MIN_EXPIRY_TIME||this._secondsForAnswer>e.MAX_EXPIRY_TIME)&&n.push("secondsForAnswer value is out of range (min: "+e.MIN_EXPIRY_TIME+"; max: "+e.MAX_EXPIRY_TIME+")"),null==this._params||this._params instanceof ot||n.push("Custom invitation parameters must be set in a SFSObject class instance"),n.length>0)throw new X("InviteUsersRequest Error",n)}},{key:"execute",value:function(t){var n,r=[],o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ho(t,e);var n={}.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)?Ho(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._invitedUsers);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i instanceof de||i instanceof Ge){if(i===t.mySelf)continue;r.push(i.id)}}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putIntArray(e.KEY_INVITED_USERS,r),this._reqObj.putShort(e.KEY_TIME,this._secondsForAnswer),null!=this._params&&this._reqObj.putSFSObject(e.KEY_PARAMS,this._params)}}])&&Xo(n.prototype,r),o&&Xo(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function ti(t){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(t)}function ei(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ni(r.key),r)}}function ni(t){var e=function(t){if("object"!=ti(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ti(e)?e:e+""}var ri=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"KEY_ROOM_ID",get:function(){return"r"}},{key:"KEY_ITEM_ID",get:function(){return"i"}},{key:"KEY_VAR_LIST",get:function(){return"v"}}],null&&ei(t.prototype,null),e&&ei(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function oi(t){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(t)}function ii(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,si(r.key),r)}}function si(t){var e=function(t){if("object"!=oi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=oi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oi(e)?e:e+""}function ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ai=function(){return!!t})()}function ui(t){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ui(t)}function ci(t,e){return ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ci(t,e)}var fi=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ui(e),function(t,e){if(e&&("object"==oi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ai()?Reflect.construct(e,n||[],ui(t).constructor):e.apply(t,n))}(this,e,[pt.SetUserPosition]))._pos=t,n._room=r,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ci(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM",get:function(){return"r"}},{key:"KEY_VEC3D",get:function(){return"v"}},{key:"KEY_PLUS_USER_LIST",get:function(){return"p"}},{key:"KEY_MINUS_USER_LIST",get:function(){return"m"}},{key:"KEY_PLUS_ITEM_LIST",get:function(){return"q"}},{key:"KEY_MINUS_ITEM_LIST",get:function(){return"n"}}],(r=[{key:"validate",value:function(t){var e=[];if(null!=this._pos&&this._pos instanceof st||e.push("Position must be an instance of Vec3D class"),null==this._room&&(this._room=t.lastJoinedRoom),null==this._room&&e.push("You are not joined in any room"),this._room instanceof re||e.push("Target room must be an instance of MMORoom class"),e.length>0)throw new X("SetUserPosition Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_ROOM,this._room.id),this._pos.isFloat?this._reqObj.putFloatArray(e.KEY_VEC3D,this._pos.toArray()):this._reqObj.putIntArray(e.KEY_VEC3D,this._pos.toArray())}}])&&ii(n.prototype,r),o&&ii(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function li(t){return li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(t)}function yi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,hi(r.key),r)}}function hi(t){var e=function(t){if("object"!=li(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=li(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==li(e)?e:e+""}function pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pi=function(){return!!t})()}function _i(t){return _i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_i(t)}function bi(t,e){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bi(t,e)}var di=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=function(t,e,n){return e=_i(e),function(t,e){if(e&&("object"==li(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pi()?Reflect.construct(e,n||[],_i(t).constructor):e.apply(t,n))}(this,e,[pt.InitBuddyList]),Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bi(t,e)}(e,t),n=e,o=[{key:"KEY_BLIST",get:function(){return"bl"}},{key:"KEY_BUDDY_STATES",get:function(){return"bs"}},{key:"KEY_MY_VARS",get:function(){return"mv"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.buddyManager.isInited&&e.push("Buddy List is already initialized"),e.length>0)throw new X("InitBuddyListRequest Error",e)}},{key:"execute",value:function(t){}}])&&yi(n.prototype,r),o&&yi(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function vi(t){return vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(t)}function mi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,gi(r.key),r)}}function gi(t){var e=function(t){if("object"!=vi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=vi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vi(e)?e:e+""}function Ei(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ei=function(){return!!t})()}function Oi(t){return Oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oi(t)}function Si(t,e){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Si(t,e)}var Ri=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Oi(e),function(t,e){if(e&&("object"==vi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ei()?Reflect.construct(e,n||[],Oi(t).constructor):e.apply(t,n))}(this,e,[pt.AddBuddy]))._name=t,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Si(t,e)}(e,t),n=e,o=[{key:"KEY_BUDDY_NAME",get:function(){return"bn"}}],(r=[{key:"validate",value:function(t){var e=[];t.buddyManager.isInited||e.push("Buddy List not yet initialized; please send an InitBuddyRequest first"),(null==this._name||this._name.length<1)&&e.push("Invalid buddy name (null or empty string)"),!1===t.buddyManager.getMyOnlineState()&&e.push("Can't add a buddy while you are offline in the Buddy List system");var n=t.buddyManager.getBuddyByName(this._name);if(null==n||n.isTemp||e.push("Can't add buddy '"+this._name+"' because it is already in your list"),e.length>0)throw new X("AddBuddyRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putUtfString(e.KEY_BUDDY_NAME,this._name)}}])&&mi(n.prototype,r),o&&mi(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function wi(t){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(t)}function Ai(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ii(r.key),r)}}function Ii(t){var e=function(t){if("object"!=wi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=wi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wi(e)?e:e+""}function Ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ti=function(){return!!t})()}function ki(t){return ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ki(t)}function ji(t,e){return ji=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ji(t,e)}var Pi=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ki(e),function(t,e){if(e&&("object"==wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ti()?Reflect.construct(e,n||[],ki(t).constructor):e.apply(t,n))}(this,e,[pt.RemoveBuddy]))._name=t,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ji(t,e)}(e,t),n=e,o=[{key:"KEY_BUDDY_NAME",get:function(){return"bn"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.buddyManager.isInited||e.push("Buddy List not yet initialized; please send an InitBuddyRequest first"),!1===t.buddyManager.getMyOnlineState()&&e.push("Can't remove a buddy while you are offline in the Buddy List system"),null==this._name||this._name.length<1?e.push("Invalid buddy name (null or empty string)"):t.buddyManager.containsBuddy(this._name)||e.push("Can't remove buddy '"+this._name+"' because it isn't in your list"),e.length>0)throw new X("RemoveBuddyRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putUtfString(e.KEY_BUDDY_NAME,this._name)}}])&&Ai(n.prototype,r),o&&Ai(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Mi(t){return Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(t)}function Ni(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ui(r.key),r)}}function Ui(t){var e=function(t){if("object"!=Mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mi(e)?e:e+""}function Yi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Yi=function(){return!!t})()}function Bi(t){return Bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bi(t)}function Li(t,e){return Li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Li(t,e)}var Di=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Bi(e),function(t,e){if(e&&("object"==Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Yi()?Reflect.construct(e,n||[],Bi(t).constructor):e.apply(t,n))}(this,e,[pt.BlockBuddy]))._name=t,r._blocked=n,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Li(t,e)}(e,t),n=e,o=[{key:"KEY_BUDDY_NAME",get:function(){return"bn"}},{key:"KEY_BUDDY_BLOCK_STATE",get:function(){return"bs"}},{key:"KEY_BUDDY",get:function(){return"bd"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.buddyManager.isInited||e.push("Buddy List not yet initialized; please send an InitBuddyRequest first"),!1===t.buddyManager.getMyOnlineState()&&e.push("Can't block a buddy while you are offline in the Buddy List system"),null==this._name||this._name.length<1)e.push("Invalid buddy name (null or empty string)");else{var n=t.buddyManager.getBuddyByName(this._name);null==n?e.push("Can't block buddy '"+this._name+"' because it isn't in your list"):n.isBlocked==this._blocked&&e.push("Block flag is already in the requested '"+this._blocked+"' state for buddy '"+this._name+"'")}if(e.length>0)throw new X("BlockBuddyRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putUtfString(e.KEY_BUDDY_NAME,this._name),this._reqObj.putBool(e.KEY_BUDDY_BLOCK_STATE,this._blocked)}}])&&Ni(n.prototype,r),o&&Ni(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function Fi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ki(r.key),r)}}function Ki(t){var e=function(t){if("object"!=Ci(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ci(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ci(e)?e:e+""}function xi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xi=function(){return!!t})()}function Vi(t){return Vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vi(t)}function Gi(t,e){return Gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gi(t,e)}var qi=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=Vi(e),function(t,e){if(e&&("object"==Ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xi()?Reflect.construct(e,n||[],Vi(t).constructor):e.apply(t,n))}(this,e,[pt.GoOnline]))._online=t,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gi(t,e)}(e,t),n=e,o=[{key:"KEY_ONLINE",get:function(){return"o"}},{key:"KEY_BUDDY_NAME",get:function(){return"bn"}},{key:"KEY_BUDDY_ID",get:function(){return"bi"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.buddyManager.isInited||e.push("Buddy List not yet initialized; please send an InitBuddyRequest first"),e.length>0)throw new X("GoOnlineRequest Error",e)}},{key:"execute",value:function(t){t.buddyManager._setMyOnlineState(this._online),this._reqObj.putBool(e.KEY_ONLINE,this._online)}}])&&Fi(n.prototype,r),o&&Fi(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Hi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Xi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ji(r.key),r)}}function Ji(t){var e=function(t){if("object"!=zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zi(e)?e:e+""}function Wi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wi=function(){return!!t})()}function $i(t){return $i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$i(t)}function Qi(t,e){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qi(t,e)}var Zi=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=$i(e),function(t,e){if(e&&("object"==zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wi()?Reflect.construct(e,n||[],$i(t).constructor):e.apply(t,n))}(this,e,[pt.SetBuddyVariables]))._buddyVariables=t,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qi(t,e)}(e,t),n=e,o=[{key:"KEY_BUDDY_NAME",get:function(){return"bn"}},{key:"KEY_BUDDY_VARS",get:function(){return"bv"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.buddyManager.isInited||e.push("Buddy List not yet initialized; please send an InitBuddyRequest first"),!1===t.buddyManager.getMyOnlineState()&&e.push("Can't set Buddy Variables while you are offline in the Buddy List system"),null==this._buddyVariables?e.push("No Buddy Variables specified"):this._buddyVariables instanceof Array?0===this._buddyVariables.length?e.push("No Buddy Variables specified"):this._buddyVariables.every((function(t){return t instanceof De}))||e.push("Buddy Variables must be passed as instances of SFSBuddyVariable class"):e.push("Buddy Variables must be passed in an array"),e.length>0)throw new X("SetBuddyVariablesRequest Error",e)}},{key:"execute",value:function(t){var n,r=new it,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Hi(t,e);var n={}.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)?Hi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._buddyVariables);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.addSFSArray(i.toSFSArray())}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putSFSArray(e.KEY_BUDDY_VARS,r)}}])&&Xi(n.prototype,r),o&&Xi(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function ts(t){return ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ts(t)}function es(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ns(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rs(r.key),r)}}function rs(t){var e=function(t){if("object"!=ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ts(e)?e:e+""}function os(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(os=function(){return!!t})()}function is(t){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},is(t)}function ss(t,e){return ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ss(t,e)}var as=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=is(e),function(t,e){if(e&&("object"==ts(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,os()?Reflect.construct(e,n||[],is(t).constructor):e.apply(t,n))}(this,e,[pt.ClusterInviteUsers]))._target=t,o._invitedUsers=n,o._secondsForAnswer=r,o._params=i,Object.seal(o),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ss(t,e)}(e,t),n=e,o=[{key:"KEY_USER",get:function(){return"u"}},{key:"KEY_USER_ID",get:function(){return"ui"}},{key:"KEY_INVITATION_ID",get:function(){return"ii"}},{key:"KEY_TIME",get:function(){return"t"}},{key:"KEY_PARAMS",get:function(){return"p"}},{key:"KEY_INVITEE_ID",get:function(){return"ee"}},{key:"KEY_INVITED_USERS",get:function(){return"iu"}},{key:"KEY_SERVER_ID",get:function(){return"ss"}},{key:"KEY_ROOM_ID",get:function(){return"rr"}},{key:"KEY_REPLY_ID",get:function(){return"ri"}},{key:"MAX_INVITATIONS_FROM_CLIENT_SIDE",get:function(){return 8}},{key:"MIN_EXPIRY_TIME",get:function(){return 5}},{key:"MAX_EXPIRY_TIME",get:function(){return 300}}],(r=[{key:"validate",value:function(t){var n=[];if(null!=this._target&&this._target instanceof Fn||n.push("Invalid target"),null==this._invitedUsers?n.push("No invited users"):this._invitedUsers instanceof Array?(this._invitedUsers.length<1&&n.push("No invited users"),this._invitedUsers.length>e.MAX_INVITATIONS_FROM_CLIENT_SIDE&&n.push("Too many invitations; "+e.MAX_INVITATIONS_FROM_CLIENT_SIDE+" max are allowed from client side"),this._invitedUsers.every((function(t){return t instanceof de||t instanceof Ge}))||n.push("Each invited user must be an instance of SFSUser or SFSBuddy class")):n.push("Invited users must be passed in an array"),(this._secondsForAnswer<e.MIN_EXPIRY_TIME||this._secondsForAnswer>e.MAX_EXPIRY_TIME)&&n.push("secondsForAnswer value is out of range (min: "+e.MIN_EXPIRY_TIME+"; max: "+e.MAX_EXPIRY_TIME+")"),null==this._params||this._params instanceof ot||n.push("Custom invitation parameters must be set in a SFSObject class instance"),n.length>0)throw new X("InviteUsersRequest Error",n)}},{key:"execute",value:function(t){var n,r=[],o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return es(t,e);var n={}.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)?es(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._invitedUsers);try{for(o.s();!(n=o.n()).done;){var i=n.value;if(i instanceof de||i instanceof Ge){if(i===t.mySelf)continue;r.push(i.id)}}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putUtfString(e.KEY_SERVER_ID,this._target.nodeId),this._reqObj.putInt(e.KEY_ROOM_ID,this._target.roomId),this._reqObj.putIntArray(e.KEY_INVITED_USERS,r),this._reqObj.putShort(e.KEY_TIME,this._secondsForAnswer),null!=this._params&&this._reqObj.putSFSObject(e.KEY_PARAMS,this._params)}}])&&ns(n.prototype,r),o&&ns(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function us(t){return us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},us(t)}function cs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,fs(r.key),r)}}function fs(t){var e=function(t){if("object"!=us(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=us(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==us(e)?e:e+""}function ls(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ls=function(){return!!t})()}function ys(t){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ys(t)}function hs(t,e){return hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hs(t,e)}var ps=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=ys(e),function(t,e){if(e&&("object"==us(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ls()?Reflect.construct(e,n||[],ys(t).constructor):e.apply(t,n))}(this,e,[pt.ClusterJoinOrCreateRequest]))._matchExpression=n,t._groupList=r,t._settings=o,null!=o&&(t._createRoomRequest=new Xn(o,!1,null)),Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hs(t,e)}(e,t),n=e,o=[{key:"KEY_GROUP_LIST",get:function(){return"gl"}},{key:"KEY_ROOM_SETTINGS",get:function(){return"rs"}},{key:"KEY_MATCH_EXPRESSION",get:function(){return"me"}},{key:"KEY_IS_PUBLIC",get:function(){return"gip"}},{key:"KEY_MIN_PLAYERS",get:function(){return"gmp"}},{key:"KEY_INVITED_PLAYERS",get:function(){return"ginp"}},{key:"KEY_INVITATION_EXPIRY",get:function(){return"gie"}},{key:"KEY_NOTIFY_GAME_STARTED",get:function(){return"gns"}},{key:"KEY_INVITATION_PARAMS",get:function(){return"ip"}}],(r=[{key:"validate",value:function(t){var e=[];if(null==this._matchExpression||this._matchExpression instanceof jo||e.push("Match expression must be an instance of MatchExpression class"),null!=this._settings){var n=this._settings instanceof Nn,r=this._settings instanceof Mn;if(n||r){try{this._createRoomRequest.validate(t)}catch(t){e=e.concat(t.errors)}n&&(this._settings.minPlayersToStartGame>this._settings.maxUsers&&e.push("minPlayersToStartGame cannot be greater than maxUsers"),(this._settings.invitationExpiryTime<as.MIN_EXPIRY_TIME||this._settings.InvitationExpiryTime>as.MAX_EXPIRY_TIME)&&e.Add("Expiry time value is out of range ("+as.MIN_EXPIRY_TIME+"-"+as.MAX_EXPIRY_TIME+")"),null!=this._settings.invitedPlayers&&this._settings.invitedPlayers.length>as.MAX_INVITATIONS_FROM_CLIENT_SIDE&&e.Add("Cannot invite more than "+as.MAX_INVITATIONS_FROM_CLIENT_SIDE+" players from client side"))}else e.push("Unsupported RoomSetting type; accepted types are ClusterRoomSettings and MMORoomSettings")}if(e.length>0)throw new X("ClusterJoinOrCreateRequest Error",e)}},{key:"execute",value:function(t){if(null!=this._matchExpression&&this._reqObj.putSFSArray(e.KEY_MATCH_EXPRESSION,this._matchExpression.toSFSArray()),null!=this._groupList&&this._groupList.length>0&&this._reqObj.putUtfStringArray(e.KEY_GROUP_LIST,this._groupList),null!=this._settings){this._createRoomRequest.execute(t);var n=this._createRoomRequest.getMessage().content;if(this._settings instanceof Nn){n.putBool(e.KEY_IS_PUBLIC,this._settings.isPublic),n.putShort(e.KEY_MIN_PLAYERS,this._settings.minPlayersToStartGame),n.putShort(e.KEY_INVITATION_EXPIRY,this._settings.invitationExpiryTime),n.putBool(e.KEY_NOTIFY_GAME_STARTED,this._settings.notifyGameStarted);var r=this._settings.invitedPlayers;if(null!=r){var o=r.map((function(t){return t.id}));n.putIntArray(e.KEY_INVITED_PLAYERS,o)}null!=this._settings.invitationParams&&n.putSFSObject(e.KEY_INVITATION_PARAMS,this._settings.invitationParams)}this._reqObj.putSFSObject(e.KEY_ROOM_SETTINGS,n)}}}])&&cs(n.prototype,r),o&&cs(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function _s(t){return _s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(t)}function bs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ds(t,e);var n={}.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)?ds(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function ds(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function vs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ms(r.key),r)}}function ms(t){var e=function(t){if("object"!=_s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_s(e)?e:e+""}var gs=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._sfs=e,this._logger=e.logger,this._id=0,this._messageHandlers=new Map,this._initMessageHandlers(),Object.freeze(this)}return e=t,n=[{key:"id",get:function(){return this._id}},{key:"handleMessage",value:function(t,e){var n=this._messageHandlers.get(e);null!=n?(this._sfs.debug&&this._logger.info("Handling server event: ".concat(n.name," (").concat(e,")")),n.handler.call(this,t)):this._logger.warn("Unknown server event received; id: ".concat(e))}},{key:"_initMessageHandlers",value:function(){this._setHandler(pt.Handshake,this._fnHandshake),this._setHandler(pt.Login,this._fnLogin),this._setHandler(pt.Logout,this._fnLogout),this._setHandler(pt.JoinRoom,this._fnJoinRoom),this._setHandler(pt.CreateRoom,this._fnCreateRoom),this._setHandler(pt.ChangeRoomName,this._fnChangeRoomName),this._setHandler(pt.ChangeRoomPassword,this._fnChangeRoomPassword),this._setHandler(pt.ChangeRoomCapacity,this._fnChangeRoomCapacity),this._setHandler(pt.GenericMessage,this._fnGenericMessage),this._setHandler(pt.SetRoomVariables,this._fnSetRoomVariables),this._setHandler(pt.SetUserVariables,this._fnSetUserVariables),this._setHandler(pt.SubscribeRoomGroup,this._fnSubscribeRoomGroup),this._setHandler(pt.UnsubscribeRoomGroup,this._fnUnsubscribeRoomGroup),this._setHandler(pt.SpectatorToPlayer,this._fnSpectatorToPlayer),this._setHandler(pt.PlayerToSpectator,this._fnPlayerToSpectator),this._setHandler(pt.FindRooms,this._fnFindRooms),this._setHandler(pt.FindUsers,this._fnFindUsers),this._setHandler(pt.PingPong,this._fnPingPong),this._setHandler(pt.InitBuddyList,this._fnInitBuddyList),this._setHandler(pt.AddBuddy,this._fnAddBuddy),this._setHandler(pt.RemoveBuddy,this._fnRemoveBuddy),this._setHandler(pt.BlockBuddy,this._fnBlockBuddy),this._setHandler(pt.GoOnline,this._fnGoOnline),this._setHandler(pt.SetBuddyVariables,this._fnSetBuddyVariables),this._setHandler(pt.QuickJoinGame,this._fnQuickJoinGame),this._setHandler(pt.InviteUsers,this._fnInviteUsers),this._setHandler(pt.InvitationReply,this._fnInvitationReply),this._setHandler(pt.SetUserPosition,this._fnSetUserPosition),this._setHandler(pt.GameServerConnectionRequired,this._fnGameServerConnectionRequired),this._setHandler(1e3,this._fnUserEnterRoom,"UserEnterRoom"),this._setHandler(1001,this._fnUserCountChange,"UserCountChange"),this._setHandler(1002,this._fnUserLost,"UserLost"),this._setHandler(1003,this._fnRoomLost,"RoomLost"),this._setHandler(1004,this._fnUserExitRoom,"UserExitRoom"),this._setHandler(1005,this._fnClientDisconnection,"ClientDisconnection"),this._setHandler(1007,this._fnSetMMOItemVariables,"SetMMOItemVariables"),this._setHandler(1600,this._fnLoadBalancerError,"LoadBalancerError")}},{key:"_setHandler",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null==n&&(n=pt.getNameFromId(t)),this._messageHandlers.set(t,{name:n,handler:e})}},{key:"_fnHandshake",value:function(t){this._sfs._handleHandShake(t)}},{key:"_fnLogin",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){this._populateRoomList(e.get(on.KEY_ROOMLIST)),this._sfs._mySelf=new de(e.get(on.KEY_ID),e.get(on.KEY_USER_NAME),!0),this._sfs.mySelf._setUserManager(this._sfs.userManager),this._sfs.mySelf._privilegeId=e.get(on.KEY_PRIVILEGE_ID),this._sfs.userManager._addUser(this._sfs.mySelf);var n=e.get(on.KEY_PARAMS);if(null!=n){var r=n.getUtfString("_sid");null!=r&&(this._sfs._nodeId=r)}var o={};o.zone=e.get(on.KEY_ZONE_NAME),o.user=this._sfs.mySelf,o.data=e.get(on.KEY_PARAMS),this._sfs.dispatchEvent(O.LOGIN,o)}else this._dispatchError(O.LOGIN_ERROR,e)}},{key:"_fnLogout",value:function(t){this._sfs._handleLogout();var e={};e.zone=t.get(yn.KEY_ZONE_NAME),this._sfs.dispatchEvent(O.LOGOUT,e)}},{key:"_fnJoinRoom",value:function(e){if(this._sfs._isJoining=!1,null==e.get(t.KEY_ERROR_CODE)){var n=e.get(mn.KEY_ROOM),r=e.get(mn.KEY_USER_LIST),o=this._sfs.roomManager,i=ne.fromSFSArray(n);i=o._replaceRoom(i,o.containsGroup(i.groupId));for(var s=0;s<r.size();s++){var a=r.get(s),u=this._getOrCreateUser(a,!0,i);i._addUser(u)}i._isJoined=!0,this._sfs._lastJoinedRoom=i;var c={};c.room=i,this._sfs.dispatchEvent(O.ROOM_JOIN,c)}else this._dispatchError(O.ROOM_JOIN_ERROR,e)}},{key:"_fnCreateRoom",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=ne.fromSFSArray(e.get(Xn.KEY_ROOM));this._sfs.roomManager._addRoom(n);var r={};r.room=n,this._sfs.dispatchEvent(O.ROOM_ADD,r)}else this._dispatchError(O.ROOM_CREATION_ERROR,e)}},{key:"_fnChangeRoomName",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(er.KEY_ROOM),r=this._sfs.roomManager.getRoomById(n);if(null!=r){var o=r.name;this._sfs.roomManager._changeRoomName(r,e.get(er.KEY_NAME));var i={};i.oldName=o,i.room=r,this._sfs.dispatchEvent(O.ROOM_NAME_CHANGE,i)}else this._logger.warn("Unexpected RoomNameChange event error; unknown Room id: "+n)}else this._dispatchError(O.ROOM_NAME_CHANGE_ERROR,e)}},{key:"_fnChangeRoomPassword",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(ur.KEY_ROOM),r=this._sfs.roomManager.getRoomById(n);if(null!=r){this._sfs.roomManager._changeRoomPasswordState(r,e.get(ur.KEY_PASS));var o={};o.room=r,this._sfs.dispatchEvent(O.ROOM_PASSWORD_STATE_CHANGE,o)}else this._logger.warn("Unexpected RoomPasswordChange event error; unknown Room id: "+n)}else this._dispatchError(O.ROOM_PASSWORD_STATE_CHANGE_ERROR,e)}},{key:"_fnChangeRoomCapacity",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(_r.KEY_ROOM),r=this._sfs.roomManager.getRoomById(n);if(null!=r){this._sfs.roomManager._changeRoomCapacity(r,e.get(_r.KEY_USER_SIZE),e.get(_r.KEY_SPEC_SIZE));var o={};o.room=r,this._sfs.dispatchEvent(O.ROOM_CAPACITY_CHANGE,o)}else this._logger.warn("Unexpected RoomCapacityChange event error; unknown Room id: "+n)}else this._dispatchError(O.ROOM_CAPACITY_CHANGE_ERROR,e)}},{key:"_fnGenericMessage",value:function(t){switch(t.get(Tr.KEY_MESSAGE_TYPE)){case Ir.PUBLIC_MSG:this._handlePublicMessage(t);break;case Ir.PRIVATE_MSG:this._handlePrivateMessage(t);break;case Ir.BUDDY_MSG:this._handleBuddyMessage(t);break;case Ir.MODERATOR_MSG:this._handleModMessage(t);break;case Ir.ADMING_MSG:this._handleAdminMessage(t);break;case Ir.OBJECT_MSG:this._handleObjectMessage(t)}}},{key:"_handlePublicMessage",value:function(t){var e=t.get(Tr.KEY_ROOM_ID),n=this._sfs.roomManager.getRoomById(e);if(null!=n){var r={};r.room=n,r.sender=this._sfs.userManager.getUserById(t.get(Tr.KEY_USER_ID)),r.message=t.get(Tr.KEY_MESSAGE),r.data=t.get(Tr.KEY_XTRA_PARAMS),this._sfs.dispatchEvent(O.PUBLIC_MESSAGE,r)}else this._logger.warn("Unexpected PublicMessage event error; unknown Room id: "+e)}},{key:"_handlePrivateMessage",value:function(t){var e=t.get(Tr.KEY_USER_ID),n=this._sfs.userManager.getUserById(e);if(null==n){if(null==t.get(Tr.KEY_SENDER_DATA))return void this._logger.warn("Unexpected PublicMessage event error; missing sender details");n=de.fromSFSArray(t.get(Tr.KEY_SENDER_DATA))}var r={};r.sender=n,r.message=t.get(Tr.KEY_MESSAGE),r.data=t.get(Tr.KEY_XTRA_PARAMS),this._sfs.dispatchEvent(O.PRIVATE_MESSAGE,r)}},{key:"_handleBuddyMessage",value:function(t){var e=t.get(Tr.KEY_USER_ID),n=this._sfs.buddyManager.getBuddyById(e),r={};r.isItMe=this._sfs.mySelf.id===e,r.buddy=n,r.message=t.get(Tr.KEY_MESSAGE),r.data=t.get(Tr.KEY_XTRA_PARAMS),this._sfs.dispatchEvent(S.BUDDY_MESSAGE,r)}},{key:"_handleObjectMessage",value:function(t){var e={};e.sender=this._sfs.userManager.getUserById(t.get(Tr.KEY_USER_ID)),e.message=t.get(Tr.KEY_XTRA_PARAMS),this._sfs.dispatchEvent(O.OBJECT_MESSAGE,e)}},{key:"_handleModMessage",value:function(t){var e={};e.sender=de.fromSFSArray(t.get(Tr.KEY_SENDER_DATA)),e.message=t.get(Tr.KEY_MESSAGE),e.data=t.get(Tr.KEY_XTRA_PARAMS),this._sfs.dispatchEvent(O.MODERATOR_MESSAGE,e)}},{key:"_handleAdminMessage",value:function(t){var e={};e.sender=de.fromSFSArray(t.get(Tr.KEY_SENDER_DATA)),e.message=t.get(Tr.KEY_MESSAGE),e.data=t.get(Tr.KEY_XTRA_PARAMS),this._sfs.dispatchEvent(O.ADMIN_MESSAGE,e)}},{key:"_fnSetRoomVariables",value:function(t){var e=t.get(Kr.KEY_VAR_ROOM),n=t.get(Kr.KEY_VAR_LIST),r=this._sfs.roomManager.getRoomById(e),o=new Set;if(null!=r){for(var i=0;i<n.size();i++){var s=Nt.fromSFSArray(n.get(i));r._setVariable(s),o.add(s.name)}var a={};a.changedVars=Array.from(o),a.room=r,this._sfs.dispatchEvent(O.ROOM_VARIABLES_UPDATE,a)}else this._logger.warn("Unexpected RoomVariablesUpdate event error; unknown Room id: "+e)}},{key:"_fnSetUserVariables",value:function(t){var e=t.get(Jr.KEY_USER),n=t.get(Jr.KEY_VAR_LIST),r=this._sfs.userManager.getUserById(e),o=new Set;if(null!=r){for(var i=0;i<n.size();i++){var s=le.fromSFSArray(n.get(i));r._setVariable(s),o.add(s.name)}var a={};a.changedVars=Array.from(o),a.user=r,this._sfs.dispatchEvent(O.USER_VARIABLES_UPDATE,a)}else this._logger.warn("Unexpected UserVariablesUpdate event error; unknown User id: "+e)}},{key:"_fnSubscribeRoomGroup",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(no.KEY_GROUP_ID),r=e.get(no.KEY_ROOM_LIST);this._sfs.roomManager.containsGroup(n)&&this._logger.warn("Unexpected SubscribeRoomGroup event error; group already subscribed: "+n),this._sfs.roomManager._addGroup(n),this._populateRoomList(r);var o={};o.groupId=n,o.newRooms=this._sfs.roomManager.getRoomListFromGroup(n),this._sfs.dispatchEvent(O.ROOM_GROUP_SUBSCRIBE,o)}else this._dispatchError(O.ROOM_GROUP_SUBSCRIBE_ERROR,e)}},{key:"_fnUnsubscribeRoomGroup",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(co.KEY_GROUP_ID);this._sfs.roomManager.containsGroup(n)||this._logger.warn("Unexpected UnsubscribeRoomGroup event error; group not found: "+n+" (maybe never subscribed, or the Room Manager doesn't contain Rooms belonging to that Group)"),this._sfs.roomManager._removeGroup(n);var r={};r.groupId=n,this._sfs.dispatchEvent(O.ROOM_GROUP_UNSUBSCRIBE,r)}else this._dispatchError(O.ROOM_GROUP_UNSUBSCRIBE_ERROR,e)}},{key:"_fnSpectatorToPlayer",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(bo.KEY_ROOM_ID),r=e.get(bo.KEY_USER_ID),o=e.get(bo.KEY_PLAYER_ID),i=this._sfs.userManager.getUserById(r),s=this._sfs.roomManager.getRoomById(n);if(null!=s)if(null!=i)if(i.isJoinedInRoom(s)){i._setPlayerId(o,s);var a={};a.room=s,a.user=i,a.playerId=o,this._sfs.dispatchEvent(O.SPECTATOR_TO_PLAYER,a)}else this._logger.warn("Unexpected SpectatorToPlayer event error; User "+i+" not in Room "+s);else this._logger.warn("Unexpected SpectatorToPlayer event error; unknown User id: "+r);else this._logger.warn("Unexpected SpectatorToPlayer event error; unknown Room id: "+n)}else this._dispatchError(O.SPECTATOR_TO_PLAYER_ERROR,e)}},{key:"_fnPlayerToSpectator",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(Ro.KEY_ROOM_ID),r=e.get(Ro.KEY_USER_ID),o=this._sfs.userManager.getUserById(r),i=this._sfs.roomManager.getRoomById(n);if(null!=i)if(null!=o)if(o.isJoinedInRoom(i)){o._setPlayerId(-1,i);var s={};s.room=i,s.user=o,this._sfs.dispatchEvent(O.PLAYER_TO_SPECTATOR,s)}else this._logger.warn("Unexpected PlayerToSpectator event error; User "+o+" not in Room "+i);else this._logger.warn("Unexpected SpectatorToPlayer event error; unknown User id: "+r);else this._logger.warn("Unexpected SpectatorToPlayer event error; unknown Room id: "+n)}else this._dispatchError(O.PLAYER_TO_SPECTATOR_ERROR,e)}},{key:"_fnPingPong",value:function(t){var e={};e.lagValue=this._sfs._lagMonitor._onPingPong(),this._sfs.dispatchEvent(O.PING_PONG,e)}},{key:"_fnFindRooms",value:function(t){for(var e=t.get(Do.KEY_FILTERED_ROOMS),n=[],r=0;r<e.size();r++){var o=e.get(r),i=ne.fromSFSArray(o),s=this._sfs.roomManager.getRoomById(i.id);null!=s&&(i._isJoined=s._isJoined),n.push(i)}var a={};a.rooms=n,this._sfs.dispatchEvent(O.ROOM_FIND_RESULT,a)}},{key:"_fnFindUsers",value:function(t){for(var e=t.get(qo.KEY_FILTERED_USERS),n=[],r=this._sfs.mySelf,o=0;o<e.size();o++){var i=e.get(o),s=de.fromSFSArray(i);s.id===r.id&&(s=r),n.push(s)}var a={};a.users=n,this._sfs.dispatchEvent(O.USER_FIND_RESULT,a)}},{key:"_fnQuickJoinGame",value:function(e){null!=e.get(t.KEY_ERROR_CODE)&&this._dispatchError(O.ROOM_JOIN_ERROR,e)}},{key:"_fnInviteUsers",value:function(t){var e;e=null!=t.get(Zo.KEY_USER_ID)?this._sfs.userManager.getUserById(t.get(Zo.KEY_USER_ID)):de.fromSFSArray(t.get(Zo.KEY_USER));var n=t.get(Zo.KEY_TIME),r=t.get(Zo.KEY_INVITATION_ID),o=t.get(Zo.KEY_PARAMS),i=new Je(e,this._sfs.mySelf,n,o);i._id=r;var s={};s.invitation=i,this._sfs.dispatchEvent(O.INVITATION,s)}},{key:"_fnInvitationReply",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n;n=null!=e.get(Zo.KEY_USER_ID)?this._sfs.userManager.getUserById(e.get(Zo.KEY_USER_ID)):de.fromSFSArray(e.get(Zo.KEY_USER));var r=e.get(Zo.KEY_REPLY_ID),o=e.get(Zo.KEY_PARAMS),i={};i.invitee=n,i.reply=r,i.data=o,this._sfs.dispatchEvent(O.INVITATION_REPLY,i)}else this._dispatchError(O.INVITATION_REPLY_ERROR,e)}},{key:"_fnSetUserPosition",value:function(t){var e=t.get(fi.KEY_ROOM),n=this._sfs.roomManager.getRoomById(e),r=t.get(fi.KEY_MINUS_USER_LIST),o=t.get(fi.KEY_PLUS_USER_LIST),i=t.get(fi.KEY_MINUS_ITEM_LIST),s=t.get(fi.KEY_PLUS_ITEM_LIST),a=[],u=[],c=[],f=[];if(null!=r){var l,y=bs(r);try{for(y.s();!(l=y.n()).done;){var h=l.value,p=n.getUserById(h);null!=p&&(n._removeUser(p),u.push(p))}}catch(t){y.e(t)}finally{y.f()}}if(null!=o)for(var _=0;_<o.size();_++){var b=o.get(_),d=this._getOrCreateUser(b,!0,n);a.push(d),n._addUser(d);var v=b.get(5);null!=v&&(d._aoiEntryPoint=st.fromArray(v))}if(null!=i){var m,g=bs(i);try{for(g.s();!(m=g.n()).done;){var E=m.value,S=n.getMMOItem(E);null!=S&&(n._removeItem(S.id),f.push(S))}}catch(t){g.e(t)}finally{g.f()}}if(null!=s)for(var R=0;R<s.size();R++){var w=s.get(R),A=je.fromSFSArray(w);c.push(A),n._addMMOItem(A);var I=w.get(2);null!=I&&(A._aoiEntryPoint=st.fromArray(I))}var T={};T.addedItems=c,T.removedItems=f,T.removedUsers=u,T.addedUsers=a,T.room=n,this._sfs.dispatchEvent(O.PROXIMITY_LIST_UPDATE,T)}},{key:"_fnInitBuddyList",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(di.KEY_BLIST),r=e.get(di.KEY_MY_VARS),o=e.get(di.KEY_BUDDY_STATES);this._sfs.buddyManager._clearAll();for(var i=0;i<n.size();i++){var s=Ge.fromSFSArray(n.get(i));this._sfs.buddyManager._addBuddy(s)}null!=o&&this._sfs.buddyManager._setBuddyStates(o);for(var a=[],u=0;u<r.size();u++){var c=De.fromSFSArray(r.get(u));a.push(c)}this._sfs.buddyManager._setMyVariables(a),this._sfs.buddyManager._setInited();var f={};f.buddyList=this._sfs.buddyManager.getBuddyList(),f.myVariables=this._sfs.buddyManager.getMyVariables(),this._sfs.dispatchEvent(S.BUDDY_LIST_INIT,f)}else this._dispatchError(S.BUDDY_ERROR,e)}},{key:"_fnAddBuddy",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=Ge.fromSFSArray(e.get(Ri.KEY_BUDDY_NAME));this._sfs.buddyManager._addBuddy(n);var r={};r.buddy=n,this._sfs.dispatchEvent(S.BUDDY_ADD,r)}else this._dispatchError(S.BUDDY_ERROR,e)}},{key:"_fnRemoveBuddy",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(Pi.KEY_BUDDY_NAME),r=this._sfs.buddyManager._removeBuddyByName(n);if(null!=r){var o={};o.buddy=r,this._sfs.dispatchEvent(S.BUDDY_REMOVE,o)}else this._logger.warn("Unexpected RemoveBuddy event error; can't find "+n+" in local buddy list")}else this._dispatchError(S.BUDDY_ERROR,e)}},{key:"_fnBlockBuddy",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(Di.KEY_BUDDY_NAME),r=this._sfs.buddyManager.getBuddyByName(n);null!=e.get(Di.KEY_BUDDY)?(r=Ge.fromSFSArray(e.get(Di.KEY_BUDDY)),this._sfs.buddyManager._addBuddy(r)):null!=r?r._isBlocked=e.get(Di.KEY_BUDDY_BLOCK_STATE):this._logger.warn("Unexpected BlockBuddy event error; can't find "+n+" in local buddy list");var o={};o.buddy=r,this._sfs.dispatchEvent(S.BUDDY_BLOCK,o)}else this._dispatchError(S.BUDDY_ERROR,e)}},{key:"_fnGoOnline",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){var n=e.get(qi.KEY_BUDDY_NAME),r=this._sfs.buddyManager.getBuddyByName(n),o=n===this._sfs.mySelf.name,i=e.get(qi.KEY_ONLINE),s=i===qe.ONLINE,a=!0;if(o)this._sfs.buddyManager.getMyOnlineState()!=s&&(this._logger.warn("Unexpected GoOnline event error; current user's online state is not in synch with the server; resynching to: "+s),this._sfs.buddyManager._setMyOnlineState(s));else{if(null==r)return void this._logger.warn("Unexpected GoOnline event error; can't find "+n+" in local buddy list");r._id=e.get(qi.KEY_BUDDY_ID),r._setVariable(new De(Le.BV_ONLINE,s)),i===qe.LEFT_THE_SERVER&&r._clearVolatileVariables(),a=this._sfs.buddyManager.getMyOnlineState()}if(a){var u={};u.buddy=r,u.isItMe=o,this._sfs.dispatchEvent(S.BUDDY_ONLINE_STATE_CHANGE,u)}}else this._dispatchError(S.BUDDY_ERROR,e)}},{key:"_fnSetBuddyVariables",value:function(e){if(null==e.get(t.KEY_ERROR_CODE)){for(var n=e.get(Zi.KEY_BUDDY_NAME),r=e.get(Zi.KEY_BUDDY_VARS),o=this._sfs.buddyManager.getBuddyByName(n),i=n===this._sfs.mySelf.name,s=[],a=[],u=!0,c=0;c<r.size();c++){var f=De.fromSFSArray(r.get(c));a.push(f),s.push(f.name)}if(i)this._sfs.buddyManager._setMyVariables(a);else{if(null==o)return void this._logger.warn("Unexpected SetBuddyVariables event error; can't find "+n+" in local buddy list");o._setVariables(a),u=this._sfs.buddyManager.getMyOnlineState()}if(u){var l={};l.buddy=o,l.isItMe=i,l.changedVars=s,this._sfs.dispatchEvent(S.BUDDY_VARIABLES_UPDATE,l)}}else this._dispatchError(S.BUDDY_ERROR,e)}},{key:"_fnUserEnterRoom",value:function(e){var n=this._sfs.roomManager.getRoomById(e.get(t.ROOM_PARAM));if(null!=n){var r=e.get(t.USER_PARAM),o=this._getOrCreateUser(r,!0,n);n._addUser(o);var i={};i.user=o,i.room=n,this._sfs.dispatchEvent(O.USER_ENTER_ROOM,i)}}},{key:"_fnUserCountChange",value:function(e){var n=this._sfs.roomManager.getRoomById(e.get(t.ROOM_PARAM));if(null!=n){var r=e.get(t.USER_COUNT_PARAM),o=null!=e.get(t.SPECT_COUNT_PARAM)?e.get(t.SPECT_COUNT_PARAM):0;n._userCount=r,n._specCount=o;var i={};i.room=n,i.uCount=r,i.sCount=o,this._sfs.dispatchEvent(O.USER_COUNT_CHANGE,i)}}},{key:"_fnUserLost",value:function(e){var n=this._sfs.userManager.getUserById(e.get(t.USER_PARAM));if(null!=n){var r=this._sfs.roomManager.getUserRooms(n);this._sfs.roomManager._removeUser(n),this._sfs.userManager._removeUser(n);var o,i=bs(r);try{for(i.s();!(o=i.n()).done;){var s=o.value,a={};a.user=n,a.room=s,this._sfs.dispatchEvent(O.USER_EXIT_ROOM,a)}}catch(t){i.e(t)}finally{i.f()}}}},{key:"_fnRoomLost",value:function(e){var n=this._sfs.roomManager.getRoomById(e.get(t.ROOM_PARAM));if(null!=n){this._sfs.roomManager._removeRoom(n);var r,o=bs(n.getUserList());try{for(o.s();!(r=o.n()).done;){var i=r.value;this._sfs.userManager._removeUser(i)}}catch(t){o.e(t)}finally{o.f()}var s={};s.room=n,this._sfs.dispatchEvent(O.ROOM_REMOVE,s)}}},{key:"_fnUserExitRoom",value:function(e){var n=this._sfs.roomManager.getRoomById(e.get(t.ROOM_PARAM)),r=this._sfs.userManager.getUserById(e.get(t.USER_PARAM));if(null!=n&&null!=r){n._removeUser(r),this._sfs.userManager._removeUser(r),r.isItMe&&n.isJoined&&(n._isJoined=!1,0!==this._sfs.roomManager.getJoinedRooms().length&&this._sfs._lastJoinedRoom!==n||(this._sfs._lastJoinedRoom=null),n._isManaged||this._sfs.roomManager._removeRoom(n));var o={};o.user=r,o.room=n,this._sfs.dispatchEvent(O.USER_EXIT_ROOM,o)}else this._logger.debug("Failed to handle UserExit event; Room: "+n+", User: "+r)}},{key:"_fnClientDisconnection",value:function(e){var n=e.get(t.DISCONNECTION_REASON_PARAM);this._sfs._handleClientDisconnection(_.getReason(n))}},{key:"_fnSetMMOItemVariables",value:function(t){var e=t.get(ri.KEY_ROOM_ID),n=t.get(ri.KEY_ITEM_ID),r=t.get(ri.KEY_VAR_LIST),o=this._sfs.roomManager.getRoomById(e),i=new Set;if(null!=o){var s=o.getMMOItem(n);if(null!=s){for(var a=0;a<r.size();a++){var u=we.fromSFSArray(r.get(a));s._setVariable(u),i.add(u.name)}var c={};c.changedVars=Array.from(i),c.mmoItem=s,c.room=o,this._sfs.dispatchEvent(O.MMOITEM_VARIABLES_UPDATE,c)}else this._logger.warn("Unexpected MMOItemVariablesUpdate event error; unknown MMOItem id: "+n)}else this._logger.warn("Unexpected MMOItemVariablesUpdate event error; unknown MMORoom id: "+e)}},{key:"_fnGameServerConnectionRequired",value:function(t){var e={};e.host=t.getUtfString("h"),e.port=t.getInt("p"),e.zone=t.getUtfString("z");var n=t.getUtfString("at");null!=this._sfs.config&&(e.port=this._sfs.config.port);var r={};r.configObj=e,r.userName=this._sfs.mySelf.name,r.password=n,this._sfs.dispatchEvent(R.CONNECTION_REQUIRED,r)}},{key:"_fnLoadBalancerError",value:function(t){this._sfs.dispatchEvent(R.LOAD_BALANCER_ERROR,{})}},{key:"_dispatchError",value:function(e,n){var r={};r.errorCode=n.get(t.KEY_ERROR_CODE),r.errorMessage=vt.getErrorMessage(r.errorCode,n.get(t.KEY_ERROR_PARAMS)),this._sfs.dispatchEvent(e,r)}},{key:"_populateRoomList",value:function(t){for(var e=0;e<t.size();e++){var n=ne.fromSFSArray(t.get(e));this._sfs.roomManager._replaceRoom(n)}}},{key:"_getOrCreateUser",value:function(t,e,n){var r=t.get(0),o=this._sfs.userManager.getUserById(r);if(null==o)(o=de.fromSFSArray(t,n))._setUserManager(this._sfs.userManager);else if(null!=n){o._setPlayerId(t.get(3),n);var i=t.get(4),s=[];if(null!=i)for(var a=0;a<i.size();a++)s.push(le.fromSFSArray(i.get(a)));o._replaceVariables(s)}return e&&this._sfs.userManager._addUser(o),o}}],r=[{key:"KEY_ERROR_CODE",get:function(){return"ec"}},{key:"KEY_ERROR_PARAMS",get:function(){return"ep"}},{key:"ROOM_PARAM",get:function(){return"r"}},{key:"USER_PARAM",get:function(){return"u"}},{key:"USER_COUNT_PARAM",get:function(){return"uc"}},{key:"SPECT_COUNT_PARAM",get:function(){return"sc"}},{key:"DISCONNECTION_REASON_PARAM",get:function(){return"dr"}}],n&&vs(e.prototype,n),r&&vs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();function Es(t){return Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(t)}function Os(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ss(r.key),r)}}function Ss(t){var e=function(t){if("object"!=Es(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Es(e)?e:e+""}function Rs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Rs=function(){return!!t})()}function ws(t){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ws(t)}function As(t,e){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},As(t,e)}var Is=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=ws(e),function(t,e){if(e&&("object"==Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Rs()?Reflect.construct(e,n||[],ws(t).constructor):e.apply(t,n))}(this,e,[pt.CallExtension]))._targetController=1,n._extCmd=t,n._params=r,n._room=o,null==n._params&&(n._params=new ot),Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&As(t,e)}(e,t),n=e,o=[{key:"KEY_CMD",get:function(){return"c"}},{key:"KEY_PARAMS",get:function(){return"p"}},{key:"KEY_ROOM",get:function(){return"r"}}],(r=[{key:"validate",value:function(t){var e=[];if(null!=this._extCmd&&0!==this._extCmd.length||e.push("Missing extension command"),null==this._params||this._params instanceof ot||e.push("Custom parameters must be set in a SFSObject class instance"),null==this._room||this._room instanceof ne||e.push("Room must be an instance of SFSRoom class"),e.length>0)throw new X("ExtensionRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putUtfString(e.KEY_CMD,this._extCmd),this._reqObj.putInt(e.KEY_ROOM,null==this._room?-1:this._room.id),this._reqObj.putSFSObject(e.KEY_PARAMS,this._params)}}])&&Os(n.prototype,r),o&&Os(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Ts(t){return Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(t)}function ks(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,js(r.key),r)}}function js(t){var e=function(t){if("object"!=Ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ts(e)?e:e+""}var Ps=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._sfs=e,this._logger=e.logger,this._id=1,Object.freeze(this)},(e=[{key:"id",get:function(){return this._id}},{key:"handleMessage",value:function(t,e){this._sfs.debug&&this._logger.info("Handling Extension response");var n={};n.cmd=t.get(Is.KEY_CMD),n.params=t.get(Is.KEY_PARAMS);var r=t.get(Is.KEY_ROOM);null!=r&&(n.room=this._sfs.roomManager.getRoomById(r)),this._sfs.dispatchEvent(O.EXTENSION_RESPONSE,n)}}])&&ks(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),Ms=n(314);function Ns(t){return Ns="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ns(t)}function Us(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ys(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ls(r.key),r)}}function Bs(t,e,n){return e&&Ys(t.prototype,e),n&&Ys(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ls(t){var e=function(t){if("object"!=Ns(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ns(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ns(e)?e:e+""}function Ds(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ds=function(){return!!t})()}function Cs(t){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cs(t)}function Fs(t,e){return Fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fs(t,e)}var Ks=Object.freeze({CONNECT:"socketConnect",DISCONNECT:"socketDisconnect",DATA:"socketData",IOERROR:"socketIOError"}),xs=function(t){function e(t){var n,r,o,i;return Us(this,e),(r=this,o=e,o=Cs(o),n=function(t,e){if(e&&("object"==Ns(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(r,Ds()?Reflect.construct(o,i||[],Cs(r).constructor):o.apply(r,i)))._sfs=t,n._logger=Y.instance,n._isConnected=!1,n._isConnecting=!1,n._socket=null,n._protocolCodec=new Vs(t),n._disconnectionReason=_.UNKNOWN,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fs(t,e)}(e,t),Bs(e,[{key:"isConnected",get:function(){return this._isConnected}},{key:"isConnecting",get:function(){return this._isConnecting}},{key:"maxMessageSize",get:function(){return this._protocolCodec.maxMessageSize},set:function(t){this._protocolCodec.maxMessageSize=t}},{key:"compressionThreshold",get:function(){return this._protocolCodec.compressionThreshold},set:function(t){this._protocolCodec.compressionThreshold=t}},{key:"connect",value:function(t,e,n){this._isConnecting=!0;var r="ws"+(n?"s":"");this._socket=new WebSocket(r+"://"+t+":"+e+"/BlueBox/websocket"),this._socket.binaryType="arraybuffer",this._socket._scope=this,this._socket.onopen=this._onSocketConnect,this._socket.onclose=this._onSocketDisconnect,this._socket.onmessage=this._onSocketData,this._socket.onerror=this._onSocketError}},{key:"disconnect",value:function(t){this._disconnectionReason=t,this._socket.close()}},{key:"addController",value:function(t,e){null==this._controllers[t]&&(this._controllers[t]=e)}},{key:"removeController",value:function(t){delete this._controllers[t]}},{key:"send",value:function(t){this._sfs.debug&&this._logger.debug("OUTGOING MESSAGE: "+t.dump());var e=this._protocolCodec.onPacketWrite(t);this._socket.send(e)}},{key:"kill",value:function(){this._socket.close()}},{key:"_onSocketConnect",value:function(){this._scope._sfs.debug&&this._scope._logger.debug("Socket connection established"),this._scope._isConnected=!0,this._scope._isConnecting=!1,this._scope.dispatchEvent(Ks.CONNECT,{success:!0})}},{key:"_onSocketDisconnect",value:function(){this._scope._isConnected=!1,this._scope.isConnecting?(this._scope._sfs.debug&&this._scope._logger.debug("Can't establish socket connection"),this._scope._isConnecting=!1,this._scope.dispatchEvent(Ks.CONNECT,{success:!1})):(this._scope._sfs.debug&&this._scope._logger.debug("Socket disconnection occurred"),this._scope.dispatchEvent(Ks.DISCONNECT,{reason:this._scope._disconnectionReason}),this._scope._disconnectionReason=_.UNKNOWN)}},{key:"_onSocketData",value:function(t){var e=this._scope._protocolCodec.onPacketRead(t.data);this._scope._sfs.debug&&this._scope._logger.debug("INCOMING MESSAGE: "+e.dump()),this._scope.dispatchEvent(Ks.DATA,e)}},{key:"_onSocketError",value:function(t){this._scope.dispatchEvent(Ks.IOERROR,t.data)}}])}(E),Vs=function(){return Bs((function t(e){Us(this,t),this.CONTROLLER_ID="c",this.ACTION_ID="a",this.PARAM_ID="p",this._maxMessageSize=1e4,this._compressionThreshold=1024,this._sfs=e,this._logger=Y.instance,Object.seal(this)}),[{key:"maxMessageSize",get:function(){return this._maxMessageSize},set:function(t){this._maxMessageSize=t}},{key:"compressionThreshold",get:function(){return this._compressionThreshold},set:function(t){this._compressionThreshold=t}},{key:"onPacketRead",value:function(t){if(0!==t.byteLength){var n=new(e())(t,0,e().BIG_ENDIAN),r=n.readUint8(),o=(32&r)>0,i=(8&r)>0?n.readUint32():n.readUint16(),s=n.readUint8Array(i);o&&(s=this.decompress(s)),this._sfs.debug&&(t.byteLength>1024?this._logger.debug("DATA READ - Binary size > 1024; dump omitted"):this._logger.debug("DATA READ - "+b.hexDump(s)));var a=ot.newFromBinaryData(s);return new ht(a.get(this.ACTION_ID),a.get(this.CONTROLLER_ID),a.get(this.PARAM_ID))}this._logger.error("Unexpected empty packet data: no readable bytes available!")}},{key:"onPacketWrite",value:function(t){var n=new ot;n.put(this.CONTROLLER_ID,t.targetController,nt.BYTE),n.put(this.ACTION_ID,t.id,nt.SHORT),n.put(this.PARAM_ID,t.content,nt.SFS_OBJECT);var r=n.toBinary(),o=r.byteLength,i=new(e())(new ArrayBuffer(0),0,e().BIG_ENDIAN),s=128;o>this.compressionThreshold&&(s+=32,o=(r=this.compress(r)).byteLength);var a=o>65335;a&&(s+=8),i.writeUint8(s),a?i.writeUint32(o):i.writeUint16(o),i.writeUint8Array(r);var u=new Uint8Array(i.buffer);if(u.byteLength>this.maxMessageSize)throw new H("Message size is too big: "+u.byteLength+"; the server limit is: "+this.maxMessageSize);return this._sfs.debug&&this._logger.debug("DATA WRITTEN - "+b.hexDump(u)),u}},{key:"decompress",value:function(t){return new Ms.Zlib.Inflate(t).decompress()}},{key:"compress",value:function(t){return new Ms.Zlib.Deflate(t).compress()}}])}();function Gs(t){return Gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(t)}function qs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return zs(t,e);var n={}.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)?zs(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function zs(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Hs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xs(r.key),r)}}function Xs(t){var e=function(t){if("object"!=Gs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gs(e)?e:e+""}var Js=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._sfs=e,this._groups=new Set,this._roomsById=new Map,this._roomsByName=new Map,Object.seal(this)},e=[{key:"getRoomGroups",value:function(){return Array.from(this._groups)}},{key:"containsGroup",value:function(t){return this._groups.has(t)}},{key:"containsRoom",value:function(t){return"number"==typeof t?this._roomsById.has(t):this._roomsByName.has(t)}},{key:"containsRoomInGroup",value:function(t,e){var n=this.getRoomListFromGroup(e);return"number"==typeof t?n.some((function(e){return e.id===t})):n.some((function(e){return e.name===t}))}},{key:"getRoomById",value:function(t){return this._roomsById.get(t)}},{key:"getRoomByName",value:function(t){return this._roomsByName.get(t)}},{key:"getRoomList",value:function(){return Array.from(this._roomsById.values())}},{key:"getRoomCount",value:function(){return this._roomsById.size}},{key:"getRoomListFromGroup",value:function(t){return this.getRoomList().filter((function(e){return e.groupId===t}))}},{key:"getJoinedRooms",value:function(){return this.getRoomList().filter((function(t){return t.isJoined}))}},{key:"getUserRooms",value:function(t){return this.getRoomList().filter((function(e){return e.containsUser(t)}))}},{key:"_addRoom",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._roomsById.set(t.id,t),this._roomsByName.set(t.name,t),t._setRoomManager(this),e?this._addGroup(t.groupId):t._isManaged=!1}},{key:"_replaceRoom",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getRoomById(t.id);return null!=n?(n._merge(t),n):(this._addRoom(t,e),t)}},{key:"_removeRoom",value:function(t){this._roomsById.delete(t.id),this._roomsByName.delete(t.name)}},{key:"_removeRoomById",value:function(t){var e=this.getRoomById(t);null!=e&&this._removeRoom(e)}},{key:"_removeRoomByName",value:function(t){var e=this.getRoomByName(t);null!=e&&this._removeRoom(e)}},{key:"_changeRoomName",value:function(t,e){var n=t.name;t._name=e,this._roomsByName.set(e,t),this._roomsByName.delete(n)}},{key:"_changeRoomPasswordState",value:function(t,e){t._isPasswordProtected=e}},{key:"_changeRoomCapacity",value:function(t,e,n){t._maxUsers=e,t._maxSpectators=n}},{key:"_addGroup",value:function(t){this.containsGroup(t)||this._groups.add(t)}},{key:"_removeGroup",value:function(t){this._groups.delete(t);var e,n=qs(this.getRoomListFromGroup(t));try{for(n.s();!(e=n.n()).done;){var r=e.value;r.isJoined?r._isManaged=!1:this._removeRoom(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_removeUser",value:function(t){var e,n=qs(this.getUserRooms(t));try{for(n.s();!(e=n.n()).done;){var r=e.value;r instanceof re||r._removeUser(t)}}catch(t){n.e(t)}finally{n.f()}}}],e&&Hs(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Ws(t){return Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ws(t)}function $s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Qs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zs(r.key),r)}}function Zs(t){var e=function(t){if("object"!=Ws(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ws(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ws(e)?e:e+""}var ta=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._sfs=e,this._buddiesByName=new Map,this._myVariables=new Map,this._inited=!1,this._buddyStates=new Set,Object.seal(this)},(e=[{key:"isInited",get:function(){return this._inited}},{key:"containsBuddy",value:function(t){return this._buddiesByName.has(t)}},{key:"getBuddyById",value:function(t){return this.getBuddyList().find((function(e){return e.id===t}))}},{key:"getBuddyByName",value:function(t){return this._buddiesByName.get(t)}},{key:"getBuddyByNickName",value:function(t){return this.getBuddyList().find((function(e){return e.nickName===t}))}},{key:"getOfflineBuddies",value:function(){return this.getBuddyList().filter((function(t){return!t.isOnline}))}},{key:"getOnlineBuddies",value:function(){return this.getBuddyList().filter((function(t){return t.isOnline}))}},{key:"getBuddyList",value:function(){return Array.from(this._buddiesByName.values())}},{key:"getMyVariable",value:function(t){return this._myVariables.get(t)}},{key:"getMyVariables",value:function(){return Array.from(this._myVariables.values())}},{key:"getMyOnlineState",value:function(){if(!this._inited)return!1;var t=this.getMyVariable(Le.BV_ONLINE);return null==t||t.value}},{key:"getMyNickName",value:function(){var t=this.getMyVariable(Le.BV_NICKNAME);return null!=t?t.value:null}},{key:"getMyState",value:function(){var t=this.getMyVariable(Le.BV_STATE);return null!=t?t.value:null}},{key:"getBuddyStates",value:function(){return Array.from(this._buddyStates.values())}},{key:"_setInited",value:function(){this._inited=!0}},{key:"_addBuddy",value:function(t){this._buddiesByName.set(t.name,t)}},{key:"_clearAll",value:function(){this._buddiesByName.clear()}},{key:"_removeBuddyById",value:function(t){var e=this.getBuddyById(t);return null!=e&&this._buddiesByName.delete(e.name),e}},{key:"_removeBuddyByName",value:function(t){var e=this.getBuddyByName(t);return null!=e&&this._buddiesByName.delete(t),e}},{key:"_setMyVariables",value:function(t){var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return $s(t,e);var n={}.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)?$s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this._setMyVariable(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"_setMyVariable",value:function(t){t.isNull?this._myVariables.delete(t.name):this._myVariables.set(t.name,t)}},{key:"_setMyOnlineState",value:function(t){this._setMyVariable(new De(Le.BV_ONLINE,t))}},{key:"_setMyNickName",value:function(t){this._setMyVariable(new De(Le.BV_NICKNAME,t))}},{key:"_setMyState",value:function(t){this._setMyVariable(new De(Le.BV_STATE,t))}},{key:"_setBuddyStates",value:function(t){this._buddyStates=new Set(t)}}])&&Qs(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function ea(t){return ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(t)}function na(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ra(r.key),r)}}function ra(t){var e=function(t){if("object"!=ea(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ea(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ea(e)?e:e+""}function oa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oa=function(){return!!t})()}function ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ia(t)}function sa(t,e){return sa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sa(t,e)}var aa=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=ia(e),function(t,e){if(e&&("object"==ea(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,oa()?Reflect.construct(e,n||[],ia(t).constructor):e.apply(t,n))}(this,e,[pt.Handshake]))._apiVersion=t,r._clientDetails=n,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sa(t,e)}(e,t),n=e,o=[{key:"KEY_SESSION_TOKEN",get:function(){return"tk"}},{key:"KEY_API",get:function(){return"api"}},{key:"KEY_COMPRESSION_THRESHOLD",get:function(){return"ct"}},{key:"KEY_CLIENT_TYPE",get:function(){return"cl"}},{key:"KEY_MAX_MESSAGE_SIZE",get:function(){return"ms"}},{key:"KEY_ADMIN_PWD_HASHED",get:function(){return"aph"}}],(r=[{key:"validate",value:function(t){}},{key:"execute",value:function(t){this._reqObj.putUtfString(e.KEY_API,this._apiVersion),this._reqObj.putUtfString(e.KEY_CLIENT_TYPE,this._clientDetails)}}])&&na(n.prototype,r),o&&na(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function ua(t){return ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ua(t)}function ca(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,fa(r.key),r)}}function fa(t){var e=function(t){if("object"!=ua(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ua(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ua(e)?e:e+""}function la(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(la=function(){return!!t})()}function ya(t){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ya(t)}function ha(t,e){return ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ha(t,e)}var pa=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=function(t,e,n){return e=ya(e),function(t,e){if(e&&("object"==ua(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,la()?Reflect.construct(e,n||[],ya(t).constructor):e.apply(t,n))}(this,e,[pt.PingPong]),Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ha(t,e)}(e,t),n=e,(r=[{key:"validate",value:function(t){}},{key:"execute",value:function(t){}}])&&ca(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(yt);function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function ba(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,da(r.key),r)}}function da(t){var e=function(t){if("object"!=_a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_a(e)?e:e+""}var va=function(){return t=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._sfs=e,this._valueQueue=[],this._interval=n,this._queueSize=r,this._thread=null,this._lastReqTime=-1},(e=[{key:"isRunning",get:function(){return null!=this._thread}},{key:"start",value:function(){this.isRunning||null==this._sfs||(this._thread=setInterval(this._threadRunner,1e3*this._interval,this))}},{key:"stop",value:function(){this.isRunning&&(clearInterval(this._thread),this._thread=null,this._valueQueue=[])}},{key:"destroy",value:function(){this.stop(),this._sfs=null}},{key:"getLastPingTime",value:function(){return this._valueQueue.length>0?this._valueQueue[this._valueQueue.length-1]:0}},{key:"_threadRunner",value:function(t){t._lastReqTime=(new Date).getTime(),t._sfs.send(new pa)}},{key:"_onPingPong",value:function(){var t=(new Date).getTime()-this._lastReqTime;return this._valueQueue.length>=this._queueSize&&this._valueQueue.shift(),this._valueQueue.push(t),this._getAveragePingTime()}},{key:"_getAveragePingTime",value:function(){if(0==this._valueQueue.length)return 0;for(var t=0,e=0;e<this._valueQueue.length;e++)t+=this._valueQueue[e];return t/this._valueQueue.length}}])&&ba(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function ma(t){return ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(t)}function ga(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ea(r.key),r)}}function Ea(t){var e=function(t){if("object"!=ma(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ma(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ma(e)?e:e+""}function Oa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oa=function(){return!!t})()}function Sa(t){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sa(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}var wa=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=Sa(e),function(t,e){if(e&&("object"==ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oa()?Reflect.construct(e,n||[],Sa(t).constructor):e.apply(t,n))}(this,e))._majVersion=1,t._minVersion=8,t._subVersion=4,t._configData=n,t._logger=Y.instance,t._sessionToken=null,t._isAdminPwdHashed=!1,t._socketEngine=new xs(t),t._socketEngine.addEventListener(Ks.CONNECT,t._onSocketConnect,t),t._socketEngine.addEventListener(Ks.DISCONNECT,t._onSocketDisconnect,t),t._socketEngine.addEventListener(Ks.DATA,t._onSocketData,t),t._socketEngine.addEventListener(Ks.IOERROR,t._onSocketIOError,t),t._controllers={},t._controllers[0]=new gs(t),t._controllers[1]=new Ps(t),t._reset(),t._clientDetails="JavaScript",t._nodeId=null,t.debug=null!=t.config&&t.config.debug,t.debug&&(t._logger.info("SmartFox instance ready"),t._logger.info("SFS2X JavaScript API v"+t.version)),Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(e,t),n=e,r=[{key:"isAdminPwdHashed",get:function(){return this._isAdminPwdHashed}},{key:"version",get:function(){return this._majVersion+"."+this._minVersion+"."+this._subVersion}},{key:"config",get:function(){return this._configData}},{key:"logger",get:function(){return this._logger}},{key:"sessionToken",get:function(){return this._sessionToken}},{key:"roomManager",get:function(){return this._roomManager}},{key:"userManager",get:function(){return this._userManager}},{key:"buddyManager",get:function(){return this._buddyManager}},{key:"mySelf",get:function(){return this._mySelf}},{key:"lastJoinedRoom",get:function(){return this._lastJoinedRoom}},{key:"isConnected",get:function(){return null!=this._socketEngine&&this._socketEngine.isConnected}},{key:"maxMessageSize",get:function(){return null!=this._socketEngine?this._socketEngine.maxMessageSize:0}},{key:"nodeId",get:function(){return this.isConnected?this._nodeId:null}},{key:"setClientDetails",value:function(t,e){this.isConnected?this._logger.warn("Method setClientDetails must be called before the connection is started"):(t=null!=t?t.replace(":"," "):"",e=null!=e?e.replace(":"," "):"",this._clientDetails=t+":"+e)}},{key:"connect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.debug&&this._logger.info("Attempting connection to server"),this.isConnected)this._logger.warn("Connection attempt interrupted: already connected");else if(this._socketEngine.isConnecting)this._logger.warn("Connection attempt interrupted: another attempt is already in progress");else{var r=null!=this.config&&null!=this.config.host?this.config.host:null,o=null!=this.config&&null!=this.config.port?this.config.port:null,i=null!=this.config&&this.config.useSSL;null!=t&&(r=t),e>-1&&(o=e),null!=n&&(i=n),null!=r&&"string"==typeof r&&0!==r.length?"number"!=typeof o||o<0||o>65535?this._logger.error("Invalid TCP connection port: "+o):("boolean"!=typeof i&&(i=!1),this._socketEngine.connect(r,o,i)):this._logger.error("Invalid connection host/address")}}},{key:"disconnect",value:function(){this.isConnected&&this._handleClientDisconnection(_.MANUAL)}},{key:"killConnection",value:function(){this._socketEngine.kill()}},{key:"enableLagMonitor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;null!=this.mySelf?(null!=this._lagMonitor&&this._lagMonitor.destroy(),t&&(this._lagMonitor=new va(this,e,n),this._lagMonitor.start())):this._logger.warn("Lag monitoring requires that you are logged in a Zone; please retry after completing the login process")}},{key:"send",value:function(t){if(this.isConnected){if(null!=t.validate&&null!=t.execute){this.debug&&this._logger.info("Sending request '"+pt.getNameFromId(t.id)+"' to server");try{t.validate(this),t.execute(this)}catch(t){if(!(t instanceof X&&null!=t.message))throw t;var e=t.message;if(null!=t.errors){e+=":";for(var n=0;n<t.errors.length;n++)t.errors.length>1&&(e+=" "+(n+1)+")"),e+=" "+t.errors[n]}return this._logger.error("Request failed | "+e),!1}return this._socketEngine.send(t.getMessage()),!0}this._logger.error("An invalid request was passed: "+t)}else this._logger.error("You are not connected. Request cannot be sent: "+pt.getNameFromId(t.id))}},{key:"getRoomById",value:function(t){return this.roomManager.getRoomById(t)}},{key:"getRoomByName",value:function(t){return this.roomManager.getRoomByName(t)}},{key:"getRoomList",value:function(){return this.roomManager.getRoomList()}},{key:"getRoomListFromGroup",value:function(t){return this.roomManager.getRoomListFromGroup(t)}},{key:"getJoinedRooms",value:function(){return this.roomManager.getJoinedRooms()}},{key:"_reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null!=this._buddyManager&&(this._buddyManager._clearAll(),this._buddyManager._inited=!1),this._userManager=new qt(this),this._roomManager=new Js(this),this._buddyManager=new ta(this),null!=this._lagMonitor&&this._lagMonitor.destroy(),this._lagMonitor=null,this._isJoining=!1,this._currentZone=null,this._lastJoinedRoom=null,this._mySelf=null,t&&(this._sessionToken=null)}},{key:"_onSocketConnect",value:function(t){t.success?this.send(new aa(this.version,this._clientDetails)):this.dispatchEvent(O.CONNECTION,{success:!1})}},{key:"_onSocketDisconnect",value:function(t){this.dispatchEvent(O.CONNECTION_LOST,{reason:t.reason}),this._reset(!0)}},{key:"_onSocketData",value:function(t){var e=t.targetController,n=t.id,r=t.content;null!=e?null!=n?this._controllers[e].handleMessage(r,n):this._logger.error("Incoming message rejected: Command ID is missing"):this._logger.error("Incoming message rejected: Controller ID is missing")}},{key:"_onSocketIOError",value:function(t){this.dispatchEvent(O.SOCKET_ERROR,{message:t})}},{key:"_handleHandShake",value:function(t){var e=t.get(yt.KEY_ERROR_CODE);if(null==e)this._sessionToken=t.get(aa.KEY_SESSION_TOKEN),this._socketEngine.maxMessageSize=t.get(aa.KEY_MAX_MESSAGE_SIZE),this._socketEngine.compressionThreshold=t.get(aa.KEY_COMPRESSION_THRESHOLD),this._isAdminPwdHashed=t.getBool(aa.KEY_ADMIN_PWD_HASHED),this.dispatchEvent(O.CONNECTION,{success:!0});else{var n={success:!1,errorMessage:vt.getErrorMessage(e,t.get(yt.KEY_ERROR_PARAMS)),errorCode:e};this.dispatchEvent(O.CONNECTION,n)}}},{key:"_handleLogout",value:function(){this._reset()}},{key:"_handleClientDisconnection",value:function(t){this.isConnected&&this._socketEngine.disconnect(t)}}],r&&ga(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(E);function Aa(t,e,n){return e=Ta(e),function(t,e){if(e&&("object"==Pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ia()?Reflect.construct(e,n||[],Ta(t).constructor):e.apply(t,n))}function Ia(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ia=function(){return!!t})()}function Ta(t){return Ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(t)}function ka(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ja(t,e)}function ja(t,e){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ja(t,e)}function Pa(t){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(t)}function Ma(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Na(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ya(r.key),r)}}function Ua(t,e,n){return e&&Na(t.prototype,e),n&&Na(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ya(t){var e=function(t){if("object"!=Pa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pa(e)?e:e+""}var Ba=function(){return Ua((function t(e,n){Ma(this,t),this._type=e,this._symbol=n,Object.freeze(this)}),[{key:"type",get:function(){return this._type}},{key:"symbol",get:function(){return this._symbol}}])}(),La=function(t){function e(t){var n;return Ma(this,e),n=Aa(this,e,[0,t]),Object.freeze(n),n}return ka(e,t),Ua(e,null,[{key:"EQUALS",get:function(){return new e("==")}},{key:"NOT_EQUALS",get:function(){return new e("!=")}}])}(Ba),Da=function(t){function e(t){var n;return Ma(this,e),n=Aa(this,e,[1,t]),Object.freeze(n),n}return ka(e,t),Ua(e,null,[{key:"EQUALS",get:function(){return new e("==")}},{key:"NOT_EQUALS",get:function(){return new e("!=")}},{key:"GREATER_THAN",get:function(){return new e(">")}},{key:"GREATER_THAN_OR_EQUAL_TO",get:function(){return new e(">=")}},{key:"LESS_THAN",get:function(){return new e("<")}},{key:"LESS_THAN_OR_EQUAL_TO",get:function(){return new e("<=")}}])}(Ba),Ca=function(t){function e(t){var n;return Ma(this,e),n=Aa(this,e,[2,t]),Object.freeze(n),n}return ka(e,t),Ua(e,null,[{key:"EQUALS",get:function(){return new e("==")}},{key:"NOT_EQUALS",get:function(){return new e("!=")}},{key:"CONTAINS",get:function(){return new e("contains")}},{key:"STARTS_WITH",get:function(){return new e("startsWith")}},{key:"ENDS_WITH",get:function(){return new e("endsWith")}}])}(Ba),Fa=Object.freeze({NAME:"${N}",GROUP_ID:"${G}",MAX_USERS:"${MXU}",MAX_SPECTATORS:"${MXS}",USER_COUNT:"${UC}",SPECTATOR_COUNT:"${SC}",IS_GAME:"${ISG}",IS_PRIVATE:"${ISP}",HAS_FREE_PLAYER_SLOTS:"${HFP}",IS_TYPE_SFSGAME:"${IST}",IS_TYPE_MMO:"${ISM}",IS_TYPE_DEFAULT:"${ISD}"}),Ka=Object.freeze({NAME:"${N}",IS_PLAYER:"${ISP}",IS_SPECTATOR:"${ISS}",IS_NPC:"${ISN}",PRIVILEGE_ID:"${PRID}",IS_IN_ANY_ROOM:"${IAR}"});function xa(t){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(t)}function Va(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ga(r.key),r)}}function Ga(t){var e=function(t){if("object"!=xa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xa(e)?e:e+""}var qa=function(){return t=function t(){throw function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"Class PasswordUtil cannot be instantiated. Please check the documentation for more details on its usage"},e=[{key:"md5Password",value:function(t){return(new $e).hex_md5(t)}}],null&&Va(t.prototype,null),e&&Va(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function za(t){return za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(t)}function Ha(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Xa(r.key),r)}}function Xa(t){var e=function(t){if("object"!=za(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=za(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==za(e)?e:e+""}function Ja(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ja=function(){return!!t})()}function Wa(t){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wa(t)}function $a(t,e){return $a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$a(t,e)}var Qa=function(t){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,n){return e=Wa(e),function(t,e){if(e&&("object"==za(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ja()?Reflect.construct(e,n||[],Wa(t).constructor):e.apply(t,n))}(this,e,[pt.QuickJoinOrCreateRoom]))._matchExpression=t,o._groupList=n,o._settings=r,o._roomToLeave=i,o._createRoomRequest=new Xn(r,!1,null),Object.seal(o),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$a(t,e)}(e,t),n=e,o=[{key:"KEY_MATCH_EXPRESSION",get:function(){return"me"}},{key:"KEY_GROUP_LIST",get:function(){return"gl"}},{key:"KEY_ROOM_SETTINGS",get:function(){return"rs"}},{key:"KEY_ROOM_TO_LEAVE",get:function(){return"tl"}}],(r=[{key:"validate",value:function(t){if(!(this._matchExpression instanceof jo))throw new X("QuickJoinOrCreateRoomRequest Error",["Match expression must be an instance of MatchExpression class"]);var e=[];(null==this._groupList||this._groupList.length<1)&&e.push("Missing list of Group names where to search the game to join"),null==this._roomToLeave||this._roomToLeave instanceof ne||e.push("Room to leave must be an instance of SFSRoom class");try{this._createRoomRequest.validate(t)}catch(t){e=e.concat(t.errors)}if(e.length>0)throw new X("QuickJoinOrCreateRoomRequest Error",e)}},{key:"execute",value:function(t){this._createRoomRequest.execute(t);var n=this._createRoomRequest.getMessage().content;this._reqObj.putSFSArray(e.KEY_MATCH_EXPRESSION,this._matchExpression.toSFSArray()),this._reqObj.putUtfStringArray(e.KEY_GROUP_LIST,this._groupList),this._reqObj.putSFSObject(e.KEY_ROOM_SETTINGS,n),null!=this._roomToLeave&&this._reqObj.putInt(e.KEY_ROOM_TO_LEAVE,this._roomToLeave.id)}}])&&Ha(n.prototype,r),o&&Ha(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Za(t){return Za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Za(t)}function tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,eu(r.key),r)}}function eu(t){var e=function(t){if("object"!=Za(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Za(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Za(e)?e:e+""}function nu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nu=function(){return!!t})()}function ru(t){return ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ru(t)}function ou(t,e){return ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ou(t,e)}var iu=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=ru(e),function(t,e){if(e&&("object"==Za(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nu()?Reflect.construct(e,n||[],ru(t).constructor):e.apply(t,n))}(this,e,[pt.LeaveRoom]))._room=n,Object.seal(t),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ou(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM_ID",get:function(){return"r"}}],(r=[{key:"validate",value:function(t){var e=[];if(t.getJoinedRooms().length<1&&e.push("You are not joined in any Room"),null==this._room||this._room instanceof ne||e.push("Room must be an instance of SFSRoom class"),e.length>0)throw new X("LeaveRoomRequest Error",e)}},{key:"execute",value:function(t){null!=this._room&&this._reqObj.putInt(e.KEY_ROOM_ID,this._room.id)}}])&&tu(n.prototype,r),o&&tu(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function su(t){return su="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(t)}function au(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,uu(r.key),r)}}function uu(t){var e=function(t){if("object"!=su(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=su(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==su(e)?e:e+""}function cu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cu=function(){return!!t})()}function fu(t){return fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fu(t)}function lu(t,e){return lu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lu(t,e)}var yu=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o<0&&(o=0),(n=function(t,e,n){return e=fu(e),function(t,e){if(e&&("object"==su(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cu()?Reflect.construct(e,n||[],fu(t).constructor):e.apply(t,n))}(this,e,[pt.KickUser]))._userId=t,n._message=r,n._delay=o,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lu(t,e)}(e,t),n=e,o=[{key:"KEY_USER_ID",get:function(){return"u"}},{key:"KEY_MESSAGE",get:function(){return"m"}},{key:"KEY_DELAY",get:function(){return"d"}}],(r=[{key:"validate",value:function(t){var e=[];if(e.length>0)throw new X("KickUserRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_USER_ID,this._userId),this._reqObj.putInt(e.KEY_DELAY,this._delay),null!=this._message&&this._message.length>0&&this._reqObj.putUtfString(e.KEY_MESSAGE,this._message)}}])&&au(n.prototype,r),o&&au(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function hu(t){return hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(t)}function pu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_u(r.key),r)}}function _u(t){var e=function(t){if("object"!=hu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=hu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==hu(e)?e:e+""}function bu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bu=function(){return!!t})()}function du(t){return du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},du(t)}function vu(t,e){return vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vu(t,e)}var mu=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=du(e),function(t,e){if(e&&("object"==hu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bu()?Reflect.construct(e,n||[],du(t).constructor):e.apply(t,n))}(this,e,[pt.BanUser]))._userId=t,n._message=r,n._banMode=o,n._delay=i,n._durationHours=s,Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vu(t,e)}(e,t),n=e,o=[{key:"KEY_USER_ID",get:function(){return"u"}},{key:"KEY_MESSAGE",get:function(){return"m"}},{key:"KEY_DELAY",get:function(){return"d"}},{key:"KEY_BAN_MODE",get:function(){return"b"}},{key:"KEY_BAN_DURATION_HOURS",get:function(){return"dh"}}],(r=[{key:"validate",value:function(t){var e=[];if(e.length>0)throw new X("BanUserRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_USER_ID,this._userId),this._reqObj.putInt(e.KEY_DELAY,this._delay),this._reqObj.putInt(e.KEY_BAN_MODE,this._banMode),this._reqObj.putInt(e.KEY_BAN_DURATION_HOURS,this._durationHours),null!=this._message&&this._message.length>0&&this._reqObj.putUtfString(e.KEY_MESSAGE,this._message)}}])&&pu(n.prototype,r),o&&pu(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function gu(t){return gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(t)}function Eu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ou(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Su(r.key),r)}}function Su(t){var e=function(t){if("object"!=gu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=gu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gu(e)?e:e+""}function Ru(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ru=function(){return!!t})()}function wu(t){return wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wu(t)}function Au(t,e){return Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Au(t,e)}var Iu=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,n){return e=wu(e),function(t,e){if(e&&("object"==gu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ru()?Reflect.construct(e,n||[],wu(t).constructor):e.apply(t,n))}(this,e,[pt.CreateSFSGame]))._settings=t,n._createRoomRequest=new Xn(t,!1,null),Object.seal(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Au(t,e)}(e,t),n=e,r=[{key:"validate",value:function(t){if(!(this._settings instanceof Pn))throw new X("CreateSFSGameRequest Error",["Room configuration must be an instance of SFSGameSettings class"]);var e=[];try{this._createRoomRequest.validate(t)}catch(t){e=t.getErrors()}if(this._settings.minPlayersToStartGame>this._settings.maxUsers&&e.push("Minimum number of players to start the game can't be greater than the Room's maximum number of users"),(this._settings.invitationExpiryTime<Zo.MIN_EXPIRY_TIME||this._settings.invitationExpiryTime>Zo.MAX_EXPIRY_TIME)&&e.push("Invitation expiration time value is out of range (min: "+Zo.MIN_EXPIRY_TIME+"; max: "+Zo.MAX_EXPIRY_TIME+")"),null!=this._settings.invitedPlayers&&(this._settings.invitedPlayers instanceof Array?(this._settings.invitedPlayers.length>Zo.MAX_INVITATIONS_FROM_CLIENT_SIDE&&e.push("Can't invite more than "+Zo.MAX_INVITATIONS_FROM_CLIENT_SIDE+" players from client side"),this._settings.invitedPlayers.every((function(t){return t instanceof de||t instanceof Ge}))||e.push("Each invited player must be an instance of SFSUser or SFSBuddy classes")):e.push("Invited players must be passed in an array")),null==this._settings.playerMatchExpression||this._settings.playerMatchExpression instanceof jo||e.push("Player match expression must be an instance of MatchExpression class"),null==this._settings.spectatorMatchExpression||this._settings.spectatorMatchExpression instanceof jo||e.push("Spectator match expression must be an instance of MatchExpression class"),null==this._settings.invitationParams||this._settings.invitationParams instanceof ot||e.push("Custom invitation parameters must be set in a SFSObject class instance"),e.length>0)throw new X("CreateSFSGameRequest Error",e)}},{key:"execute",value:function(t){if(this._createRoomRequest.execute(t),this._reqObj=this._createRoomRequest._reqObj,this._reqObj.putBool(e.KEY_IS_PUBLIC,this._settings.isPublic),this._reqObj.putShort(e.KEY_MIN_PLAYERS,this._settings.minPlayersToStartGame),this._reqObj.putShort(e.KEY_INVITATION_EXPIRY,this._settings.invitationExpiryTime),this._reqObj.putBool(e.KEY_LEAVE_ROOM,this._settings.leaveLastJoinedRoom),this._reqObj.putBool(e.KEY_NOTIFY_GAME_STARTED,this._settings.notifyGameStarted),null!=this._settings.playerMatchExpression&&this._reqObj.putSFSArray(e.KEY_PLAYER_MATCH_EXP,this._settings.playerMatchExpression.toSFSArray()),null!=this._settings.spectatorMatchExpression&&this._reqObj.putSFSArray(e.KEY_SPECTATOR_MATCH_EXP,this._settings.spectatorMatchExpression.toSFSArray()),null!=this._settings.invitedPlayers){var n,r=[],o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Eu(t,e);var n={}.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)?Eu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._settings.invitedPlayers);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.push(i.id)}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putIntArray(e.KEY_INVITED_PLAYERS,r)}null!=this._settings.searchableRooms&&this._reqObj.putUtfStringArray(e.KEY_SEARCHABLE_ROOMS,this._settings.searchableRooms),null!=this._settings.invitationParams&&this._reqObj.putSFSObject(e.KEY_INVITATION_PARAMS,this._settings.invitationParams)}}],o=[{key:"KEY_IS_PUBLIC",get:function(){return"gip"}},{key:"KEY_MIN_PLAYERS",get:function(){return"gmp"}},{key:"KEY_INVITED_PLAYERS",get:function(){return"ginp"}},{key:"KEY_SEARCHABLE_ROOMS",get:function(){return"gsr"}},{key:"KEY_PLAYER_MATCH_EXP",get:function(){return"gpme"}},{key:"KEY_SPECTATOR_MATCH_EXP",get:function(){return"gsme"}},{key:"KEY_INVITATION_EXPIRY",get:function(){return"gie"}},{key:"KEY_LEAVE_ROOM",get:function(){return"glr"}},{key:"KEY_NOTIFY_GAME_STARTED",get:function(){return"gns"}},{key:"KEY_INVITATION_PARAMS",get:function(){return"ip"}}],r&&Ou(n.prototype,r),o&&Ou(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Tu(t){return Tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tu(t)}function ku(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ju(r.key),r)}}function ju(t){var e=function(t){if("object"!=Tu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tu(e)?e:e+""}function Pu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pu=function(){return!!t})()}function Mu(t){return Mu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mu(t)}function Nu(t,e){return Nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nu(t,e)}var Uu=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Mu(e),function(t,e){if(e&&("object"==Tu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pu()?Reflect.construct(e,n||[],Mu(t).constructor):e.apply(t,n))}(this,e,[pt.InvitationReply]))._invitation=t,r._reply=n,r._params=o,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nu(t,e)}(e,t),n=e,o=[{key:"KEY_INVITATION_ID",get:function(){return"i"}},{key:"KEY_INVITATION_REPLY",get:function(){return"r"}},{key:"KEY_INVITATION_PARAMS",get:function(){return"p"}}],(r=[{key:"validate",value:function(t){var e=[];if(null==this._invitation?e.push("Missing invitation object"):this._invitation instanceof Je||e.push("Invitation object must be an instance of Invitation class"),null==this._params||this._params instanceof ot||e.push("Custom invitation parameters must be set in a SFSObject class instance"),e.length>0)throw new X("InvitationReplyRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_INVITATION_ID,this._invitation.id),this._reqObj.putByte(e.KEY_INVITATION_REPLY,this._reply),null!=this._params&&this._reqObj.putSFSObject(e.KEY_INVITATION_PARAMS,this._params)}}])&&ku(n.prototype,r),o&&ku(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Yu(t){return Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(t)}function Bu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Lu(r.key),r)}}function Lu(t){var e=function(t){if("object"!=Yu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Yu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Yu(e)?e:e+""}function Du(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Du=function(){return!!t})()}function Cu(t){return Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cu(t)}function Fu(t,e){return Fu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fu(t,e)}var Ku=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Cu(e),function(t,e){if(e&&("object"==Yu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Du()?Reflect.construct(e,n||[],Cu(t).constructor):e.apply(t,n))}(this,e,[pt.JoinRoomInvite]))._targetRoom=t,r._invitedUserNames=n,r._params=o,r._expirySeconds=i,r._asSpectator=s,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fu(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM_ID",get:function(){return"r"}},{key:"KEY_EXPIRY_SECONDS",get:function(){return"es"}},{key:"KEY_INVITED_NAMES",get:function(){return"in"}},{key:"KEY_AS_SPECT",get:function(){return"as"}},{key:"KEY_OPTIONAL_PARAMS",get:function(){return"op"}}],(r=[{key:"validate",value:function(t){var e=[];if(null==this._targetRoom&&e.push("Missing target room"),null==this._targetRoom||this._targetRoom instanceof ne||e.push("Target room must be an instance of SFSRoom class"),null==this._invitedUserNames?e.push("No invitees provided"):this._invitedUserNames instanceof Array?this._invitedUserNames.length<1&&e.push("No invitees provided"):e.push("Invited user names must be passed in an array"),null==this._params||this._params instanceof ot||e.push("Custom invitation parameters must be set in a SFSObject class instance"),e.length>0)throw new X("JoinRoomInvitationRequest Error",e)}},{key:"execute",value:function(t){this._reqObj.putInt(e.KEY_ROOM_ID,this._targetRoom.id),this._reqObj.putUtfStringArray(e.KEY_INVITED_NAMES,this._invitedUserNames),this._reqObj.putInt(e.KEY_EXPIRY_SECONDS,this._expirySeconds),this._reqObj.putBool(e.KEY_AS_SPECT,this._asSpectator),null!=this._params&&this._reqObj.putSFSObject(e.KEY_OPTIONAL_PARAMS,this._params)}}])&&Bu(n.prototype,r),o&&Bu(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function xu(t){return xu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xu(t)}function Vu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Gu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,qu(r.key),r)}}function qu(t){var e=function(t){if("object"!=xu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xu(e)?e:e+""}function zu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zu=function(){return!!t})()}function Hu(t){return Hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hu(t)}function Xu(t,e){return Xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xu(t,e)}var Ju=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,n){return e=Hu(e),function(t,e){if(e&&("object"==xu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zu()?Reflect.construct(e,n||[],Hu(t).constructor):e.apply(t,n))}(this,e,[pt.QuickJoinGame]))._matchExpression=t,r._whereToSearch=n,r._roomToLeave=o,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xu(t,e)}(e,t),n=e,o=[{key:"KEY_ROOM_LIST",get:function(){return"rl"}},{key:"KEY_GROUP_LIST",get:function(){return"gl"}},{key:"KEY_ROOM_TO_LEAVE",get:function(){return"tl"}},{key:"KEY_MATCH_EXPRESSION",get:function(){return"me"}},{key:"MAX_ROOMS",get:function(){return 32}}],(r=[{key:"validate",value:function(t){var n=[];if(null==this._matchExpression||this._matchExpression instanceof jo||n.push("Match expression must be an instance of MatchExpression class"),null==this._whereToSearch||this._whereToSearch.length<1?n.push("Missing list of Rooms or Group names where to search the game to join"):this._whereToSearch.length>e.MAX_ROOMS&&n.push("Too many Rooms specified in list where to search the game to join; client limit is: "+e.MAX_ROOMS),null==this._roomToLeave||this._roomToLeave instanceof ne||n.push("Room to leave must be an instance of SFSRoom class"),n.length>0)throw new X("QuickJoinGameRequest Error",n)}},{key:"execute",value:function(t){if("string"==typeof this._whereToSearch[0])this._reqObj.putUtfStringArray(e.KEY_GROUP_LIST,this._whereToSearch);else{if(!(this._whereToSearch[0]instanceof ne))throw new H("Invalid type in whereToSearch parameter");var n,r=[],o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Vu(t,e);var n={}.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)?Vu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(this._whereToSearch);try{for(o.s();!(n=o.n()).done;){var i=n.value;i instanceof ne&&r.push(i.id)}}catch(t){o.e(t)}finally{o.f()}this._reqObj.putIntArray(e.KEY_ROOM_LIST,r)}null!=this._roomToLeave&&this._reqObj.putInt(e.KEY_ROOM_TO_LEAVE,this._roomToLeave.id),null!=this._matchExpression&&this._reqObj.putSFSArray(e.KEY_MATCH_EXPRESSION,this._matchExpression.toSFSArray())}}])&&Gu(n.prototype,r),o&&Gu(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(yt);function Wu(t){return Wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(t)}function $u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($u=function(){return!!t})()}function Qu(t){return Qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qu(t)}function Zu(t,e){return Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zu(t,e)}var tc=function(t){function e(t,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(t,e,n){return e=Qu(e),function(t,e){if(e&&("object"==Wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$u()?Reflect.construct(e,n||[],Qu(t).constructor):e.apply(t,n))}(this,e),null!=n&&!(n instanceof Ge))throw new H("Target buddy must be an instance of SFSBuddy class");return r._type=Ir.BUDDY_MSG,r._message=t,r._recipient=null!=n?n.id:-1,r._params=o,Object.seal(r),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zu(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Tr)})(),r})()));
|
|
3
|
+
//# sourceMappingURL=sfs2x-api-1.8.4.js.map
|