From 425649bc6d33e046843632a49394ac8800773cdc Mon Sep 17 00:00:00 2001 From: autosubmit Date: Fri, 26 May 2023 22:42:03 +0800 Subject: [PATCH] Auto Submit --- 29462.async.js | 229 ------------------ 41297.async.js | 105 ++++++-- 70335.async.js | 229 ++++++++++++++++++ color.less | 28 +-- ...ts__CommonHomework__Detail__index.async.js | 108 +++++++-- ...s__CommonHomework__Detail__index.chunk.css | 5 +- ...ts__CommonHomework__Review__index.async.js | 70 +++--- ...s__CommonHomework__Review__index.chunk.css | 7 +- ...sts__GroupHomework__Detail__index.async.js | 108 +++++++-- ...ts__GroupHomework__Detail__index.chunk.css | 5 +- ...sts__GroupHomework__Review__index.async.js | 60 +++-- ...ts__GroupHomework__Review__index.chunk.css | 8 +- ...assrooms__Lists__LiveVideo__index.async.js | 19 +- ...s__ShixunHomeworks__Detail__index.async.js | 3 + p__Message__index.async.js | 4 +- umi.js | 27 ++- 16 files changed, 630 insertions(+), 385 deletions(-) delete mode 100644 29462.async.js create mode 100644 70335.async.js diff --git a/29462.async.js b/29462.async.js deleted file mode 100644 index f4d90216e1..0000000000 --- a/29462.async.js +++ /dev/null @@ -1,229 +0,0 @@ -"use strict"; -(self["webpackChunk"] = self["webpackChunk"] || []).push([[29462],{ - -/***/ 82826: -/*!**********************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***! - \**********************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_ArrowLeftOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js -var objectSpread2 = __webpack_require__(1413); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js -// This icon file is generated automatically. -var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" }; -/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules -var AntdIcon = __webpack_require__(7918); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - -var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { - ref: ref, - icon: asn_ArrowLeftOutlined - })); -}; -ArrowLeftOutlined_ArrowLeftOutlined.displayName = 'ArrowLeftOutlined'; -/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined)); - -/***/ }), - -/***/ 82061: -/*!*******************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js ***! - \*******************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294); -/* harmony import */ var _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DeleteOutlined */ 47046); -/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918); - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - -var DeleteOutlined = function DeleteOutlined(props, ref) { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, { - ref: ref, - icon: _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z - })); -}; -DeleteOutlined.displayName = 'DeleteOutlined'; -/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DeleteOutlined)); - -/***/ }), - -/***/ 64082: -/*!******************************************************************************!*\ - !*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***! - \******************************************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - - -// EXPORTS -__webpack_require__.d(__webpack_exports__, { - "Z": function() { return /* binding */ icons_InboxOutlined; } -}); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js -var objectSpread2 = __webpack_require__(1413); -// EXTERNAL MODULE: ./node_modules/react/index.js -var react = __webpack_require__(67294); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js -// This icon file is generated automatically. -var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" }; -/* harmony default export */ var asn_InboxOutlined = (InboxOutlined); - -// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules -var AntdIcon = __webpack_require__(7918); -;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js - -// GENERATE BY ./scripts/generate.ts -// DON NOT EDIT IT MANUALLY - - - -var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) { - return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { - ref: ref, - icon: asn_InboxOutlined - })); -}; -InboxOutlined_InboxOutlined.displayName = 'InboxOutlined'; -/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined)); - -/***/ }), - -/***/ 27049: -/*!***********************************************!*\ - !*** ./node_modules/antd/es/divider/index.js ***! - \***********************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462); -/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294); -/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124); - - -var __rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - -var Divider = function Divider(props) { - var _classNames; - var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_), - getPrefixCls = _React$useContext.getPrefixCls, - direction = _React$useContext.direction; - var customizePrefixCls = props.prefixCls, - _props$type = props.type, - type = _props$type === void 0 ? 'horizontal' : _props$type, - _props$orientation = props.orientation, - orientation = _props$orientation === void 0 ? 'center' : _props$orientation, - orientationMargin = props.orientationMargin, - className = props.className, - children = props.children, - dashed = props.dashed, - plain = props.plain, - restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"]); - var prefixCls = getPrefixCls('divider', customizePrefixCls); - var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation; - var hasChildren = !!children; - var hasCustomMarginLeft = orientation === 'left' && orientationMargin != null; - var hasCustomMarginRight = orientation === 'right' && orientationMargin != null; - var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-plain"), !!plain), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-left"), hasCustomMarginLeft), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-right"), hasCustomMarginRight), _classNames), className); - var innerStyle = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({}, hasCustomMarginLeft && { - marginLeft: orientationMargin - }), hasCustomMarginRight && { - marginRight: orientationMargin - }); - // Warning children not work in vertical mode - if (false) {} - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({ - className: classString - }, restProps, { - role: "separator" - }), children && type !== 'vertical' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { - className: "".concat(prefixCls, "-inner-text"), - style: innerStyle - }, children)); -}; -/* harmony default export */ __webpack_exports__["Z"] = (Divider); - -/***/ }), - -/***/ 98541: -/*!*****************************************************************!*\ - !*** ./node_modules/antd/es/divider/style/index.js + 1 modules ***! - \*****************************************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) { - - -// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less -var style_default = __webpack_require__(43146); -;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.less -// extracted by mini-css-extract-plugin - -;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js - - - -/***/ }), - -/***/ 50290: -/*!*************************************************!*\ - !*** ./node_modules/markerjs2/markerjs2.esm.js ***! - \*************************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "hP": function() { return /* binding */ K; } -/* harmony export */ }); -/* unused harmony exports Activator, ArrowMarker, ArrowTypePanel, CalloutMarker, CaptionFrameMarker, ColorPickerPanel, CoverMarker, CurveMarker, EllipseFrameMarker, EllipseMarker, EventListenerRepository, FontFamilyPanel, FrameMarker, FreehandMarker, HighlightMarker, LineMarker, LineStylePanel, LineWidthPanel, LinearMarkerBase, MarkerAreaEvent, MarkerAreaRenderEvent, MarkerBase, MarkerEvent, MeasurementMarker, OpacityPanel, RectangleMarker, RectangularBoxMarkerBase, RectangularBoxMarkerGrips, ResizeGrip, Settings, Style, StyleClass, StyleManager, SvgHelper, TextMarker, ToolboxPanel, TransformMatrix */ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};function e(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}function i(t,e,i,o){return new(i||(i=Promise))((function(s,r){function n(t){try{h(o.next(t))}catch(t){r(t)}}function a(t){try{h(o.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,a)}h((o=o.apply(t,e||[])).next())}))}function o(t,e){var i,o,s,r,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,o&&(s=2&r[0]?o.return:r[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;switch(o=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,o=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(!(s=n.trys,(s=s.length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){n=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]',"select"),this.addActionButton(i,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(i,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(i,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(i,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(i,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(i,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(i,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(t){var i=document.createElement("div");i.className=""+e.toolbarButtonStyleClass.name,i.setAttribute("data-type-name",t.typeName),i.innerHTML=t.icon,i.addEventListener("click",(function(){e.markerToolbarButtonClicked(i,t)})),e.buttons.push(i),e.markerButtons.push(i)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var o=document.createElement("div");o.className=this.toolbarBlockStyleClass.name,o.style.whiteSpace="nowrap",o.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(o),this.addActionButton(o,'',"render"),this.addActionButton(o,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),u=function(){function t(t,e,i,o){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=i,this.styles=o,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new c("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new c("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new c("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,i,o=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(i=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==i?i:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=o.uiStyleSettings;var i=document.createElement("div");i.className=o.toolboxButtonStyleClass.name+" "+(null!==(e=o.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:o.toolboxButtonStyleColorsClass.name),i.innerHTML=t.icon,i.title=t.title,i.addEventListener("click",(function(){o.panelButtonClick(t)})),o.panelButtons.push(i),o.buttonRow.appendChild(i)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,i=-1;if(t!==this.activePanel){i=this.panels.indexOf(t),this.panelRow.innerHTML="";var o=t.getUi();o.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(o),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,o){var s,r;t.className=e.toolboxButtonStyleClass.name+" "+(o===i?""+(null!==(s=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==s?s:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(r=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==r?r:e.toolboxButtonStyleColorsClass.name))}))},t}(),y=function(t,e){this.title=t,this.icon=e},g=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.colors=[],r.addTransparent=!1,r.colorBoxes=[],r.colors=i,r.currentColor=o,r.setCurrentColor=r.setCurrentColor.bind(r),r.getColorBox=r.getColorBox.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(i){var o=t.getColorBox(i);e.appendChild(o),t.colorBoxes.push(o)})),e},i.prototype.getColorBox=function(t){var e=this,i=this.uiStyleSettings.toolbarHeight/4,o=this.uiStyleSettings.toolbarHeight-i,s=document.createElement("div");s.style.display="inline-block",s.style.boxSizing="content-box",s.style.width=o-2+"px",s.style.height=o-2+"px",s.style.padding="1px",s.style.marginRight="2px",s.style.marginBottom="2px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderRadius=(o+2)/2+"px",s.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",(function(){e.setCurrentColor(t,s)}));var r=document.createElement("div");return r.style.display="inline-block",r.style.width=o-2+"px",r.style.height=o-2+"px",r.style.backgroundColor=t,r.style.borderRadius=o/2+"px","transparent"===t&&(r.style.fill=this.uiStyleSettings.toolboxAccentColor,r.innerHTML='\n \n '),s.appendChild(r),s},i.prototype.setCurrentColor=function(t,e){var i=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},i}(y),f=function(){function t(t,e,i){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=i,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),v=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),m=function(){function t(){this.GRIP_SIZE=10,this.visual=r.createGroup(),this.visual.appendChild(r.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(r.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),C=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),b=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.left=0,s.top=0,s.width=0,s.height=0,s.defaultSize={x:50,y:20},s.offsetX=0,s.offsetY=0,s.rotationAngle=0,s.CB_DISTANCE=10,s._suppressMarkerCreateEvent=!1,s.container.transform.baseVal.appendItem(r.createTransform()),s.setupControlBox(),s}return e(i,t),Object.defineProperty(i.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=r.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),i.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var o=this.unrotatePoint(e);if(this.manipulationStartX=o.x,this.manipulationStartY=o.y,this.offsetX=o.x-this.left,this.offsetY=o.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(i),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(i)){this.activeGrip=this.rotatorGrip;var s=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=s.x-this.width/2,this.top=s.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var r=this.container.transform.baseVal.getItem(0);r.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(r,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},i.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},i.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},i.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},i.prototype.resize=function(t){var e=this.manipulationStartLeft,i=this.manipulationStartWidth,o=this.manipulationStartTop,s=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,i=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:i=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:o=this.manipulationStartTop+t.y-this.manipulationStartY,s=this.manipulationStartHeight+this.manipulationStartTop-o;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:s=this.manipulationStartHeight+t.y-this.manipulationStartY}i>=0?(this.left=e,this.width=i):(this.left=e+i,this.width=-i),s>=0?(this.top=o,this.height=s):(this.top=o+s,this.height=-s),this.setSize()},i.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},i.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},i.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},i.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),i=r.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},i.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var i=r.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},i.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=r.createGroup();var t=r.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=r.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=r.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new v,this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},i.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},i.prototype.createGrip=function(){var t=new m;return t.visual.transform.baseVal.appendItem(r.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,i=e,o=(this.width+this.CB_DISTANCE)/2-t/2,s=(this.height+this.CB_DISTANCE)/2-t/2,r=this.height+this.CB_DISTANCE-t/2,n=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,i),this.positionGrip(this.controlGrips.topCenter.visual,o,i),this.positionGrip(this.controlGrips.topRight.visual,n,i),this.positionGrip(this.controlGrips.centerLeft.visual,e,s),this.positionGrip(this.controlGrips.centerRight.visual,n,s),this.positionGrip(this.controlGrips.bottomLeft.visual,e,r),this.positionGrip(this.controlGrips.bottomCenter.visual,o,r),this.positionGrip(this.controlGrips.bottomRight.visual,n,r),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,o,i-3*this.CB_DISTANCE)},i.prototype.positionGrip=function(t,e,i){var o=t.transform.baseVal.getItem(0);o.setTranslate(e,i),t.transform.baseVal.replaceItem(o,0)},i.prototype.hideControlBox=function(){this.controlBox.style.display="none"},i.prototype.showControlBox=function(){this.controlBox.style.display=""},i.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:C.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:C.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.left=i.left,this.top=i.top,this.width=i.width,this.height=i.height,this.rotationAngle=i.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,i.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,i.containerTransformMatrix))},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i);var o=this.rotatePoint({x:this.left,y:this.top}),s=this.unrotatePoint({x:o.x*e,y:o.y*i});this.left=s.x,this.top=s.y,this.width=this.width*e,this.height=this.height*i,this.adjustControlBox()},i}(f),S=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.fillColor="transparent",s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.opacity=1,s.setStrokeColor=s.setStrokeColor.bind(s),s.setFillColor=s.setFillColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.createVisual=s.createVisual.bind(s),s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},i.prototype.createVisual=function(){this.visual=r.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},i.prototype.setSize=function(){t.prototype.setSize.call(this),r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&r.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&r.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&r.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&r.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},i.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.opacity=i.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},i.title="Rectangle marker",i}(b),x=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.widths=[],r.widthBoxes=[],r.widths=i,r.currentWidth=o,r.setCurrentWidth=r.setCurrentWidth.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentWidth(i,o)})),e.appendChild(o);var s=document.createElement("div");s.innerText=i.toString(),s.style.marginRight="5px",o.appendChild(s);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.display="flex",r.style.alignItems="center";var n=document.createElement("hr");n.style.minWidth="20px",n.style.border="0px",n.style.borderTop=i+"px solid "+t.uiStyleSettings.toolboxColor,n.style.flexGrow="2",r.appendChild(n),o.appendChild(r),t.widthBoxes.push(o)})),e},i.prototype.setCurrentWidth=function(t,e){var i=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},i}(y),k=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.styles=[],r.styleBoxes=[],r.styles=i,r.currentStyle=o,r.setCurrentStyle=r.setCurrentStyle.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.overflow="hidden",o.style.maxWidth=100/t.styles.length-5+"%",o.style.borderColor=i===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentStyle(i,o)})),e.appendChild(o);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.overflow="hidden";var r='\n \n ";s.innerHTML=r,o.appendChild(s),t.styleBoxes.push(o)})),e},i.prototype.setCurrentStyle=function(t,e){var i=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},i}(y),w=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="FrameMarker",i.title="Frame marker",i.icon='',i}(S),B=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},E=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.x1=0,s.y1=0,s.x2=0,s.y2=0,s.defaultLength=50,s.manipulationStartX=0,s.manipulationStartY=0,s.manipulationStartX1=0,s.manipulationStartY1=0,s.manipulationStartX2=0,s.manipulationStartY2=0,s.setupControlBox(),s}return e(i,t),i.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(i)?this.activeGrip=this.grip1:this.grip2.ownsTarget(i)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},i.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&this.onMarkerCreated(this)},i.prototype.adjustVisual=function(){},i.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},i.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},i.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=r.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){this.positionGrips()},i.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},i.prototype.createGrip=function(){var t=new m;return t.visual.transform.baseVal.appendItem(r.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},i.prototype.positionGrip=function(t,e,i){var o=t.transform.baseVal.getItem(0);o.setTranslate(e,i),t.transform.baseVal.replaceItem(o,0)},i.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.x1=i.x1,this.y1=i.y1,this.x2=i.x2,this.y2=i.y2},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.x1=this.x1*e,this.y1=this.y1*i,this.x2=this.x2*e,this.y2=this.y2*i,this.adjustVisual(),this.adjustControlBox()},i}(f),M=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.setStrokeColor=s.setStrokeColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.selectorLine=r.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=r.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},i.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),r.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),r.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),r.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.createVisual(),this.adjustVisual()},i.typeName="LineMarker",i.title="Line marker",i.icon='',i}(E),T=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.fonts=[],r.fontBoxes=[],r.fonts=i,r.currentFont=o,r.setCurrentFont=r.setCurrentFont.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(i){var o=document.createElement("div");o.style.display="inline-block",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.overflow="hidden",o.style.maxWidth=100/t.fonts.length-5+"%",o.style.borderColor=i===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentFont(i,o)})),e.appendChild(o);var s=document.createElement("div");s.style.display="flex",s.style.minHeight="20px",s.style.flexGrow="2",s.style.fontFamily=i,s.style.overflow="hidden";var r=document.createElement("div");r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",r.innerHTML="The quick brown fox jumps over the lazy dog",s.appendChild(r),o.appendChild(s),t.fontBoxes.push(o)})),e},i.prototype.setCurrentFont=function(t,e){var i=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},i}(y),P=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.color="transparent",s.padding=5,s.DEFAULT_TEXT="your text here",s.text=s.DEFAULT_TEXT,s.isMoved=!1,s.color=o.defaultColor,s.fontFamily=o.defaultFontFamily,s.defaultSize={x:100,y:30},s.setColor=s.setColor.bind(s),s.setFont=s.setFont.bind(s),s.renderText=s.renderText.bind(s),s.sizeText=s.sizeText.bind(s),s.textEditDivClicked=s.textEditDivClicked.bind(s),s.showTextEditor=s.showTextEditor.bind(s),s.setSize=s.setSize.bind(s),s.positionTextEditor=s.positionTextEditor.bind(s),s.colorPanel=new g("Color",o.defaultColorSet,o.defaultColor),s.colorPanel.onColorChanged=s.setColor,s.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),s.fontFamilyPanel.onFontChanged=s.setFont,s}return e(i,t),i.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var i=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(i=!0)})),i},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.bgRectangle=r.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=r.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(r.createTransform()),this.textElement.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(e){t.textElement.appendChild(r.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},i.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var i=(1*this.width-this.width*this.padding*2/100)/t.width,o=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(i,o)}return e},i.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),i=0,o=0;return e.width>0&&e.height>0&&(i=(this.width-e.width*t)/2,o=this.height/2-e.height*t/2),{x:i,y:o}},i.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),i=this.getTextPosition(e);i.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+i.x+"px, "+i.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(i.x,i.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},i.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},i.prototype.pointerUp=function(e){var i=this.state;"creating"===i&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===i||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),i=window.getSelection();if(!i.rangeCount)return!1;i.deleteFromDocument(),i.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},i.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),i=this.textElement.getBBox(),o={x:i.width*t,y:i.height*t};e.x-=o.x/2,e.y-=o.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},i.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},i.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},i.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},i.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},i.prototype.setColor=function(t){this.textElement&&r.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},i.prototype.setFont=function(t){this.textElement&&r.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},i.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},i.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){var i=e;this.color=i.color,this.fontFamily=i.fontFamily,this.padding=i.padding,this.text=i.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize(),this.sizeText(),this.positionTextEditor()},i.typeName="TextMarker",i.title="Text marker",i.icon='',i}(b),L=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.color="transparent",s.lineWidth=3,s.drawing=!1,s.pixelRatio=1,s.color=o.defaultColor,s.lineWidth=o.defaultStrokeWidth,s.pixelRatio=o.freehandPixelRatio,s.setColor=s.setColor.bind(s),s.addCanvas=s.addCanvas.bind(s),s.finishCreation=s.finishCreation.bind(s),s.setLineWidth=s.setLineWidth.bind(s),s.colorPanel=new g("Color",o.defaultColorSet,o.defaultColor),s.colorPanel.onColorChanged=s.setColor,s.lineWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.lineWidthPanel.onWidthChanged=s.setLineWidth,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.drawingImage=r.createImage(),this.visual.appendChild(this.drawingImage);var t=r.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,i)},i.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},i.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},i.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},i.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},i.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],i=e[0],o=e[1],s=e[2],r=e[3],n=!1,a=0;a0&&(n=!0,ar&&(r=a),h>s&&(s=h))}if(n){this.left=i/this.pixelRatio,this.top=o/this.pixelRatio,this.width=(s-i)/this.pixelRatio,this.height=(r-o)/this.pixelRatio;var l=document.createElement("canvas");l.width=s-i,l.height=r-o,l.getContext("2d").putImageData(this.canvasContext.getImageData(i,o,s-i,r-o),0,0),this.drawingImgUrl=l.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},i.prototype.setDrawingImage=function(){r.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},i.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},i.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setDrawingImage()},i.typeName="FreehandMarker",i.title="Freehand marker",i.icon='',i}(b),D=function(t){function i(e,i,o){var s=t.call(this,e,o||'')||this;return s.typeBoxes=[],s.currentType=i,s.setCurrentType=s.setCurrentType.bind(s),s}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var i=function(i){var s="both";switch(i){case 0:s="both";break;case 1:s="start";break;case 2:s="end";break;case 3:s="none"}var r=document.createElement("div");if(r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=s===o.currentType?o.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentType(s,r)})),e.appendChild(r),"both"===s||"start"===s){var n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.minHeight="20px",n.innerHTML='\n \n ',n.style.marginLeft="5px",r.appendChild(n)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var h=document.createElement("hr");if(h.style.minWidth="20px",h.style.border="0px",h.style.borderTop="3px solid "+(void 0!==o.uiStyleSettings?o.uiStyleSettings.toolboxColor:"#eeeeee"),h.style.flexGrow="2",a.appendChild(h),r.appendChild(a),"both"===s||"end"===s){var l=document.createElement("div");l.style.display="flex",l.style.alignItems="center",l.style.minHeight="20px",l.innerHTML='\n \n ',l.style.marginRight="5px",r.appendChild(l)}o.typeBoxes.push(r)},o=this,s=0;s<4;s++)i(s);return e},i.prototype.setCurrentType=function(t,e){var i=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},i}(y),A=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.arrowType="end",s.arrowBaseHeight=10,s.arrowBaseWidth=10,s.getArrowPoints=s.getArrowPoints.bind(s),s.setArrowType=s.setArrowType.bind(s),s.arrowTypePanel=new D("Arrow type","end"),s.arrowTypePanel.onArrowTypeChanged=s.setArrowType,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},i.prototype.getArrowPoints=function(t,e){var i=this.arrowBaseWidth+2*this.strokeWidth,o=this.arrowBaseHeight+2*this.strokeWidth;return t-i/2+","+(e+o/2)+" "+t+","+(e-o/2)+" "+(t+i/2)+","+(e+o/2)},i.prototype.createTips=function(){this.arrow1=r.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=r.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.arrow2)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"creating"===this.state&&this.createTips()},i.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",r.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),r.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var e=0;Math.abs(this.x1-this.x2)>.1&&(e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var i=this.arrow1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(i,0);var o=this.arrow2.transform.baseVal.getItem(0);o.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(o,0)}},i.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.arrowType=i.arrowType,this.createTips(),this.adjustVisual()},i.typeName="ArrowMarker",i.title="Arrow marker",i.icon='',i}(M),_=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.fillColor=o.defaultFillColor,s.strokeWidth=0,s.fillPanel=new g("Color",o.defaultColorSet,o.defaultFillColor),s.fillPanel.onColorChanged=s.setFillColor,s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="CoverMarker",i.title="Cover marker",i.icon='',i}(S),I=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.opacities=[],r.opacityBoxes=[],r.opacities=i,r.currentOpacity=o,r.setCurrentOpacity=r.setCurrentOpacity.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentOpacity(i,o)})),e.appendChild(o);var s=document.createElement("div");s.innerText=100*i+"%",o.appendChild(s),t.opacityBoxes.push(o)})),e},i.prototype.setCurrentOpacity=function(t,e){var i=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},i}(y),W=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.setOpacity=s.setOpacity.bind(s),s.fillColor=o.defaultHighlightColor,s.strokeWidth=0,s.opacity=o.defaultHighlightOpacity,s.fillPanel=new g("Color",o.defaultColorSet,s.fillColor),s.fillPanel.onColorChanged=s.setFillColor,s.opacityPanel=new I("Opacity",o.defaultOpacitySteps,s.opacity),s.opacityPanel.onOpacityChanged=s.setOpacity,s}return e(i,t),i.prototype.setOpacity=function(t){this.opacity=t,this.visual&&r.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="HighlightMarker",i.title="Highlight marker",i.icon='',i}(_),N='',H='',z=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.bgColor="transparent",s.tipPosition={x:0,y:0},s.tipBase1Position={x:0,y:0},s.tipBase2Position={x:0,y:0},s.tipMoving=!1,s.color=o.defaultStrokeColor,s.bgColor=o.defaultFillColor,s.fontFamily=o.defaultFontFamily,s.defaultSize={x:100,y:30},s.setBgColor=s.setBgColor.bind(s),s.getTipPoints=s.getTipPoints.bind(s),s.positionTip=s.positionTip.bind(s),s.setTipPoints=s.setTipPoints.bind(s),s.colorPanel=new g("Text color",o.defaultColorSet,s.color,N),s.colorPanel.onColorChanged=s.setColor,s.bgColorPanel=new g("Fill color",o.defaultColorSet,s.bgColor,H),s.bgColorPanel.onColorChanged=s.setBgColor,s.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),s.fontFamilyPanel.onFontChanged=s.setFont,s.tipGrip=new m,s.tipGrip.visual.transform.baseVal.appendItem(r.createTransform()),s.controlBox.appendChild(s.tipGrip.visual),s}return e(i,t),i.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},i.prototype.createTip=function(){r.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=r.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},i.prototype.pointerDown=function(e,i){"new"===this.state&&t.prototype.pointerDown.call(this,e,i),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(i)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,i)},i.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var i="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(i),this.positionTip()}},i.prototype.manipulate=function(e){if(this.tipMoving){var i=this.unrotatePoint(e);this.tipPosition={x:i.x-this.manipulationStartLeft,y:i.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},i.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(r.setAttributes(this.bgRectangle,[["fill",t]]),r.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},i.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},i.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),i=this.height/5;t&&(this.tipPosition={x:e+i/2,y:this.height+20});var o=Math.atan(this.height/2/(this.width/2));if(this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2){o.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),i=this.tip1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(i,0);var o=this.tip2.transform.baseVal.getItem(0);o.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(o,0)}},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},i.typeName="MeasurementMarker",i.title="Measurement marker",i.icon='',i}(M),V=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokePanel.colors=o.defaultColorSet,s.fillColor="transparent",s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="EllipseFrameMarker",i.title="Ellipse frame marker",i.icon='',i}(R),G=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),F=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.curveX=0,s.curveY=0,s.manipulationStartCurveX=0,s.manipulationStartCurveY=0,s.setStrokeColor=s.setStrokeColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.positionGrips=s.positionGrips.bind(s),s.addControlGrips=s.addControlGrips.bind(s),s.adjustVisual=s.adjustVisual.bind(s),s.setupControlBox=s.setupControlBox.bind(s),s.resize=s.resize.bind(s),s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},i.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.selectorCurve=r.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=r.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(i)&&(this.activeGrip=this.curveGrip,this._state="resize")},i.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),r.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),r.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),r.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=r.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=r.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},i.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},i.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},i.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},i.prototype.scale=function(e,i){this.curveX=this.curveX*e,this.curveY=this.curveY*i,t.prototype.scale.call(this,e,i)},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.curveX=i.curveX,this.curveY=i.curveY,this.createVisual(),this.adjustVisual()},i.typeName="CurveMarker",i.title="Curve marker",i.icon='',i}(E),j=function(t){function i(e,i,o){var r=t.call(this,e,i,o)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.textColor="transparent",r.fontSize="1rem",r.isMoved=!1,r.captionText="Caption",r.PADDING=5,r.captionBoxWidth=0,r.captionBoxHeight=0,r.strokeColor=o.defaultColor,r.strokeWidth=o.defaultStrokeWidth,r.strokeDasharray=o.defaultStrokeDasharray,r.fillColor=o.defaultFillColor,r.textColor=o.defaultStrokeColor,r.fontFamily=o.defaultFontFamily,r.fontSize=o.defaultCaptionFontSize,r.captionText=o.defaultCaptionText,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r.sizeCaption=r.sizeCaption.bind(r),r.setCaptionText=r.setCaptionText.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.finishTextEditing=r.finishTextEditing.bind(r),r.setFont=r.setFont.bind(r),r.setTextColor=r.setTextColor.bind(r),r.strokePanel=new g("Line color",s(o.defaultColorSet,["transparent"]),r.strokeColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new g("Fill color",s(o.defaultColorSet,["transparent"]),r.fillColor,H),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.textColorPanel=new g("Text color",o.defaultColorSet,r.textColor,N),r.textColorPanel.onColorChanged=r.setTextColor,r}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.frame&&e!==this.captionBg&&e!==this.captionElement)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=r.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=r.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=r.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},i.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},i.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),r.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),r.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(e){"Enter"===e.key&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},i.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},i.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},i.prototype.setFont=function(t){this.captionElement&&r.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},i.prototype.setTextColor=function(t){this.captionElement&&r.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},i.prototype.setSize=function(){t.prototype.setSize.call(this),r.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},i.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&r.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&r.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&r.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&r.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},t.prototype.getState.call(this));return e.typeName=this.typeName,e},i.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.textColor=i.textColor,this.fontFamily=i.fontFamily,this.captionText=i.captionText,this.fontSize=i.fontSize,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},i.typeName="CaptionFrameMarker",i.title="Caption frame marker",i.icon='',i}(b),U=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Y=function(t){function i(e,i,o){var s=t.call(this,e,!1)||this;return s.dataUrl=i,s.state=o,s}return e(i,t),i}(U),X=function(t){function i(e,i,o){void 0===o&&(o=!1);var s=t.call(this,e,o)||this;return s.marker=i,s}return e(i,t),i}(U),Z=function(){function t(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var i=this[t].indexOf(e);i>-1&&this[t].splice(i,1)},t}(),K=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new B,this._isOpen=!1,this.undoRedoManager=new G,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Z,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new l(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[w,L,A,P,V,R,W,z,O,_,M,F,j]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[w,L,A,P,R,W,z]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[w,L,A,P,W]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var i=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==i&&e._availableMarkerTypes.push(i)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),n.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==h.styleSheetRoot&&(this.styles.styleSheetRoot=h.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new U(t))}))},t.prototype.render=function(){return i(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new a).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var i=!1;t||this.eventListeners.beforeclose.forEach((function(t){var o=new U(e,!0);t(o),o.defaultPrevented&&(i=!0)})),i||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new U(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],i=0;ithis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,i=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=void 0!==this.settings.uiOffsetTop?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new d(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),void 0===this.settings.uiOffsetTop&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(i){var o=new X(t,t._currentMarker,!0);i(o),o.defaultPrevented&&(e=!0)})),!e){var i=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(e){return e(new X(t,i))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(i){var o=new X(t,void 0,!0);i(o),o.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var i=function(e){var i=o.markers[e];o.setCurrentMarker(o.markers[e]),o._currentMarker.dispose(),o.markerImage.removeChild(o._currentMarker.container),o.markers.splice(o.markers.indexOf(o._currentMarker),1),o.eventListeners.markerdelete.forEach((function(e){return e(new X(t,i))}))},o=this,s=this.markers.length-1;s>=0;s--)i(s);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),i=this.undoRedoManager.getLastUndoStep();if(!i||i.width===e.width&&i.height===e.height){var o=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),o1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.markerImage.getBoundingClientRect();return{x:(t-i.left)/this.zoomLevel,y:(e-i.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},t.prototype.addLicenseKey=function(t){n.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new U(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new U(t))})))},t.instanceCounter=0,t}(); -//# sourceMappingURL=markerjs2.esm.js.map - - -/***/ }) - -}]); \ No newline at end of file diff --git a/41297.async.js b/41297.async.js index d8769ec89b..0b8384b56d 100644 --- a/41297.async.js +++ b/41297.async.js @@ -39,10 +39,12 @@ var spin = __webpack_require__(11382); ;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var ImageDimensionsmodules = ({"imageDimensions":"imageDimensions___a7crR","img":"img___Kroat"}); -// EXTERNAL MODULE: ./node_modules/markerjs2/markerjs2.esm.js -var markerjs2_esm = __webpack_require__(50290); +// EXTERNAL MODULE: ./node_modules/markerjs3/markerjs2.esm.js +var markerjs2_esm = __webpack_require__(20507); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__(84519); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(29427); // EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(85893); ;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.tsx @@ -58,6 +60,7 @@ var jsx_runtime = __webpack_require__(85893); + var ImageDimensions = function ImageDimensions(_ref) { var data = _ref.data, className = _ref.className, @@ -71,21 +74,58 @@ var ImageDimensions = function ImageDimensions(_ref) { _useState2 = slicedToArray_default()(_useState, 2), loading = _useState2[0], setLoading = _useState2[1]; + var _useState3 = (0,react.useState)('正在加载中'), + _useState4 = slicedToArray_default()(_useState3, 2), + loadingText = _useState4[0], + setLoadingText = _useState4[1]; (0,react.useEffect)(function () { if (data !== null && data !== void 0 && data.visible) { document.body.setAttribute('data-custom', 'height'); } else { document.body.removeAttribute('data-custom'); } + if (data !== null && data !== void 0 && data.src) { + getImg(); + } }, [data === null || data === void 0 ? void 0 : data.visible]); - var onSave = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(event) { - var res, result; + var getImg = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: setLoading(true); - _context.next = 3; + setLoadingText('正在加载中'); + _context.next = 4; + return (0,util/* toDataUrl */.ZJ)(data === null || data === void 0 ? void 0 : data.src); + case 4: + res = _context.sent; + imgRef.current.src = ""; + imgRef.current.src = res; + imgRef.current.onload = function () { + initMarkerjs(); + }; + setLoading(false); + setLoadingText(''); + case 10: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function getImg() { + return _ref2.apply(this, arguments); + }; + }(); + var onSave = /*#__PURE__*/function () { + var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(event) { + var res, result; + return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + setLoading(true); + setLoadingText('正在保存中'); + _context2.next = 4; return (0,fetch/* default */.ZP)('/api/attachments.json', { method: 'post', body: { @@ -94,13 +134,13 @@ var ImageDimensions = function ImageDimensions(_ref) { file: event.dataUrl } }); - case 3: - res = _context.sent; + case 4: + res = _context2.sent; if (!(res !== null && res !== void 0 && res.id)) { - _context.next = 9; + _context2.next = 10; break; } - _context.next = 7; + _context2.next = 8; return (0,fetch/* default */.ZP)("/api/attachments/".concat(data.id, "/add_subitem.json"), { method: 'post', body: { @@ -108,21 +148,22 @@ var ImageDimensions = function ImageDimensions(_ref) { settings: JSON.stringify(event.state) } }); - case 7: - result = _context.sent; + case 8: + result = _context2.sent; if (result.status === 0) { onOk(); } - case 9: - setLoading(false); case 10: + setLoading(false); + setLoadingText(''); + case 12: case "end": - return _context.stop(); + return _context2.stop(); } - }, _callee); + }, _callee2); })); return function onSave(_x) { - return _ref2.apply(this, arguments); + return _ref3.apply(this, arguments); }; }(); var dealDom = function dealDom() { @@ -197,22 +238,21 @@ var ImageDimensions = function ImageDimensions(_ref) { style: style, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, { spinning: loading, - tip: "\u6B63\u5728\u4FDD\u5B58\u4E2D...", + tip: loadingText, style: { position: 'absolute' } }), /*#__PURE__*/(0,jsx_runtime.jsx)("img", { - onLoad: initMarkerjs, className: ImageDimensionsmodules.img, - ref: imgRef, - src: data === null || data === void 0 ? void 0 : data.src + ref: imgRef + // crossOrigin='anonymous' + // src={data?.src} })] }) }); }; + /* harmony default export */ var components_ImageDimensions = (ImageDimensions); -// EXTERNAL MODULE: ./src/utils/util.tsx -var util = __webpack_require__(29427); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(59758); ;// CONCATENATED MODULE: ./src/components/FileDownloadList/index.tsx @@ -340,6 +380,7 @@ var FileDownloadList = function FileDownloadList(_ref) { className: classnames_default()(FileDownloadListmodules.list, className), style: style, children: dataSource.map(function (item, index) { + var _item$subitem3, _item$subitem4; return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: FileDownloadListmodules.row, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { @@ -373,7 +414,23 @@ var FileDownloadList = function FileDownloadList(_ref) { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-yulan" }), "\u9884\u89C8"] - })] + }), ['image'].includes(item === null || item === void 0 ? void 0 : item.file_type) && showDimensions && (authority ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: FileDownloadListmodules.annotation, + onClick: function onClick() { + return handleAnnotation(item); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-pizhu" + }), (_item$subitem3 = item.subitem) !== null && _item$subitem3 !== void 0 && _item$subitem3.id ? '修改批注' : '批注'] + }) : ((_item$subitem4 = item.subitem) === null || _item$subitem4 === void 0 ? void 0 : _item$subitem4.id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: FileDownloadListmodules.annotation, + onClick: function onClick() { + return handleCheckAnnotation(item); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-chakanlaoshipizhu1" + }), "\u67E5\u770B\u8001\u5E08\u6279\u6CE8"] + }))] }, index); }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, { diff --git a/70335.async.js b/70335.async.js new file mode 100644 index 0000000000..d91a2233ba --- /dev/null +++ b/70335.async.js @@ -0,0 +1,229 @@ +"use strict"; +(self["webpackChunk"] = self["webpackChunk"] || []).push([[70335],{ + +/***/ 82826: +/*!**********************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***! + \**********************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_ArrowLeftOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__(1413); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ArrowLeftOutlined.js +// This icon file is generated automatically. +var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" }; +/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules +var AntdIcon = __webpack_require__(7918); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + +var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { + ref: ref, + icon: asn_ArrowLeftOutlined + })); +}; +ArrowLeftOutlined_ArrowLeftOutlined.displayName = 'ArrowLeftOutlined'; +/* harmony default export */ var icons_ArrowLeftOutlined = (/*#__PURE__*/react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined)); + +/***/ }), + +/***/ 82061: +/*!*******************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/DeleteOutlined.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ 1413); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 67294); +/* harmony import */ var _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ant-design/icons-svg/es/asn/DeleteOutlined */ 47046); +/* harmony import */ var _components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AntdIcon */ 7918); + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + +var DeleteOutlined = function DeleteOutlined(props, ref) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_AntdIcon__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)({}, props), {}, { + ref: ref, + icon: _ant_design_icons_svg_es_asn_DeleteOutlined__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z + })); +}; +DeleteOutlined.displayName = 'DeleteOutlined'; +/* harmony default export */ __webpack_exports__["Z"] = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(DeleteOutlined)); + +/***/ }), + +/***/ 64082: +/*!******************************************************************************!*\ + !*** ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***! + \******************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": function() { return /* binding */ icons_InboxOutlined; } +}); + +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__(1413); +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(67294); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/InboxOutlined.js +// This icon file is generated automatically. +var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" }; +/* harmony default export */ var asn_InboxOutlined = (InboxOutlined); + +// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 6 modules +var AntdIcon = __webpack_require__(7918); +;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js + +// GENERATE BY ./scripts/generate.ts +// DON NOT EDIT IT MANUALLY + + + +var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) { + return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { + ref: ref, + icon: asn_InboxOutlined + })); +}; +InboxOutlined_InboxOutlined.displayName = 'InboxOutlined'; +/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/react.forwardRef(InboxOutlined_InboxOutlined)); + +/***/ }), + +/***/ 27049: +/*!***********************************************!*\ + !*** ./node_modules/antd/es/divider/index.js ***! + \***********************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 87462); +/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ 4942); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 94184); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 67294); +/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 53124); + + +var __rest = undefined && undefined.__rest || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; + } + return t; +}; + + + + +var Divider = function Divider(props) { + var _classNames; + var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_), + getPrefixCls = _React$useContext.getPrefixCls, + direction = _React$useContext.direction; + var customizePrefixCls = props.prefixCls, + _props$type = props.type, + type = _props$type === void 0 ? 'horizontal' : _props$type, + _props$orientation = props.orientation, + orientation = _props$orientation === void 0 ? 'center' : _props$orientation, + orientationMargin = props.orientationMargin, + className = props.className, + children = props.children, + dashed = props.dashed, + plain = props.plain, + restProps = __rest(props, ["prefixCls", "type", "orientation", "orientationMargin", "className", "children", "dashed", "plain"]); + var prefixCls = getPrefixCls('divider', customizePrefixCls); + var orientationPrefix = orientation.length > 0 ? "-".concat(orientation) : orientation; + var hasChildren = !!children; + var hasCustomMarginLeft = orientation === 'left' && orientationMargin != null; + var hasCustomMarginRight = orientation === 'right' && orientationMargin != null; + var classString = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, "".concat(prefixCls, "-").concat(type), (_classNames = {}, (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text"), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-with-text").concat(orientationPrefix), hasChildren), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-dashed"), !!dashed), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-plain"), !!plain), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-left"), hasCustomMarginLeft), (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_classNames, "".concat(prefixCls, "-no-default-orientation-margin-right"), hasCustomMarginRight), _classNames), className); + var innerStyle = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({}, hasCustomMarginLeft && { + marginLeft: orientationMargin + }), hasCustomMarginRight && { + marginRight: orientationMargin + }); + // Warning children not work in vertical mode + if (false) {} + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)({ + className: classString + }, restProps, { + role: "separator" + }), children && type !== 'vertical' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { + className: "".concat(prefixCls, "-inner-text"), + style: innerStyle + }, children)); +}; +/* harmony default export */ __webpack_exports__["Z"] = (Divider); + +/***/ }), + +/***/ 98541: +/*!*****************************************************************!*\ + !*** ./node_modules/antd/es/divider/style/index.js + 1 modules ***! + \*****************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) { + + +// EXTERNAL MODULE: ./node_modules/antd/es/style/default.less +var style_default = __webpack_require__(43146); +;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.less +// extracted by mini-css-extract-plugin + +;// CONCATENATED MODULE: ./node_modules/antd/es/divider/style/index.js + + + +/***/ }), + +/***/ 20507: +/*!*************************************************!*\ + !*** ./node_modules/markerjs3/markerjs2.esm.js ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "hP": function() { return /* binding */ K; } +/* harmony export */ }); +/* unused harmony exports Activator, ArrowMarker, ArrowTypePanel, CalloutMarker, CaptionFrameMarker, ColorPickerPanel, CoverMarker, CurveMarker, EllipseFrameMarker, EllipseMarker, EventListenerRepository, FontFamilyPanel, FrameMarker, FreehandMarker, HighlightMarker, LineMarker, LineStylePanel, LineWidthPanel, LinearMarkerBase, MarkerAreaEvent, MarkerAreaRenderEvent, MarkerBase, MarkerEvent, MeasurementMarker, OpacityPanel, RectangleMarker, RectangularBoxMarkerBase, RectangularBoxMarkerGrips, ResizeGrip, Settings, Style, StyleClass, StyleManager, SvgHelper, TextMarker, ToolboxPanel, TransformMatrix */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};function e(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}function i(t,e,i,o){return new(i||(i=Promise))((function(s,r){function n(t){try{h(o.next(t))}catch(t){r(t)}}function a(t){try{h(o.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(n,a)}h((o=o.apply(t,e||[])).next())}))}function o(t,e){var i,o,s,r,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,o&&(s=2&r[0]?o.return:r[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;switch(o=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,o=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(!(s=n.trys,(s=s.length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){n=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]',"select"),this.addActionButton(i,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(i,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(i,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(i,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(i,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(i,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(i,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(t){var i=document.createElement("div");i.className=""+e.toolbarButtonStyleClass.name,i.setAttribute("data-type-name",t.typeName),i.innerHTML=t.icon,i.addEventListener("click",(function(){e.markerToolbarButtonClicked(i,t)})),e.buttons.push(i),e.markerButtons.push(i)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var o=document.createElement("div");o.className=this.toolbarBlockStyleClass.name,o.style.whiteSpace="nowrap",o.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(o),this.addActionButton(o,'',"render"),this.addActionButton(o,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),u=function(){function t(t,e,i,o){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=i,this.styles=o,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new c("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new c("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new c("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,i,o=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(i=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==i?i:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=o.uiStyleSettings;var i=document.createElement("div");i.className=o.toolboxButtonStyleClass.name+" "+(null!==(e=o.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:o.toolboxButtonStyleColorsClass.name),i.innerHTML=t.icon,i.title=t.title,i.addEventListener("click",(function(){o.panelButtonClick(t)})),o.panelButtons.push(i),o.buttonRow.appendChild(i)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,i=-1;if(t!==this.activePanel){i=this.panels.indexOf(t),this.panelRow.innerHTML="";var o=t.getUi();o.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(o),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,o){var s,r;t.className=e.toolboxButtonStyleClass.name+" "+(o===i?""+(null!==(s=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==s?s:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(r=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==r?r:e.toolboxButtonStyleColorsClass.name))}))},t}(),y=function(t,e){this.title=t,this.icon=e},g=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.colors=[],r.addTransparent=!1,r.colorBoxes=[],r.colors=i,r.currentColor=o,r.setCurrentColor=r.setCurrentColor.bind(r),r.getColorBox=r.getColorBox.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(i){var o=t.getColorBox(i);e.appendChild(o),t.colorBoxes.push(o)})),e},i.prototype.getColorBox=function(t){var e=this,i=this.uiStyleSettings.toolbarHeight/4,o=this.uiStyleSettings.toolbarHeight-i,s=document.createElement("div");s.style.display="inline-block",s.style.boxSizing="content-box",s.style.width=o-2+"px",s.style.height=o-2+"px",s.style.padding="1px",s.style.marginRight="2px",s.style.marginBottom="2px",s.style.borderWidth="2px",s.style.borderStyle="solid",s.style.borderRadius=(o+2)/2+"px",s.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",s.addEventListener("click",(function(){e.setCurrentColor(t,s)}));var r=document.createElement("div");return r.style.display="inline-block",r.style.width=o-2+"px",r.style.height=o-2+"px",r.style.backgroundColor=t,r.style.borderRadius=o/2+"px","transparent"===t&&(r.style.fill=this.uiStyleSettings.toolboxAccentColor,r.innerHTML='\n \n '),s.appendChild(r),s},i.prototype.setCurrentColor=function(t,e){var i=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},i}(y),f=function(){function t(t,e,i){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=i,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),v=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),m=function(){function t(){this.GRIP_SIZE=10,this.visual=r.createGroup(),this.visual.appendChild(r.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(r.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),C=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),b=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.left=0,s.top=0,s.width=0,s.height=0,s.defaultSize={x:50,y:20},s.offsetX=0,s.offsetY=0,s.rotationAngle=0,s.CB_DISTANCE=10,s._suppressMarkerCreateEvent=!1,s.container.transform.baseVal.appendItem(r.createTransform()),s.setupControlBox(),s}return e(i,t),Object.defineProperty(i.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=r.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),i.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var o=this.unrotatePoint(e);if(this.manipulationStartX=o.x,this.manipulationStartY=o.y,this.offsetX=o.x-this.left,this.offsetY=o.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(i),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(i)){this.activeGrip=this.rotatorGrip;var s=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=s.x-this.width/2,this.top=s.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var r=this.container.transform.baseVal.getItem(0);r.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(r,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},i.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},i.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},i.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},i.prototype.resize=function(t){var e=this.manipulationStartLeft,i=this.manipulationStartWidth,o=this.manipulationStartTop,s=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,i=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:i=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:o=this.manipulationStartTop+t.y-this.manipulationStartY,s=this.manipulationStartHeight+this.manipulationStartTop-o;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:s=this.manipulationStartHeight+t.y-this.manipulationStartY}i>=0?(this.left=e,this.width=i):(this.left=e+i,this.width=-i),s>=0?(this.top=o,this.height=s):(this.top=o+s,this.height=-s),this.setSize()},i.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},i.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},i.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},i.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),i=r.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},i.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var i=r.createPoint(t.x,t.y);return{x:(i=i.matrixTransform(e)).x,y:i.y}},i.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=r.createGroup();var t=r.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=r.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=r.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new v,this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},i.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},i.prototype.createGrip=function(){var t=new m;return t.visual.transform.baseVal.appendItem(r.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,i=e,o=(this.width+this.CB_DISTANCE)/2-t/2,s=(this.height+this.CB_DISTANCE)/2-t/2,r=this.height+this.CB_DISTANCE-t/2,n=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,i),this.positionGrip(this.controlGrips.topCenter.visual,o,i),this.positionGrip(this.controlGrips.topRight.visual,n,i),this.positionGrip(this.controlGrips.centerLeft.visual,e,s),this.positionGrip(this.controlGrips.centerRight.visual,n,s),this.positionGrip(this.controlGrips.bottomLeft.visual,e,r),this.positionGrip(this.controlGrips.bottomCenter.visual,o,r),this.positionGrip(this.controlGrips.bottomRight.visual,n,r),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,o,i-3*this.CB_DISTANCE)},i.prototype.positionGrip=function(t,e,i){var o=t.transform.baseVal.getItem(0);o.setTranslate(e,i),t.transform.baseVal.replaceItem(o,0)},i.prototype.hideControlBox=function(){this.controlBox.style.display="none"},i.prototype.showControlBox=function(){this.controlBox.style.display=""},i.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:C.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:C.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.left=i.left,this.top=i.top,this.width=i.width,this.height=i.height,this.rotationAngle=i.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,i.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,i.containerTransformMatrix))},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i);var o=this.rotatePoint({x:this.left,y:this.top}),s=this.unrotatePoint({x:o.x*e,y:o.y*i});this.left=s.x,this.top=s.y,this.width=this.width*e,this.height=this.height*i,this.adjustControlBox()},i}(f),S=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.fillColor="transparent",s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.opacity=1,s.setStrokeColor=s.setStrokeColor.bind(s),s.setFillColor=s.setFillColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.createVisual=s.createVisual.bind(s),s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},i.prototype.createVisual=function(){this.visual=r.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},i.prototype.setSize=function(){t.prototype.setSize.call(this),r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&r.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&r.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&r.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&r.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},i.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.opacity=i.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},i.title="Rectangle marker",i}(b),x=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.widths=[],r.widthBoxes=[],r.widths=i,r.currentWidth=o,r.setCurrentWidth=r.setCurrentWidth.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentWidth(i,o)})),e.appendChild(o);var s=document.createElement("div");s.innerText=i.toString(),s.style.marginRight="5px",o.appendChild(s);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.display="flex",r.style.alignItems="center";var n=document.createElement("hr");n.style.minWidth="20px",n.style.border="0px",n.style.borderTop=i+"px solid "+t.uiStyleSettings.toolboxColor,n.style.flexGrow="2",r.appendChild(n),o.appendChild(r),t.widthBoxes.push(o)})),e},i.prototype.setCurrentWidth=function(t,e){var i=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},i}(y),k=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.styles=[],r.styleBoxes=[],r.styles=i,r.currentStyle=o,r.setCurrentStyle=r.setCurrentStyle.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.overflow="hidden",o.style.maxWidth=100/t.styles.length-5+"%",o.style.borderColor=i===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentStyle(i,o)})),e.appendChild(o);var s=document.createElement("div");s.style.minHeight="20px",s.style.flexGrow="2",s.style.overflow="hidden";var r='\n \n ";s.innerHTML=r,o.appendChild(s),t.styleBoxes.push(o)})),e},i.prototype.setCurrentStyle=function(t,e){var i=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},i}(y),w=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="FrameMarker",i.title="Frame marker",i.icon='',i}(S),B=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},E=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.x1=0,s.y1=0,s.x2=0,s.y2=0,s.defaultLength=50,s.manipulationStartX=0,s.manipulationStartY=0,s.manipulationStartX1=0,s.manipulationStartY1=0,s.manipulationStartX2=0,s.manipulationStartY2=0,s.setupControlBox(),s}return e(i,t),i.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(i)?this.activeGrip=this.grip1:this.grip2.ownsTarget(i)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},i.prototype.pointerUp=function(e){var i=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(e),this._state="select","creating"===i&&this.onMarkerCreated&&this.onMarkerCreated(this)},i.prototype.adjustVisual=function(){},i.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},i.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},i.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},i.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},i.prototype.setupControlBox=function(){this.controlBox=r.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},i.prototype.adjustControlBox=function(){this.positionGrips()},i.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},i.prototype.createGrip=function(){var t=new m;return t.visual.transform.baseVal.appendItem(r.createTransform()),this.controlBox.appendChild(t.visual),t},i.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},i.prototype.positionGrip=function(t,e,i){var o=t.transform.baseVal.getItem(0);o.setTranslate(e,i),t.transform.baseVal.replaceItem(o,0)},i.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.x1=i.x1,this.y1=i.y1,this.x2=i.x2,this.y2=i.y2},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.x1=this.x1*e,this.y1=this.y1*i,this.x2=this.x2*e,this.y2=this.y2*i,this.adjustVisual(),this.adjustControlBox()},i}(f),M=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.setStrokeColor=s.setStrokeColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.selectorLine=r.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=r.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},i.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),r.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),r.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),r.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.createVisual(),this.adjustVisual()},i.typeName="LineMarker",i.title="Line marker",i.icon='',i}(E),T=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.fonts=[],r.fontBoxes=[],r.fonts=i,r.currentFont=o,r.setCurrentFont=r.setCurrentFont.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(i){var o=document.createElement("div");o.style.display="inline-block",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.overflow="hidden",o.style.maxWidth=100/t.fonts.length-5+"%",o.style.borderColor=i===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentFont(i,o)})),e.appendChild(o);var s=document.createElement("div");s.style.display="flex",s.style.minHeight="20px",s.style.flexGrow="2",s.style.fontFamily=i,s.style.overflow="hidden";var r=document.createElement("div");r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",r.innerHTML="The quick brown fox jumps over the lazy dog",s.appendChild(r),o.appendChild(s),t.fontBoxes.push(o)})),e},i.prototype.setCurrentFont=function(t,e){var i=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},i}(y),P=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.color="transparent",s.padding=5,s.DEFAULT_TEXT="请输入文本",s.text=s.DEFAULT_TEXT,s.isMoved=!1,s.color=o.defaultColor,s.fontFamily=o.defaultFontFamily,s.defaultSize={x:100,y:30},s.setColor=s.setColor.bind(s),s.setFont=s.setFont.bind(s),s.renderText=s.renderText.bind(s),s.sizeText=s.sizeText.bind(s),s.textEditDivClicked=s.textEditDivClicked.bind(s),s.showTextEditor=s.showTextEditor.bind(s),s.setSize=s.setSize.bind(s),s.positionTextEditor=s.positionTextEditor.bind(s),s.colorPanel=new g("Color",o.defaultColorSet,o.defaultColor),s.colorPanel.onColorChanged=s.setColor,s.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),s.fontFamilyPanel.onFontChanged=s.setFont,s}return e(i,t),i.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var i=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(i=!0)})),i},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.bgRectangle=r.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=r.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(r.createTransform()),this.textElement.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(e){t.textElement.appendChild(r.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},i.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var i=(1*this.width-this.width*this.padding*2/100)/t.width,o=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(i,o)}return e},i.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),i=0,o=0;return e.width>0&&e.height>0&&(i=(this.width-e.width*t)/2,o=this.height/2-e.height*t/2),{x:i,y:o}},i.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),i=this.getTextPosition(e);i.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+i.x+"px, "+i.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(i.x,i.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},i.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},i.prototype.pointerUp=function(e){var i=this.state;"creating"===i&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===i||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),i=window.getSelection();if(!i.rangeCount)return!1;i.deleteFromDocument(),i.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},i.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),i=this.textElement.getBBox(),o={x:i.width*t,y:i.height*t};e.x-=o.x/2,e.y-=o.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},i.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},i.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},i.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},i.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},i.prototype.setColor=function(t){this.textElement&&r.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},i.prototype.setFont=function(t){this.textElement&&r.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},i.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},i.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){var i=e;this.color=i.color,this.fontFamily=i.fontFamily,this.padding=i.padding,this.text=i.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize(),this.sizeText(),this.positionTextEditor()},i.typeName="TextMarker",i.title="Text marker",i.icon='',i}(b),L=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.color="transparent",s.lineWidth=3,s.drawing=!1,s.pixelRatio=1,s.color=o.defaultColor,s.lineWidth=o.defaultStrokeWidth,s.pixelRatio=o.freehandPixelRatio,s.setColor=s.setColor.bind(s),s.addCanvas=s.addCanvas.bind(s),s.finishCreation=s.finishCreation.bind(s),s.setLineWidth=s.setLineWidth.bind(s),s.colorPanel=new g("Color",o.defaultColorSet,o.defaultColor),s.colorPanel.onColorChanged=s.setColor,s.lineWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.lineWidthPanel.onWidthChanged=s.setLineWidth,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.drawingImage=r.createImage(),this.visual.appendChild(this.drawingImage);var t=r.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,i)},i.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),r.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},i.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},i.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},i.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},i.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},i.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],i=e[0],o=e[1],s=e[2],r=e[3],n=!1,a=0;a0&&(n=!0,ar&&(r=a),h>s&&(s=h))}if(n){this.left=i/this.pixelRatio,this.top=o/this.pixelRatio,this.width=(s-i)/this.pixelRatio,this.height=(r-o)/this.pixelRatio;var l=document.createElement("canvas");l.width=s-i,l.height=r-o,l.getContext("2d").putImageData(this.canvasContext.getImageData(i,o,s-i,r-o),0,0),this.drawingImgUrl=l.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},i.prototype.setDrawingImage=function(){r.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),r.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},i.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},i.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setDrawingImage()},i.typeName="FreehandMarker",i.title="Freehand marker",i.icon='',i}(b),D=function(t){function i(e,i,o){var s=t.call(this,e,o||'')||this;return s.typeBoxes=[],s.currentType=i,s.setCurrentType=s.setCurrentType.bind(s),s}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var i=function(i){var s="both";switch(i){case 0:s="both";break;case 1:s="start";break;case 2:s="end";break;case 3:s="none"}var r=document.createElement("div");if(r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=s===o.currentType?o.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentType(s,r)})),e.appendChild(r),"both"===s||"start"===s){var n=document.createElement("div");n.style.display="flex",n.style.alignItems="center",n.style.minHeight="20px",n.innerHTML='\n \n ',n.style.marginLeft="5px",r.appendChild(n)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var h=document.createElement("hr");if(h.style.minWidth="20px",h.style.border="0px",h.style.borderTop="3px solid "+(void 0!==o.uiStyleSettings?o.uiStyleSettings.toolboxColor:"#eeeeee"),h.style.flexGrow="2",a.appendChild(h),r.appendChild(a),"both"===s||"end"===s){var l=document.createElement("div");l.style.display="flex",l.style.alignItems="center",l.style.minHeight="20px",l.innerHTML='\n \n ',l.style.marginRight="5px",r.appendChild(l)}o.typeBoxes.push(r)},o=this,s=0;s<4;s++)i(s);return e},i.prototype.setCurrentType=function(t,e){var i=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},i}(y),A=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.arrowType="end",s.arrowBaseHeight=10,s.arrowBaseWidth=10,s.getArrowPoints=s.getArrowPoints.bind(s),s.setArrowType=s.setArrowType.bind(s),s.arrowTypePanel=new D("Arrow type","end"),s.arrowTypePanel.onArrowTypeChanged=s.setArrowType,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},i.prototype.getArrowPoints=function(t,e){var i=this.arrowBaseWidth+2*this.strokeWidth,o=this.arrowBaseHeight+2*this.strokeWidth;return t-i/2+","+(e+o/2)+" "+t+","+(e-o/2)+" "+(t+i/2)+","+(e+o/2)},i.prototype.createTips=function(){this.arrow1=r.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=r.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(r.createTransform()),this.visual.appendChild(this.arrow2)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),"creating"===this.state&&this.createTips()},i.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",r.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),r.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var e=0;Math.abs(this.x1-this.x2)>.1&&(e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var i=this.arrow1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(i,0);var o=this.arrow2.transform.baseVal.getItem(0);o.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(o,0)}},i.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.arrowType=i.arrowType,this.createTips(),this.adjustVisual()},i.typeName="ArrowMarker",i.title="Arrow marker",i.icon='',i}(M),_=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.fillColor=o.defaultFillColor,s.strokeWidth=0,s.fillPanel=new g("Color",o.defaultColorSet,o.defaultFillColor),s.fillPanel.onColorChanged=s.setFillColor,s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="CoverMarker",i.title="Cover marker",i.icon='',i}(S),I=function(t){function i(e,i,o,s){var r=t.call(this,e,s||'')||this;return r.opacities=[],r.opacityBoxes=[],r.opacities=i,r.currentOpacity=o,r.setCurrentOpacity=r.setCurrentOpacity.bind(r),r}return e(i,t),i.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(i){var o=document.createElement("div");o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentOpacity(i,o)})),e.appendChild(o);var s=document.createElement("div");s.innerText=100*i+"%",o.appendChild(s),t.opacityBoxes.push(o)})),e},i.prototype.setCurrentOpacity=function(t,e){var i=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?i.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},i}(y),W=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.setOpacity=s.setOpacity.bind(s),s.fillColor=o.defaultHighlightColor,s.strokeWidth=0,s.opacity=o.defaultHighlightOpacity,s.fillPanel=new g("Color",o.defaultColorSet,s.fillColor),s.fillPanel.onColorChanged=s.setFillColor,s.opacityPanel=new I("Opacity",o.defaultOpacitySteps,s.opacity),s.opacityPanel.onOpacityChanged=s.setOpacity,s}return e(i,t),i.prototype.setOpacity=function(t){this.opacity=t,this.visual&&r.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="HighlightMarker",i.title="Highlight marker",i.icon='',i}(_),N='',H='',z=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.bgColor="transparent",s.tipPosition={x:0,y:0},s.tipBase1Position={x:0,y:0},s.tipBase2Position={x:0,y:0},s.tipMoving=!1,s.color=o.defaultStrokeColor,s.bgColor=o.defaultFillColor,s.fontFamily=o.defaultFontFamily,s.defaultSize={x:100,y:30},s.setBgColor=s.setBgColor.bind(s),s.getTipPoints=s.getTipPoints.bind(s),s.positionTip=s.positionTip.bind(s),s.setTipPoints=s.setTipPoints.bind(s),s.colorPanel=new g("Text color",o.defaultColorSet,s.color,N),s.colorPanel.onColorChanged=s.setColor,s.bgColorPanel=new g("Fill color",o.defaultColorSet,s.bgColor,H),s.bgColorPanel.onColorChanged=s.setBgColor,s.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),s.fontFamilyPanel.onFontChanged=s.setFont,s.tipGrip=new m,s.tipGrip.visual.transform.baseVal.appendItem(r.createTransform()),s.controlBox.appendChild(s.tipGrip.visual),s}return e(i,t),i.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},i.prototype.createTip=function(){r.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=r.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},i.prototype.pointerDown=function(e,i){"new"===this.state&&t.prototype.pointerDown.call(this,e,i),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(i)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,i)},i.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var i="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(i),this.positionTip()}},i.prototype.manipulate=function(e){if(this.tipMoving){var i=this.unrotatePoint(e);this.tipPosition={x:i.x-this.manipulationStartLeft,y:i.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},i.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(r.setAttributes(this.bgRectangle,[["fill",t]]),r.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},i.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},i.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),i=this.height/5;t&&(this.tipPosition={x:e+i/2,y:this.height+20});var o=Math.atan(this.height/2/(this.width/2));if(this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2){o.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),i=this.tip1.transform.baseVal.getItem(0);i.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(i,0);var o=this.tip2.transform.baseVal.getItem(0);o.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(o,0)}},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},i.typeName="MeasurementMarker",i.title="Measurement marker",i.icon='',i}(M),V=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokePanel.colors=o.defaultColorSet,s.fillColor="transparent",s}return e(i,t),Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=t.prototype.getState.call(this);return e.typeName=i.typeName,e},i.typeName="EllipseFrameMarker",i.title="Ellipse frame marker",i.icon='',i}(R),G=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),F=function(t){function i(e,i,o){var s=t.call(this,e,i,o)||this;return s.strokeColor="transparent",s.strokeWidth=0,s.strokeDasharray="",s.curveX=0,s.curveY=0,s.manipulationStartCurveX=0,s.manipulationStartCurveY=0,s.setStrokeColor=s.setStrokeColor.bind(s),s.setStrokeWidth=s.setStrokeWidth.bind(s),s.setStrokeDasharray=s.setStrokeDasharray.bind(s),s.positionGrips=s.positionGrips.bind(s),s.addControlGrips=s.addControlGrips.bind(s),s.adjustVisual=s.adjustVisual.bind(s),s.setupControlBox=s.setupControlBox.bind(s),s.resize=s.resize.bind(s),s.strokeColor=o.defaultColor,s.strokeWidth=o.defaultStrokeWidth,s.strokeDasharray=o.defaultStrokeDasharray,s.strokePanel=new g("Line color",o.defaultColorSet,o.defaultColor),s.strokePanel.onColorChanged=s.setStrokeColor,s.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),s.strokeWidthPanel.onWidthChanged=s.setStrokeWidth,s.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),s.strokeStylePanel.onStyleChanged=s.setStrokeDasharray,s}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},i.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.selectorCurve=r.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=r.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(i)&&(this.activeGrip=this.curveGrip,this._state="resize")},i.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),r.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),r.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),r.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},i.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=r.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=r.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},i.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},i.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},i.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},i.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},i.prototype.scale=function(e,i){this.curveX=this.curveX*e,this.curveY=this.curveY*i,t.prototype.scale.call(this,e,i)},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return e.typeName=i.typeName,e},i.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var i=e;this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.curveX=i.curveX,this.curveY=i.curveY,this.createVisual(),this.adjustVisual()},i.typeName="CurveMarker",i.title="Curve marker",i.icon='',i}(E),j=function(t){function i(e,i,o){var r=t.call(this,e,i,o)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.textColor="transparent",r.fontSize="1rem",r.isMoved=!1,r.captionText="Caption",r.PADDING=5,r.captionBoxWidth=0,r.captionBoxHeight=0,r.strokeColor=o.defaultColor,r.strokeWidth=o.defaultStrokeWidth,r.strokeDasharray=o.defaultStrokeDasharray,r.fillColor=o.defaultFillColor,r.textColor=o.defaultStrokeColor,r.fontFamily=o.defaultFontFamily,r.fontSize=o.defaultCaptionFontSize,r.captionText=o.defaultCaptionText,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r.sizeCaption=r.sizeCaption.bind(r),r.setCaptionText=r.setCaptionText.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.finishTextEditing=r.finishTextEditing.bind(r),r.setFont=r.setFont.bind(r),r.setTextColor=r.setTextColor.bind(r),r.strokePanel=new g("Line color",s(o.defaultColorSet,["transparent"]),r.strokeColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new g("Fill color",s(o.defaultColorSet,["transparent"]),r.fillColor,H),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new x("Line width",o.defaultStrokeWidths,o.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new k("Line style",o.defaultStrokeDasharrays,o.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.fontFamilyPanel=new T("Font",o.defaultFontFamilies,o.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.textColorPanel=new g("Text color",o.defaultColorSet,r.textColor,N),r.textColorPanel.onColorChanged=r.setTextColor,r}return e(i,t),i.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.frame&&e!==this.captionBg&&e!==this.captionElement)},i.prototype.createVisual=function(){this.visual=r.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=r.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=r.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=r.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},i.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},i.prototype.pointerDown=function(e,i){t.prototype.pointerDown.call(this,e,i),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},i.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},i.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},i.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),r.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),r.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},i.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(e){"Enter"===e.key&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},i.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},i.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},i.prototype.setFont=function(t){this.captionElement&&r.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},i.prototype.setTextColor=function(t){this.captionElement&&r.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},i.prototype.setSize=function(){t.prototype.setSize.call(this),r.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},i.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},i.prototype.dblClick=function(e,i){t.prototype.dblClick.call(this,e,i),this.showTextEditor()},i.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&r.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},i.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&r.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},i.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&r.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},i.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&r.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(i.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),i.prototype.getState=function(){var e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},t.prototype.getState.call(this));return e.typeName=this.typeName,e},i.prototype.restoreState=function(e){var i=e;this.fillColor=i.fillColor,this.strokeColor=i.strokeColor,this.strokeWidth=i.strokeWidth,this.strokeDasharray=i.strokeDasharray,this.textColor=i.textColor,this.fontFamily=i.fontFamily,this.captionText=i.captionText,this.fontSize=i.fontSize,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},i.prototype.scale=function(e,i){t.prototype.scale.call(this,e,i),this.setSize()},i.typeName="CaptionFrameMarker",i.title="Caption frame marker",i.icon='',i}(b),U=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Y=function(t){function i(e,i,o){var s=t.call(this,e,!1)||this;return s.dataUrl=i,s.state=o,s}return e(i,t),i}(U),X=function(t){function i(e,i,o){void 0===o&&(o=!1);var s=t.call(this,e,o)||this;return s.marker=i,s}return e(i,t),i}(U),Z=function(){function t(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var i=this[t].indexOf(e);i>-1&&this[t].splice(i,1)},t}(),K=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new B,this._isOpen=!1,this.undoRedoManager=new G,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Z,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new l(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[w,L,A,P,V,R,W,z,O,_,M,F,j]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[w,L,A,P,R,W,z]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[w,L,A,P,W]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var i=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==i&&e._availableMarkerTypes.push(i)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),n.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==h.styleSheetRoot&&(this.styles.styleSheetRoot=h.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new U(t))}))},t.prototype.render=function(){return i(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new a).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var i=!1;t||this.eventListeners.beforeclose.forEach((function(t){var o=new U(e,!0);t(o),o.defaultPrevented&&(i=!0)})),i||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new U(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],i=0;ithis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,i=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=void 0!==this.settings.uiOffsetTop?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new d(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),void 0===this.settings.uiOffsetTop&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(i){var o=new X(t,t._currentMarker,!0);i(o),o.defaultPrevented&&(e=!0)})),!e){var i=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(e){return e(new X(t,i))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(i){var o=new X(t,void 0,!0);i(o),o.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var i=function(e){var i=o.markers[e];o.setCurrentMarker(o.markers[e]),o._currentMarker.dispose(),o.markerImage.removeChild(o._currentMarker.container),o.markers.splice(o.markers.indexOf(o._currentMarker),1),o.eventListeners.markerdelete.forEach((function(e){return e(new X(t,i))}))},o=this,s=this.markers.length-1;s>=0;s--)i(s);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),i=this.undoRedoManager.getLastUndoStep();if(!i||i.width===e.width&&i.height===e.height){var o=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),o1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var i=this.markerImage.getBoundingClientRect();return{x:(t-i.left)/this.zoomLevel,y:(e-i.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},t.prototype.addLicenseKey=function(t){n.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new U(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new U(t))})))},t.instanceCounter=0,t}(); +//# sourceMappingURL=markerjs2.esm.js.map + + +/***/ }) + +}]); \ No newline at end of file diff --git a/color.less b/color.less index 9082badfe0..fa8ab54038 100644 --- a/color.less +++ b/color.less @@ -563,10 +563,10 @@ a.ant-btn-disabled:active > a:only-child::after {background: transparent;} .ant-comment-actions > li > span {color: @text-color-secondary;} .ant-comment-actions > li > span:hover {color: #595959;} .ant-picker-status-error.ant-picker, .ant-picker-status-error.ant-picker:not([disabled]):hover {background-color: #fff;border-color: @error-color;} -.ant-picker-status-error.ant-picker-focused, .ant-picker-status-error.ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(190, 63, 14, 0.2);border-right-width: 1px;} +.ant-picker-status-error.ant-picker-focused, .ant-picker-status-error.ant-picker:focus {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(32, 219, 81, 0.2);border-right-width: 1px;} .ant-picker-status-error.ant-picker .ant-picker-active-bar {background: color(~`colorPalette("@{error-color}", 5)`);} .ant-picker-status-warning.ant-picker, .ant-picker-status-warning.ant-picker:not([disabled]):hover {background-color: #fff;border-color: @warning-color;} -.ant-picker-status-warning.ant-picker-focused, .ant-picker-status-warning.ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 159, 183, 0.2);border-right-width: 1px;} +.ant-picker-status-warning.ant-picker-focused, .ant-picker-status-warning.ant-picker:focus {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(15, 69, 124, 0.2);border-right-width: 1px;} .ant-picker-status-warning.ant-picker .ant-picker-active-bar {background: color(~`colorPalette("@{warning-color}", 5)`);} .ant-picker {color: @text-color;background: #fff;border: 1px solid @border-color-base;border-radius: 2px;} .ant-picker:hover, .ant-picker-focused {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px;} @@ -788,16 +788,16 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .anticon.ant-input-clear-icon:hover, .ant-input-clear-icon:hover {color: @text-color-secondary;} .anticon.ant-input-clear-icon:active, .ant-input-clear-icon:active {color: @text-color;} .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {background: #fff;border-color: @error-color;} -.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(190, 63, 14, 0.2);border-right-width: 1px;} +.ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-error:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(32, 219, 81, 0.2);border-right-width: 1px;} .ant-input-status-error .ant-input-prefix {color: @error-color;} .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover {background: #fff;border-color: @warning-color;} -.ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 159, 183, 0.2);border-right-width: 1px;} +.ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus, .ant-input-status-warning:not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(15, 69, 124, 0.2);border-right-width: 1px;} .ant-input-status-warning .ant-input-prefix {color: @warning-color;} .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {background: #fff;border-color: @error-color;} -.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(190, 63, 14, 0.2);border-right-width: 1px;} +.ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(32, 219, 81, 0.2);border-right-width: 1px;} .ant-input-affix-wrapper-status-error .ant-input-prefix {color: @error-color;} .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover {background: #fff;border-color: @warning-color;} -.ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 159, 183, 0.2);border-right-width: 1px;} +.ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus, .ant-input-affix-wrapper-status-warning:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(15, 69, 124, 0.2);border-right-width: 1px;} .ant-input-affix-wrapper-status-warning .ant-input-prefix {color: @warning-color;} .ant-input-group-wrapper-status-error .ant-input-group-addon {color: @error-color;border-color: @error-color;} .ant-input-group-wrapper-status-warning .ant-input-group-addon {color: @warning-color;border-color: @warning-color;} @@ -894,16 +894,16 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-input-number-affix-wrapper > div.ant-input-number {border: none;} .ant-input-number-affix-wrapper > div.ant-input-number.ant-input-number-focused {box-shadow: none !important;} .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover {background: #fff;border-color: @error-color;} -.ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(190, 63, 14, 0.2);border-right-width: 1px;} +.ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-error:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(32, 219, 81, 0.2);border-right-width: 1px;} .ant-input-number-status-error .ant-input-number-prefix {color: @error-color;} .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:hover {background: #fff;border-color: @warning-color;} -.ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 159, 183, 0.2);border-right-width: 1px;} +.ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number:focus, .ant-input-number-status-warning:not(.ant-input-number-disabled):not(.ant-input-number-borderless).ant-input-number-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(15, 69, 124, 0.2);border-right-width: 1px;} .ant-input-number-status-warning .ant-input-number-prefix {color: @warning-color;} .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover {background: #fff;border-color: @error-color;} -.ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(190, 63, 14, 0.2);border-right-width: 1px;} +.ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-error:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(32, 219, 81, 0.2);border-right-width: 1px;} .ant-input-number-affix-wrapper-status-error .ant-input-number-prefix {color: @error-color;} .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover {background: #fff;border-color: @warning-color;} -.ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 159, 183, 0.2);border-right-width: 1px;} +.ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus, .ant-input-number-affix-wrapper-status-warning:not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(15, 69, 124, 0.2);border-right-width: 1px;} .ant-input-number-affix-wrapper-status-warning .ant-input-number-prefix {color: @warning-color;} .ant-input-number-group-wrapper-status-error .ant-input-number-group-addon {color: @error-color;border-color: @error-color;} .ant-input-number-group-wrapper-status-warning .ant-input-number-group-addon {color: @warning-color;border-color: @warning-color;} @@ -1024,10 +1024,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-list-grid .ant-col > .ant-list-item {border-bottom: none;} .ant-list-bordered {border: 1px solid @border-color-base;border-radius: 2px;} .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:hover {background: #fff;border-color: @error-color;} -.ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(190, 63, 14, 0.2);border-right-width: 1px;} +.ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-error:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(32, 219, 81, 0.2);border-right-width: 1px;} .ant-mentions-status-error .ant-input-prefix {color: @error-color;} .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:hover {background: #fff;border-color: @warning-color;} -.ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 159, 183, 0.2);border-right-width: 1px;} +.ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions:focus, .ant-mentions-status-warning:not(.ant-mentions-disabled):not(.ant-mentions-borderless).ant-mentions-focused {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(15, 69, 124, 0.2);border-right-width: 1px;} .ant-mentions-status-warning .ant-input-prefix {color: @warning-color;} .ant-mentions {color: @text-color;background-color: #fff;background-image: none;border: 1px solid @border-color-base;border-radius: 2px;} .ant-mentions::placeholder {color: #bfbfbf;} @@ -1360,9 +1360,9 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-select-multiple .ant-select-selection-item-remove {color: inherit;color: @text-color-secondary;} .ant-select-multiple .ant-select-selection-item-remove:hover {color: rgba(0, 0, 0, 0.75);} .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {background-color: #fff;border-color: @error-color !important;} -.ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(190, 63, 14, 0.2);border-right-width: 1px;} +.ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-error.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{error-color}", 5)`);box-shadow: 0 0 0 2px rgba(32, 219, 81, 0.2);border-right-width: 1px;} .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector {background-color: #fff;border-color: @warning-color !important;} -.ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(90, 159, 183, 0.2);border-right-width: 1px;} +.ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-open .ant-select-selector, .ant-select-status-warning.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer).ant-select-focused .ant-select-selector {border-color: color(~`colorPalette("@{warning-color}", 5)`);box-shadow: 0 0 0 2px rgba(15, 69, 124, 0.2);border-right-width: 1px;} .ant-select {color: @text-color;} .ant-select:not(.ant-select-customize-input) .ant-select-selector {background-color: #fff;border: 1px solid @border-color-base;border-radius: 2px;} .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {border-color: color(~`colorPalette("@{primary-color}", 5)`);box-shadow: 0 0 0 2px fade(@primary-color, 20%);border-right-width: 1px;} diff --git a/p__Classrooms__Lists__CommonHomework__Detail__index.async.js b/p__Classrooms__Lists__CommonHomework__Detail__index.async.js index dc3d59f5da..0add5f139a 100644 --- a/p__Classrooms__Lists__CommonHomework__Detail__index.async.js +++ b/p__Classrooms__Lists__CommonHomework__Detail__index.async.js @@ -395,10 +395,12 @@ var spin = __webpack_require__(11382); ;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var ImageDimensionsmodules = ({"imageDimensions":"imageDimensions___a7crR","img":"img___Kroat"}); -// EXTERNAL MODULE: ./node_modules/markerjs2/markerjs2.esm.js -var markerjs2_esm = __webpack_require__(50290); +// EXTERNAL MODULE: ./node_modules/markerjs3/markerjs2.esm.js +var markerjs2_esm = __webpack_require__(20507); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__(84519); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(29427); // EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(85893); ;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.tsx @@ -414,6 +416,7 @@ var jsx_runtime = __webpack_require__(85893); + var ImageDimensions = function ImageDimensions(_ref) { var data = _ref.data, className = _ref.className, @@ -427,21 +430,58 @@ var ImageDimensions = function ImageDimensions(_ref) { _useState2 = slicedToArray_default()(_useState, 2), loading = _useState2[0], setLoading = _useState2[1]; + var _useState3 = (0,react.useState)('正在加载中'), + _useState4 = slicedToArray_default()(_useState3, 2), + loadingText = _useState4[0], + setLoadingText = _useState4[1]; (0,react.useEffect)(function () { if (data !== null && data !== void 0 && data.visible) { document.body.setAttribute('data-custom', 'height'); } else { document.body.removeAttribute('data-custom'); } + if (data !== null && data !== void 0 && data.src) { + getImg(); + } }, [data === null || data === void 0 ? void 0 : data.visible]); - var onSave = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(event) { - var res, result; + var getImg = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: setLoading(true); - _context.next = 3; + setLoadingText('正在加载中'); + _context.next = 4; + return (0,util/* toDataUrl */.ZJ)(data === null || data === void 0 ? void 0 : data.src); + case 4: + res = _context.sent; + imgRef.current.src = ""; + imgRef.current.src = res; + imgRef.current.onload = function () { + initMarkerjs(); + }; + setLoading(false); + setLoadingText(''); + case 10: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function getImg() { + return _ref2.apply(this, arguments); + }; + }(); + var onSave = /*#__PURE__*/function () { + var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(event) { + var res, result; + return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + setLoading(true); + setLoadingText('正在保存中'); + _context2.next = 4; return (0,fetch/* default */.ZP)('/api/attachments.json', { method: 'post', body: { @@ -450,13 +490,13 @@ var ImageDimensions = function ImageDimensions(_ref) { file: event.dataUrl } }); - case 3: - res = _context.sent; + case 4: + res = _context2.sent; if (!(res !== null && res !== void 0 && res.id)) { - _context.next = 9; + _context2.next = 10; break; } - _context.next = 7; + _context2.next = 8; return (0,fetch/* default */.ZP)("/api/attachments/".concat(data.id, "/add_subitem.json"), { method: 'post', body: { @@ -464,21 +504,22 @@ var ImageDimensions = function ImageDimensions(_ref) { settings: JSON.stringify(event.state) } }); - case 7: - result = _context.sent; + case 8: + result = _context2.sent; if (result.status === 0) { onOk(); } - case 9: - setLoading(false); case 10: + setLoading(false); + setLoadingText(''); + case 12: case "end": - return _context.stop(); + return _context2.stop(); } - }, _callee); + }, _callee2); })); return function onSave(_x) { - return _ref2.apply(this, arguments); + return _ref3.apply(this, arguments); }; }(); var dealDom = function dealDom() { @@ -553,22 +594,21 @@ var ImageDimensions = function ImageDimensions(_ref) { style: style, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, { spinning: loading, - tip: "\u6B63\u5728\u4FDD\u5B58\u4E2D...", + tip: loadingText, style: { position: 'absolute' } }), /*#__PURE__*/(0,jsx_runtime.jsx)("img", { - onLoad: initMarkerjs, className: ImageDimensionsmodules.img, - ref: imgRef, - src: data === null || data === void 0 ? void 0 : data.src + ref: imgRef + // crossOrigin='anonymous' + // src={data?.src} })] }) }); }; + /* harmony default export */ var components_ImageDimensions = (ImageDimensions); -// EXTERNAL MODULE: ./src/utils/util.tsx -var util = __webpack_require__(29427); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(59758); ;// CONCATENATED MODULE: ./src/components/FileDownloadList/index.tsx @@ -696,6 +736,7 @@ var FileDownloadList = function FileDownloadList(_ref) { className: classnames_default()(FileDownloadListmodules.list, className), style: style, children: dataSource.map(function (item, index) { + var _item$subitem3, _item$subitem4; return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: FileDownloadListmodules.row, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { @@ -729,7 +770,23 @@ var FileDownloadList = function FileDownloadList(_ref) { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-yulan" }), "\u9884\u89C8"] - })] + }), ['image'].includes(item === null || item === void 0 ? void 0 : item.file_type) && showDimensions && (authority ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: FileDownloadListmodules.annotation, + onClick: function onClick() { + return handleAnnotation(item); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-pizhu" + }), (_item$subitem3 = item.subitem) !== null && _item$subitem3 !== void 0 && _item$subitem3.id ? '修改批注' : '批注'] + }) : ((_item$subitem4 = item.subitem) === null || _item$subitem4 === void 0 ? void 0 : _item$subitem4.id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: FileDownloadListmodules.annotation, + onClick: function onClick() { + return handleCheckAnnotation(item); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-chakanlaoshipizhu1" + }), "\u67E5\u770B\u8001\u5E08\u6279\u6CE8"] + }))] }, index); }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, { @@ -6317,6 +6374,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) { }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", + style: { + pointerEvents: "none" + }, children: !showReply && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { size: "large", className: "current", diff --git a/p__Classrooms__Lists__CommonHomework__Detail__index.chunk.css b/p__Classrooms__Lists__CommonHomework__Detail__index.chunk.css index c981fa7980..28587beec0 100644 --- a/p__Classrooms__Lists__CommonHomework__Detail__index.chunk.css +++ b/p__Classrooms__Lists__CommonHomework__Detail__index.chunk.css @@ -1046,7 +1046,7 @@ span.CodeMirror-selectedtext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - max-width: 880px; + max-width: 760px; } .list___KhJas .row___GGtIx .title___o_xqf i { font-size: 13px; @@ -1103,7 +1103,7 @@ span.CodeMirror-selectedtext { .imageDimensions___a7crR { display: flex; justify-content: center; - align-items: center; + align-items: start; position: fixed; width: 100%; height: 100%; @@ -1111,6 +1111,7 @@ span.CodeMirror-selectedtext { top: 0; z-index: 4; background: rgba(0, 0, 0, 0.5); + padding-top: 60px; } .imageDimensions___a7crR .img___Kroat { visibility: hidden; diff --git a/p__Classrooms__Lists__CommonHomework__Review__index.async.js b/p__Classrooms__Lists__CommonHomework__Review__index.async.js index b8342ba225..8b5d853580 100644 --- a/p__Classrooms__Lists__CommonHomework__Review__index.async.js +++ b/p__Classrooms__Lists__CommonHomework__Review__index.async.js @@ -555,40 +555,48 @@ var ExeriseReview = function ExeriseReview(_ref) { _useState4 = slicedToArray_default()(_useState3, 2), showApply = _useState4[0], setShowApply = _useState4[1]; + var _useState5 = (0,react.useState)({ + show: false, + type: 0, + active: null + }), + _useState6 = slicedToArray_default()(_useState5, 2), + showApplys = _useState6[0], + setShowApplys = _useState6[1]; var _Modal$useModal = es_modal/* default.useModal */.Z.useModal(), _Modal$useModal2 = slicedToArray_default()(_Modal$useModal, 2), modal = _Modal$useModal2[0], contextHolder = _Modal$useModal2[1]; - var _useState5 = (0,react.useState)({ - last: false - }), - _useState6 = slicedToArray_default()(_useState5, 2), - nextComment = _useState6[0], - setNextComment = _useState6[1]; var _useState7 = (0,react.useState)({ last: false }), _useState8 = slicedToArray_default()(_useState7, 2), - Previous = _useState8[0], - setPrevious = _useState8[1]; + nextComment = _useState8[0], + setNextComment = _useState8[1]; + var _useState9 = (0,react.useState)({ + last: false + }), + _useState10 = slicedToArray_default()(_useState9, 2), + Previous = _useState10[0], + setPrevious = _useState10[1]; var _Form$useForm = es_form/* default.useForm */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; - var _useState9 = (0,react.useState)(false), - _useState10 = slicedToArray_default()(_useState9, 2), - isshow = _useState10[0], - setisshow = _useState10[1]; - var _useState11 = (0,react.useState)(''), + var _useState11 = (0,react.useState)(false), _useState12 = slicedToArray_default()(_useState11, 2), - comment = _useState12[0], - setcomment = _useState12[1]; - var _useState13 = (0,react.useState)({ + isshow = _useState12[0], + setisshow = _useState12[1]; + var _useState13 = (0,react.useState)(''), + _useState14 = slicedToArray_default()(_useState13, 2), + comment = _useState14[0], + setcomment = _useState14[1]; + var _useState15 = (0,react.useState)({ content: "", type: "" }), - _useState14 = slicedToArray_default()(_useState13, 2), - data = _useState14[0], - setData = _useState14[1]; + _useState16 = slicedToArray_default()(_useState15, 2), + data = _useState16[0], + setData = _useState16[1]; var monacoValueRef = (0,react.useRef)(); var location = (0,_umi_production_exports.useLocation)(); var getData = function getData() { @@ -1279,6 +1287,9 @@ var ExeriseReview = function ExeriseReview(_ref) { }); }, children: "\u56DE\u590D" + }), !v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + className: "c-light-black ml10", + children: "\u5931\u6548" })] }) : /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { children: [v["delete"] && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { @@ -1678,9 +1689,6 @@ var ExeriseReview = function ExeriseReview(_ref) { }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-light-black ml10", children: moment_default()(v === null || v === void 0 ? void 0 : v.comment_time).format('YYYY-MM-DD HH:mm') - }), v.score !== null && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { - className: "ml30 c-orange", - children: [v.score, "\u5206"] })] }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: k === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { @@ -1693,7 +1701,7 @@ var ExeriseReview = function ExeriseReview(_ref) { }), v.can_appeal && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-blue current", onClick: function onClick() { - setShowApply({ + setShowApplys({ show: true, type: 1, active: k @@ -1703,7 +1711,7 @@ var ExeriseReview = function ExeriseReview(_ref) { }), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-blue current ml10", onClick: function onClick() { - return setShowApply({ + return setShowApplys({ show: true, type: 0, active: k @@ -1721,7 +1729,7 @@ var ExeriseReview = function ExeriseReview(_ref) { }), v.can_appeal && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-blue current", onClick: function onClick() { - setShowApply({ + setShowApplys({ show: true, type: 1, active: k @@ -1731,7 +1739,7 @@ var ExeriseReview = function ExeriseReview(_ref) { }), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-blue current ml10", onClick: function onClick() { - return setShowApply({ + return setShowApplys({ show: true, type: 0, active: k @@ -1973,7 +1981,7 @@ var ExeriseReview = function ExeriseReview(_ref) { })] })] })] - }), showApply.show && k === showApply.active && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { + }), showApplys.show && k === showApplys.active && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { className: ['bg-white'].join(' '), children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, { onChange: function onChange(v) { @@ -1993,7 +2001,7 @@ var ExeriseReview = function ExeriseReview(_ref) { return regeneratorRuntime_default()().wrap(function _callee13$(_context13) { while (1) switch (_context13.prev = _context13.next) { case 0: - setShowApply({ + setShowApplys({ show: false, type: 0, active: k @@ -2022,7 +2030,7 @@ var ExeriseReview = function ExeriseReview(_ref) { _context14.next = 14; break; case 4: - if (!(showApply.type === 0)) { + if (!(showApplys.type === 0)) { _context14.next = 10; break; } @@ -2048,7 +2056,7 @@ var ExeriseReview = function ExeriseReview(_ref) { case 13: if (res.status === 0) { message/* default.success */.ZP.success('操作成功'); - setShowApply({ + setShowApplys({ show: false, type: 0, active: k @@ -2061,7 +2069,7 @@ var ExeriseReview = function ExeriseReview(_ref) { } }, _callee14); })), - children: showApply.type === 0 ? '回复' : '申诉' + children: showApplys.type === 0 ? '回复' : '申诉' })] }) })] diff --git a/p__Classrooms__Lists__CommonHomework__Review__index.chunk.css b/p__Classrooms__Lists__CommonHomework__Review__index.chunk.css index 7925458beb..f8349d62d9 100644 --- a/p__Classrooms__Lists__CommonHomework__Review__index.chunk.css +++ b/p__Classrooms__Lists__CommonHomework__Review__index.chunk.css @@ -313,7 +313,7 @@ li:last-child > .ant-breadcrumb-separator { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - max-width: 880px; + max-width: 760px; } .list___KhJas .row___GGtIx .title___o_xqf i { font-size: 13px; @@ -370,7 +370,7 @@ li:last-child > .ant-breadcrumb-separator { .imageDimensions___a7crR { display: flex; justify-content: center; - align-items: center; + align-items: start; position: fixed; width: 100%; height: 100%; @@ -378,6 +378,7 @@ li:last-child > .ant-breadcrumb-separator { top: 0; z-index: 4; background: rgba(0, 0, 0, 0.5); + padding-top: 60px; } .imageDimensions___a7crR .img___Kroat { visibility: hidden; @@ -465,7 +466,7 @@ li:last-child > .ant-breadcrumb-separator { } .buttonFixed___twN45 { position: fixed; - z-index: 1000; + z-index: 3; bottom: 0; left: 0; width: 100%; diff --git a/p__Classrooms__Lists__GroupHomework__Detail__index.async.js b/p__Classrooms__Lists__GroupHomework__Detail__index.async.js index 6d134e226b..2f10a1c013 100644 --- a/p__Classrooms__Lists__GroupHomework__Detail__index.async.js +++ b/p__Classrooms__Lists__GroupHomework__Detail__index.async.js @@ -858,10 +858,12 @@ var spin = __webpack_require__(11382); ;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var ImageDimensionsmodules = ({"imageDimensions":"imageDimensions___a7crR","img":"img___Kroat"}); -// EXTERNAL MODULE: ./node_modules/markerjs2/markerjs2.esm.js -var markerjs2_esm = __webpack_require__(50290); +// EXTERNAL MODULE: ./node_modules/markerjs3/markerjs2.esm.js +var markerjs2_esm = __webpack_require__(20507); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__(84519); +// EXTERNAL MODULE: ./src/utils/util.tsx +var util = __webpack_require__(29427); // EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js var jsx_runtime = __webpack_require__(85893); ;// CONCATENATED MODULE: ./src/components/ImageDimensions/index.tsx @@ -877,6 +879,7 @@ var jsx_runtime = __webpack_require__(85893); + var ImageDimensions = function ImageDimensions(_ref) { var data = _ref.data, className = _ref.className, @@ -890,21 +893,58 @@ var ImageDimensions = function ImageDimensions(_ref) { _useState2 = slicedToArray_default()(_useState, 2), loading = _useState2[0], setLoading = _useState2[1]; + var _useState3 = (0,react.useState)('正在加载中'), + _useState4 = slicedToArray_default()(_useState3, 2), + loadingText = _useState4[0], + setLoadingText = _useState4[1]; (0,react.useEffect)(function () { if (data !== null && data !== void 0 && data.visible) { document.body.setAttribute('data-custom', 'height'); } else { document.body.removeAttribute('data-custom'); } + if (data !== null && data !== void 0 && data.src) { + getImg(); + } }, [data === null || data === void 0 ? void 0 : data.visible]); - var onSave = /*#__PURE__*/function () { - var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(event) { - var res, result; + var getImg = /*#__PURE__*/function () { + var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { + var res; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: setLoading(true); - _context.next = 3; + setLoadingText('正在加载中'); + _context.next = 4; + return (0,util/* toDataUrl */.ZJ)(data === null || data === void 0 ? void 0 : data.src); + case 4: + res = _context.sent; + imgRef.current.src = ""; + imgRef.current.src = res; + imgRef.current.onload = function () { + initMarkerjs(); + }; + setLoading(false); + setLoadingText(''); + case 10: + case "end": + return _context.stop(); + } + }, _callee); + })); + return function getImg() { + return _ref2.apply(this, arguments); + }; + }(); + var onSave = /*#__PURE__*/function () { + var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(event) { + var res, result; + return regeneratorRuntime_default()().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + setLoading(true); + setLoadingText('正在保存中'); + _context2.next = 4; return (0,fetch/* default */.ZP)('/api/attachments.json', { method: 'post', body: { @@ -913,13 +953,13 @@ var ImageDimensions = function ImageDimensions(_ref) { file: event.dataUrl } }); - case 3: - res = _context.sent; + case 4: + res = _context2.sent; if (!(res !== null && res !== void 0 && res.id)) { - _context.next = 9; + _context2.next = 10; break; } - _context.next = 7; + _context2.next = 8; return (0,fetch/* default */.ZP)("/api/attachments/".concat(data.id, "/add_subitem.json"), { method: 'post', body: { @@ -927,21 +967,22 @@ var ImageDimensions = function ImageDimensions(_ref) { settings: JSON.stringify(event.state) } }); - case 7: - result = _context.sent; + case 8: + result = _context2.sent; if (result.status === 0) { onOk(); } - case 9: - setLoading(false); case 10: + setLoading(false); + setLoadingText(''); + case 12: case "end": - return _context.stop(); + return _context2.stop(); } - }, _callee); + }, _callee2); })); return function onSave(_x) { - return _ref2.apply(this, arguments); + return _ref3.apply(this, arguments); }; }(); var dealDom = function dealDom() { @@ -1016,22 +1057,21 @@ var ImageDimensions = function ImageDimensions(_ref) { style: style, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, { spinning: loading, - tip: "\u6B63\u5728\u4FDD\u5B58\u4E2D...", + tip: loadingText, style: { position: 'absolute' } }), /*#__PURE__*/(0,jsx_runtime.jsx)("img", { - onLoad: initMarkerjs, className: ImageDimensionsmodules.img, - ref: imgRef, - src: data === null || data === void 0 ? void 0 : data.src + ref: imgRef + // crossOrigin='anonymous' + // src={data?.src} })] }) }); }; + /* harmony default export */ var components_ImageDimensions = (ImageDimensions); -// EXTERNAL MODULE: ./src/utils/util.tsx -var util = __webpack_require__(29427); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(59758); ;// CONCATENATED MODULE: ./src/components/FileDownloadList/index.tsx @@ -1159,6 +1199,7 @@ var FileDownloadList = function FileDownloadList(_ref) { className: classnames_default()(FileDownloadListmodules.list, className), style: style, children: dataSource.map(function (item, index) { + var _item$subitem3, _item$subitem4; return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: FileDownloadListmodules.row, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { @@ -1192,7 +1233,23 @@ var FileDownloadList = function FileDownloadList(_ref) { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-yulan" }), "\u9884\u89C8"] - })] + }), ['image'].includes(item === null || item === void 0 ? void 0 : item.file_type) && showDimensions && (authority ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: FileDownloadListmodules.annotation, + onClick: function onClick() { + return handleAnnotation(item); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-pizhu" + }), (_item$subitem3 = item.subitem) !== null && _item$subitem3 !== void 0 && _item$subitem3.id ? '修改批注' : '批注'] + }) : ((_item$subitem4 = item.subitem) === null || _item$subitem4 === void 0 ? void 0 : _item$subitem4.id) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { + className: FileDownloadListmodules.annotation, + onClick: function onClick() { + return handleCheckAnnotation(item); + }, + children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { + className: "iconfont icon-chakanlaoshipizhu1" + }), "\u67E5\u770B\u8001\u5E08\u6279\u6CE8"] + }))] }, index); }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, { @@ -6533,6 +6590,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) { }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", + style: { + pointerEvents: "none" + }, children: !showReply && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { size: "large", className: "current", diff --git a/p__Classrooms__Lists__GroupHomework__Detail__index.chunk.css b/p__Classrooms__Lists__GroupHomework__Detail__index.chunk.css index e9cca30e42..8b9408bb33 100644 --- a/p__Classrooms__Lists__GroupHomework__Detail__index.chunk.css +++ b/p__Classrooms__Lists__GroupHomework__Detail__index.chunk.css @@ -959,7 +959,7 @@ span.CodeMirror-selectedtext { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - max-width: 880px; + max-width: 760px; } .list___KhJas .row___GGtIx .title___o_xqf i { font-size: 13px; @@ -1016,7 +1016,7 @@ span.CodeMirror-selectedtext { .imageDimensions___a7crR { display: flex; justify-content: center; - align-items: center; + align-items: start; position: fixed; width: 100%; height: 100%; @@ -1024,6 +1024,7 @@ span.CodeMirror-selectedtext { top: 0; z-index: 4; background: rgba(0, 0, 0, 0.5); + padding-top: 60px; } .imageDimensions___a7crR .img___Kroat { visibility: hidden; diff --git a/p__Classrooms__Lists__GroupHomework__Review__index.async.js b/p__Classrooms__Lists__GroupHomework__Review__index.async.js index 7438337e2f..5148e91267 100644 --- a/p__Classrooms__Lists__GroupHomework__Review__index.async.js +++ b/p__Classrooms__Lists__GroupHomework__Review__index.async.js @@ -558,6 +558,13 @@ var ExeriseReview = function ExeriseReview(_ref) { _useState6 = slicedToArray_default()(_useState5, 2), showApply = _useState6[0], setShowApply = _useState6[1]; + var _useState7 = (0,react.useState)({ + show: false, + active: 0 + }), + _useState8 = slicedToArray_default()(_useState7, 2), + showApplys = _useState8[0], + setShowApplys = _useState8[1]; var _Modal$useModal = es_modal/* default.useModal */.Z.useModal(), _Modal$useModal2 = slicedToArray_default()(_Modal$useModal, 2), modal = _Modal$useModal2[0], @@ -565,26 +572,26 @@ var ExeriseReview = function ExeriseReview(_ref) { var _Form$useForm = es_form/* default.useForm */.Z.useForm(), _Form$useForm2 = slicedToArray_default()(_Form$useForm, 1), form = _Form$useForm2[0]; - var _useState7 = (0,react.useState)({ - last: false - }), - _useState8 = slicedToArray_default()(_useState7, 2), - nextComment = _useState8[0], - setNextComment = _useState8[1]; var _useState9 = (0,react.useState)({ last: false }), _useState10 = slicedToArray_default()(_useState9, 2), - Previous = _useState10[0], - setPrevious = _useState10[1]; - var _useState11 = (0,react.useState)(false), + nextComment = _useState10[0], + setNextComment = _useState10[1]; + var _useState11 = (0,react.useState)({ + last: false + }), _useState12 = slicedToArray_default()(_useState11, 2), - isshow = _useState12[0], - setisshow = _useState12[1]; - var _useState13 = (0,react.useState)(''), + Previous = _useState12[0], + setPrevious = _useState12[1]; + var _useState13 = (0,react.useState)(false), _useState14 = slicedToArray_default()(_useState13, 2), - comment = _useState14[0], - setcomment = _useState14[1]; + isshow = _useState14[0], + setisshow = _useState14[1]; + var _useState15 = (0,react.useState)(''), + _useState16 = slicedToArray_default()(_useState15, 2), + comment = _useState16[0], + setcomment = _useState16[1]; var getData = function getData() { dispatch({ type: "shixunHomeworks/getStudentWorkCommon", @@ -1542,9 +1549,6 @@ var ExeriseReview = function ExeriseReview(_ref) { }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-light-black ml10", children: moment_default()(v === null || v === void 0 ? void 0 : v.comment_time).format("YYYY-MM-DD HH:mm") - }), v.score !== null && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { - className: "ml30 c-orange", - children: [v.score, "\u5206"] })] }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: k === 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { @@ -1563,7 +1567,10 @@ var ExeriseReview = function ExeriseReview(_ref) { }), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-blue current ml10", onClick: function onClick() { - return setShowApply(true); + setShowApplys({ + show: true, + active: k + }); }, children: "\u56DE\u590D" })] @@ -1583,7 +1590,10 @@ var ExeriseReview = function ExeriseReview(_ref) { }), v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "c-blue current ml10", onClick: function onClick() { - return setShowApply(true); + return setShowApplys({ + show: true, + active: k + }); }, children: "\u56DE\u590D" }), !v.can_reply && /*#__PURE__*/(0,jsx_runtime.jsx)("span", { @@ -1662,7 +1672,7 @@ var ExeriseReview = function ExeriseReview(_ref) { }) })] })] - }), showApply && k === 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { + }), showApplys.show && k === showApplys.active && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { className: ['bg-white'].join(' '), children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, { onChange: function onChange(v) { @@ -1682,7 +1692,10 @@ var ExeriseReview = function ExeriseReview(_ref) { return regeneratorRuntime_default()().wrap(function _callee7$(_context7) { while (1) switch (_context7.prev = _context7.next) { case 0: - setShowApply(false); + setShowApplys({ + show: false, + active: 0 + }); case 1: case "end": return _context7.stop(); @@ -1717,7 +1730,10 @@ var ExeriseReview = function ExeriseReview(_ref) { res = _context8.sent; if (res.status === 0) { message/* default.success */.ZP.success('操作成功'); - setShowApply(false); + setShowApplys({ + show: false, + active: 0 + }); getData(); } case 8: diff --git a/p__Classrooms__Lists__GroupHomework__Review__index.chunk.css b/p__Classrooms__Lists__GroupHomework__Review__index.chunk.css index 8935939bfc..97189f0f4a 100644 --- a/p__Classrooms__Lists__GroupHomework__Review__index.chunk.css +++ b/p__Classrooms__Lists__GroupHomework__Review__index.chunk.css @@ -304,6 +304,7 @@ li:last-child > .ant-breadcrumb-separator { .replyList___HLYJ8 { margin-top: 20px; padding: 30px; + padding-bottom: 80px; } .replyList___HLYJ8 img { border-radius: 40px; @@ -323,7 +324,7 @@ strong { } .buttonFixed___WAuFs { position: fixed; - z-index: 1000; + z-index: 3; bottom: 0; left: 0; width: 100%; @@ -421,7 +422,7 @@ strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - max-width: 880px; + max-width: 760px; } .list___KhJas .row___GGtIx .title___o_xqf i { font-size: 13px; @@ -478,7 +479,7 @@ strong { .imageDimensions___a7crR { display: flex; justify-content: center; - align-items: center; + align-items: start; position: fixed; width: 100%; height: 100%; @@ -486,6 +487,7 @@ strong { top: 0; z-index: 4; background: rgba(0, 0, 0, 0.5); + padding-top: 60px; } .imageDimensions___a7crR .img___Kroat { visibility: hidden; diff --git a/p__Classrooms__Lists__LiveVideo__index.async.js b/p__Classrooms__Lists__LiveVideo__index.async.js index a6b35d08c1..6bcececae2 100644 --- a/p__Classrooms__Lists__LiveVideo__index.async.js +++ b/p__Classrooms__Lists__LiveVideo__index.async.js @@ -621,6 +621,17 @@ var Edit_EditAttendance = function EditAttendance(_ref) { var disabledDate = function disabledDate(current) { return current && current < moment_default()().startOf('day'); }; + (0,react.useEffect)(function () { + var _actionTabs$data, _actionTabs$data2, _actionTabs$data3, _actionTabs$data4, _actionTabs$data5, _actionTabs$data6, _actionTabs$data7; + form.setFieldsValue({ + platform: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$data = actionTabs.data) === null || _actionTabs$data === void 0 ? void 0 : _actionTabs$data.platform, + course_name: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$data2 = actionTabs.data) === null || _actionTabs$data2 === void 0 ? void 0 : _actionTabs$data2.course_name, + live_time: actionTabs !== null && actionTabs !== void 0 && (_actionTabs$data3 = actionTabs.data) !== null && _actionTabs$data3 !== void 0 && _actionTabs$data3.live_time ? moment_default()(actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$data4 = actionTabs.data) === null || _actionTabs$data4 === void 0 ? void 0 : _actionTabs$data4.live_time) : null, + url: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$data5 = actionTabs.data) === null || _actionTabs$data5 === void 0 ? void 0 : _actionTabs$data5.url, + duration: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$data6 = actionTabs.data) === null || _actionTabs$data6 === void 0 ? void 0 : _actionTabs$data6.duration, + description: actionTabs === null || actionTabs === void 0 ? void 0 : (_actionTabs$data7 = actionTabs.data) === null || _actionTabs$data7 === void 0 ? void 0 : _actionTabs$data7.description + }); + }, [actionTabs]); return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, { centered: true, title: "\u7F16\u8F91\u76F4\u64AD", @@ -678,7 +689,7 @@ var Edit_EditAttendance = function EditAttendance(_ref) { }); }, children: actionTabs.data && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, { - className: Addlivemodules.form, + // className={styles.form} form: form, initialValues: (_ref3 = {}, defineProperty_default()(_ref3, 'platform', actionTabs.data.platform), defineProperty_default()(_ref3, 'course_name', actionTabs.data.course_name), defineProperty_default()(_ref3, 'live_time', actionTabs.data.live_time ? moment_default()(actionTabs.data.live_time) : null), defineProperty_default()(_ref3, 'url', actionTabs.data.url), defineProperty_default()(_ref3, 'duration', actionTabs.data.duration), defineProperty_default()(_ref3, 'description', actionTabs.data.description), _ref3), children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, { @@ -1034,6 +1045,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) { })] }), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", { + style: { + cursor: "pointer" + }, onClick: function onClick() { dispatch({ type: 'classroomList/setActionTabs', @@ -1046,6 +1060,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) { }, children: "\u7F16\u8F91" }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { + style: { + cursor: "pointer" + }, className: "ml25", onClick: function onClick() { dispatch({ diff --git a/p__Classrooms__Lists__ShixunHomeworks__Detail__index.async.js b/p__Classrooms__Lists__ShixunHomeworks__Detail__index.async.js index 0582f4f4f8..3c7e97b767 100644 --- a/p__Classrooms__Lists__ShixunHomeworks__Detail__index.async.js +++ b/p__Classrooms__Lists__ShixunHomeworks__Detail__index.async.js @@ -1742,6 +1742,9 @@ var ShixunsListPage = function ShixunsListPage(_ref) { }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { flex: "1", + style: { + pointerEvents: "none" + }, children: !showReply && /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, { size: "large", className: "current", diff --git a/p__Message__index.async.js b/p__Message__index.async.js index f1072fd4d5..011e5cb26c 100644 --- a/p__Message__index.async.js +++ b/p__Message__index.async.js @@ -627,8 +627,10 @@ var Message = function Message(_ref) { borderTop: 0 } : {}, className: "".concat(Messagemodules.li, " ").concat(Messagemodules.active), - children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", { + children: [rightData !== null && rightData !== void 0 && rightData.avatar ? /*#__PURE__*/(0,jsx_runtime.jsx)("img", { src: "".concat(env/* default.IMG_SERVER */.Z.IMG_SERVER, "/images/").concat(rightData === null || rightData === void 0 ? void 0 : rightData.avatar) + }) : /*#__PURE__*/(0,jsx_runtime.jsx)("img", { + src: pt0_namespaceObject }), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", { children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", { children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { diff --git a/umi.js b/umi.js index 8bf7699c3f..3fab11a8ee 100644 --- a/umi.js +++ b/umi.js @@ -70637,7 +70637,7 @@ __webpack_require__.d(__webpack_exports__, { ;// CONCATENATED MODULE: ./src/utils/env/dev.ts var DEV = { - PROXY_SERVER: 'https://test-data.educoder.net', + PROXY_SERVER: 'https://pre-data.educoder.net', API_SERVER: 'http://localhost:8000', REPORT_SERVER: 'http://192.168.1.57:3001', IMG_SERVER: 'https://new-testali-cdn.educoder.net', @@ -71409,6 +71409,7 @@ function del(url, params) { /* harmony export */ "W": function() { return /* binding */ isUnOrNull; }, /* harmony export */ "WX": function() { return /* binding */ isLocalApp; }, /* harmony export */ "YA": function() { return /* binding */ getHiddenName; }, +/* harmony export */ "ZJ": function() { return /* binding */ toDataUrl; }, /* harmony export */ "_g": function() { return /* binding */ getMessagesUrl; }, /* harmony export */ "_m": function() { return /* binding */ isKepuKehuan; }, /* harmony export */ "b9": function() { return /* binding */ isPc; }, @@ -73780,6 +73781,22 @@ function randomArray(array, seed) { } return array; } +var toDataUrl = function toDataUrl(url) { + return new Promise(function (resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.withCredentials = true; + xhr.onload = function () { + var reader = new FileReader(); + reader.onloadend = function () { + resolve(reader.result); + }; + reader.readAsDataURL(xhr.response); + }; + xhr.open('GET', url); + xhr.responseType = 'blob'; + xhr.send(); + }); +}; /***/ }), @@ -124059,16 +124076,16 @@ function _getRoutes() { return Promise.all(/*! import() | p__Classrooms__Lists__ShixunHomeworks__Commitsummary__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(62168), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(65814), __webpack_require__.e(8691), __webpack_require__.e(12768), __webpack_require__.e(67570), __webpack_require__.e(71450)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/ShixunHomeworks/Commitsummary/index.tsx */ 47765)); }), '33': /*#__PURE__*/react.lazy(function () { - return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Detail__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(64057), __webpack_require__.e(62168), __webpack_require__.e(67390), __webpack_require__.e(33479), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(75800), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(72465), __webpack_require__.e(97278), __webpack_require__.e(48764), __webpack_require__.e(87939), __webpack_require__.e(29462), __webpack_require__.e(14074), __webpack_require__.e(8691), __webpack_require__.e(38448), __webpack_require__.e(10195)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/Detail/index.tsx */ 82080)); + return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Detail__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(64057), __webpack_require__.e(62168), __webpack_require__.e(67390), __webpack_require__.e(33479), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(75800), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(72465), __webpack_require__.e(97278), __webpack_require__.e(48764), __webpack_require__.e(87939), __webpack_require__.e(70335), __webpack_require__.e(14074), __webpack_require__.e(8691), __webpack_require__.e(38448), __webpack_require__.e(10195)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/Detail/index.tsx */ 82080)); }), '34': /*#__PURE__*/react.lazy(function () { - return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Detail__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(64057), __webpack_require__.e(62168), __webpack_require__.e(67390), __webpack_require__.e(33479), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(75800), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(72465), __webpack_require__.e(97278), __webpack_require__.e(48764), __webpack_require__.e(87939), __webpack_require__.e(29462), __webpack_require__.e(44851), __webpack_require__.e(8691), __webpack_require__.e(21506), __webpack_require__.e(38448), __webpack_require__.e(47015), __webpack_require__.e(93668)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/CommonHomework/Detail/index.tsx */ 59212)); + return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Detail__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(64057), __webpack_require__.e(62168), __webpack_require__.e(67390), __webpack_require__.e(33479), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(75800), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(72465), __webpack_require__.e(97278), __webpack_require__.e(48764), __webpack_require__.e(87939), __webpack_require__.e(70335), __webpack_require__.e(44851), __webpack_require__.e(8691), __webpack_require__.e(21506), __webpack_require__.e(38448), __webpack_require__.e(47015), __webpack_require__.e(93668)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/CommonHomework/Detail/index.tsx */ 59212)); }), '35': /*#__PURE__*/react.lazy(function () { - return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Review__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(62168), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(29462), __webpack_require__.e(60608), __webpack_require__.e(8691), __webpack_require__.e(4977), __webpack_require__.e(12768), __webpack_require__.e(67570), __webpack_require__.e(55351), __webpack_require__.e(53114), __webpack_require__.e(66728), __webpack_require__.e(41297), __webpack_require__.e(52338)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/CommonHomework/Review/index.tsx */ 51330)); + return Promise.all(/*! import() | p__Classrooms__Lists__CommonHomework__Review__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(62168), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(70335), __webpack_require__.e(60608), __webpack_require__.e(8691), __webpack_require__.e(4977), __webpack_require__.e(12768), __webpack_require__.e(67570), __webpack_require__.e(55351), __webpack_require__.e(53114), __webpack_require__.e(66728), __webpack_require__.e(41297), __webpack_require__.e(52338)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/CommonHomework/Review/index.tsx */ 51330)); }), '36': /*#__PURE__*/react.lazy(function () { - return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Review__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(62168), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(29462), __webpack_require__.e(37807), __webpack_require__.e(8691), __webpack_require__.e(12768), __webpack_require__.e(67570), __webpack_require__.e(41297), __webpack_require__.e(14662)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/Review/index.tsx */ 38117)); + return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Review__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(62168), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(70335), __webpack_require__.e(37807), __webpack_require__.e(8691), __webpack_require__.e(12768), __webpack_require__.e(67570), __webpack_require__.e(41297), __webpack_require__.e(14662)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/Review/index.tsx */ 38117)); }), '37': /*#__PURE__*/react.lazy(function () { return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__SubmitWork__index */[__webpack_require__.e(21649), __webpack_require__.e(81263), __webpack_require__.e(1226), __webpack_require__.e(73453), __webpack_require__.e(65491), __webpack_require__.e(8571), __webpack_require__.e(82375), __webpack_require__.e(66516), __webpack_require__.e(18562), __webpack_require__.e(59013), __webpack_require__.e(62168), __webpack_require__.e(67631), __webpack_require__.e(75151), __webpack_require__.e(51370), __webpack_require__.e(99836), __webpack_require__.e(15428), __webpack_require__.e(43915), __webpack_require__.e(40477), __webpack_require__.e(17400), __webpack_require__.e(8691), __webpack_require__.e(12768), __webpack_require__.e(67570), __webpack_require__.e(28072)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/SubmitWork/index.tsx */ 31303));