diff --git a/chunks/compatibilitytesting.js b/chunks/compatibilitytesting.js index 7caf33ff914..31dc25c7cb8 100644 --- a/chunks/compatibilitytesting.js +++ b/chunks/compatibilitytesting.js @@ -17,15 +17,15 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } @@ -35,11 +35,10 @@ var WrappedGui = Object(_lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_4__[/* d var DEFAULT_PROJECT_ID = '10015059'; var Player = /*#__PURE__*/function (_React$Component) { _inherits(Player, _React$Component); - var _super = _createSuper(Player); function Player(props) { var _this; _classCallCheck(this, Player); - _this = _super.call(this, props); + _this = _callSuper(this, Player, [props]); _this.updateProject = _this.updateProject.bind(_assertThisInitialized(_this)); _this.state = { projectId: window.location.hash.substring(1) || DEFAULT_PROJECT_ID diff --git a/chunks/compatibilitytesting.js.map b/chunks/compatibilitytesting.js.map index b1eb0ae2520..82c7748e744 100644 --- a/chunks/compatibilitytesting.js.map +++ b/chunks/compatibilitytesting.js.map @@ -1 +1 @@ -{"version":3,"file":"chunks/compatibilitytesting.js","sources":["webpack://GUI/./src/playground/compatibility-testing.jsx"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport GUI from '../containers/gui.jsx';\nimport HashParserHOC from '../lib/hash-parser-hoc.jsx';\nimport AppStateHOC from '../lib/app-state-hoc.jsx';\nconst WrappedGui = AppStateHOC(HashParserHOC(GUI));\n\n\nconst DEFAULT_PROJECT_ID = '10015059';\n\nclass Player extends React.Component {\n constructor (props) {\n super(props);\n this.updateProject = this.updateProject.bind(this);\n\n this.state = {\n projectId: window.location.hash.substring(1) || DEFAULT_PROJECT_ID\n };\n }\n componentDidMount () {\n window.addEventListener('hashchange', this.updateProject);\n if (!window.location.hash.substring(1)) {\n window.location.hash = DEFAULT_PROJECT_ID;\n }\n }\n componentWillUnmount () {\n window.addEventListener('hashchange', this.updateProject);\n }\n updateProject () {\n this.setState({projectId: window.location.hash.substring(1)});\n }\n render () {\n return (\n
1?this.handleDeleteCostume:null,onDrop:this.handleDrop,onDuplicateClick:this.handleDuplicateCostume,onExportClick:this.handleExportCostume,onItemClick:this.handleSelectCostume},l.costumes?r.a.createElement(ha,{selectedCostumeIndex:this.state.selectedCostumeIndex}):null)}}]),o}();ja.propTypes={dispatchUpdateRestore:i.a.func,editingTarget:i.a.string,intl:d.f,isRtl:i.a.bool,onActivateSoundsTab:i.a.func.isRequired,onCloseImporting:i.a.func.isRequired,onNewLibraryBackdropClick:i.a.func.isRequired,onNewLibraryCostumeClick:i.a.func.isRequired,onShowImporting:i.a.func.isRequired,sprites:i.a.shape({id:i.a.shape({costumes:i.a.arrayOf(i.a.shape({url:i.a.string,name:i.a.string.isRequired,skinId:i.a.number}))})}),stage:i.a.shape({sounds:i.a.arrayOf(i.a.shape({name:i.a.string.isRequired}))}),vm:i.a.instanceOf(g.a)};var za=Object(p.a)("Costume Tab")(Object(d.e)(Object(s.b)(function(e){return{editingTarget:e.scratchGui.targets.editingTarget,isRtl:e.locales.isRtl,sprites:e.scratchGui.targets.sprites,stage:e.scratchGui.targets.stage,dragging:e.scratchGui.assetDrag.dragging}},function(e){return{onActivateSoundsTab:function(){return e(Object(h.d)(h.c))},onNewLibraryBackdropClick:function(t){t.preventDefault(),e(Object(m.m)())},onNewLibraryCostumeClick:function(t){t.preventDefault(),e(Object(m.o)())},dispatchUpdateRestore:function(t){e(Object(Ia.c)(t))},onCloseImporting:function(){return e(Object(_e.c)("importingAsset"))},onShowImporting:function(){return e(Object(_e.i)("importingAsset"))}}})(ja))),Ka=o(254),Wa=Object(d.d)({all:{id:"gui.libraryTags.all",defaultMessage:"All"},animals:{id:"gui.libraryTags.animals",defaultMessage:"Animals"},dance:{id:"gui.libraryTags.dance",defaultMessage:"Dance"},effects:{id:"gui.libraryTags.effects",defaultMessage:"Effects"},fantasy:{id:"gui.libraryTags.fantasy",defaultMessage:"Fantasy"},fashion:{id:"gui.libraryTags.fashion",defaultMessage:"Fashion"},food:{id:"gui.libraryTags.food",defaultMessage:"Food"},indoors:{id:"gui.libraryTags.indoors",defaultMessage:"Indoors"},loops:{id:"gui.libraryTags.loops",defaultMessage:"Loops"},music:{id:"gui.libraryTags.music",defaultMessage:"Music"},notes:{id:"gui.libraryTags.notes",defaultMessage:"Notes"},outdoors:{id:"gui.libraryTags.outdoors",defaultMessage:"Outdoors"},patterns:{id:"gui.libraryTags.patterns",defaultMessage:"Patterns"},people:{id:"gui.libraryTags.people",defaultMessage:"People"},percussion:{id:"gui.libraryTags.percussion",defaultMessage:"Percussion"},space:{id:"gui.libraryTags.space",defaultMessage:"Space"},sports:{id:"gui.libraryTags.sports",defaultMessage:"Sports"},underwater:{id:"gui.libraryTags.underwater",defaultMessage:"Underwater"},voice:{id:"gui.libraryTags.voice",defaultMessage:"Voice"},wacky:{id:"gui.libraryTags.wacky",defaultMessage:"Wacky"},animation:{id:"gui.libraryTags.animation",defaultMessage:"Animation"},art:{id:"gui.libraryTags.art",defaultMessage:"Art"},games:{id:"gui.libraryTags.games",defaultMessage:"Games"},stories:{id:"gui.libraryTags.stories",defaultMessage:"Stories"},letters:{id:"gui.libraryTags.letters",defaultMessage:"Letters"}}),Va=[{tag:"animals",intlLabel:Wa.animals},{tag:"people",intlLabel:Wa.people},{tag:"fantasy",intlLabel:Wa.fantasy},{tag:"dance",intlLabel:Wa.dance},{tag:"music",intlLabel:Wa.music},{tag:"sports",intlLabel:Wa.sports},{tag:"food",intlLabel:Wa.food},{tag:"fashion",intlLabel:Wa.fashion},{tag:"letters",intlLabel:Wa.letters}],Ja=o(82);function qa(e){"@babel/helpers - typeof";return(qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xa(e,t){for(var o=0;o