From 60cf2629e5fee3cfa66ae1aefde191edb4675d3a Mon Sep 17 00:00:00 2001
From: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Date: Tue, 28 Nov 2023 13:54:11 -0800
Subject: [PATCH] Drops ie8 support (#79974)
## About The Pull Request
We currently transpile TGUI down into ie8. This was primarily for Linux
compatibility, which, to my understanding, hasn't worked for quite some
time. As we approach 2024, consider that ie8 is nearly 15 years old and
had its support ended in 2016. I believe sunsetting ie8 is in order.
>I have no objections to remove IE8 support and fully target IE11.
https://github.com/tgstation/tgstation/issues/79943#issuecomment-1826735705_
## Why It's Good For The Game
- Probably improves performance to some degree, you're only as slow as
your weakest link.
- Reduced maintenance burden
## Changelog
N/A if they can even see this message it doesn't affect them
---
tgui/package.json | 2 +-
tgui/packages/tgui-bench/package.json | 2 +-
tgui/packages/tgui-dev-server/package.json | 2 +-
tgui/packages/tgui-polyfill/00-html5shiv.js | 331 -------
tgui/packages/tgui-polyfill/01-ie8.js | 837 -----------------
tgui/packages/tgui-polyfill/02-dom4.js | 973 --------------------
tgui/packages/tgui-polyfill/03-css-om.js | 45 -
tgui/packages/tgui-polyfill/1-misc.js | 53 ++
tgui/packages/tgui-polyfill/10-misc.js | 62 --
tgui/packages/tgui-polyfill/package.json | 4 +-
tgui/packages/tgui/package.json | 2 +-
tgui/public/tgui-polyfill.min.js | 2 +-
tgui/public/tgui.html | 1 -
tgui/tsconfig.json | 2 +-
tgui/webpack.config.js | 5 +-
15 files changed, 63 insertions(+), 2260 deletions(-)
delete mode 100644 tgui/packages/tgui-polyfill/00-html5shiv.js
delete mode 100644 tgui/packages/tgui-polyfill/01-ie8.js
delete mode 100644 tgui/packages/tgui-polyfill/02-dom4.js
delete mode 100644 tgui/packages/tgui-polyfill/03-css-om.js
create mode 100644 tgui/packages/tgui-polyfill/1-misc.js
delete mode 100644 tgui/packages/tgui-polyfill/10-misc.js
diff --git a/tgui/package.json b/tgui/package.json
index 32e24fcff40..79e4946875d 100644
--- a/tgui/package.json
+++ b/tgui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "tgui-workspace",
- "version": "4.3.2",
+ "version": "4.4.0",
"packageManager": "yarn@3.3.1",
"workspaces": [
"packages/*"
diff --git a/tgui/packages/tgui-bench/package.json b/tgui/packages/tgui-bench/package.json
index 5ebd81685ea..22719711733 100644
--- a/tgui/packages/tgui-bench/package.json
+++ b/tgui/packages/tgui-bench/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "tgui-bench",
- "version": "4.3.2",
+ "version": "4.4.0",
"dependencies": {
"@fastify/static": "^6.12.0",
"common": "workspace:*",
diff --git a/tgui/packages/tgui-dev-server/package.json b/tgui/packages/tgui-dev-server/package.json
index 709d73d3050..d911f9693de 100644
--- a/tgui/packages/tgui-dev-server/package.json
+++ b/tgui/packages/tgui-dev-server/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "tgui-dev-server",
- "version": "4.3.2",
+ "version": "4.4.0",
"type": "module",
"dependencies": {
"axios": "^1.6.2",
diff --git a/tgui/packages/tgui-polyfill/00-html5shiv.js b/tgui/packages/tgui-polyfill/00-html5shiv.js
deleted file mode 100644
index ce4b97576fa..00000000000
--- a/tgui/packages/tgui-polyfill/00-html5shiv.js
+++ /dev/null
@@ -1,331 +0,0 @@
-/**
- * @file
- * @copyright 2014 Alexander Farkas
- * @license MIT
- */
-
-/* eslint-disable */
-// prettier-ignore
-(function(window, document) {
-/*jshint evil:true */
- /** version */
- var version = '3.7.3';
-
- /** Preset options */
- var options = window.html5 || {};
-
- /** Used to skip problem elements */
- var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
-
- /** Not all elements can be cloned in IE **/
- var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
-
- /** Detect whether the browser supports default html5 styles */
- var supportsHtml5Styles;
-
- /** Name of the expando, to work with multiple documents or to re-shiv one document */
- var expando = '_html5shiv';
-
- /** The id for the the documents expando */
- var expanID = 0;
-
- /** Cached data for each document */
- var expandoData = {};
-
- /** Detect whether the browser supports unknown elements */
- var supportsUnknownElements;
-
- (function() {
- try {
- var a = document.createElement('a');
- a.innerHTML = '';
- //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
- supportsHtml5Styles = ('hidden' in a);
-
- supportsUnknownElements = a.childNodes.length == 1 || (function() {
- // assign a false positive if unable to shiv
- (document.createElement)('a');
- var frag = document.createDocumentFragment();
- return (
- typeof frag.cloneNode == 'undefined' ||
- typeof frag.createDocumentFragment == 'undefined' ||
- typeof frag.createElement == 'undefined'
- );
- }());
- } catch(e) {
- // assign a false positive if detection fails => unable to shiv
- supportsHtml5Styles = true;
- supportsUnknownElements = true;
- }
-
- }());
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Creates a style sheet with the given CSS text and adds it to the document.
- * @private
- * @param {Document} ownerDocument The document.
- * @param {String} cssText The CSS text.
- * @returns {StyleSheet} The style element.
- */
- function addStyleSheet(ownerDocument, cssText) {
- var p = ownerDocument.createElement('p'),
- parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
-
- p.innerHTML = 'x';
- return parent.insertBefore(p.lastChild, parent.firstChild);
- }
-
- /**
- * Returns the value of `html5.elements` as an array.
- * @private
- * @returns {Array} An array of shived element node names.
- */
- function getElements() {
- var elements = html5.elements;
- return typeof elements == 'string' ? elements.split(' ') : elements;
- }
-
- /**
- * Extends the built-in list of html5 elements
- * @memberOf html5
- * @param {String|Array} newElements whitespace separated list or array of new element names to shiv
- * @param {Document} ownerDocument The context document.
- */
- function addElements(newElements, ownerDocument) {
- var elements = html5.elements;
- if(typeof elements != 'string'){
- elements = elements.join(' ');
- }
- if(typeof newElements != 'string'){
- newElements = newElements.join(' ');
- }
- html5.elements = elements +' '+ newElements;
- shivDocument(ownerDocument);
- }
-
- /**
- * Returns the data associated to the given document
- * @private
- * @param {Document} ownerDocument The document.
- * @returns {Object} An object of data.
- */
- function getExpandoData(ownerDocument) {
- var data = expandoData[ownerDocument[expando]];
- if (!data) {
- data = {};
- expanID++;
- ownerDocument[expando] = expanID;
- expandoData[expanID] = data;
- }
- return data;
- }
-
- /**
- * returns a shived element for the given nodeName and document
- * @memberOf html5
- * @param {String} nodeName name of the element
- * @param {Document|DocumentFragment} ownerDocument The context document.
- * @returns {Object} The shived element.
- */
- function createElement(nodeName, ownerDocument, data){
- if (!ownerDocument) {
- ownerDocument = document;
- }
- if(supportsUnknownElements){
- return ownerDocument.createElement(nodeName);
- }
- if (!data) {
- data = getExpandoData(ownerDocument);
- }
- var node;
-
- if (data.cache[nodeName]) {
- node = data.cache[nodeName].cloneNode();
- } else if (saveClones.test(nodeName)) {
- node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
- } else {
- node = data.createElem(nodeName);
- }
-
- // Avoid adding some elements to fragments in IE < 9 because
- // * Attributes like `name` or `type` cannot be set/changed once an element
- // is inserted into a document/fragment
- // * Link elements with `src` attributes that are inaccessible, as with
- // a 403 response, will cause the tab/window to crash
- // * Script elements appended to fragments will execute when their `src`
- // or `text` property is set
- return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
- }
-
- /**
- * returns a shived DocumentFragment for the given document
- * @memberOf html5
- * @param {Document} ownerDocument The context document.
- * @returns {Object} The shived DocumentFragment.
- */
- function createDocumentFragment(ownerDocument, data){
- if (!ownerDocument) {
- ownerDocument = document;
- }
- if(supportsUnknownElements){
- return ownerDocument.createDocumentFragment();
- }
- data = data || getExpandoData(ownerDocument);
- var clone = data.frag.cloneNode(),
- i = 0,
- elems = getElements(),
- l = elems.length;
- for(;i 3 ? getModifier(init) : null,
- key = String(init.key),
- chr = String(init.char),
- location = init.location,
- keyCode = init.keyCode || (
- (init.keyCode = key) &&
- key.charCodeAt(0)
- ) || 0,
- charCode = init.charCode || (
- (init.charCode = chr) &&
- chr.charCodeAt(0)
- ) || 0,
- bubbles = init.bubbles,
- cancelable = init.cancelable,
- repeat = init.repeat,
- locale = init.locale,
- view = init.view || window,
- args
- ;
- if (!init.which) init.which = init.keyCode;
- if ('initKeyEvent' in out) {
- out.initKeyEvent(
- type, bubbles, cancelable, view,
- ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode
- );
- } else if (0 < initType && 'initKeyboardEvent' in out) {
- args = [type, bubbles, cancelable, view];
- switch (initType) {
- case 1:
- args.push(key, location, ctrlKey, shiftKey, altKey, metaKey, altGraphKey);
- break;
- case 2:
- args.push(ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode);
- break;
- case 3:
- args.push(key, location, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
- break;
- case 4:
- args.push(key, location, modifiers, repeat, locale);
- break;
- default:
- args.push(char, key, location, modifiers, repeat, locale);
- }
- out.initKeyboardEvent.apply(out, args);
- } else {
- out.initEvent(type, bubbles, cancelable);
- }
- for (key in out) {
- if (defaults.hasOwnProperty(key) && out[key] !== init[key]) {
- withInitValues(key, out, init);
- }
- }
- return out;
- }
- KeyboardEvent.prototype = $KeyboardEvent.prototype;
- return KeyboardEvent;
- }(window.KeyboardEvent || function KeyboardEvent() {}));
- defineProperty(window, 'KeyboardEvent', {value: o_O});
- // Android 4 gotcha
- if (KeyboardEvent !== o_O) KeyboardEvent = o_O;
- }
-
- // window.MouseEvent as constructor
- try { new MouseEvent('_', {}); } catch (o_O) {
- /* jshint -W022 */
- o_O = (function ($MouseEvent) {
- function MouseEvent(type, init) {
- enoughArguments(arguments.length, 'MouseEvent');
- var out = document.createEvent('MouseEvent');
- if (!init) init = {};
- out.initMouseEvent(
- type,
- !!init.bubbles,
- !!init.cancelable,
- init.view || window,
- init.detail || 1,
- init.screenX || 0,
- init.screenY || 0,
- init.clientX || 0,
- init.clientY || 0,
- !!init.ctrlKey,
- !!init.altKey,
- !!init.shiftKey,
- !!init.metaKey,
- init.button || 0,
- init.relatedTarget || null
- );
- return out;
- }
- MouseEvent.prototype = $MouseEvent.prototype;
- return MouseEvent;
- }(window.MouseEvent || function MouseEvent() {}));
- defineProperty(window, 'MouseEvent', {value: o_O});
- // Android 4 gotcha
- if (MouseEvent !== o_O) MouseEvent = o_O;
- }
-
- if (!document.querySelectorAll('*').forEach) {
- (function () {
- function patch(what) {
- var querySelectorAll = what.querySelectorAll;
- what.querySelectorAll = function qSA(css) {
- var result = querySelectorAll.call(this, css);
- result.forEach = Array.prototype.forEach;
- return result;
- };
- }
- patch(document);
- patch(Element.prototype);
- }());
- }
-
- try {
- // https://drafts.csswg.org/selectors-4/#the-scope-pseudo
- document.querySelector(':scope *');
- } catch(o_O) {
- (function () {
- var dataScope = 'data-scope-' + (Math.random() * 1e9 >>> 0);
- var proto = Element.prototype;
- var querySelector = proto.querySelector;
- var querySelectorAll = proto.querySelectorAll;
- proto.querySelector = function qS(css) {
- return find(this, querySelector, css);
- };
- proto.querySelectorAll = function qSA(css) {
- return find(this, querySelectorAll, css);
- };
- function find(node, method, css) {
- node.setAttribute(dataScope, null);
- var result = method.call(
- node,
- String(css).replace(
- /(^|,\s*)(:scope([ >]|$))/g,
- function ($0, $1, $2, $3) {
- return $1 + '[' + dataScope + ']' + ($3 || ' ');
- }
- )
- );
- node.removeAttribute(dataScope);
- return result;
- }
- }());
- }
-}(window));
-
-// prettier-ignore
-(function (global){'use strict';
-
- // a WeakMap fallback for DOM nodes only used as key
- var DOMMap = global.WeakMap || (function () {
-
- var
- counter = 0,
- dispatched = false,
- drop = false,
- value
- ;
-
- function dispatch(key, ce, shouldDrop) {
- drop = shouldDrop;
- dispatched = false;
- value = undefined;
- key.dispatchEvent(ce);
- }
-
- function Handler(value) {
- this.value = value;
- }
-
- Handler.prototype.handleEvent = function handleEvent(e) {
- dispatched = true;
- if (drop) {
- e.currentTarget.removeEventListener(e.type, this, false);
- } else {
- value = this.value;
- }
- };
-
- function DOMMap() {
- counter++; // make id clashing highly improbable
- this.__ce__ = new Event(('@DOMMap:' + counter) + Math.random());
- }
-
- DOMMap.prototype = {
- 'constructor': DOMMap,
- 'delete': function del(key) {
- return dispatch(key, this.__ce__, true), dispatched;
- },
- 'get': function get(key) {
- dispatch(key, this.__ce__, false);
- var v = value;
- value = undefined;
- return v;
- },
- 'has': function has(key) {
- return dispatch(key, this.__ce__, false), dispatched;
- },
- 'set': function set(key, value) {
- dispatch(key, this.__ce__, true);
- key.addEventListener(this.__ce__.type, new Handler(value), false);
- return this;
- },
- };
-
- return DOMMap;
-
- }());
-
- function Dict() {}
- Dict.prototype = (Object.create || Object)(null);
-
- // https://dom.spec.whatwg.org/#interface-eventtarget
-
- function createEventListener(type, callback, options) {
- function eventListener(e) {
- if (eventListener.once) {
- e.currentTarget.removeEventListener(
- e.type,
- callback,
- eventListener
- );
- eventListener.removed = true;
- }
- if (eventListener.passive) {
- e.preventDefault = createEventListener.preventDefault;
- }
- if (typeof eventListener.callback === 'function') {
- /* jshint validthis: true */
- eventListener.callback.call(this, e);
- } else if (eventListener.callback) {
- eventListener.callback.handleEvent(e);
- }
- if (eventListener.passive) {
- delete e.preventDefault;
- }
- }
- eventListener.type = type;
- eventListener.callback = callback;
- eventListener.capture = !!options.capture;
- eventListener.passive = !!options.passive;
- eventListener.once = !!options.once;
- // currently pointless but specs say to use it, so ...
- eventListener.removed = false;
- return eventListener;
- }
-
- createEventListener.preventDefault = function preventDefault() {};
-
- var
- Event = global.CustomEvent,
- dE = global.dispatchEvent,
- aEL = global.addEventListener,
- rEL = global.removeEventListener,
- counter = 0,
- increment = function () { counter++; },
- indexOf = [].indexOf || function indexOf(value){
- var length = this.length;
- while(length--) {
- if (this[length] === value) {
- break;
- }
- }
- return length;
- },
- getListenerKey = function (options) {
- return ''.concat(
- options.capture ? '1' : '0',
- options.passive ? '1' : '0',
- options.once ? '1' : '0'
- );
- },
- augment
- ;
-
- try {
- aEL('_', increment, {once: true});
- dE(new Event('_'));
- dE(new Event('_'));
- rEL('_', increment, {once: true});
- } catch(o_O) {}
-
- if (counter !== 1) {
- (function () {
- var dm = new DOMMap();
- function createAEL(aEL) {
- return function addEventListener(type, handler, options) {
- if (options && typeof options !== 'boolean') {
- var
- info = dm.get(this),
- key = getListenerKey(options),
- i, tmp, wrap
- ;
- if (!info) dm.set(this, (info = new Dict()));
- if (!(type in info)) info[type] = {
- handler: [],
- wrap: []
- };
- tmp = info[type];
- i = indexOf.call(tmp.handler, handler);
- if (i < 0) {
- i = tmp.handler.push(handler) - 1;
- tmp.wrap[i] = (wrap = new Dict());
- } else {
- wrap = tmp.wrap[i];
- }
- if (!(key in wrap)) {
- wrap[key] = createEventListener(type, handler, options);
- aEL.call(this, type, wrap[key], wrap[key].capture);
- }
- } else {
- aEL.call(this, type, handler, options);
- }
- };
- }
- function createREL(rEL) {
- return function removeEventListener(type, handler, options) {
- if (options && typeof options !== 'boolean') {
- var
- info = dm.get(this),
- key, i, tmp, wrap
- ;
- if (info && (type in info)) {
- tmp = info[type];
- i = indexOf.call(tmp.handler, handler);
- if (-1 < i) {
- key = getListenerKey(options);
- wrap = tmp.wrap[i];
- if (key in wrap) {
- rEL.call(this, type, wrap[key], wrap[key].capture);
- delete wrap[key];
- // return if there are other wraps
- for (key in wrap) return;
- // otherwise remove all the things
- tmp.handler.splice(i, 1);
- tmp.wrap.splice(i, 1);
- // if there are no other handlers
- if (tmp.handler.length === 0)
- // drop the info[type] entirely
- delete info[type];
- }
- }
- }
- } else {
- rEL.call(this, type, handler, options);
- }
- };
- }
-
- augment = function (Constructor) {
- if (!Constructor) return;
- var proto = Constructor.prototype;
- proto.addEventListener = createAEL(proto.addEventListener);
- proto.removeEventListener = createREL(proto.removeEventListener);
- };
-
- if (global.EventTarget) {
- augment(EventTarget);
- } else {
- augment(global.Text);
- augment(global.Element || global.HTMLElement);
- augment(global.HTMLDocument);
- augment(global.Window || {prototype:global});
- augment(global.XMLHttpRequest);
- }
-
- }());
- }
-
-}(window));
diff --git a/tgui/packages/tgui-polyfill/03-css-om.js b/tgui/packages/tgui-polyfill/03-css-om.js
deleted file mode 100644
index 0fb11eee280..00000000000
--- a/tgui/packages/tgui-polyfill/03-css-om.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * CSS Object Model patches
- *
- * Adapted from: https://github.com/shawnbot/aight
- *
- * @file
- * @copyright 2020 Aleksej Komarov
- * @license MIT
- */
-
-/* eslint-disable */
-// prettier-ignore
-(function(Proto) {
- 'use strict';
-
- if (typeof Proto.setAttribute !== 'undefined') {
- function toAttr(prop) {
- return prop.replace(/-[a-z]/g, function (bit) {
- return bit[1].toUpperCase();
- });
- }
-
- Proto.setProperty = function (prop, value) {
- var attr = toAttr(prop);
- if (!value) {
- return this.removeAttribute(attr);
- }
- var str = String(value);
- return this.setAttribute(attr, str);
- };
-
- Proto.getPropertyValue = function (prop) {
- var attr = toAttr(prop);
- return this.getAttribute(attr) || null;
- };
-
- Proto.removeProperty = function (prop) {
- var attr = toAttr(prop);
- var value = this.getAttribute(attr);
- this.removeAttribute(attr);
- return value;
- };
- }
-
-})(CSSStyleDeclaration.prototype);
diff --git a/tgui/packages/tgui-polyfill/1-misc.js b/tgui/packages/tgui-polyfill/1-misc.js
new file mode 100644
index 00000000000..af9b900fe0b
--- /dev/null
+++ b/tgui/packages/tgui-polyfill/1-misc.js
@@ -0,0 +1,53 @@
+/**
+ * @file
+ * @copyright 2020 Aleksej Komarov
+ * @license MIT
+ */
+
+/* eslint-disable */
+(function () {
+ 'use strict';
+
+ // Inferno needs Int32Array, and it is not covered by core-js.
+ if (!window.Int32Array) {
+ window.Int32Array = Array;
+ }
+
+ // ie11 polyfills
+ !(function () {
+ // append
+ function t() {
+ var e = Array.prototype.slice.call(arguments),
+ n = document.createDocumentFragment();
+ e.forEach(function (e) {
+ var t = e instanceof Node;
+ n.appendChild(t ? e : document.createTextNode(String(e)));
+ }),
+ this.appendChild(n);
+ }
+ // remove
+ function n() {
+ this.parentNode && this.parentNode.removeChild(this);
+ }
+
+ // add to prototype
+ [Element.prototype, Document.prototype, DocumentFragment.prototype].forEach(
+ function (e) {
+ e.hasOwnProperty('append') ||
+ Object.defineProperty(e, 'append', {
+ configurable: !0,
+ enumerable: !0,
+ writable: !0,
+ value: t,
+ });
+ e.hasOwnProperty('remove') ||
+ Object.defineProperty(e, 'remove', {
+ configurable: !0,
+ enumerable: !0,
+ writable: !0,
+ value: n,
+ });
+ }
+ );
+ })();
+})();
diff --git a/tgui/packages/tgui-polyfill/10-misc.js b/tgui/packages/tgui-polyfill/10-misc.js
deleted file mode 100644
index 9849166c2df..00000000000
--- a/tgui/packages/tgui-polyfill/10-misc.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * @file
- * @copyright 2020 Aleksej Komarov
- * @license MIT
- */
-
-/* eslint-disable */
-// prettier-ignore
-(function () {
- 'use strict';
-
- // Necessary polyfill to make Webpack code splitting work on IE8
- if (!Function.prototype.bind) (function () {
- var slice = Array.prototype.slice;
- Function.prototype.bind = function () {
- var thatFunc = this, thatArg = arguments[0];
- var args = slice.call(arguments, 1);
- if (typeof thatFunc !== 'function') {
- // closest thing possible to the ECMAScript 5
- // internal IsCallable function
- throw new TypeError('Function.prototype.bind - ' +
- 'what is trying to be bound is not callable');
- }
- return function () {
- var funcArgs = args.concat(slice.call(arguments))
- return thatFunc.apply(thatArg, funcArgs);
- };
- };
- })();
-
- if (!Array.prototype['forEach']) {
- Array.prototype.forEach = function (callback, thisArg) {
- if (this == null) {
- throw new TypeError('Array.prototype.forEach called on null or undefined');
- }
- var T, k;
- var O = Object(this);
- var len = O.length >>> 0;
- if (typeof callback !== "function") {
- throw new TypeError(callback + ' is not a function');
- }
- if (arguments.length > 1) {
- T = thisArg;
- }
- k = 0;
- while (k < len) {
- var kValue;
- if (k in O) {
- kValue = O[k];
- callback.call(T, kValue, k, O);
- }
- k++;
- }
- };
- }
-
- // Inferno needs Int32Array, and it is not covered by core-js.
- if (!window.Int32Array) {
- window.Int32Array = Array;
- }
-
-})();
diff --git a/tgui/packages/tgui-polyfill/package.json b/tgui/packages/tgui-polyfill/package.json
index 227d192faa6..c0cb0911160 100644
--- a/tgui/packages/tgui-polyfill/package.json
+++ b/tgui/packages/tgui-polyfill/package.json
@@ -1,9 +1,9 @@
{
"private": true,
"name": "tgui-polyfill",
- "version": "4.3.2",
+ "version": "4.4.0",
"scripts": {
- "tgui-polyfill:build": "terser 00-html5shiv.js 01-ie8.js 02-dom4.js 03-css-om.js 10-misc.js --ie8 -f ascii_only,comments=false -o ../../public/tgui-polyfill.min.js"
+ "tgui-polyfill:build": "terser 1-misc.js -f ascii_only,comments=false -o ../../public/tgui-polyfill.min.js"
},
"dependencies": {
"core-js": "^3.33.3",
diff --git a/tgui/packages/tgui/package.json b/tgui/packages/tgui/package.json
index 12fa809139e..d7cdd701db4 100644
--- a/tgui/packages/tgui/package.json
+++ b/tgui/packages/tgui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "tgui",
- "version": "4.3.2",
+ "version": "4.4.0",
"dependencies": {
"@popperjs/core": "^2.11.8",
"@types/marked": "^4.0.8",
diff --git a/tgui/public/tgui-polyfill.min.js b/tgui/public/tgui-polyfill.min.js
index 91be6dc8765..68c21147e6d 100644
--- a/tgui/public/tgui-polyfill.min.js
+++ b/tgui/public/tgui-polyfill.min.js
@@ -1 +1 @@
-(function(window,document){var version="3.7.3";var options=window.html5||{};var reSkip=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;var saveClones=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;var supportsHtml5Styles;var expando="_html5shiv";var expanID=0;var expandoData={};var supportsUnknownElements;(function(){try{var a=document.createElement("a");a.innerHTML="";supportsHtml5Styles="hidden"in a;supportsUnknownElements=a.childNodes.length==1||function(){document.createElement("a");var frag=document.createDocumentFragment();return typeof frag.cloneNode=="undefined"||typeof frag.createDocumentFragment=="undefined"||typeof frag.createElement=="undefined"}()}catch(e){supportsHtml5Styles=true;supportsUnknownElements=true}})();function addStyleSheet(ownerDocument,cssText){var p=ownerDocument.createElement("p"),parent=ownerDocument.getElementsByTagName("head")[0]||ownerDocument.documentElement;p.innerHTML="x";return parent.insertBefore(p.lastChild,parent.firstChild)}function getElements(){var elements=html5.elements;return typeof elements=="string"?elements.split(" "):elements}function addElements(newElements,ownerDocument){var elements=html5.elements;if(typeof elements!="string"){elements=elements.join(" ")}if(typeof newElements!="string"){newElements=newElements.join(" ")}html5.elements=elements+" "+newElements;shivDocument(ownerDocument)}function getExpandoData(ownerDocument){var data=expandoData[ownerDocument[expando]];if(!data){data={};expanID++;ownerDocument[expando]=expanID;expandoData[expanID]=data}return data}function createElement(nodeName,ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createElement(nodeName)}if(!data){data=getExpandoData(ownerDocument)}var node;if(data.cache[nodeName]){node=data.cache[nodeName].cloneNode()}else if(saveClones.test(nodeName)){node=(data.cache[nodeName]=data.createElem(nodeName)).cloneNode()}else{node=data.createElem(nodeName)}return node.canHaveChildren&&!reSkip.test(nodeName)&&!node.tagUrn?data.frag.appendChild(node):node}function createDocumentFragment(ownerDocument,data){if(!ownerDocument){ownerDocument=document}if(supportsUnknownElements){return ownerDocument.createDocumentFragment()}data=data||getExpandoData(ownerDocument);var clone=data.frag.cloneNode(),i=0,elems=getElements(),l=elems.length;for(;i3?getModifier(init):null,key=String(init.key),chr=String(init.char),location=init.location,keyCode=init.keyCode||(init.keyCode=key)&&key.charCodeAt(0)||0,charCode=init.charCode||(init.charCode=chr)&&chr.charCodeAt(0)||0,bubbles=init.bubbles,cancelable=init.cancelable,repeat=init.repeat,locale=init.locale,view=init.view||window,args;if(!init.which)init.which=init.keyCode;if("initKeyEvent"in out){out.initKeyEvent(type,bubbles,cancelable,view,ctrlKey,altKey,shiftKey,metaKey,keyCode,charCode)}else if(0>>0);var proto=Element.prototype;var querySelector=proto.querySelector;var querySelectorAll=proto.querySelectorAll;proto.querySelector=function qS(css){return find(this,querySelector,css)};proto.querySelectorAll=function qSA(css){return find(this,querySelectorAll,css)};function find(node,method,css){node.setAttribute(dataScope,null);var result=method.call(node,String(css).replace(/(^|,\s*)(:scope([ >]|$))/g,(function($0,$1,$2,$3){return $1+"["+dataScope+"]"+($3||" ")})));node.removeAttribute(dataScope);return result}})()}})(window);(function(global){"use strict";var DOMMap=global.WeakMap||function(){var counter=0,dispatched=false,drop=false,value;function dispatch(key,ce,shouldDrop){drop=shouldDrop;dispatched=false;value=undefined;key.dispatchEvent(ce)}function Handler(value){this.value=value}Handler.prototype.handleEvent=function handleEvent(e){dispatched=true;if(drop){e.currentTarget.removeEventListener(e.type,this,false)}else{value=this.value}};function DOMMap(){counter++;this.__ce__=new Event("@DOMMap:"+counter+Math.random())}DOMMap.prototype={constructor:DOMMap,"delete":function del(key){return dispatch(key,this.__ce__,true),dispatched},get:function get(key){dispatch(key,this.__ce__,false);var v=value;value=undefined;return v},has:function has(key){return dispatch(key,this.__ce__,false),dispatched},set:function set(key,value){dispatch(key,this.__ce__,true);key.addEventListener(this.__ce__.type,new Handler(value),false);return this}};return DOMMap}();function Dict(){}Dict.prototype=(Object.create||Object)(null);function createEventListener(type,callback,options){function eventListener(e){if(eventListener.once){e.currentTarget.removeEventListener(e.type,callback,eventListener);eventListener.removed=true}if(eventListener.passive){e.preventDefault=createEventListener.preventDefault}if(typeof eventListener.callback==="function"){eventListener.callback.call(this,e)}else if(eventListener.callback){eventListener.callback.handleEvent(e)}if(eventListener.passive){delete e.preventDefault}}eventListener.type=type;eventListener.callback=callback;eventListener.capture=!!options.capture;eventListener.passive=!!options.passive;eventListener.once=!!options.once;eventListener.removed=false;return eventListener}createEventListener.preventDefault=function preventDefault(){};var Event=global.CustomEvent,dE=global.dispatchEvent,aEL=global.addEventListener,rEL=global.removeEventListener,counter=0,increment=function(){counter++},indexOf=[].indexOf||function indexOf(value){var length=this.length;while(length--){if(this[length]===value){break}}return length},getListenerKey=function(options){return"".concat(options.capture?"1":"0",options.passive?"1":"0",options.once?"1":"0")},augment;try{aEL("_",increment,{once:true});dE(new Event("_"));dE(new Event("_"));rEL("_",increment,{once:true})}catch(o_O){}if(counter!==1){(function(){var dm=new DOMMap;function createAEL(aEL){return function addEventListener(type,handler,options){if(options&&typeof options!=="boolean"){var info=dm.get(this),key=getListenerKey(options),i,tmp,wrap;if(!info)dm.set(this,info=new Dict);if(!(type in info))info[type]={handler:[],wrap:[]};tmp=info[type];i=indexOf.call(tmp.handler,handler);if(i<0){i=tmp.handler.push(handler)-1;tmp.wrap[i]=wrap=new Dict}else{wrap=tmp.wrap[i]}if(!(key in wrap)){wrap[key]=createEventListener(type,handler,options);aEL.call(this,type,wrap[key],wrap[key].capture)}}else{aEL.call(this,type,handler,options)}}}function createREL(rEL){return function removeEventListener(type,handler,options){if(options&&typeof options!=="boolean"){var info=dm.get(this),key,i,tmp,wrap;if(info&&type in info){tmp=info[type];i=indexOf.call(tmp.handler,handler);if(-1>>0;if(typeof callback!=="function"){throw new TypeError(callback+" is not a function")}if(arguments.length>1){T=thisArg}k=0;while(k
-