amis 6.2.1 → 6.2.2
Sign up to get free protection for your applications and to get access to all the features.
- package/esm/compat.js +3 -3
- package/esm/index.js +3 -3
- package/esm/preset.js +3 -3
- package/esm/renderers/AMIS.js +3 -3
- package/esm/renderers/Action.js +3 -3
- package/esm/renderers/Alert.js +3 -3
- package/esm/renderers/AnchorNav.js +3 -3
- package/esm/renderers/App.js +3 -3
- package/esm/renderers/Audio.js +3 -3
- package/esm/renderers/Avatar.js +3 -3
- package/esm/renderers/BarCode.js +3 -3
- package/esm/renderers/Breadcrumb.js +3 -3
- package/esm/renderers/ButtonGroup.js +3 -3
- package/esm/renderers/CRUD.js +3 -3
- package/esm/renderers/CRUD2.js +3 -3
- package/esm/renderers/Calendar.js +3 -3
- package/esm/renderers/Card.js +3 -3
- package/esm/renderers/Card2.js +3 -3
- package/esm/renderers/Cards.js +3 -3
- package/esm/renderers/Carousel.js +3 -3
- package/esm/renderers/Chart.js +3 -3
- package/esm/renderers/Code.js +3 -3
- package/esm/renderers/Collapse.js +3 -3
- package/esm/renderers/CollapseGroup.js +3 -3
- package/esm/renderers/Color.js +3 -3
- package/esm/renderers/Container.js +3 -3
- package/esm/renderers/Copyable.js +3 -3
- package/esm/renderers/Custom.js +3 -3
- package/esm/renderers/Date.js +3 -3
- package/esm/renderers/DateRange.js +3 -3
- package/esm/renderers/Dialog.js +3 -3
- package/esm/renderers/Divider.js +3 -3
- package/esm/renderers/Drawer.js +3 -3
- package/esm/renderers/DropDownButton.js +3 -3
- package/esm/renderers/Each.js +3 -3
- package/esm/renderers/Flex.js +3 -3
- package/esm/renderers/Form/ButtonGroupSelect.js +3 -3
- package/esm/renderers/Form/ButtonToolbar.js +3 -3
- package/esm/renderers/Form/ChainedSelect.js +3 -3
- package/esm/renderers/Form/ChartRadios.js +3 -3
- package/esm/renderers/Form/Checkbox.js +3 -3
- package/esm/renderers/Form/Checkboxes.js +3 -3
- package/esm/renderers/Form/Combo.js +3 -3
- package/esm/renderers/Form/ConditionBuilder.js +3 -3
- package/esm/renderers/Form/Control.js +3 -3
- package/esm/renderers/Form/DiffEditor.js +3 -3
- package/esm/renderers/Form/Editor.js +3 -3
- package/esm/renderers/Form/FieldSet.js +3 -3
- package/esm/renderers/Form/Formula.js +3 -3
- package/esm/renderers/Form/Group.js +3 -3
- package/esm/renderers/Form/Hidden.js +3 -3
- package/esm/renderers/Form/IconPicker.js +3 -3
- package/esm/renderers/Form/IconPickerIcons.js +3 -3
- package/esm/renderers/Form/IconSelect.js +3 -3
- package/esm/renderers/Form/IconSelectStore.js +3 -3
- package/esm/renderers/Form/InputArray.js +3 -3
- package/esm/renderers/Form/InputCity.js +3 -3
- package/esm/renderers/Form/InputColor.js +3 -3
- package/esm/renderers/Form/InputDate.js +3 -3
- package/esm/renderers/Form/InputDateRange.js +3 -3
- package/esm/renderers/Form/InputExcel.js +3 -3
- package/esm/renderers/Form/InputFile.js +3 -3
- package/esm/renderers/Form/InputFormula.js +3 -3
- package/esm/renderers/Form/InputGroup.js +3 -3
- package/esm/renderers/Form/InputImage.js +3 -3
- package/esm/renderers/Form/InputMonthRange.js +3 -3
- package/esm/renderers/Form/InputNumber.js +3 -3
- package/esm/renderers/Form/InputQuarterRange.js +3 -3
- package/esm/renderers/Form/InputRange.js +3 -3
- package/esm/renderers/Form/InputRating.js +3 -3
- package/esm/renderers/Form/InputRepeat.js +3 -3
- package/esm/renderers/Form/InputRichText.js +3 -3
- package/esm/renderers/Form/InputSubForm.js +3 -3
- package/esm/renderers/Form/InputTable.js +3 -3
- package/esm/renderers/Form/InputTag.js +3 -3
- package/esm/renderers/Form/InputText.js +3 -3
- package/esm/renderers/Form/InputTree.js +3 -3
- package/esm/renderers/Form/InputYearRange.js +3 -3
- package/esm/renderers/Form/JSONSchema.js +3 -3
- package/esm/renderers/Form/JSONSchemaEditor.js +3 -3
- package/esm/renderers/Form/ListSelect.js +3 -3
- package/esm/renderers/Form/LocationPicker.js +3 -3
- package/esm/renderers/Form/MatrixCheckboxes.js +3 -3
- package/esm/renderers/Form/NestedSelect.js +3 -3
- package/esm/renderers/Form/Picker.js +3 -3
- package/esm/renderers/Form/Radio.js +3 -3
- package/esm/renderers/Form/Radios.js +3 -3
- package/esm/renderers/Form/Select.js +3 -3
- package/esm/renderers/Form/Static.js +3 -3
- package/esm/renderers/Form/StaticHoc.js +3 -3
- package/esm/renderers/Form/Switch.js +3 -3
- package/esm/renderers/Form/TabsTransfer.js +3 -3
- package/esm/renderers/Form/TabsTransferPicker.js +3 -3
- package/esm/renderers/Form/Textarea.js +3 -3
- package/esm/renderers/Form/Transfer.js +3 -3
- package/esm/renderers/Form/TransferPicker.js +3 -3
- package/esm/renderers/Form/TreeSelect.js +3 -3
- package/esm/renderers/Form/UUID.js +3 -3
- package/esm/renderers/Form/UserSelect.js +3 -3
- package/esm/renderers/Grid.js +3 -3
- package/esm/renderers/Grid2D.js +3 -3
- package/esm/renderers/GridNav.js +3 -3
- package/esm/renderers/HBox.js +3 -3
- package/esm/renderers/IFrame.js +3 -3
- package/esm/renderers/Icon.js +3 -3
- package/esm/renderers/Image.js +3 -3
- package/esm/renderers/Images.js +3 -3
- package/esm/renderers/Json.js +3 -3
- package/esm/renderers/Link.js +3 -3
- package/esm/renderers/List.js +3 -3
- package/esm/renderers/Log.js +3 -3
- package/esm/renderers/Mapping.js +3 -3
- package/esm/renderers/Markdown.js +3 -3
- package/esm/renderers/MultilineText.js +3 -3
- package/esm/renderers/Nav.js +3 -3
- package/esm/renderers/Number.js +3 -3
- package/esm/renderers/OfficeViewer.js +3 -3
- package/esm/renderers/Operation.js +3 -3
- package/esm/renderers/Page.js +3 -3
- package/esm/renderers/Pagination.js +3 -3
- package/esm/renderers/PaginationWrapper.js +3 -3
- package/esm/renderers/Panel.js +3 -3
- package/esm/renderers/Password.js +3 -3
- package/esm/renderers/Plain.js +3 -3
- package/esm/renderers/PopOver.js +3 -3
- package/esm/renderers/Portlet.js +3 -3
- package/esm/renderers/Progress.js +3 -3
- package/esm/renderers/Property.js +3 -3
- package/esm/renderers/QRCode.js +3 -3
- package/esm/renderers/QuickEdit.js +3 -3
- package/esm/renderers/Remark.js +3 -3
- package/esm/renderers/SearchBox.js +3 -3
- package/esm/renderers/Service.js +3 -3
- package/esm/renderers/SparkLine.js +3 -3
- package/esm/renderers/Spinner.js +3 -3
- package/esm/renderers/Status.js +3 -3
- package/esm/renderers/Steps.js +3 -3
- package/esm/renderers/SwitchContainer.js +3 -3
- package/esm/renderers/Table/AutoFilterForm.js +3 -3
- package/esm/renderers/Table/Cell.js +3 -3
- package/esm/renderers/Table/ColGroup.js +3 -3
- package/esm/renderers/Table/ColumnToggler.js +3 -3
- package/esm/renderers/Table/HeadCellFilterDropdown.js +3 -3
- package/esm/renderers/Table/HeadCellSearchDropdown.js +3 -3
- package/esm/renderers/Table/ItemActionsWrapper.js +3 -3
- package/esm/renderers/Table/TableBody.js +3 -3
- package/esm/renderers/Table/TableCell.js +3 -3
- package/esm/renderers/Table/TableContent.js +3 -3
- package/esm/renderers/Table/TableRow.js +3 -3
- package/esm/renderers/Table/exportExcel.js +3 -3
- package/esm/renderers/Table/index.js +3 -3
- package/esm/renderers/Table2/ColumnToggler.js +3 -3
- package/esm/renderers/Table2/HeadCellSearchDropdown.js +3 -3
- package/esm/renderers/Table2/TableCell.js +3 -3
- package/esm/renderers/Table2/index.js +3 -3
- package/esm/renderers/TableView.js +3 -3
- package/esm/renderers/Tabs.js +3 -3
- package/esm/renderers/Tag.js +3 -3
- package/esm/renderers/Tasks.js +3 -3
- package/esm/renderers/Timeline.js +3 -3
- package/esm/renderers/TooltipWrapper.js +3 -3
- package/esm/renderers/Tpl.js +3 -3
- package/esm/renderers/VBox.js +3 -3
- package/esm/renderers/Video.js +3 -3
- package/esm/renderers/WebComponent.js +3 -3
- package/esm/renderers/Wizard.js +3 -3
- package/esm/renderers/Words.js +3 -3
- package/esm/renderers/Wrapper.js +3 -3
- package/esm/schemaExtend.js +3 -3
- package/lib/compat.js +3 -3
- package/lib/index.js +3 -3
- package/lib/preset.js +3 -3
- package/lib/renderers/AMIS.js +3 -3
- package/lib/renderers/Action.js +3 -3
- package/lib/renderers/Alert.js +3 -3
- package/lib/renderers/AnchorNav.js +3 -3
- package/lib/renderers/App.js +3 -3
- package/lib/renderers/Audio.js +3 -3
- package/lib/renderers/Avatar.js +3 -3
- package/lib/renderers/BarCode.js +3 -3
- package/lib/renderers/Breadcrumb.js +3 -3
- package/lib/renderers/ButtonGroup.js +3 -3
- package/lib/renderers/CRUD.js +3 -3
- package/lib/renderers/CRUD2.js +3 -3
- package/lib/renderers/Calendar.js +3 -3
- package/lib/renderers/Card.js +3 -3
- package/lib/renderers/Card2.js +3 -3
- package/lib/renderers/Cards.js +3 -3
- package/lib/renderers/Carousel.js +3 -3
- package/lib/renderers/Chart.js +3 -3
- package/lib/renderers/Code.js +3 -3
- package/lib/renderers/Collapse.js +3 -3
- package/lib/renderers/CollapseGroup.js +3 -3
- package/lib/renderers/Color.js +3 -3
- package/lib/renderers/Container.js +3 -3
- package/lib/renderers/Copyable.js +3 -3
- package/lib/renderers/Custom.js +3 -3
- package/lib/renderers/Date.js +3 -3
- package/lib/renderers/DateRange.js +3 -3
- package/lib/renderers/Dialog.d.ts +40 -40
- package/lib/renderers/Dialog.js +3 -3
- package/lib/renderers/Divider.js +3 -3
- package/lib/renderers/Drawer.js +3 -3
- package/lib/renderers/DropDownButton.js +3 -3
- package/lib/renderers/Each.js +3 -3
- package/lib/renderers/Flex.js +3 -3
- package/lib/renderers/Form/ButtonGroupSelect.js +3 -3
- package/lib/renderers/Form/ButtonToolbar.js +3 -3
- package/lib/renderers/Form/ChainedSelect.js +3 -3
- package/lib/renderers/Form/ChartRadios.js +3 -3
- package/lib/renderers/Form/Checkbox.js +3 -3
- package/lib/renderers/Form/Checkboxes.js +3 -3
- package/lib/renderers/Form/Combo.js +3 -3
- package/lib/renderers/Form/ConditionBuilder.js +3 -3
- package/lib/renderers/Form/Control.js +3 -3
- package/lib/renderers/Form/DiffEditor.d.ts +50 -50
- package/lib/renderers/Form/DiffEditor.js +3 -3
- package/lib/renderers/Form/Editor.d.ts +24 -24
- package/lib/renderers/Form/Editor.js +3 -3
- package/lib/renderers/Form/FieldSet.js +3 -3
- package/lib/renderers/Form/Formula.js +3 -3
- package/lib/renderers/Form/Group.js +3 -3
- package/lib/renderers/Form/Hidden.js +3 -3
- package/lib/renderers/Form/IconPicker.js +3 -3
- package/lib/renderers/Form/IconPickerIcons.js +3 -3
- package/lib/renderers/Form/IconSelect.js +3 -3
- package/lib/renderers/Form/IconSelectStore.js +3 -3
- package/lib/renderers/Form/InputArray.js +3 -3
- package/lib/renderers/Form/InputCity.d.ts +80 -80
- package/lib/renderers/Form/InputCity.js +3 -3
- package/lib/renderers/Form/InputColor.d.ts +40 -40
- package/lib/renderers/Form/InputColor.js +3 -3
- package/lib/renderers/Form/InputDate.js +3 -3
- package/lib/renderers/Form/InputDateRange.js +3 -3
- package/lib/renderers/Form/InputExcel.js +3 -3
- package/lib/renderers/Form/InputFile.js +3 -3
- package/lib/renderers/Form/InputFormula.js +3 -3
- package/lib/renderers/Form/InputGroup.d.ts +1 -1
- package/lib/renderers/Form/InputGroup.js +3 -3
- package/lib/renderers/Form/InputImage.js +3 -3
- package/lib/renderers/Form/InputMonthRange.js +3 -3
- package/lib/renderers/Form/InputNumber.js +3 -3
- package/lib/renderers/Form/InputQuarterRange.js +3 -3
- package/lib/renderers/Form/InputRange.js +3 -3
- package/lib/renderers/Form/InputRating.js +3 -3
- package/lib/renderers/Form/InputRepeat.js +3 -3
- package/lib/renderers/Form/InputRichText.js +3 -3
- package/lib/renderers/Form/InputSubForm.js +3 -3
- package/lib/renderers/Form/InputTable.js +3 -3
- package/lib/renderers/Form/InputTag.js +3 -3
- package/lib/renderers/Form/InputText.js +3 -3
- package/lib/renderers/Form/InputTree.js +3 -3
- package/lib/renderers/Form/InputYearRange.js +3 -3
- package/lib/renderers/Form/JSONSchema.js +3 -3
- package/lib/renderers/Form/JSONSchemaEditor.js +3 -3
- package/lib/renderers/Form/ListSelect.js +3 -3
- package/lib/renderers/Form/LocationPicker.js +3 -3
- package/lib/renderers/Form/MatrixCheckboxes.js +3 -3
- package/lib/renderers/Form/NestedSelect.js +3 -3
- package/lib/renderers/Form/Picker.js +3 -3
- package/lib/renderers/Form/Radio.js +3 -3
- package/lib/renderers/Form/Radios.js +3 -3
- package/lib/renderers/Form/Select.js +3 -3
- package/lib/renderers/Form/Static.js +3 -3
- package/lib/renderers/Form/StaticHoc.js +3 -3
- package/lib/renderers/Form/Switch.js +3 -3
- package/lib/renderers/Form/TabsTransfer.js +3 -3
- package/lib/renderers/Form/TabsTransferPicker.js +3 -3
- package/lib/renderers/Form/Textarea.js +3 -3
- package/lib/renderers/Form/Transfer.js +3 -3
- package/lib/renderers/Form/TransferPicker.js +3 -3
- package/lib/renderers/Form/TreeSelect.js +3 -3
- package/lib/renderers/Form/UUID.js +3 -3
- package/lib/renderers/Form/UserSelect.js +3 -3
- package/lib/renderers/Grid.js +3 -3
- package/lib/renderers/Grid2D.js +3 -3
- package/lib/renderers/GridNav.js +3 -3
- package/lib/renderers/HBox.js +3 -3
- package/lib/renderers/IFrame.js +3 -3
- package/lib/renderers/Icon.js +3 -3
- package/lib/renderers/Image.js +3 -3
- package/lib/renderers/Images.js +3 -3
- package/lib/renderers/Json.js +3 -3
- package/lib/renderers/Link.js +3 -3
- package/lib/renderers/List.js +3 -3
- package/lib/renderers/Log.js +3 -3
- package/lib/renderers/Mapping.js +3 -3
- package/lib/renderers/Markdown.js +3 -3
- package/lib/renderers/MultilineText.js +3 -3
- package/lib/renderers/Nav.js +3 -3
- package/lib/renderers/Number.js +3 -3
- package/lib/renderers/OfficeViewer.js +3 -3
- package/lib/renderers/Operation.js +3 -3
- package/lib/renderers/Page.js +3 -3
- package/lib/renderers/Pagination.js +3 -3
- package/lib/renderers/PaginationWrapper.js +3 -3
- package/lib/renderers/Panel.js +3 -3
- package/lib/renderers/Password.js +3 -3
- package/lib/renderers/Plain.js +3 -3
- package/lib/renderers/PopOver.js +3 -3
- package/lib/renderers/Portlet.js +3 -3
- package/lib/renderers/Progress.js +3 -3
- package/lib/renderers/Property.js +3 -3
- package/lib/renderers/QRCode.js +3 -3
- package/lib/renderers/QuickEdit.js +3 -3
- package/lib/renderers/Remark.d.ts +1 -1
- package/lib/renderers/Remark.js +3 -3
- package/lib/renderers/SearchBox.js +3 -3
- package/lib/renderers/Service.js +3 -3
- package/lib/renderers/SparkLine.js +3 -3
- package/lib/renderers/Spinner.js +3 -3
- package/lib/renderers/Status.js +3 -3
- package/lib/renderers/Steps.js +3 -3
- package/lib/renderers/SwitchContainer.js +3 -3
- package/lib/renderers/Table/AutoFilterForm.js +3 -3
- package/lib/renderers/Table/Cell.js +3 -3
- package/lib/renderers/Table/ColGroup.js +3 -3
- package/lib/renderers/Table/ColumnToggler.js +3 -3
- package/lib/renderers/Table/HeadCellFilterDropdown.js +3 -3
- package/lib/renderers/Table/HeadCellSearchDropdown.js +3 -3
- package/lib/renderers/Table/ItemActionsWrapper.js +3 -3
- package/lib/renderers/Table/TableBody.js +3 -3
- package/lib/renderers/Table/TableCell.js +3 -3
- package/lib/renderers/Table/TableContent.js +3 -3
- package/lib/renderers/Table/TableRow.js +3 -3
- package/lib/renderers/Table/exportExcel.js +3 -3
- package/lib/renderers/Table/index.js +3 -3
- package/lib/renderers/Table2/ColumnToggler.js +3 -3
- package/lib/renderers/Table2/HeadCellSearchDropdown.js +3 -3
- package/lib/renderers/Table2/TableCell.js +3 -3
- package/lib/renderers/Table2/index.js +3 -3
- package/lib/renderers/TableView.js +3 -3
- package/lib/renderers/Tabs.js +3 -3
- package/lib/renderers/Tag.js +3 -3
- package/lib/renderers/Tasks.js +3 -3
- package/lib/renderers/Timeline.js +3 -3
- package/lib/renderers/TooltipWrapper.js +3 -3
- package/lib/renderers/Tpl.js +3 -3
- package/lib/renderers/VBox.js +3 -3
- package/lib/renderers/Video.js +3 -3
- package/lib/renderers/WebComponent.js +3 -3
- package/lib/renderers/Wizard.js +3 -3
- package/lib/renderers/Words.js +3 -3
- package/lib/renderers/Wrapper.js +3 -3
- package/lib/schemaExtend.js +3 -3
- package/package.json +3 -3
- package/revision.json +4 -4
- package/sdk/barcode.js +50 -50
- package/sdk/charts.js +16 -16
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/exceljs.js +1 -1
- package/sdk/fomula-doc.js +1 -1
- package/sdk/json-view.js +1 -1
- package/sdk/markdown.js +68 -68
- package/sdk/office-viewer.js +125 -125
- package/sdk/papaparse.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk.js +1527 -1527
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +58 -58
- package/sdk/xlsx.js +3 -3
package/sdk/rich-text.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
;/*!node_modules/froala-editor/js/froala_editor.min.js*/
|
2
|
-
amis.define('
|
2
|
+
amis.define('ac195f5', function(require, exports, module, define) {
|
3
3
|
|
4
4
|
/*!
|
5
5
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -12,7 +12,7 @@ amis.define('fa8683a', function(require, exports, module, define) {
|
|
12
12
|
});
|
13
13
|
|
14
14
|
;/*!node_modules/froala-editor/js/plugins/align.min.js*/
|
15
|
-
amis.define('
|
15
|
+
amis.define('1fe5b85', function(require, exports, module, define) {
|
16
16
|
|
17
17
|
/*!
|
18
18
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -20,12 +20,12 @@ amis.define('77d9a08', function(require, exports, module, define) {
|
|
20
20
|
* Copyright 2014-2020 Froala Labs
|
21
21
|
*/
|
22
22
|
|
23
|
-
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
23
|
+
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(n.FroalaEditor)}(this,function(i){"use strict";(i=i&&i.hasOwnProperty("default")?i["default"]:i).PLUGINS.align=function(a){var l=a.$;return{apply:function r(n){var t=a.selection.element();if(l(t).parents(".fr-img-caption").length)l(t).css("text-align",n);else{a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();for(var e=a.selection.blocks(),i=0;i<e.length;i++)l(e[i]).css("text-align",n).removeClass("fr-temp-div"),""===l(e[i]).attr("class")&&l(e[i]).removeAttr("class"),""===l(e[i]).attr("style")&&l(e[i]).removeAttr("style");a.selection.save(),a.html.unwrap(),a.selection.restore()}},refresh:function i(n){var t=a.selection.blocks();if(t.length){var e=a.helpers.getAlignment(l(t[0]));n.find("> *").first().replaceWith(a.icon.create("align-".concat(e)))}},refreshOnShow:function o(n,t){var e=a.selection.blocks();if(e.length){var i=a.helpers.getAlignment(l(e[0]));t.find('a.fr-command[data-param1="'.concat(i,'"]')).addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function s(n){var t=a.selection.blocks();if(t.length){var e=a.helpers.getAlignment(l(t[0]));e=e.charAt(0).toUpperCase()+e.slice(1),"align".concat(e)===n.attr("data-cmd")&&n.addClass("fr-active")}}}},i.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),i.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),i.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),i.RegisterCommand("align",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var n='<ul class="fr-dropdown-list" role="presentation">',t=i.COMMANDS.align.options;for(var e in t)t.hasOwnProperty(e)&&(n+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align"data-param1="\n '.concat(e,'" title="').concat(this.language.translate(t[e]),'">').concat(this.icon.create("align-".concat(e)),'<span class="fr-sr-only">\n ').concat(this.language.translate(t[e]),"</span></a></li>"));return n+="</ul>"},callback:function(n,t){this.align.apply(t)},refresh:function(n){this.align.refresh(n)},refreshOnShow:function(n,t){this.align.refreshOnShow(n,t)},plugin:"align"}),i.RegisterCommand("alignLeft",{type:"button",icon:"align-left",title:"Align Left",callback:function(){this.align.apply("left")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"}),i.RegisterCommand("alignRight",{type:"button",icon:"align-right",title:"Align Right",callback:function(){this.align.apply("right")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"}),i.RegisterCommand("alignCenter",{type:"button",icon:"align-center",title:"Align Center",callback:function(){this.align.apply("center")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"}),i.RegisterCommand("alignJustify",{type:"button",icon:"align-justify",title:"Align Justify",callback:function(){this.align.apply("justify")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"})});
|
24
24
|
|
25
25
|
});
|
26
26
|
|
27
27
|
;/*!node_modules/froala-editor/js/plugins/colors.min.js*/
|
28
|
-
amis.define('
|
28
|
+
amis.define('9e8b99b', function(require, exports, module, define) {
|
29
29
|
|
30
30
|
/*!
|
31
31
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -33,12 +33,12 @@ amis.define('4449ea8', function(require, exports, module, define) {
|
|
33
33
|
* Copyright 2014-2020 Froala Labs
|
34
34
|
*/
|
35
35
|
|
36
|
-
!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
36
|
+
!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(o.FroalaEditor)}(this,function(k){"use strict";k=k&&k.hasOwnProperty("default")?k["default"]:k,Object.assign(k.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(k.DEFAULTS,{colorsText:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsBackground:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsStep:7,colorsHEXInput:!0,colorsButtons:["colorsBack","|","-"]}),k.PLUGINS.colors=function(g){var E=g.$,l='<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n '.concat(g.id,'"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n type="text" placeholder="').concat(g.language.translate("HEX Color"),'" \n tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button \n type="button" class="fr-command fr-submit" data-cmd="[COMMAND]" tabIndex="2" role="button">\n ').concat(g.language.translate("OK"),"</button></div></div>");function s(o){for(var t="text"===o?g.opts.colorsText:g.opts.colorsBackground,r='<div class="fr-color-set fr-'.concat(o,'-color fr-selected-set">'),e=0;e<t.length;e++)0!==e&&e%g.opts.colorsStep==0&&(r+="<br>"),"REMOVE"!==t[e]?r+='<span class="fr-command fr-select-color" style="background:'.concat(t[e],';" \n tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(o,'Color" \n data-param1="').concat(t[e],'"><span class="fr-sr-only"> ').concat(g.language.translate("Color")).concat(t[e]," \n </span></span>"):r+='<span class="fr-command fr-select-color" data-cmd="apply'.concat(o,'Color"\n tabIndex="-1" role="button" data-param1="REMOVE" \n title="').concat(g.language.translate("Clear Formatting"),'">').concat(g.icon.create("remove"),' \n <span class="fr-sr-only"> ').concat(g.language.translate("Clear Formatting")," </span></span>");return"".concat(r,"</div>")}function i(o){var t,r=g.popups.get("".concat(o,"Color.picker")),e=E(g.selection.element());t="background"===o?"background-color":"color";var c=r.find(".fr-".concat(o,"-color .fr-select-color"));for(c.find(".fr-selected-color").remove(),c.removeClass("fr-active-item"),c.not('[data-param1="REMOVE"]').attr("aria-selected",!1);e.get(0)!==g.el;){if("transparent"!==e.css(t)&&"rgba(0, 0, 0, 0)"!==e.css(t)){var a=r.find(".fr-".concat(o,'-color .fr-select-color[data-param1="').concat(g.helpers.RGBToHex(e.css(t)),'"]'));a.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'),a.addClass("fr-active-item").attr("aria-selected",!0);break}e=e.parent()}!function n(o){var t=g.popups.get("".concat(o,"Color.picker")),r=t.find(".fr-".concat(o,"-color .fr-active-item")).attr("data-param1"),e=t.find(".fr-color-hex-layer input");r||(r="");e.length&&E(e.val(r).input).trigger("change")}(o)}function e(o){"REMOVE"!==o?g.format.applyStyle("background-color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("background-color"),g.popups.hide("backgroundColor.picker")}function c(o){"REMOVE"!==o?g.format.applyStyle("color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("color"),g.popups.hide("textColor.picker")}return{showColorsPopup:function p(o){var t=g.$tb.find('.fr-command[data-cmd="'.concat(o,'"]')),r=g.popups.get("".concat(o,".picker"));if(r||(r=function n(o){var t="";g.opts.toolbarInline&&0<g.opts.colorsButtons.length&&(t+='<div class="fr-buttons fr-colors-buttons fr-tabs">\n '.concat(g.button.buildList(g.opts.colorsButtons),"\n </div>"));var r,e="";r="textColor"===o?(g.opts.colorsHEXInput&&(e=l.replace(/\[ID\]/g,"fr-color-hex-layer-text-".concat(g.id)).replace(/\[COMMAND\]/g,"customTextColor")),{buttons:t,text_colors:s("text"),custom_color:e}):(g.opts.colorsHEXInput&&(e=l.replace(/\[ID\]/g,"fr-color-hex-layer-background-".concat(g.id)).replace(/\[COMMAND\]/g,"customBackgroundColor")),{buttons:t,background_colors:s("background"),custom_color:e});var c=g.popups.create("".concat(o,".picker"),r);return function a(C,b){g.events.on("popup.tab",function(o){var t=E(o.currentTarget);if(!g.popups.isVisible(b)||!t.is("span"))return!0;var r=o.which,e=!0;if(k.KEYCODE.TAB===r){var c=C.find(".fr-buttons");e=!g.accessibility.focusToolbar(c,!!o.shiftKey)}else if(k.KEYCODE.ARROW_UP===r||k.KEYCODE.ARROW_DOWN===r||k.KEYCODE.ARROW_LEFT===r||k.KEYCODE.ARROW_RIGHT===r){if(t.is("span.fr-select-color")){var a=t.parent().find("span.fr-select-color"),n=a.index(t),l=g.opts.colorsStep,s=Math.floor(a.length/l),i=n%l,p=Math.floor(n/l),u=p*l+i,d=s*l;k.KEYCODE.ARROW_UP===r?u=((u-l)%d+d)%d:k.KEYCODE.ARROW_DOWN===r?u=(u+l)%d:k.KEYCODE.ARROW_LEFT===r?u=((u-1)%d+d)%d:k.KEYCODE.ARROW_RIGHT===r&&(u=(u+1)%d);var f=E(a.get(u));g.events.disableBlur(),f.focus(),e=!1}}else k.KEYCODE.ENTER===r&&(g.button.exec(t),e=!1);return!1===e&&(o.preventDefault(),o.stopPropagation()),e},!0)}(c,"".concat(o,".picker")),c}(o)),!r.hasClass("fr-active"))if(g.popups.setContainer("".concat(o,".picker"),g.$tb),i("textColor"===o?"text":"background"),t.isVisible()){var e=g.button.getPosition(t),c=e.left,a=e.top;g.popups.show("".concat(o,".picker"),c,a,t.outerHeight())}else g.position.forSelection(r),g.popups.show("".concat(o,".picker"))},background:e,customColor:function a(o){var t=g.popups.get("".concat(o,"Color.picker")).find(".fr-color-hex-layer input");if(t.length){var r=t.val();"background"===o?e(r):c(r)}},text:c,back:function o(){g.popups.hide("textColor.picker"),g.popups.hide("backgroundColor.picker"),g.toolbar.showInline()}}},k.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),k.RegisterCommand("textColor",{title:"Text Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("textColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("textColor.picker")):this.colors.showColorsPopup("textColor")}}),k.RegisterCommand("applytextColor",{undo:!0,callback:function(o,t){this.colors.text(t)}}),k.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),k.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),k.RegisterCommand("backgroundColor",{title:"Background Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("backgroundColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("backgroundColor.picker")):this.colors.showColorsPopup("backgroundColor")}}),k.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(o,t){this.colors.background(t)}}),k.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),k.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),k.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),k.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"})});
|
37
37
|
|
38
38
|
});
|
39
39
|
|
40
40
|
;/*!node_modules/froala-editor/js/plugins/char_counter.min.js*/
|
41
|
-
amis.define('
|
41
|
+
amis.define('cf50745', function(require, exports, module, define) {
|
42
42
|
|
43
43
|
/*!
|
44
44
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -46,12 +46,12 @@ amis.define('1819a92', function(require, exports, module, define) {
|
|
46
46
|
* Copyright 2014-2020 Froala Labs
|
47
47
|
*/
|
48
48
|
|
49
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("
|
49
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i,Object.assign(i.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),i.PLUGINS.charCounter=function(n){var r,e=n.$,o=function o(){return(n.el.textContent||"").replace(/\u200B/g,"").length};function t(t){if(n.opts.charCounterMax<0)return!0;if(o()<n.opts.charCounterMax)return!0;var e=t.which;return!(!n.keys.ctrlKey(t)&&n.keys.isCharacter(e)||e===i.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function a(t){return n.opts.charCounterMax<0?t:e("<div>").html(t).text().length+o()<=n.opts.charCounterMax?t:(n.events.trigger("charCounter.exceeded"),"")}function c(){if(n.opts.charCounterCount){var t=o()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");r.text("".concat(n.language.translate("Characters")," : ").concat(t)),n.opts.toolbarBottom&&r.css("margin-bottom",n.$tb.outerHeight(!0));var e=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=e&&("rtl"==n.opts.direction?r.css("margin-left",e):r.css("margin-right",e))}}return{_init:function u(){return!!n.$wp&&!!n.opts.charCounterCount&&((r=e(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb&&n.$second_tb.append(r),n.events.on("keydown",t,!0),n.events.on("paste.afterCleanup",a),n.events.on("keyup contentChanged input",function(){n.events.trigger("charCounter.update")}),n.events.on("charCounter.update",c),n.events.trigger("charCounter.update"),void n.events.on("destroy",function(){e(n.o_win).off("resize.char".concat(n.id)),r.removeData().remove(),r=null}))},count:o}}});
|
50
50
|
|
51
51
|
});
|
52
52
|
|
53
53
|
;/*!node_modules/froala-editor/js/plugins/code_view.min.js*/
|
54
|
-
amis.define('
|
54
|
+
amis.define('3906d17', function(require, exports, module, define) {
|
55
55
|
|
56
56
|
/*!
|
57
57
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -59,12 +59,12 @@ amis.define('0c3079f', function(require, exports, module, define) {
|
|
59
59
|
* Copyright 2014-2020 Froala Labs
|
60
60
|
*/
|
61
61
|
|
62
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
62
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{codeMirror:window.CodeMirror,codeMirrorOptions:{lineNumbers:!0,tabMode:"indent",indentWithTabs:!0,lineWrapping:!0,mode:"text/html",tabSize:2},codeBeautifierOptions:{end_with_newline:!0,indent_inner_html:!0,extra_liners:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","ol","table","dl"],brace_style:"expand",indent_char:"\t",indent_size:1,wrap_line_length:0},codeViewKeepActiveButtons:["fullscreen"]}),e.PLUGINS.codeView=function(c){var d,f,h=c.$,p=function p(){return c.$box.hasClass("fr-code-view")};function u(){return f?f.getValue():d.val()}function g(){p()&&(f&&f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin||c.opts.height?(c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",c.opts.heightMin||c.opts.height),d.css("height",c.opts.height)):c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",""))}var m,b=!1;function v(){p()&&c.events.trigger("blur")}function w(){p()&&b&&c.events.trigger("focus")}function o(e){d||(!function l(){d=h('<textarea class="fr-code" tabIndex="-1">'),c.$wp.append(d),d.attr("dir",c.opts.direction),c.$box.hasClass("fr-basic")||(m=h('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'.concat(c.helpers.isMobile()?"":" fr-desktop",'" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>')),c.$box.append(m),c.events.bindClick(c.$box,"a.html-switch",function(){c.events.trigger("commands.before",["html"]),M(!1),c.events.trigger("commands.after",["html"])}));var e=function e(){return!p()};c.events.on("buttons.refresh",e),c.events.on("copy",e,!0),c.events.on("cut",e,!0),c.events.on("paste",e,!0),c.events.on("destroy",x,!0),c.events.on("html.set",function(){p()&&M(!0)}),c.events.on("codeView.update",g),c.events.on("codeView.toggle",function(){c.$box.hasClass("fr-code-view")&&M()}),c.events.on("form.submit",function(){p()&&(c.html.set(u()),c.events.trigger("contentChanged",[],!0))},!0)}(),!f&&c.opts.codeMirror?((f=c.opts.codeMirror.fromTextArea(d.get(0),c.opts.codeMirrorOptions)).on("blur",v),f.on("focus",w)):(c.events.$on(d,"keydown keyup change input",function(){c.opts.height?this.removeAttribute("rows"):(this.rows=1,0===this.value.length?this.style.height="auto":this.style.height="".concat(this.scrollHeight,"px"))}),c.events.$on(d,"blur",v),c.events.$on(d,"focus",w))),c.undo.saveStep(),c.html.cleanEmptyTags(),c.html.cleanWhiteTags(!0),c.core.hasFocus()&&(c.core.isEmpty()||(c.selection.save(),c.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'),c.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));var t=c.html.get(!1,!0);c.$el.find("span.fr-tmp").remove(),c.$box.toggleClass("fr-code-view",!0);var r,o,n=!1;if(c.core.hasFocus()&&(n=!0,c.events.disableBlur(),c.$el.blur()),t=(t=t.replace(/<span class="fr-tmp fr-sm">F<\/span>/,"FROALA-SM")).replace(/<span class="fr-tmp fr-em">F<\/span>/,"FROALA-EM"),c.codeBeautifier&&!t.includes("fr-embedly")&&(t=c.codeBeautifier.run(t,c.opts.codeBeautifierOptions)),f){r=t.indexOf("FROALA-SM"),(o=t.indexOf("FROALA-EM"))<r?r=o:o-=9;var s=(t=t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).substring(0,r).length-t.substring(0,r).replace(/\n/g,"").length,i=t.substring(0,o).length-t.substring(0,o).replace(/\n/g,"").length;r=t.substring(0,r).length-t.substring(0,t.substring(0,r).lastIndexOf("\n")+1).length,o=t.substring(0,o).length-t.substring(0,t.substring(0,o).lastIndexOf("\n")+1).length,f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin&&c.$box.find(".CodeMirror-scroll").css("min-height",c.opts.heightMin),f.setValue(t),b=!n,f.focus(),b=!0,f.setSelection({line:s,ch:r},{line:i,ch:o}),f.refresh(),f.clearHistory()}else{r=t.indexOf("FROALA-SM"),o=t.indexOf("FROALA-EM")-9,c.opts.heightMin&&d.css("min-height",c.opts.heightMin),c.opts.height&&d.css("height",c.opts.height),c.opts.heightMax&&d.css("max-height",c.opts.height||c.opts.heightMax),d.val(t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).trigger("change");var a=h(c.o_doc).scrollTop();b=!n,d.focus(),b=!0,d.get(0).setSelectionRange(r,o),h(c.o_doc).scrollTop(a)}c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(h(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!0),e.addClass("fr-active").attr("aria-pressed",!0),!c.helpers.isMobile()&&c.opts.toolbarInline&&c.toolbar.hide()}function M(e){void 0===e&&(e=!p());var t=c.$tb.find('.fr-command[data-cmd="html"]');e?(c.popups.hideAll(),o(t)):(c.$box.toggleClass("fr-code-view",!1),function r(e){var t=u();c.html.set(t),c.$el.blur(),c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1),c.selection.setAtStart(c.el),c.selection.restore(),c.placeholder.refresh(),c.undo.saveStep()}(t),c.events.trigger("codeView.update"))}function x(){p()&&M(!1),f&&f.toTextArea(),d.val("").removeData().remove(),d=null,m&&(m.remove(),m=null)}return{_init:function e(){if(c.events.on("focus",function(){c.opts.toolbarContainer&&function t(){var e=c.$tb.find('.fr-command[data-cmd="html"]');p()?(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(h(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!1),e.addClass("fr-active").attr("aria-pressed",!1)):(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1))}()}),!c.$wp)return!1},toggle:M,isActive:p,get:u}},e.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),e.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"})});
|
63
63
|
|
64
64
|
});
|
65
65
|
|
66
66
|
;/*!node_modules/froala-editor/js/plugins/draggable.min.js*/
|
67
|
-
amis.define('
|
67
|
+
amis.define('fdb39f3', function(require, exports, module, define) {
|
68
68
|
|
69
69
|
/*!
|
70
70
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -72,12 +72,12 @@ amis.define('59ff179', function(require, exports, module, define) {
|
|
72
72
|
* Copyright 2014-2020 Froala Labs
|
73
73
|
*/
|
74
74
|
|
75
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
75
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(c){"use strict";c=c&&c.hasOwnProperty("default")?c["default"]:c,Object.assign(c.DEFAULTS,{dragInline:!0}),c.PLUGINS.draggable=function(g){var d=g.$;function e(e){return!(!e.originalEvent||!e.originalEvent.target||e.originalEvent.target.nodeType!==Node.TEXT_NODE)||(e.target&&"A"===e.target.tagName&&1===e.target.childNodes.length&&"IMG"===e.target.childNodes[0].tagName&&(e.target=e.target.childNodes[0]),d(e.target).hasClass("fr-draggable")?(g.undo.canDo()||g.undo.saveStep(),g.opts.dragInline?g.$el.attr("contenteditable",!0):g.$el.attr("contenteditable",!1),g.opts.toolbarInline&&g.toolbar.hide(),d(e.target).addClass("fr-dragging"),g.browser.msie||g.browser.edge||g.selection.clear(),void e.originalEvent.dataTransfer.setData("text","Froala")):(e.preventDefault(),!1))}var p,v=function v(e){return!(e&&("HTML"===e.tagName||"BODY"===e.tagName||g.node.isElement(e)))};function m(e,t,r){if(g.opts.iframe){var n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),a=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));e+=g.$iframe.offset().top+n,t+=g.$iframe.offset().left+a}p.offset().top!==e&&p.css("top",e),p.offset().left!==t&&p.css("left",t),p.width()!==r&&p.css("width",r)}function t(e){e.originalEvent.dataTransfer.dropEffect="move",g.opts.dragInline?(!function r(){for(var e=null,t=0;t<c.INSTANCES.length;t++)if((e=c.INSTANCES[t].$el.find(".fr-dragging")).length)return e.get(0)}()||g.browser.msie||g.browser.edge)&&e.preventDefault():(e.preventDefault(),function f(e){var t=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset);if(!v(t)){for(var r=0,n=t;!v(n)&&n===t&&0<e.originalEvent.pageY-g.win.pageYOffset-r;)r++,n=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset-r);(!v(n)||p&&0===g.$el.find(n).length&&n!==p.get(0))&&(n=null);for(var a=0,o=t;!v(o)&&o===t&&e.originalEvent.pageY-g.win.pageYOffset+a<d(g.doc).height();)a++,o=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset+a);(!v(o)||p&&0===g.$el.find(o).length&&o!==p.get(0))&&(o=null),t=null===o&&n?n:o&&null===n?o:o&&n?r<a?n:o:null}if(d(t).hasClass("fr-drag-helper"))return!1;if(t&&!g.node.isBlock(t)&&(t=g.node.blockParent(t)),t&&0<=["TD","TH","TR","THEAD","TBODY"].indexOf(t.tagName)&&(t=d(t).parents("table").get(0)),t&&0<=["LI"].indexOf(t.tagName)&&(t=d(t).parents("UL, OL").get(0)),t&&!d(t).hasClass("fr-drag-helper")){var i;p||(c.$draggable_helper||(c.$draggable_helper=d(document.createElement("div")).attr("class","fr-drag-helper")),p=c.$draggable_helper,g.events.on("shared.destroy",function(){p.html("").removeData().remove(),p=null},!0)),i=e.originalEvent.pageY<d(t).offset().top+d(t).outerHeight()/2;var l=d(t),s=0;i||0!==l.next().length?(i||(l=l.next()),"before"===p.data("fr-position")&&l.is(p.data("fr-tag"))||(0<l.prev().length&&(s=parseFloat(l.prev().css("margin-bottom"))||0),s=Math.max(s,parseFloat(l.css("margin-top"))||0),m(l.offset().top-s/2-g.$box.offset().top,l.offset().left-g.win.pageXOffset-g.$box.offset().left,l.width()),p.data("fr-position","before"))):"after"===p.data("fr-position")&&l.is(p.data("fr-tag"))||(s=parseFloat(l.css("margin-bottom"))||0,m(l.offset().top+d(t).height()+s/2-g.$box.offset().top,l.offset().left-g.win.pageXOffset-g.$box.offset().left,l.width()),p.data("fr-position","after")),p.data("fr-tag",l),p.addClass("fr-visible"),g.$box.append(p)}else p&&0<g.$box.find(p).length&&p.removeClass("fr-visible")}(e))}function r(e){e.originalEvent.dataTransfer.dropEffect="move",g.opts.dragInline||e.preventDefault()}function n(e){g.$el.attr("contenteditable",!0);var t=g.$el.find(".fr-dragging");p&&p.hasClass("fr-visible")&&g.$box.find(p).length?a(e):t.length&&(e.preventDefault(),e.stopPropagation()),p&&g.$box.find(p).length&&p.removeClass("fr-visible"),t.removeClass("fr-dragging")}function a(e){var t,r;g.$el.attr("contenteditable",!0);for(var n=0;n<c.INSTANCES.length;n++)if((t=c.INSTANCES[n].$el.find(".fr-dragging")).length){r=c.INSTANCES[n];break}if(t.length){if(e.preventDefault(),e.stopPropagation(),p&&p.hasClass("fr-visible")&&g.$box.find(p).length)p.data("fr-tag")[p.data("fr-position")]('<span class="fr-marker"></span>'),p.removeClass("fr-visible");else if(!1===g.markers.insertAtPoint(e.originalEvent))return!1;if(t.removeClass("fr-dragging"),!1===(t=g.events.chainTrigger("element.beforeDrop",t)))return!1;var a=t;if(t.parent().is("A")&&1===t.parent().get(0).childNodes.length&&(a=t.parent()),g.core.isEmpty())g.events.focus();else g.$el.find(".fr-marker").replaceWith(c.MARKERS),g.selection.restore();if(r===g||g.undo.canDo()||g.undo.saveStep(),g.core.isEmpty())g.$el.html(a);else{var o=g.markers.insert();0===a.find(o).length?d(o).replaceWith(a):0===t.find(o).length&&d(o).replaceWith(t),t.after(c.MARKERS),g.selection.restore()}return g.popups.hideAll(),g.selection.save(),g.$el.find(g.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(g.opts.htmlAllowedEmptyTags.join(",")).remove(),g.html.wrap(),g.html.fillEmptyBlocks(),g.selection.restore(),g.undo.saveStep(),g.opts.iframe&&g.size.syncIframe(),r!==g&&(r.popups.hideAll(),r.$el.find(r.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(),r.html.wrap(),r.html.fillEmptyBlocks(),r.undo.saveStep(),r.events.trigger("element.dropped"),r.opts.iframe&&r.size.syncIframe()),g.events.trigger("element.dropped",[a]),!1}p&&p.removeClass("fr-visible"),g.undo.canDo()||g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0)}function o(e){if(e&&"DIV"===e.tagName&&g.node.hasClass(e,"fr-drag-helper"))e.parentNode.removeChild(e);else if(e&&e.nodeType===Node.ELEMENT_NODE)for(var t=e.querySelectorAll("div.fr-drag-helper"),r=0;r<t.length;r++)t[r].parentNode.removeChild(t[r])}return{_init:function i(){g.opts.enter===c.ENTER_BR&&(g.opts.dragInline=!0),g.events.on("dragstart",e,!0),g.events.on("dragover",t,!0),g.events.on("dragenter",r,!0),g.events.on("document.dragend",n,!0),g.events.on("document.drop",n,!0),g.events.on("drop",a,!0),g.events.on("html.processGet",o)}}}});
|
76
76
|
|
77
77
|
});
|
78
78
|
|
79
79
|
;/*!node_modules/froala-editor/js/plugins/entities.min.js*/
|
80
|
-
amis.define('
|
80
|
+
amis.define('4132b3b', function(require, exports, module, define) {
|
81
81
|
|
82
82
|
/*!
|
83
83
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -85,12 +85,12 @@ amis.define('ab8e348', function(require, exports, module, define) {
|
|
85
85
|
* Copyright 2014-2020 Froala Labs
|
86
86
|
*/
|
87
87
|
|
88
|
-
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("
|
88
|
+
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{entities:""'¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿŒœŠšŸƒˆ˜ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ   ‌‍‎‏–—‘’‚“”„†‡•…‰′″‹›‾⁄€ℑ℘ℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋⟨⟩◊♠♣♥♦"}),e.PLUGINS.entities=function(i){var n,o,l=i.$;function r(e){var a=e.textContent;if(a.match(n)){for(var t="",r=0;r<a.length;r++)o[a[r]]?t+=o[a[r]]:t+=a[r];e.textContent=t}}function u(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var a=i.node.contents(e),t=0;t<a.length;t++)a[t].nodeType===Node.TEXT_NODE?r(a[t]):u(a[t]);return e.nodeType===Node.TEXT_NODE&&r(e),!1}var c=function c(e){return 0===e.length?"":i.clean.exec(e,u).replace(/\&/g,"&")};return{_init:function s(){i.opts.htmlSimpleAmpersand||(i.opts.entities="".concat(i.opts.entities,"&"));var e=l(document.createElement("div")).html(i.opts.entities).text(),a=i.opts.entities.split(";");o={},n="";for(var t=0;t<e.length;t++){var r=e.charAt(t);o[r]="".concat(a[t],";"),n+="\\".concat(r+(t<e.length-1?"|":""))}n=new RegExp("(".concat(n,")"),"g"),i.events.on("html.get",c,!0)}}}});
|
89
89
|
|
90
90
|
});
|
91
91
|
|
92
92
|
;/*!node_modules/froala-editor/js/plugins/font_family.min.js*/
|
93
|
-
amis.define('
|
93
|
+
amis.define('1c1c8c8', function(require, exports, module, define) {
|
94
94
|
|
95
95
|
/*!
|
96
96
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -98,12 +98,12 @@ amis.define('b3e5d78', function(require, exports, module, define) {
|
|
98
98
|
* Copyright 2014-2020 Froala Labs
|
99
99
|
*/
|
100
100
|
|
101
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
101
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","Times New Roman,Times,serif,-webkit-standard":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},fontFamilySelection:!1,fontFamilyDefaultSelection:"Font Family"}),e.PLUGINS.fontFamily=function(o){var i=o.$;function r(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return i(this).grep(t,function(e){return 0<e.length})}function f(e,t){for(var n=0;n<e.length;n++)for(var a=0;a<t.length;a++)if(e[n].toLowerCase()===t[a].toLowerCase())return[n,a];return null}function n(){var e=r(i(o.selection.element()).css("font-family")),t=[];for(var n in o.opts.fontFamily)if(o.opts.fontFamily.hasOwnProperty(n)){var a=f(e,r(n));a&&t.push([n,a])}return 0===t.length?null:(t.sort(function(e,t){var n=e[1][0]-t[1][0];return 0===n?e[1][1]-t[1][1]:n}),t[0][0])}return{apply:function t(e){o.format.applyStyle("font-family",e)},refreshOnShow:function a(e,t){t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'.concat(n(),'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function l(e){if(o.opts.fontFamilySelection){var t=i(o.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(o.opts.fontFamily[n()]||t[0]||o.language.translate(o.opts.fontFamilyDefaultSelection))}}}},e.RegisterCommand("fontFamily",{type:"dropdown",displaySelection:function(e){return e.opts.fontFamilySelection},defaultSelection:function(e){return e.opts.fontFamilyDefaultSelection},displaySelectionWidth:120,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontFamily;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'.concat(n,'" \n style="font-family: ').concat(n,'" title="').concat(t[n],'">').concat(t[n],"</a></li>"));return e+="</ul>"},title:"Font Family",callback:function(e,t){this.fontFamily.apply(t)},refresh:function(e){this.fontFamily.refresh(e)},refreshOnShow:function(e,t){this.fontFamily.refreshOnShow(e,t)},plugin:"fontFamily"}),e.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"})});
|
102
102
|
|
103
103
|
});
|
104
104
|
|
105
105
|
;/*!node_modules/froala-editor/js/plugins/font_size.min.js*/
|
106
|
-
amis.define('
|
106
|
+
amis.define('bf9c132', function(require, exports, module, define) {
|
107
107
|
|
108
108
|
/*!
|
109
109
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -111,12 +111,12 @@ amis.define('78e238f', function(require, exports, module, define) {
|
|
111
111
|
* Copyright 2014-2020 Froala Labs
|
112
112
|
*/
|
113
113
|
|
114
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("
|
114
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),t.PLUGINS.fontSize=function(o){var i=o.$;return{apply:function e(t){o.format.applyStyle("font-size",t)},refreshOnShow:function a(t,e){var n=i(o.selection.element()).css("font-size");"pt"===o.opts.fontSizeUnit&&(n="".concat(Math.round(72*parseFloat(n,10)/96),"pt")),e.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),e.find('.fr-command[data-param1="'.concat(n,'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function n(t){if(o.opts.fontSizeSelection){var e=o.helpers.getPX(i(o.selection.element()).css("font-size"));"pt"===o.opts.fontSizeUnit&&(e="".concat(Math.round(72*parseFloat(e,10)/96),"pt")),t.find("> span").text(e)}}}},t.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(t){return t.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(t){return t.opts.fontSizeDefaultSelection},html:function(){for(var t='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.fontSize,n=0;n<e.length;n++){var o=e[n];t+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'.concat(o).concat(this.opts.fontSizeUnit,'" title="').concat(o,'">').concat(o,"</a></li>")}return t+="</ul>"},callback:function(t,e){this.fontSize.apply(e)},refresh:function(t){this.fontSize.refresh(t)},refreshOnShow:function(t,e){this.fontSize.refreshOnShow(t,e)},plugin:"fontSize"}),t.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"})});
|
115
115
|
|
116
116
|
});
|
117
117
|
|
118
118
|
;/*!node_modules/froala-editor/js/plugins/forms.min.js*/
|
119
|
-
amis.define('
|
119
|
+
amis.define('46f6506', function(require, exports, module, define) {
|
120
120
|
|
121
121
|
/*!
|
122
122
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -124,12 +124,12 @@ amis.define('3c5fc2f', function(require, exports, module, define) {
|
|
124
124
|
* Copyright 2014-2020 Froala Labs
|
125
125
|
*/
|
126
126
|
|
127
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("
|
127
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(t.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),t.PLUGINS.forms=function(s){var u,r=s.$;function e(t){s.selection.clear(),r(this).data("mousedown",!0)}function o(t){r(this).data("mousedown")&&(t.stopPropagation(),r(this).removeData("mousedown"),f(u=this)),t.preventDefault()}function n(){s.$el.find("input, textarea, button").removeData("mousedown")}function a(){r(this).removeData("mousedown")}function p(){return u||null}function f(t){if(-1==["checkbox","radio"].indexOf(t.type)){var e=s.popups.get("forms.edit");e||(e=function i(){var t="";0<s.opts.formEditButtons.length&&(t='<div class="fr-buttons">'.concat(s.button.buildList(s.opts.formEditButtons),"</div>"));var e={buttons:t},o=s.popups.create("forms.edit",e);return s.$wp&&s.events.$on(s.$wp,"scroll.link-edit",function(){p()&&s.popups.isVisible("forms.edit")&&f(p())}),o}());var o=r(u=t);s.popups.refresh("forms.edit"),s.popups.setContainer("forms.edit",s.$sc);var n=o.offset().left+o.outerWidth()/2,a=o.offset().top+o.outerHeight();s.popups.show("forms.edit",n,a,o.outerHeight())}}function i(){var t=s.popups.get("forms.update"),e=p();if(e){var o=r(e);o.is("button")?t.find('input[type="text"][name="text"]').val(o.text()):o.is("input[type=button]")||o.is("input[type=submit]")||o.is("input[type=reset]")?t.find('input[type="text"][name="text"]').val(o.val()):t.find('input[type="text"][name="text"]').val(o.attr("placeholder"))}t.find('input[type="text"][name="text"]').trigger("change")}function d(){u=null}function l(t){if(t)return s.popups.onRefresh("forms.update",i),s.popups.onHide("forms.update",d),!0;var e="";1<=s.opts.formUpdateButtons.length&&(e='<div class="fr-buttons">'.concat(s.button.buildList(s.opts.formUpdateButtons),"</div>"));var o=0,n={buttons:e,text_layer:'<div class="fr-forms-text-layer fr-layer fr-active"> \n <div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex=" '.concat(++o,' "></div>\n <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2,'" type="button">').concat(s.language.translate("Update"),"</button></div></div>")};return s.popups.create("forms.update",n)}return{_init:function c(){!function t(){s.events.$on(s.$el,s._mousedown,"input, textarea, button",e),s.events.$on(s.$el,s._mouseup,"input, textarea, button",o),s.events.$on(s.$el,"touchmove","input, textarea, button",a),s.events.$on(s.$el,s._mouseup,n),s.events.$on(s.$win,s._mouseup,n),l(!0)}(),s.events.$on(s.$el,"submit","form",function(t){return t.preventDefault(),!1})},updateInput:function m(){var t=s.popups.get("forms.update"),e=p();if(e){var o=r(e),n=t.find('input[type="text"][name="text"]').val()||"";o.is("button")?n.length?o.text(n):o.text("\u200b"):-1!=["button","submit","reset"].indexOf(e.type)?o.attr("value",n):o.attr("placeholder",n),s.popups.hide("forms.update"),f(e)}},getInput:p,applyStyle:function v(t,e,o){void 0===e&&(e=s.opts.formStyles),void 0===o&&(o=s.opts.formMultipleStyles);var n=p();if(!n)return!1;if(!o){var a=Object.keys(e);a.splice(a.indexOf(t),1),r(n).removeClass(a.join(" "))}r(n).toggleClass(t)},showUpdatePopup:function h(){var t=p();if(t){var e=r(t),o=s.popups.get("forms.update");o||(o=l()),s.popups.isVisible("forms.update")||s.popups.refresh("forms.update"),s.popups.setContainer("forms.update",s.$sc);var n=e.offset().left+e.outerWidth()/2,a=e.offset().top+e.outerHeight();s.popups.show("forms.update",n,a,e.outerHeight())}},showEditPopup:f,back:function b(){s.events.disableBlur(),s.selection.restore(),s.events.enableBlur();var t=p();t&&s.$wp&&("BUTTON"===t.tagName&&s.selection.restore(),f(t))}}},t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),t.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),t.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var t='<ul class="fr-dropdown-list">',e=this.opts.formStyles;for(var o in e)e.hasOwnProperty(o)&&(t+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(o,'">').concat(this.language.translate(e[o]),"</a></li>"));return t+="</ul>"},callback:function(t,e){var o=this.forms.getInput();o&&(this.forms.applyStyle(e),this.forms.showEditPopup(o))},refreshOnShow:function(t,e){var o=this.$,n=this.forms.getInput();if(n){var a=o(n);e.find(".fr-command").each(function(){var t=o(this).data("param1");o(this).toggleClass("fr-active",a.hasClass(t))})}}}),t.DefineIcon("inputEdit",{NAME:"edit",SVG_KEY:"edit"}),t.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),t.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}})});
|
128
128
|
|
129
129
|
});
|
130
130
|
|
131
131
|
;/*!node_modules/froala-editor/js/plugins/fullscreen.min.js*/
|
132
|
-
amis.define('
|
132
|
+
amis.define('20edd43', function(require, exports, module, define) {
|
133
133
|
|
134
134
|
/*!
|
135
135
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -137,12 +137,12 @@ amis.define('4ebb1e1', function(require, exports, module, define) {
|
|
137
137
|
* Copyright 2014-2020 Froala Labs
|
138
138
|
*/
|
139
139
|
|
140
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
140
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.fullscreen=function(s){var t,r,o,n,i=s.$,a=function a(){return s.$box.hasClass("fr-fullscreen")};function l(){if(s.helpers.isIOS()&&s.core.hasFocus())return s.$el.blur(),setTimeout(c,250),!1;t=s.helpers.scrollTop(),s.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),s.helpers.isMobile()&&(s.$tb.data("parent",s.$tb.parent()),s.$box.prepend(s.$tb),s.$tb.data("sticky-dummy")&&s.$tb.after(s.$tb.data("sticky-dummy"))),r=s.opts.height,o=s.opts.heightMax,n=s.opts.z_index,s.opts.height=s.o_win.innerHeight-(s.opts.toolbarInline?0:s.$tb.outerHeight()+(s.$second_tb?s.$second_tb.outerHeight():0)),s.opts.zIndex=2147483641,s.opts.heightMax=null,s.size.refresh(),s.opts.toolbarInline&&s.toolbar.showInline();for(var e=s.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();s.opts.toolbarContainer&&s.$box.prepend(s.$tb),s.events.trigger("charCounter.update"),s.events.trigger("codeView.update"),s.$win.trigger("scroll")}function f(){if(s.helpers.isIOS()&&s.core.hasFocus())return s.$el.blur(),setTimeout(c,250),!1;s.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),s.$tb.data("parent")&&s.$tb.data("parent").prepend(s.$tb),s.$tb.data("sticky-dummy")&&s.$tb.after(s.$tb.data("sticky-dummy")),s.opts.height=r,s.opts.heightMax=o,s.opts.zIndex=n,s.size.refresh(),i(s.o_win).scrollTop(t),s.opts.toolbarInline&&s.toolbar.showInline(),s.events.trigger("charCounter.update"),s.opts.toolbarSticky&&s.opts.toolbarStickyOffset&&(s.opts.toolbarBottom?s.$tb.css("bottom",s.opts.toolbarStickyOffset).data("bottom",s.opts.toolbarStickyOffset):s.$tb.css("top",s.opts.toolbarStickyOffset).data("top",s.opts.toolbarStickyOffset));for(var e=s.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();s.opts.toolbarContainer&&i(s.opts.toolbarContainer).append(s.$tb),i(s.o_win).trigger("scroll"),s.events.trigger("codeView.update")}function c(){a()?f():l(),d(s.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=s.$tb.find('.fr-command[data-cmd="moreText"]'),t=s.$tb.find('.fr-command[data-cmd="moreParagraph"]'),r=s.$tb.find('.fr-command[data-cmd="moreRich"]'),o=s.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&s.refresh.moreText(e),t.length&&s.refresh.moreParagraph(t),r.length&&s.refresh.moreRich(r),o.length&&s.refresh.moreMisc(o)}function d(e){var t=a();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?s.icon.create("fullscreenCompress"):s.icon.create("fullscreen"))}return{_init:function e(){if(!s.$wp)return!1;s.events.$on(i(s.o_win),"resize",function(){a()&&(f(),l())}),s.events.on("toolbar.hide",function(){if(a()&&s.helpers.isMobile())return!1}),s.events.on("position.refresh",function(){if(s.helpers.isIOS())return!a()}),s.events.on("destroy",function(){a()&&f()},!0)},toggle:c,refresh:d,isActive:a}},e.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),e.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),e.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"})});
|
141
141
|
|
142
142
|
});
|
143
143
|
|
144
144
|
;/*!node_modules/froala-editor/js/plugins/help.min.js*/
|
145
|
-
amis.define('
|
145
|
+
amis.define('8d9ead6', function(require, exports, module, define) {
|
146
146
|
|
147
147
|
/*!
|
148
148
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -150,12 +150,12 @@ amis.define('70c12b9', function(require, exports, module, define) {
|
|
150
150
|
* Copyright 2014-2020 Froala Labs
|
151
151
|
*/
|
152
152
|
|
153
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
153
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{helpSets:[{title:"Inline Editor",commands:[{val:"OSkeyE",desc:"Show the editor"}]},{title:"Common actions",commands:[{val:"OSkeyC",desc:"Copy"},{val:"OSkeyX",desc:"Cut"},{val:"OSkeyV",desc:"Paste"},{val:"OSkeyZ",desc:"Undo"},{val:"OSkeyShift+Z",desc:"Redo"},{val:"OSkeyK",desc:"Insert Link"},{val:"OSkeyP",desc:"Insert Image"}]},{title:"Basic Formatting",commands:[{val:"OSkeyA",desc:"Select All"},{val:"OSkeyB",desc:"Bold"},{val:"OSkeyI",desc:"Italic"},{val:"OSkeyU",desc:"Underline"},{val:"OSkeyS",desc:"Strikethrough"},{val:"OSkey]",desc:"Increase Indent"},{val:"OSkey[",desc:"Decrease Indent"}]},{title:"Quote",commands:[{val:"OSkey'",desc:"Increase quote level"},{val:"OSkeyShift+'",desc:"Decrease quote level"}]},{title:"Image / Video",commands:[{val:"OSkey+",desc:"Resize larger"},{val:"OSkey-",desc:"Resize smaller"}]},{title:"Table",commands:[{val:"Alt+Space",desc:"Select table cell"},{val:"Shift+Left/Right arrow",desc:"Extend selection one cell"},{val:"Shift+Up/Down arrow",desc:"Extend selection one row"}]},{title:"Navigation",commands:[{val:"OSkey/",desc:"Shortcuts"},{val:"Alt+F10",desc:"Focus popup / toolbar"},{val:"Esc",desc:"Return focus to previous position"}]}]}),e.PLUGINS.help=function(c){var a,o=c.$,s="help";return{_init:function e(){},show:function d(){if(!a){var e="<h4>".concat(c.language.translate("Shortcuts"),"</h4>"),t=function n(){for(var e='<div class="fr-help-modal">',t=0;t<c.opts.helpSets.length;t++){var l=c.opts.helpSets[t],a="<table>";a+="<thead><tr><th>".concat(c.language.translate(l.title),"</th></tr></thead>"),a+="<tbody>";for(var o=0;o<l.commands.length;o++){var s=l.commands[o];a+="<tr>",a+="<td>".concat(c.language.translate(s.desc),"</td>"),a+="<td>".concat(s.val.replace("OSkey",c.helpers.isMac()?"⌘":"Ctrl+"),"</td>"),a+="</tr>"}e+=a+="</tbody></table>"}return e+="</div>"}(),l=c.modals.create(s,e,t);a=l.$modal,c.events.$on(o(c.o_win),"resize",function(){c.modals.resize(s)})}c.modals.show(s),c.modals.resize(s)},hide:function t(){c.modals.hide(s)}}},e.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),e.RegisterShortcut(e.KEYCODE.SLASH,"help",null,"/"),e.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1})});
|
154
154
|
|
155
155
|
});
|
156
156
|
|
157
157
|
;/*!node_modules/froala-editor/js/plugins/image.min.js*/
|
158
|
-
amis.define('
|
158
|
+
amis.define('70e0f2a', function(require, exports, module, define) {
|
159
159
|
|
160
160
|
/*!
|
161
161
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -163,12 +163,12 @@ amis.define('f9bcc92', function(require, exports, module, define) {
|
|
163
163
|
* Copyright 2014-2020 Froala Labs
|
164
164
|
*/
|
165
165
|
|
166
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("fa8683a")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(_e){"use strict";function Le(e){return(Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}_e=_e&&_e.hasOwnProperty("default")?_e["default"]:_e,Object.assign(_e.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_e.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_e.PLUGINS.image=function(g){var c,l,f,p,o,a,d=g.$,s="https://i.froala.com/upload",t=!1,i=1,m=2,u=3,h=4,v=5,b=6,n={};function y(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),c&&e.val(c.attr("src")),e.trigger("change")}function r(){var e=g.popups.get("image.edit");if(e||(e=P()),e){var t=we();Ce()&&(t=t.find(".fr-img-wrap")),g.popups.setContainer("image.edit",g.$sc),g.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();c.hasClass("fr-uploading")?O():g.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function w(){k()}function C(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ue(e);me(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function A(){for(var e,t="IMG"==g.el.tagName?[g.el]:g.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=d(t[a]);!g.opts.htmlUntouched&&g.opts.useClasses?((g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(ue(e)[0])),e.addClass("fr-di".concat(he(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),g.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):g.opts.htmlUntouched||g.opts.useClasses||(g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&C(i),g.opts.iframe&&i.on("load",g.size.syncIframe)}}function E(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(g.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),d(a[t]).toggleClass("fr-draggable",g.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&g.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var n=a[t].parentNode.parentNode;g.browser.mozilla||n.setAttribute("contenteditable",!1),n.setAttribute("draggable",!1),n.classList.add("fr-draggable");var r=a[t].nextSibling;r&&!g.browser.mozilla&&r.setAttribute("contenteditable",!0)}if(o)for(t=0;t<o.length;t++)i.indexOf(o[t].getAttribute("src"))<0&&g.events.trigger("image.removed",[d(o[t])]);if(o&&e){var s=[];for(t=0;t<o.length;t++)s.push(o[t].getAttribute("src"));for(t=0;t<a.length;t++)s.indexOf(a[t].getAttribute("src"))<0&&g.events.trigger("image.loaded",[d(a[t])])}o=a}function S(){if(l||function s(){var e;g.shared.$image_resizer?(l=g.shared.$image_resizer,p=g.shared.$img_overlay,g.events.on("destroy",function(){d("body").first().append(l.removeClass("fr-active"))},!0)):(g.shared.$image_resizer=d(document.createElement("div")).attr("class","fr-image-resizer"),l=g.shared.$image_resizer,g.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),g.opts.imageResize&&(l.append(R("nw")+R("ne")+R("sw")+R("se")),g.shared.$img_overlay=d(document.createElement("div")).attr("class","fr-image-overlay"),p=g.shared.$img_overlay,e=l.get(0).ownerDocument,d(e).find("body").first().append(p)));g.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,g.opts.imageResize&&(p.remove(),p=null)},!0),g.helpers.isMobile()||g.events.$on(d(g.o_win),"resize",function(){c&&!c.hasClass("fr-uploading")?pe(!0):c&&(S(),ve(),O(!1))});if(g.opts.imageResize){e=l.get(0).ownerDocument,g.events.$on(l,g._mousedown,".fr-handler",x),g.events.$on(d(e),g._mousemove,$),g.events.$on(d(e.defaultView||e.parentWindow),g._mouseup,U),g.events.$on(p,"mouseleave",U);var i=1,n=null,r=0;g.events.on("keydown",function(e){if(c){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==n||200<e.timeStamp-r)&&(i=1),(a==_e.KEYCODE.EQUALS||g.browser.mozilla&&a==_e.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==_e.KEYCODE.HYPHEN||g.browser.mozilla&&a==_e.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):g.keys.ctrlKey(e)||a!=_e.KEYCODE.ENTER||(c.before("<br>"),T(c)),n=a,r=e.timeStamp}},!0),g.events.on("keyup",function(){i=1})}}(),!c)return!1;var e=g.$wp||g.$sc;e.append(l),l.data("instance",g);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=g.helpers.getPX(e.css("border-left-width")),t-=g.helpers.getPX(e.css("border-top-width")),g.$el.is("img")&&g.$sc.is("body")&&(a=t=0);var i=we();Ce()&&(i=i.find(".fr-img-wrap"));var n=0,r=0;g.opts.iframe&&(n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),r=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(g.opts.iframe?i.offset().top+n:i.offset().top+t)-1).css("left",(g.opts.iframe?i.offset().left+r:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function R(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function D(e){Ce()?c.parents(".fr-img-caption").css("width",e):c.css("width",e)}function x(e){if(!g.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;g.undo.canDo()||g.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=g.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,n=!1;try{n=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(o){}n&&i.frameElement&&(t+=g.helpers.getPX(d(i.frameElement).offset().left)+i.frameElement.clientLeft)}(f=d(this)).data("start-x",t),f.data("start-width",c.width()),f.data("start-height",c.height());var r=c.width();if(g.opts.imageResizeWithPercent){var s=c.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;r=(r/d(s).outerWidth()*100).toFixed(2)+"%"}D(r),p.show(),g.popups.hideAll(),de()}function $(e){if(!g.core.sameInstance(l))return!0;var t;if(f&&c){if(e.preventDefault(),g.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-f.data("start-x"),n=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),g.opts.imageResizeWithPercent){var r=c.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;n=((n+i)/d(r).outerWidth()*100).toFixed(2),g.opts.imageRoundPercent&&(n=Math.round(n)),D("".concat(n,"%")),(t=Ce()?(g.helpers.getPX(c.parents(".fr-img-caption").css("width"))/d(r).outerWidth()*100).toFixed(2):(g.helpers.getPX(c.css("width"))/d(r).outerWidth()*100).toFixed(2))===n||g.opts.imageRoundPercent||D("".concat(t,"%")),c.css("height","").removeAttr("height")}else n+i>=g.opts.imageMinWidth&&(D(n+i),t=Ce()?g.helpers.getPX(c.parents(".fr-img-caption").css("width")):g.helpers.getPX(c.css("width"))),t!==n+i&&D(t),((c.attr("style")||"").match(/(^height:)|(; *height:)/)||c.attr("height"))&&(c.css("height",f.data("start-height")*c.width()/f.data("start-width")),c.removeAttr("height"));S(),g.events.trigger("image.resize",[ye()])}}function U(e){if(!g.core.sameInstance(l))return!0;if(f&&c){if(e&&e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;f=null,p.hide(),S(),r(),g.undo.saveStep(),g.events.trigger("image.resizeEnd",[ye()])}else l.removeClass("fr-active")}function I(e,t,a){g.edit.on(),c&&c.addClass("fr-error"),n[e]?B(g.language.translate(n[e])):B(g.language.translate("Something went wrong. Please try again.")),!c&&a&&te(a),g.events.trigger("image.error",[{code:e,message:n[e]},t,a])}function P(e){if(e)return g.$wp&&g.events.$on(g.$wp,"scroll.image-edit",function(){c&&g.popups.isVisible("image.edit")&&(g.events.disableBlur(),r())}),!0;var t="";if(0<g.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(g.button.buildList(g.opts.imageEditButtons),"\n </div>")};return g.popups.create("image.edit",a)}return!1}function O(e){var t=g.popups.get("image.insert");if(t||(t=X()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),c){var a=we();g.popups.setContainer("image.insert",g.$sc);var i=a.offset().left,n=a.offset().top+a.height();g.popups.show("image.insert",i,n,a.outerHeight())}void 0===e&&N(g.language.translate("Uploading"),0)}function k(e){var t=g.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||g.$el.find("img.fr-error").length)){if(g.events.focus(),g.$el.find("img.fr-error").length&&(g.$el.find("img.fr-error").remove(),g.undo.saveStep(),g.undo.run(),g.undo.dropRedo()),!g.$wp&&c){var a=c;pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore()}g.popups.hide("image.insert")}}function N(e,t){var a=g.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function B(e){O();var t=g.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),g.events.disableBlur(),a.focus()}function T(e){fe.call(e.get(0))}function _(){var e=d(this);g.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),T(e),g.events.trigger("image.loaded",[e])}function L(s,e,o,l,f){l&&"string"==typeof l&&(l=g.$(l)),g.edit.off(),N(g.language.translate("Loading image")),e&&(s=g.helpers.sanitizeURL(s));var t=new Image;t.onload=function(){var e,t;if(l){g.undo.canDo()||l.hasClass("fr-uploading")||g.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),g.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,n=0;n<i.length;n++){var r=i[n];0===r.nodeName.indexOf("data-")&&e.removeAttr(r.nodeName)}if(void 0!==o)for(t in o)o.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),o[t]);e.on("load",_),e.attr("src",s),g.edit.on(),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger(a?"image.replaced":"image.inserted",[e,f])}else e=Y(s,o,_),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger("image.inserted",[e,f])},t.onerror=function(){I(i)},O(g.language.translate("Loading image")),t.src=s}function M(e){N(g.language.translate("Loading image"));var t=this.status,a=this.response,i=this.responseXML,n=this.responseText;try{if(g.opts.imageUploadToS3)if(201==t){var r=function o(e){try{var t=d(e).find("Location").text(),a=d(e).find("Key").text();return!1===g.events.trigger("image.uploadedToS3",[t,a,e],!0)?(g.edit.on(),!1):t}catch(i){return I(h,e),!1}}(i);r&&L(r,!1,[],e,a||i)}else I(h,a||i,e);else if(200<=t&&t<300){var s=function l(e){try{if(!1===g.events.trigger("image.uploaded",[e],!0))return g.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(m,e),!1)}catch(a){return I(h,e),!1}}(n);s&&L(s.link,!1,s,e,a||n)}else I(u,a||n,e)}catch(f){I(h,a||n,e)}}function z(){I(h,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;N(g.language.translate("Uploading"),t)}}function Y(e,t,a){var i,n=d(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),n.attr("data-str".concat(i),t[i]));var r=g.opts.imageDefaultWidth;r&&"auto"!=r&&(r=g.opts.imageResizeWithPercent?"100%":"".concat(r,"px")),n.attr("style",r?"width: ".concat(r,";"):""),me(n,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),n.on("load",a),n.on("error",a),g.edit.on(),g.events.focus(!0),g.selection.restore(),g.undo.saveStep(),g.opts.imageSplitHTML?g.markers.split():g.markers.insert(),g.html.wrap();var s=g.$el.find(".fr-marker");return s.length?(s.parent().is("hr")&&s.parent().after(s),g.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(n)):g.$el.append(n),g.selection.clear(),n}function W(){g.edit.on(),k(!0)}function G(e,t){if(void 0!==e&&0<e.length){if(!1===g.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if((null===g.opts.imageUploadURL||g.opts.imageUploadURL==s)&&!g.opts.imageUploadToS3)return function o(n,r){var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:n.type})),g.image.insert(e,!1,null,r)}},O(),s.readAsDataURL(n)}(i,t||c),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>g.opts.imageMaxSize)return I(v),!1;if(g.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return I(b),!1;if(g.drag_support.formdata&&(a=g.drag_support.formdata?new FormData:null),a){var n;if(!1!==g.opts.imageUploadToS3)for(n in a.append("key",g.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),g.opts.imageUploadToS3.params)g.opts.imageUploadToS3.params.hasOwnProperty(n)&&a.append(n,g.opts.imageUploadToS3.params[n]);for(n in g.opts.imageUploadParams)g.opts.imageUploadParams.hasOwnProperty(n)&&a.append(n,g.opts.imageUploadParams[n]);a.append(g.opts.imageUploadParam,i,i.name);var r=g.opts.imageUploadURL;g.opts.imageUploadToS3&&(r=g.opts.imageUploadToS3.uploadURL?g.opts.imageUploadToS3.uploadURL:"https://".concat(g.opts.imageUploadToS3.region,".amazonaws.com/").concat(g.opts.imageUploadToS3.bucket)),function l(t,a,e,n){function r(){var e=d(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),g.placeholder.refresh(),T(e),S(),O(),g.edit.off(),t.onload=function(){M.call(t,e)},t.onerror=z,t.upload.onprogress=K,t.onabort=W,d(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),n?(n.attr("src",n.data("fr-old-src")),n.removeClass("fr-uploading")):e.remove(),pe(!0))}),t.send(a)}var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}n?(n.on("load",r),n.on("error",function(){r(),d(this).off("error")}),g.edit.on(),g.undo.saveStep(),n.data("fr-old-src",n.attr("src")),n.attr("src",e)):Y(e,null,r)},s.readAsDataURL(e)}(g.core.getXHR(r,g.opts.imageUploadMethod),a,i,t||c)}}}function H(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!g.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;g.markers.remove(),g.markers.insertAtPoint(e.originalEvent),g.$el.find(".fr-marker").replaceWith(_e.MARKERS),0===g.$el.find(".fr-marker").length&&g.selection.setAtEnd(g.el),g.popups.hideAll();var i=g.popups.get("image.insert");i||(i=X()),g.popups.setContainer("image.insert",g.$sc);var n=e.originalEvent.pageX,r=e.originalEvent.pageY;if(g.opts.iframe){var s=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),o=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));r+=g.$iframe.offset().top+s,n+=g.$iframe.offset().left+o}return g.popups.show("image.insert",n,r),O(),0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(pe(!0),G(t.files)):I(b),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return g.popups.onRefresh("image.insert",y),g.popups.onHide("image.insert",w),!0;var t,a,i="";g.opts.imageUpload||-1===g.opts.imageInsertButtons.indexOf("imageUpload")||g.opts.imageInsertButtons.splice(g.opts.imageInsertButtons.indexOf("imageUpload"),1);var n=g.button.buildList(g.opts.imageInsertButtons);""!==n&&(i='<div class="fr-buttons fr-tabs">'.concat(n,"</div>"));var r=g.opts.imageInsertButtons.indexOf("imageUpload"),s=g.opts.imageInsertButtons.indexOf("imageByURL"),o="";0<=r&&(t=" fr-active",0<=s&&s<r&&(t=""),o='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(g.id,'"><strong>').concat(g.language.translate("Drop image"),"</strong><br>(").concat(g.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(g.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(g.id,'" role="button"></div></div>'));var l="";0<=s&&(t=" fr-active",0<=r&&r<s&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(g.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(g.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(g.language.translate("Insert"),"</button></div></div>"));var f={buttons:i,upload_layer:o,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=g.opts.imageInsertButtons.length&&(a=g.popups.create("image.insert",f)),g.$wp&&g.events.$on(g.$wp,"scroll",function(){c&&g.popups.isVisible("image.insert")&&ve()}),function p(i){g.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return d(this).addClass("fr-drop"),(g.browser.msie||g.browser.edge)&&e.preventDefault(),!1},!0),g.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return d(this).removeClass("fr-drop"),(g.browser.msie||g.browser.edge)&&e.preventDefault(),!1},!0),g.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),d(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||g;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),g.helpers.isIOS()&&g.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){d(this).trigger("click")},!0),g.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||g;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,c)}d(this).val("")},!0)}(a),a}function F(){c&&g.popups.get("image.alt").find("input").val(c.attr("alt")||"").trigger("change")}function j(){var e=g.popups.get("image.alt");e||(e=q()),k(),g.popups.refresh("image.alt"),g.popups.setContainer("image.alt",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.alt",a,i,t.outerHeight(),!0)}function q(e){if(e)return g.popups.onRefresh("image.alt",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(g.button.buildList(g.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(g.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(g.id,'" type="text" placeholder="').concat(g.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(g.language.translate("Update"),"</button></div></div>")},a=g.popups.create("image.alt",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-alt",function(){c&&g.popups.isVisible("image.alt")&&j()}),a}function Q(){var e=g.popups.get("image.size");if(c)if(Ce()){var t=c.parent();t.get(0).style.width||(t=c.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(c.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(c.get(0).style.height).trigger("change")}function J(){var e=g.popups.get("image.size");e||(e=Z()),k(),g.popups.refresh("image.size"),g.popups.setContainer("image.size",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return g.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(g.button.buildList(g.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(g.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(g.id,'" type="text" name="width" placeholder="').concat(g.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(g.id,'" type="text" name="height" placeholder="').concat(g.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(g.language.translate("Update"),"</button></div></div>")},a=g.popups.create("image.size",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-size",function(){c&&g.popups.isVisible("image.size")&&J()}),a}function ee(e,t,a,i){return e.pageX=t,x.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),$.call(this,e),U.call(this,e),++i}function te(e){(e=e||we())&&!1!==g.events.trigger("image.beforeRemove",[e])&&(g.popups.hideAll(),be(),pe(!0),g.undo.canDo()||g.undo.saveStep(),e.get(0)==g.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(g.selection.setBefore(e.get(0).parentNode)||g.selection.setAfter(e.get(0).parentNode)||e.parent().after(_e.MARKERS),d(e.get(0).parentNode).remove()):(g.selection.setBefore(e.get(0))||g.selection.setAfter(e.get(0))||e.after(_e.MARKERS),e.remove()),g.html.fillEmptyBlocks(),g.selection.restore()),g.undo.saveStep())}function ae(e){var t=e.which;if(c&&(t==_e.KEYCODE.BACKSPACE||t==_e.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(c&&t==_e.KEYCODE.ESC){var a=c;return pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore(),e.preventDefault(),!1}if(!c||t!=_e.KEYCODE.ARROW_LEFT&&t!=_e.KEYCODE.ARROW_RIGHT)return c&&t===_e.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),pe(!0),!1):c&&t!=_e.KEYCODE.F10&&!g.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=c.get(0);return pe(!0),t==_e.KEYCODE.ARROW_LEFT?g.selection.setBefore(i):g.selection.setAfter(i),g.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(g.node.hasClass(e,"fr-uploading")||g.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):g.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&g.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),n=0;n<i.length;n++)ie(i[n])}function ne(e){if(!1===g.events.trigger("image.beforePasteUpload",[e]))return!1;c=d(e),S(),r(),ve(),O(),c.on("load",function(){var t=[];S(),d(g.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&O(),d(this).data("events").find(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&d(this).off("load")});for(var t=d(e).attr("src").split(","),a=atob(t[1]),i=[],n=0;n<a.length;n++)i.push(a.charCodeAt(n));G([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],c)}function re(){g.opts.imagePaste?g.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(g.opts.imagePasteProcess){var t=g.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=g.opts.imageResizeWithPercent?"%":"px"),d(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),me(d(i),g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))ne(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=g.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){ne(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/".concat(e))},a.src=(0===i.src.indexOf("blob:")?"":"".concat(g.opts.imageCORSProxy,"/"))+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(g.selection.save(),d(i).remove(),g.selection.restore()):d(i).removeAttr("data-fr-image-pasted")}):g.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=g.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=g.opts.imageResizeWithPercent?"%":"px"),g.undo.saveStep(),g.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=g.$el.find('img[data-fr-image-pasted="true"]');i&&me(i,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),g.events.trigger("paste.after")}function oe(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var a=0;a<e.clipboardData.items.length&&!(t=e.clipboardData.items[a].getAsFile());a++);if(t)return function i(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(t),!1}}function le(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==d(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&g.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_e.INSTANCES.length;t++)_e.INSTANCES[t]!=g&&_e.INSTANCES[t].events.trigger("image.hideResizer");g.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),g.helpers.isMobile()&&(g.events.disableBlur(),g.$el.blur(),g.events.enableBlur()),g.opts.iframe&&g.size.syncIframe(),c=d(this),be(),S(),r(),g.browser.msie?(g.popups.areVisible()&&g.events.disableBlur(),g.win.getSelection&&(g.win.getSelection().removeAllRanges(),g.win.getSelection().addRange(g.doc.createRange()))):g.selection.clear(),g.helpers.isIOS()&&(g.events.disableBlur(),g.$el.blur()),g.button.bulkRefresh(),g.events.trigger("video.hideResizer")}function pe(e){c&&(function t(){return ge}()||!0===e)&&(g.toolbar.enable(),l.removeClass("fr-active"),g.popups.hide("image.edit"),c=null,de(),f=null,p&&p.hide())}n[i]="Image cannot be loaded from the passed link.",n[m]="No link in upload response.",n[u]="Error during file upload.",n[h]="Parsing response failed.",n[v]="File is too large.",n[b]="Image file type is invalid.",n[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ge=!(n[8]="Image file is corrupted.");function ce(){ge=!0}function de(){ge=!1}function me(e,t,a){!g.opts.htmlUntouched&&g.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:g.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*g.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(g.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(g.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(g.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ue(e){if(void 0===e&&(e=we()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function he(e){void 0===e&&(e=we());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ve(){var e=g.popups.get("image.insert");e||(e=X()),g.popups.isVisible("image.insert")||(k(),g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$sc));var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function be(){if(c){g.events.disableBlur(),g.selection.clear();var e=g.doc.createRange();e.selectNode(c.get(0)),g.browser.msie&&e.collapse(!0),g.selection.get().addRange(e),g.events.enableBlur()}}function ye(){return c}function we(){return Ce()?c.parents(".fr-img-caption").first():c}function Ce(){return!!c&&0<c.parents(".fr-img-caption").length}return{_init:function Ae(){var i;(function e(){g.events.$on(g.$el,g._mousedown,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==d(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;g.helpers.isMobile()||g.selection.clear(),t=!0,g.popups.areVisible()&&g.events.disableBlur(),g.browser.msie&&(g.events.disableBlur(),g.$el.attr("contenteditable",!1)),g.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),g.events.$on(g.$el,g._mousedown,".fr-img-caption .fr-inner",function(e){g.core.hasFocus()||g.events.focus(),e.stopPropagation()}),g.events.$on(g.$el,"paste",".fr-img-caption .fr-inner",function(e){g.toolbar.hide(),e.stopPropagation()}),g.events.$on(g.$el,g._mouseup,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==d(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),g.browser.msie&&(g.$el.attr("contenteditable",!0),g.events.enableBlur()))}),g.events.on("keyup",function(e){if(e.shiftKey&&""===g.selection.text().replace(/\n/g,"")&&g.keys.isArrow(e.which)){var t=g.selection.element(),a=g.selection.endElement();t&&"IMG"==t.tagName?T(d(t)):a&&"IMG"==a.tagName&&T(d(a))}},!0),g.events.on("drop",V),g.events.on("element.beforeDrop",H),g.events.on("window.mousedown",ce),g.events.on("window.touchmove",de),g.events.on("mouseup window.mouseup",function(){if(c)return pe(),!1;de()}),g.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&pe()}),g.events.on("image.resizeEnd",function(){g.opts.iframe&&g.size.syncIframe()}),g.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){pe(!(t=!1))}),g.events.on("modals.hide",function(){c&&(be(),g.selection.clear())}),g.events.on("image.resizeEnd",function(){g.win.getSelection&&T(c)}),g.opts.imageAddNewLine&&g.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!g.node.isElement(t);)t=g.node.isLastSibling(t)?t.parentNode:null;g.node.isElement(t)&&(g.opts.enter===_e.ENTER_BR?e.after("<br>"):d(g.node.blockParent(e.get(0))).after("<".concat(g.html.defaultTag(),"><br></").concat(g.html.defaultTag(),">")))})})(),"IMG"==g.el.tagName&&g.$el.addClass("fr-view"),g.events.$on(g.$el,g.helpers.isMobile()&&!g.helpers.isWindowsPhone()?"touchend":"click","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',fe),g.helpers.isMobile()&&(g.events.$on(g.$el,"touchstart","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),g.events.$on(g.$el,"touchmove",function(){a=!0})),g.$wp?(g.events.on("window.keydown keydown",ae,!0),g.events.on("keyup",function(e){if(c&&e.which==_e.KEYCODE.ENTER)return!1},!0),g.events.$on(g.$el,"keydown",function(){var e=g.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&g.node.isLastSibling(e))&&(e=e.parentNode),g.node.hasClass(e,"fr-inner")||(g.node.hasClass(e,"fr-img-caption")||(e=d(e).parents(".fr-img-caption").get(0)),g.node.hasClass(e,"fr-img-caption")&&(d(e).after(_e.INVISIBLE_SPACE+_e.MARKERS),g.selection.restore()))})):g.events.$on(g.$win,"keydown",ae),g.events.on("toolbar.esc",function(){if(c){if(g.$wp)g.events.disableBlur(),g.events.focus();else{var e=c;pe(!0),g.selection.setAfter(e.get(0)),g.selection.restore()}return!1}},!0),g.events.on("toolbar.focusEditor",function(){if(c)return!1},!0),g.events.on("window.cut window.copy",function(e){if(c&&g.popups.isVisible("image.edit")&&!g.popups.get("image.edit").find(":focus").length){var t=we();Ce()?(t.before(_e.START_MARKER),t.after(_e.END_MARKER),g.selection.restore(),g.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(be(),g.paste.saveCopiedText(c.get(0).outerHTML,c.attr("alt"))),"copy"==e.type?setTimeout(function(){T(c)}):(pe(!0),g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0))}},!0),g.browser.msie&&g.events.on("keydown",function(e){if(!g.selection.isCollapsed()||!c)return!0;var t=e.which;t==_e.KEYCODE.C&&g.keys.ctrlKey(e)?g.events.trigger("window.copy"):t==_e.KEYCODE.X&&g.keys.ctrlKey(e)&&g.events.trigger("window.cut")}),g.events.$on(d(g.o_win),"keydown",function(e){var t=e.which;if(c&&t==_e.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),g.events.$on(g.$win,"keydown",function(e){var t=e.which;c&&c.hasClass("fr-uploading")&&t==_e.KEYCODE.ESC&&c.trigger("abortUpload")}),g.events.on("destroy",function(){c&&c.hasClass("fr-uploading")&&c.trigger("abortUpload")}),g.events.on("paste.before",oe),g.events.on("paste.beforeCleanup",le),g.events.on("paste.after",re),g.events.on("html.set",A),g.events.on("html.inserted",A),A(),g.events.on("destroy",function(){o=[]}),g.events.on("html.processGet",ie),g.opts.imageOutputSize&&g.events.on("html.beforeGet",function(){i=g.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||d(i[e]).width(),a=i[e].style.height||d(i[e]).height();t&&i[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&i[e].setAttribute("height","".concat(a).replace(/px/,""))}}),g.opts.iframe&&g.events.on("image.loaded",g.size.syncIframe),g.$wp&&(E(),g.events.on("contentChanged",E)),g.events.$on(d(g.o_win),"orientationchange.image",function(){setTimeout(function(){c&&T(c)},100)}),P(!0),X(!0),Z(!0),q(!0),g.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Ee(){var e=g.$tb.find('.fr-command[data-cmd="insertImage"]'),t=g.popups.get("image.insert");if(t||(t=X()),k(),!t.hasClass("fr-active"))if(g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$tb),e.isVisible()){var a=g.button.getPosition(e),i=a.left,n=a.top;g.popups.show("image.insert",i,n,e.outerHeight())}else g.position.forSelection(t),g.popups.show("image.insert")},showLayer:function Se(e){var t,a,i=g.popups.get("image.insert");if(c||g.opts.toolbarInline){if(c){var n=we();Ce()&&(n=n.find(".fr-img-wrap")),a=n.offset().top+n.outerHeight(),t=n.offset().left}}else{var r=g.$tb.find('.fr-command[data-cmd="insertImage"]');t=r.offset().left,a=r.offset().top+(g.opts.toolbarBottom?10:r.outerHeight()-10)}!c&&g.opts.toolbarInline&&(a=i.offset().top-g.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),g.popups.show("image.insert",t,a,c?c.outerHeight():0),g.accessibility.focusPopup(i)},refreshUploadButton:function Re(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function De(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:G,insertByURL:function xe(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){O(),N(g.language.translate("Loading image"));var t=e.val().trim();if(g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy&&g.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?G([new Blob([this.response],{type:this.response.type||"image/png"})],c):I(i)},a.onerror=function(){L(t,!0,[],c)},a.open("GET","".concat(g.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else L(t,!0,[],c);e.val(""),e.blur()}},align:function $e(e){var t=we();t.removeClass("fr-fir fr-fil"),!g.opts.htmlUntouched&&g.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):me(t,he(),e),be(),S(),r(),g.selection.clear()},refreshAlign:function Ue(e){c&&e.find("> *").first().replaceWith(g.icon.create("image-align-".concat(ue())))},refreshAlignOnShow:function Ie(e,t){c&&t.find('.fr-command[data-param1="'.concat(ue(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function Pe(e){var t=we();t.removeClass("fr-dii fr-dib"),!g.opts.htmlUntouched&&g.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ue()),be(),S(),r(),g.selection.clear()},refreshDisplayOnShow:function Oe(e,t){c&&t.find('.fr-command[data-param1="'.concat(he(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:ve,back:function e(){c?(g.events.disableBlur(),d(".fr-popup input:focus").blur(),T(c)):(g.events.disableBlur(),g.selection.restore(),g.events.enableBlur(),g.popups.hide("image.insert"),g.toolbar.showInline())},get:ye,getEl:we,insert:L,showProgressBar:O,remove:te,hideProgressBar:k,applyStyle:function ke(e,t,a){if(void 0===t&&(t=g.opts.imageStyles),void 0===a&&(a=g.opts.imageMultipleStyles),!c)return!1;var i=we();if(!a){var n=Object.keys(t);n.splice(n.indexOf(e),1),i.removeClass(n.join(" "))}"object"==Le(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),T(c)},showAltPopup:j,showSizePopup:J,setAlt:function Ne(e){if(c){var t=g.popups.get("image.alt");c.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),T(c)}},setSize:function Be(e,t){if(c){var a=g.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;c.removeAttr("width").removeAttr("height"),e.match(i)?c.css("width",e):c.css("width",""),t.match(i)?c.css("height",t):c.css("height",""),Ce()&&(c.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?c.parents(".fr-img-caption").css("width",e):c.parents(".fr-img-caption").css("width",""),t.match(i)?c.parents(".fr-img-caption").css("height",t):c.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),T(c)}},toggleCaption:function Te(){var e;if(c&&!Ce()){(e=c).parent().is("a")&&(e=c.parent());var t,a,i=c.parents("ul")&&0<c.parents("ul").length?c.parents("ul"):c.parents("ol")&&0<c.parents("ol").length?c.parents("ol"):[];if(0<i.length){var n=i.find("li").length,r=c.parents("li"),s=document.createElement("li");n-1===r.index()&&(i.append(s),s.innerHTML=" ")}e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var o=g.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":c.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(g.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+c.attr("class")+'" style="'+(g.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2"> </p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),c.after('<span class="fr-inner"'.concat(g.browser.mozilla?"":' contenteditable="true"',">").concat(_e.START_MARKER).concat(g.language.translate("Image Caption")).concat(_e.END_MARKER,"</span>")),c.removeAttr("class").removeAttr("style").removeAttr("width"),c.parents(".fr-img-caption").css("width",o),pe(!0),g.selection.restore()}else e=we(),c.insertAfter(e),c.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),T(c)},hasCaption:Ce,exitEdit:pe,edit:T}},_e.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),_e.RegisterShortcut(_e.KEYCODE.P,"insertImage",null,"P"),_e.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),_e.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),_e.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),_e.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),_e.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),_e.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),_e.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),_e.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),_e.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),_e.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),_e.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),_e.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=_e.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),_e.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),_e.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),_e.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),_e.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),_e.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),_e.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),_e.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),_e.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),_e.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Le(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),_e.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),_e.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),_e.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),_e.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),_e.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),_e.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),_e.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),_e.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
|
166
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(_e){"use strict";function Le(e){return(Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}_e=_e&&_e.hasOwnProperty("default")?_e["default"]:_e,Object.assign(_e.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_e.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_e.PLUGINS.image=function(g){var c,l,f,p,o,a,d=g.$,s="https://i.froala.com/upload",t=!1,i=1,m=2,u=3,h=4,v=5,b=6,n={};function y(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),c&&e.val(c.attr("src")),e.trigger("change")}function r(){var e=g.popups.get("image.edit");if(e||(e=P()),e){var t=we();Ce()&&(t=t.find(".fr-img-wrap")),g.popups.setContainer("image.edit",g.$sc),g.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();c.hasClass("fr-uploading")?O():g.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function w(){k()}function C(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ue(e);me(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function A(){for(var e,t="IMG"==g.el.tagName?[g.el]:g.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=d(t[a]);!g.opts.htmlUntouched&&g.opts.useClasses?((g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(ue(e)[0])),e.addClass("fr-di".concat(he(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),g.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):g.opts.htmlUntouched||g.opts.useClasses||(g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&C(i),g.opts.iframe&&i.on("load",g.size.syncIframe)}}function E(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(g.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),d(a[t]).toggleClass("fr-draggable",g.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&g.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var n=a[t].parentNode.parentNode;g.browser.mozilla||n.setAttribute("contenteditable",!1),n.setAttribute("draggable",!1),n.classList.add("fr-draggable");var r=a[t].nextSibling;r&&!g.browser.mozilla&&r.setAttribute("contenteditable",!0)}if(o)for(t=0;t<o.length;t++)i.indexOf(o[t].getAttribute("src"))<0&&g.events.trigger("image.removed",[d(o[t])]);if(o&&e){var s=[];for(t=0;t<o.length;t++)s.push(o[t].getAttribute("src"));for(t=0;t<a.length;t++)s.indexOf(a[t].getAttribute("src"))<0&&g.events.trigger("image.loaded",[d(a[t])])}o=a}function S(){if(l||function s(){var e;g.shared.$image_resizer?(l=g.shared.$image_resizer,p=g.shared.$img_overlay,g.events.on("destroy",function(){d("body").first().append(l.removeClass("fr-active"))},!0)):(g.shared.$image_resizer=d(document.createElement("div")).attr("class","fr-image-resizer"),l=g.shared.$image_resizer,g.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),g.opts.imageResize&&(l.append(R("nw")+R("ne")+R("sw")+R("se")),g.shared.$img_overlay=d(document.createElement("div")).attr("class","fr-image-overlay"),p=g.shared.$img_overlay,e=l.get(0).ownerDocument,d(e).find("body").first().append(p)));g.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,g.opts.imageResize&&(p.remove(),p=null)},!0),g.helpers.isMobile()||g.events.$on(d(g.o_win),"resize",function(){c&&!c.hasClass("fr-uploading")?pe(!0):c&&(S(),ve(),O(!1))});if(g.opts.imageResize){e=l.get(0).ownerDocument,g.events.$on(l,g._mousedown,".fr-handler",x),g.events.$on(d(e),g._mousemove,$),g.events.$on(d(e.defaultView||e.parentWindow),g._mouseup,U),g.events.$on(p,"mouseleave",U);var i=1,n=null,r=0;g.events.on("keydown",function(e){if(c){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==n||200<e.timeStamp-r)&&(i=1),(a==_e.KEYCODE.EQUALS||g.browser.mozilla&&a==_e.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==_e.KEYCODE.HYPHEN||g.browser.mozilla&&a==_e.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):g.keys.ctrlKey(e)||a!=_e.KEYCODE.ENTER||(c.before("<br>"),T(c)),n=a,r=e.timeStamp}},!0),g.events.on("keyup",function(){i=1})}}(),!c)return!1;var e=g.$wp||g.$sc;e.append(l),l.data("instance",g);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=g.helpers.getPX(e.css("border-left-width")),t-=g.helpers.getPX(e.css("border-top-width")),g.$el.is("img")&&g.$sc.is("body")&&(a=t=0);var i=we();Ce()&&(i=i.find(".fr-img-wrap"));var n=0,r=0;g.opts.iframe&&(n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),r=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(g.opts.iframe?i.offset().top+n:i.offset().top+t)-1).css("left",(g.opts.iframe?i.offset().left+r:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function R(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function D(e){Ce()?c.parents(".fr-img-caption").css("width",e):c.css("width",e)}function x(e){if(!g.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;g.undo.canDo()||g.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=g.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,n=!1;try{n=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(o){}n&&i.frameElement&&(t+=g.helpers.getPX(d(i.frameElement).offset().left)+i.frameElement.clientLeft)}(f=d(this)).data("start-x",t),f.data("start-width",c.width()),f.data("start-height",c.height());var r=c.width();if(g.opts.imageResizeWithPercent){var s=c.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;r=(r/d(s).outerWidth()*100).toFixed(2)+"%"}D(r),p.show(),g.popups.hideAll(),de()}function $(e){if(!g.core.sameInstance(l))return!0;var t;if(f&&c){if(e.preventDefault(),g.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-f.data("start-x"),n=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),g.opts.imageResizeWithPercent){var r=c.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;n=((n+i)/d(r).outerWidth()*100).toFixed(2),g.opts.imageRoundPercent&&(n=Math.round(n)),D("".concat(n,"%")),(t=Ce()?(g.helpers.getPX(c.parents(".fr-img-caption").css("width"))/d(r).outerWidth()*100).toFixed(2):(g.helpers.getPX(c.css("width"))/d(r).outerWidth()*100).toFixed(2))===n||g.opts.imageRoundPercent||D("".concat(t,"%")),c.css("height","").removeAttr("height")}else n+i>=g.opts.imageMinWidth&&(D(n+i),t=Ce()?g.helpers.getPX(c.parents(".fr-img-caption").css("width")):g.helpers.getPX(c.css("width"))),t!==n+i&&D(t),((c.attr("style")||"").match(/(^height:)|(; *height:)/)||c.attr("height"))&&(c.css("height",f.data("start-height")*c.width()/f.data("start-width")),c.removeAttr("height"));S(),g.events.trigger("image.resize",[ye()])}}function U(e){if(!g.core.sameInstance(l))return!0;if(f&&c){if(e&&e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;f=null,p.hide(),S(),r(),g.undo.saveStep(),g.events.trigger("image.resizeEnd",[ye()])}else l.removeClass("fr-active")}function I(e,t,a){g.edit.on(),c&&c.addClass("fr-error"),n[e]?B(g.language.translate(n[e])):B(g.language.translate("Something went wrong. Please try again.")),!c&&a&&te(a),g.events.trigger("image.error",[{code:e,message:n[e]},t,a])}function P(e){if(e)return g.$wp&&g.events.$on(g.$wp,"scroll.image-edit",function(){c&&g.popups.isVisible("image.edit")&&(g.events.disableBlur(),r())}),!0;var t="";if(0<g.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(g.button.buildList(g.opts.imageEditButtons),"\n </div>")};return g.popups.create("image.edit",a)}return!1}function O(e){var t=g.popups.get("image.insert");if(t||(t=X()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),c){var a=we();g.popups.setContainer("image.insert",g.$sc);var i=a.offset().left,n=a.offset().top+a.height();g.popups.show("image.insert",i,n,a.outerHeight())}void 0===e&&N(g.language.translate("Uploading"),0)}function k(e){var t=g.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||g.$el.find("img.fr-error").length)){if(g.events.focus(),g.$el.find("img.fr-error").length&&(g.$el.find("img.fr-error").remove(),g.undo.saveStep(),g.undo.run(),g.undo.dropRedo()),!g.$wp&&c){var a=c;pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore()}g.popups.hide("image.insert")}}function N(e,t){var a=g.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function B(e){O();var t=g.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),g.events.disableBlur(),a.focus()}function T(e){fe.call(e.get(0))}function _(){var e=d(this);g.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),T(e),g.events.trigger("image.loaded",[e])}function L(s,e,o,l,f){l&&"string"==typeof l&&(l=g.$(l)),g.edit.off(),N(g.language.translate("Loading image")),e&&(s=g.helpers.sanitizeURL(s));var t=new Image;t.onload=function(){var e,t;if(l){g.undo.canDo()||l.hasClass("fr-uploading")||g.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),g.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,n=0;n<i.length;n++){var r=i[n];0===r.nodeName.indexOf("data-")&&e.removeAttr(r.nodeName)}if(void 0!==o)for(t in o)o.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),o[t]);e.on("load",_),e.attr("src",s),g.edit.on(),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger(a?"image.replaced":"image.inserted",[e,f])}else e=Y(s,o,_),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger("image.inserted",[e,f])},t.onerror=function(){I(i)},O(g.language.translate("Loading image")),t.src=s}function M(e){N(g.language.translate("Loading image"));var t=this.status,a=this.response,i=this.responseXML,n=this.responseText;try{if(g.opts.imageUploadToS3)if(201==t){var r=function o(e){try{var t=d(e).find("Location").text(),a=d(e).find("Key").text();return!1===g.events.trigger("image.uploadedToS3",[t,a,e],!0)?(g.edit.on(),!1):t}catch(i){return I(h,e),!1}}(i);r&&L(r,!1,[],e,a||i)}else I(h,a||i,e);else if(200<=t&&t<300){var s=function l(e){try{if(!1===g.events.trigger("image.uploaded",[e],!0))return g.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(m,e),!1)}catch(a){return I(h,e),!1}}(n);s&&L(s.link,!1,s,e,a||n)}else I(u,a||n,e)}catch(f){I(h,a||n,e)}}function z(){I(h,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;N(g.language.translate("Uploading"),t)}}function Y(e,t,a){var i,n=d(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),n.attr("data-str".concat(i),t[i]));var r=g.opts.imageDefaultWidth;r&&"auto"!=r&&(r=g.opts.imageResizeWithPercent?"100%":"".concat(r,"px")),n.attr("style",r?"width: ".concat(r,";"):""),me(n,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),n.on("load",a),n.on("error",a),g.edit.on(),g.events.focus(!0),g.selection.restore(),g.undo.saveStep(),g.opts.imageSplitHTML?g.markers.split():g.markers.insert(),g.html.wrap();var s=g.$el.find(".fr-marker");return s.length?(s.parent().is("hr")&&s.parent().after(s),g.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(n)):g.$el.append(n),g.selection.clear(),n}function W(){g.edit.on(),k(!0)}function G(e,t){if(void 0!==e&&0<e.length){if(!1===g.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if((null===g.opts.imageUploadURL||g.opts.imageUploadURL==s)&&!g.opts.imageUploadToS3)return function o(n,r){var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:n.type})),g.image.insert(e,!1,null,r)}},O(),s.readAsDataURL(n)}(i,t||c),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>g.opts.imageMaxSize)return I(v),!1;if(g.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return I(b),!1;if(g.drag_support.formdata&&(a=g.drag_support.formdata?new FormData:null),a){var n;if(!1!==g.opts.imageUploadToS3)for(n in a.append("key",g.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),g.opts.imageUploadToS3.params)g.opts.imageUploadToS3.params.hasOwnProperty(n)&&a.append(n,g.opts.imageUploadToS3.params[n]);for(n in g.opts.imageUploadParams)g.opts.imageUploadParams.hasOwnProperty(n)&&a.append(n,g.opts.imageUploadParams[n]);a.append(g.opts.imageUploadParam,i,i.name);var r=g.opts.imageUploadURL;g.opts.imageUploadToS3&&(r=g.opts.imageUploadToS3.uploadURL?g.opts.imageUploadToS3.uploadURL:"https://".concat(g.opts.imageUploadToS3.region,".amazonaws.com/").concat(g.opts.imageUploadToS3.bucket)),function l(t,a,e,n){function r(){var e=d(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),g.placeholder.refresh(),T(e),S(),O(),g.edit.off(),t.onload=function(){M.call(t,e)},t.onerror=z,t.upload.onprogress=K,t.onabort=W,d(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),n?(n.attr("src",n.data("fr-old-src")),n.removeClass("fr-uploading")):e.remove(),pe(!0))}),t.send(a)}var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}n?(n.on("load",r),n.on("error",function(){r(),d(this).off("error")}),g.edit.on(),g.undo.saveStep(),n.data("fr-old-src",n.attr("src")),n.attr("src",e)):Y(e,null,r)},s.readAsDataURL(e)}(g.core.getXHR(r,g.opts.imageUploadMethod),a,i,t||c)}}}function H(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!g.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;g.markers.remove(),g.markers.insertAtPoint(e.originalEvent),g.$el.find(".fr-marker").replaceWith(_e.MARKERS),0===g.$el.find(".fr-marker").length&&g.selection.setAtEnd(g.el),g.popups.hideAll();var i=g.popups.get("image.insert");i||(i=X()),g.popups.setContainer("image.insert",g.$sc);var n=e.originalEvent.pageX,r=e.originalEvent.pageY;if(g.opts.iframe){var s=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),o=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));r+=g.$iframe.offset().top+s,n+=g.$iframe.offset().left+o}return g.popups.show("image.insert",n,r),O(),0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(pe(!0),G(t.files)):I(b),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return g.popups.onRefresh("image.insert",y),g.popups.onHide("image.insert",w),!0;var t,a,i="";g.opts.imageUpload||-1===g.opts.imageInsertButtons.indexOf("imageUpload")||g.opts.imageInsertButtons.splice(g.opts.imageInsertButtons.indexOf("imageUpload"),1);var n=g.button.buildList(g.opts.imageInsertButtons);""!==n&&(i='<div class="fr-buttons fr-tabs">'.concat(n,"</div>"));var r=g.opts.imageInsertButtons.indexOf("imageUpload"),s=g.opts.imageInsertButtons.indexOf("imageByURL"),o="";0<=r&&(t=" fr-active",0<=s&&s<r&&(t=""),o='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(g.id,'"><strong>').concat(g.language.translate("Drop image"),"</strong><br>(").concat(g.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(g.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(g.id,'" role="button"></div></div>'));var l="";0<=s&&(t=" fr-active",0<=r&&r<s&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(g.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(g.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(g.language.translate("Insert"),"</button></div></div>"));var f={buttons:i,upload_layer:o,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=g.opts.imageInsertButtons.length&&(a=g.popups.create("image.insert",f)),g.$wp&&g.events.$on(g.$wp,"scroll",function(){c&&g.popups.isVisible("image.insert")&&ve()}),function p(i){g.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return d(this).addClass("fr-drop"),(g.browser.msie||g.browser.edge)&&e.preventDefault(),!1},!0),g.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return d(this).removeClass("fr-drop"),(g.browser.msie||g.browser.edge)&&e.preventDefault(),!1},!0),g.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),d(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||g;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),g.helpers.isIOS()&&g.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){d(this).trigger("click")},!0),g.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||g;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,c)}d(this).val("")},!0)}(a),a}function F(){c&&g.popups.get("image.alt").find("input").val(c.attr("alt")||"").trigger("change")}function j(){var e=g.popups.get("image.alt");e||(e=q()),k(),g.popups.refresh("image.alt"),g.popups.setContainer("image.alt",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.alt",a,i,t.outerHeight(),!0)}function q(e){if(e)return g.popups.onRefresh("image.alt",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(g.button.buildList(g.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(g.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(g.id,'" type="text" placeholder="').concat(g.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(g.language.translate("Update"),"</button></div></div>")},a=g.popups.create("image.alt",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-alt",function(){c&&g.popups.isVisible("image.alt")&&j()}),a}function Q(){var e=g.popups.get("image.size");if(c)if(Ce()){var t=c.parent();t.get(0).style.width||(t=c.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(c.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(c.get(0).style.height).trigger("change")}function J(){var e=g.popups.get("image.size");e||(e=Z()),k(),g.popups.refresh("image.size"),g.popups.setContainer("image.size",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return g.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(g.button.buildList(g.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(g.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(g.id,'" type="text" name="width" placeholder="').concat(g.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(g.id,'" type="text" name="height" placeholder="').concat(g.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(g.language.translate("Update"),"</button></div></div>")},a=g.popups.create("image.size",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-size",function(){c&&g.popups.isVisible("image.size")&&J()}),a}function ee(e,t,a,i){return e.pageX=t,x.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),$.call(this,e),U.call(this,e),++i}function te(e){(e=e||we())&&!1!==g.events.trigger("image.beforeRemove",[e])&&(g.popups.hideAll(),be(),pe(!0),g.undo.canDo()||g.undo.saveStep(),e.get(0)==g.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(g.selection.setBefore(e.get(0).parentNode)||g.selection.setAfter(e.get(0).parentNode)||e.parent().after(_e.MARKERS),d(e.get(0).parentNode).remove()):(g.selection.setBefore(e.get(0))||g.selection.setAfter(e.get(0))||e.after(_e.MARKERS),e.remove()),g.html.fillEmptyBlocks(),g.selection.restore()),g.undo.saveStep())}function ae(e){var t=e.which;if(c&&(t==_e.KEYCODE.BACKSPACE||t==_e.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(c&&t==_e.KEYCODE.ESC){var a=c;return pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore(),e.preventDefault(),!1}if(!c||t!=_e.KEYCODE.ARROW_LEFT&&t!=_e.KEYCODE.ARROW_RIGHT)return c&&t===_e.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),pe(!0),!1):c&&t!=_e.KEYCODE.F10&&!g.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=c.get(0);return pe(!0),t==_e.KEYCODE.ARROW_LEFT?g.selection.setBefore(i):g.selection.setAfter(i),g.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(g.node.hasClass(e,"fr-uploading")||g.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):g.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&g.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),n=0;n<i.length;n++)ie(i[n])}function ne(e){if(!1===g.events.trigger("image.beforePasteUpload",[e]))return!1;c=d(e),S(),r(),ve(),O(),c.on("load",function(){var t=[];S(),d(g.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&O(),d(this).data("events").find(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&d(this).off("load")});for(var t=d(e).attr("src").split(","),a=atob(t[1]),i=[],n=0;n<a.length;n++)i.push(a.charCodeAt(n));G([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],c)}function re(){g.opts.imagePaste?g.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(g.opts.imagePasteProcess){var t=g.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=g.opts.imageResizeWithPercent?"%":"px"),d(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),me(d(i),g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))ne(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=g.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){ne(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/".concat(e))},a.src=(0===i.src.indexOf("blob:")?"":"".concat(g.opts.imageCORSProxy,"/"))+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(g.selection.save(),d(i).remove(),g.selection.restore()):d(i).removeAttr("data-fr-image-pasted")}):g.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=g.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=g.opts.imageResizeWithPercent?"%":"px"),g.undo.saveStep(),g.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=g.$el.find('img[data-fr-image-pasted="true"]');i&&me(i,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),g.events.trigger("paste.after")}function oe(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var a=0;a<e.clipboardData.items.length&&!(t=e.clipboardData.items[a].getAsFile());a++);if(t)return function i(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(t),!1}}function le(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==d(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&g.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_e.INSTANCES.length;t++)_e.INSTANCES[t]!=g&&_e.INSTANCES[t].events.trigger("image.hideResizer");g.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),g.helpers.isMobile()&&(g.events.disableBlur(),g.$el.blur(),g.events.enableBlur()),g.opts.iframe&&g.size.syncIframe(),c=d(this),be(),S(),r(),g.browser.msie?(g.popups.areVisible()&&g.events.disableBlur(),g.win.getSelection&&(g.win.getSelection().removeAllRanges(),g.win.getSelection().addRange(g.doc.createRange()))):g.selection.clear(),g.helpers.isIOS()&&(g.events.disableBlur(),g.$el.blur()),g.button.bulkRefresh(),g.events.trigger("video.hideResizer")}function pe(e){c&&(function t(){return ge}()||!0===e)&&(g.toolbar.enable(),l.removeClass("fr-active"),g.popups.hide("image.edit"),c=null,de(),f=null,p&&p.hide())}n[i]="Image cannot be loaded from the passed link.",n[m]="No link in upload response.",n[u]="Error during file upload.",n[h]="Parsing response failed.",n[v]="File is too large.",n[b]="Image file type is invalid.",n[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ge=!(n[8]="Image file is corrupted.");function ce(){ge=!0}function de(){ge=!1}function me(e,t,a){!g.opts.htmlUntouched&&g.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:g.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*g.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(g.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(g.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(g.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ue(e){if(void 0===e&&(e=we()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function he(e){void 0===e&&(e=we());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ve(){var e=g.popups.get("image.insert");e||(e=X()),g.popups.isVisible("image.insert")||(k(),g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$sc));var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function be(){if(c){g.events.disableBlur(),g.selection.clear();var e=g.doc.createRange();e.selectNode(c.get(0)),g.browser.msie&&e.collapse(!0),g.selection.get().addRange(e),g.events.enableBlur()}}function ye(){return c}function we(){return Ce()?c.parents(".fr-img-caption").first():c}function Ce(){return!!c&&0<c.parents(".fr-img-caption").length}return{_init:function Ae(){var i;(function e(){g.events.$on(g.$el,g._mousedown,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==d(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;g.helpers.isMobile()||g.selection.clear(),t=!0,g.popups.areVisible()&&g.events.disableBlur(),g.browser.msie&&(g.events.disableBlur(),g.$el.attr("contenteditable",!1)),g.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),g.events.$on(g.$el,g._mousedown,".fr-img-caption .fr-inner",function(e){g.core.hasFocus()||g.events.focus(),e.stopPropagation()}),g.events.$on(g.$el,"paste",".fr-img-caption .fr-inner",function(e){g.toolbar.hide(),e.stopPropagation()}),g.events.$on(g.$el,g._mouseup,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==d(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),g.browser.msie&&(g.$el.attr("contenteditable",!0),g.events.enableBlur()))}),g.events.on("keyup",function(e){if(e.shiftKey&&""===g.selection.text().replace(/\n/g,"")&&g.keys.isArrow(e.which)){var t=g.selection.element(),a=g.selection.endElement();t&&"IMG"==t.tagName?T(d(t)):a&&"IMG"==a.tagName&&T(d(a))}},!0),g.events.on("drop",V),g.events.on("element.beforeDrop",H),g.events.on("window.mousedown",ce),g.events.on("window.touchmove",de),g.events.on("mouseup window.mouseup",function(){if(c)return pe(),!1;de()}),g.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&pe()}),g.events.on("image.resizeEnd",function(){g.opts.iframe&&g.size.syncIframe()}),g.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){pe(!(t=!1))}),g.events.on("modals.hide",function(){c&&(be(),g.selection.clear())}),g.events.on("image.resizeEnd",function(){g.win.getSelection&&T(c)}),g.opts.imageAddNewLine&&g.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!g.node.isElement(t);)t=g.node.isLastSibling(t)?t.parentNode:null;g.node.isElement(t)&&(g.opts.enter===_e.ENTER_BR?e.after("<br>"):d(g.node.blockParent(e.get(0))).after("<".concat(g.html.defaultTag(),"><br></").concat(g.html.defaultTag(),">")))})})(),"IMG"==g.el.tagName&&g.$el.addClass("fr-view"),g.events.$on(g.$el,g.helpers.isMobile()&&!g.helpers.isWindowsPhone()?"touchend":"click","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',fe),g.helpers.isMobile()&&(g.events.$on(g.$el,"touchstart","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),g.events.$on(g.$el,"touchmove",function(){a=!0})),g.$wp?(g.events.on("window.keydown keydown",ae,!0),g.events.on("keyup",function(e){if(c&&e.which==_e.KEYCODE.ENTER)return!1},!0),g.events.$on(g.$el,"keydown",function(){var e=g.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&g.node.isLastSibling(e))&&(e=e.parentNode),g.node.hasClass(e,"fr-inner")||(g.node.hasClass(e,"fr-img-caption")||(e=d(e).parents(".fr-img-caption").get(0)),g.node.hasClass(e,"fr-img-caption")&&(d(e).after(_e.INVISIBLE_SPACE+_e.MARKERS),g.selection.restore()))})):g.events.$on(g.$win,"keydown",ae),g.events.on("toolbar.esc",function(){if(c){if(g.$wp)g.events.disableBlur(),g.events.focus();else{var e=c;pe(!0),g.selection.setAfter(e.get(0)),g.selection.restore()}return!1}},!0),g.events.on("toolbar.focusEditor",function(){if(c)return!1},!0),g.events.on("window.cut window.copy",function(e){if(c&&g.popups.isVisible("image.edit")&&!g.popups.get("image.edit").find(":focus").length){var t=we();Ce()?(t.before(_e.START_MARKER),t.after(_e.END_MARKER),g.selection.restore(),g.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(be(),g.paste.saveCopiedText(c.get(0).outerHTML,c.attr("alt"))),"copy"==e.type?setTimeout(function(){T(c)}):(pe(!0),g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0))}},!0),g.browser.msie&&g.events.on("keydown",function(e){if(!g.selection.isCollapsed()||!c)return!0;var t=e.which;t==_e.KEYCODE.C&&g.keys.ctrlKey(e)?g.events.trigger("window.copy"):t==_e.KEYCODE.X&&g.keys.ctrlKey(e)&&g.events.trigger("window.cut")}),g.events.$on(d(g.o_win),"keydown",function(e){var t=e.which;if(c&&t==_e.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),g.events.$on(g.$win,"keydown",function(e){var t=e.which;c&&c.hasClass("fr-uploading")&&t==_e.KEYCODE.ESC&&c.trigger("abortUpload")}),g.events.on("destroy",function(){c&&c.hasClass("fr-uploading")&&c.trigger("abortUpload")}),g.events.on("paste.before",oe),g.events.on("paste.beforeCleanup",le),g.events.on("paste.after",re),g.events.on("html.set",A),g.events.on("html.inserted",A),A(),g.events.on("destroy",function(){o=[]}),g.events.on("html.processGet",ie),g.opts.imageOutputSize&&g.events.on("html.beforeGet",function(){i=g.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||d(i[e]).width(),a=i[e].style.height||d(i[e]).height();t&&i[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&i[e].setAttribute("height","".concat(a).replace(/px/,""))}}),g.opts.iframe&&g.events.on("image.loaded",g.size.syncIframe),g.$wp&&(E(),g.events.on("contentChanged",E)),g.events.$on(d(g.o_win),"orientationchange.image",function(){setTimeout(function(){c&&T(c)},100)}),P(!0),X(!0),Z(!0),q(!0),g.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Ee(){var e=g.$tb.find('.fr-command[data-cmd="insertImage"]'),t=g.popups.get("image.insert");if(t||(t=X()),k(),!t.hasClass("fr-active"))if(g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$tb),e.isVisible()){var a=g.button.getPosition(e),i=a.left,n=a.top;g.popups.show("image.insert",i,n,e.outerHeight())}else g.position.forSelection(t),g.popups.show("image.insert")},showLayer:function Se(e){var t,a,i=g.popups.get("image.insert");if(c||g.opts.toolbarInline){if(c){var n=we();Ce()&&(n=n.find(".fr-img-wrap")),a=n.offset().top+n.outerHeight(),t=n.offset().left}}else{var r=g.$tb.find('.fr-command[data-cmd="insertImage"]');t=r.offset().left,a=r.offset().top+(g.opts.toolbarBottom?10:r.outerHeight()-10)}!c&&g.opts.toolbarInline&&(a=i.offset().top-g.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),g.popups.show("image.insert",t,a,c?c.outerHeight():0),g.accessibility.focusPopup(i)},refreshUploadButton:function Re(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function De(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:G,insertByURL:function xe(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){O(),N(g.language.translate("Loading image"));var t=e.val().trim();if(g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy&&g.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?G([new Blob([this.response],{type:this.response.type||"image/png"})],c):I(i)},a.onerror=function(){L(t,!0,[],c)},a.open("GET","".concat(g.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else L(t,!0,[],c);e.val(""),e.blur()}},align:function $e(e){var t=we();t.removeClass("fr-fir fr-fil"),!g.opts.htmlUntouched&&g.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):me(t,he(),e),be(),S(),r(),g.selection.clear()},refreshAlign:function Ue(e){c&&e.find("> *").first().replaceWith(g.icon.create("image-align-".concat(ue())))},refreshAlignOnShow:function Ie(e,t){c&&t.find('.fr-command[data-param1="'.concat(ue(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function Pe(e){var t=we();t.removeClass("fr-dii fr-dib"),!g.opts.htmlUntouched&&g.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ue()),be(),S(),r(),g.selection.clear()},refreshDisplayOnShow:function Oe(e,t){c&&t.find('.fr-command[data-param1="'.concat(he(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:ve,back:function e(){c?(g.events.disableBlur(),d(".fr-popup input:focus").blur(),T(c)):(g.events.disableBlur(),g.selection.restore(),g.events.enableBlur(),g.popups.hide("image.insert"),g.toolbar.showInline())},get:ye,getEl:we,insert:L,showProgressBar:O,remove:te,hideProgressBar:k,applyStyle:function ke(e,t,a){if(void 0===t&&(t=g.opts.imageStyles),void 0===a&&(a=g.opts.imageMultipleStyles),!c)return!1;var i=we();if(!a){var n=Object.keys(t);n.splice(n.indexOf(e),1),i.removeClass(n.join(" "))}"object"==Le(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),T(c)},showAltPopup:j,showSizePopup:J,setAlt:function Ne(e){if(c){var t=g.popups.get("image.alt");c.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),T(c)}},setSize:function Be(e,t){if(c){var a=g.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;c.removeAttr("width").removeAttr("height"),e.match(i)?c.css("width",e):c.css("width",""),t.match(i)?c.css("height",t):c.css("height",""),Ce()&&(c.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?c.parents(".fr-img-caption").css("width",e):c.parents(".fr-img-caption").css("width",""),t.match(i)?c.parents(".fr-img-caption").css("height",t):c.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),T(c)}},toggleCaption:function Te(){var e;if(c&&!Ce()){(e=c).parent().is("a")&&(e=c.parent());var t,a,i=c.parents("ul")&&0<c.parents("ul").length?c.parents("ul"):c.parents("ol")&&0<c.parents("ol").length?c.parents("ol"):[];if(0<i.length){var n=i.find("li").length,r=c.parents("li"),s=document.createElement("li");n-1===r.index()&&(i.append(s),s.innerHTML=" ")}e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var o=g.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":c.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(g.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+c.attr("class")+'" style="'+(g.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2"> </p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),c.after('<span class="fr-inner"'.concat(g.browser.mozilla?"":' contenteditable="true"',">").concat(_e.START_MARKER).concat(g.language.translate("Image Caption")).concat(_e.END_MARKER,"</span>")),c.removeAttr("class").removeAttr("style").removeAttr("width"),c.parents(".fr-img-caption").css("width",o),pe(!0),g.selection.restore()}else e=we(),c.insertAfter(e),c.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),T(c)},hasCaption:Ce,exitEdit:pe,edit:T}},_e.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),_e.RegisterShortcut(_e.KEYCODE.P,"insertImage",null,"P"),_e.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),_e.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),_e.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),_e.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),_e.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),_e.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),_e.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),_e.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),_e.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),_e.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),_e.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),_e.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=_e.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),_e.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),_e.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),_e.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),_e.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),_e.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),_e.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),_e.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),_e.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),_e.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Le(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),_e.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),_e.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),_e.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),_e.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),_e.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),_e.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),_e.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),_e.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
|
167
167
|
|
168
168
|
});
|
169
169
|
|
170
170
|
;/*!node_modules/froala-editor/js/plugins/inline_class.min.js*/
|
171
|
-
amis.define('
|
171
|
+
amis.define('a74c656', function(require, exports, module, define) {
|
172
172
|
|
173
173
|
/*!
|
174
174
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -176,12 +176,12 @@ amis.define('dad8958', function(require, exports, module, define) {
|
|
176
176
|
* Copyright 2014-2020 Froala Labs
|
177
177
|
*/
|
178
178
|
|
179
|
-
!function(n,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("
|
179
|
+
!function(n,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(n.FroalaEditor)}(this,function(n){"use strict";n=n&&n.hasOwnProperty("default")?n["default"]:n,Object.assign(n.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),n.PLUGINS.inlineClass=function(e){var i=e.$;return{apply:function a(n){e.format.toggle("span",{"class":n})},refreshOnShow:function s(n,a){a.find(".fr-command").each(function(){var n=i(this).data("param1"),a=e.format.is("span",{"class":n});i(this).toggleClass("fr-active",a).attr("aria-selected",a)})}}},n.RegisterCommand("inlineClass",{type:"dropdown",title:"Inline Class",html:function(){var n='<ul class="fr-dropdown-list" role="presentation">',a=this.opts.inlineClasses;for(var e in a)a.hasOwnProperty(e)&&(n+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="'.concat(e,'" title="').concat(a[e],'">').concat(a[e],"</a></li>"));return n+="</ul>"},callback:function(n,a){this.inlineClass.apply(a)},refreshOnShow:function(n,a){this.inlineClass.refreshOnShow(n,a)},plugin:"inlineClass"}),n.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"})});
|
180
180
|
|
181
181
|
});
|
182
182
|
|
183
183
|
;/*!node_modules/froala-editor/js/plugins/inline_style.min.js*/
|
184
|
-
amis.define('
|
184
|
+
amis.define('ed54733', function(require, exports, module, define) {
|
185
185
|
|
186
186
|
/*!
|
187
187
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -189,12 +189,12 @@ amis.define('ab686ec', function(require, exports, module, define) {
|
|
189
189
|
* Copyright 2014-2020 Froala Labs
|
190
190
|
*/
|
191
191
|
|
192
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
192
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),e.PLUGINS.inlineStyle=function(i){return{apply:function a(e){for(var t=e.split(";"),n=0;n<t.length;n++){var l=t[n].split(":");t[n].length&&2==l.length&&i.format.applyStyle(l[0].trim(),l[1].trim())}}}},e.RegisterCommand("inlineStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineStyles;for(var n in t)if(t.hasOwnProperty(n)){var l=t[n]+(-1===t[n].indexOf("display:block;")?" display:block;":"");e+='<li role="presentation"><span style="'.concat(l,'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="').concat(t[n],'" title="').concat(this.language.translate(n),'">').concat(this.language.translate(n),"</a></span></li>")}return e+="</ul>"},title:"Inline Style",callback:function(e,t){this.inlineStyle.apply(t)},plugin:"inlineStyle"}),e.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"})});
|
193
193
|
|
194
194
|
});
|
195
195
|
|
196
196
|
;/*!node_modules/froala-editor/js/plugins/line_breaker.min.js*/
|
197
|
-
amis.define('
|
197
|
+
amis.define('79b65a7', function(require, exports, module, define) {
|
198
198
|
|
199
199
|
/*!
|
200
200
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -202,12 +202,12 @@ amis.define('84b53f5', function(require, exports, module, define) {
|
|
202
202
|
* Copyright 2014-2020 Froala Labs
|
203
203
|
*/
|
204
204
|
|
205
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
205
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(b){"use strict";b=b&&b.hasOwnProperty("default")?b["default"]:b,Object.assign(b.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),b.PLUGINS.lineBreaker=function(g){var v,t,a,m=g.$;function f(e,t){var n,r,a,o,i,s,f,l;if(null==e)i=(o=t.parent()).offset().top,n=(f=t.offset().top)-Math.min((f-i)/2,g.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else if(null==t)(s=(o=e.parent()).offset().top+o.outerHeight())<(l=e.offset().top+e.outerHeight())&&(s=(o=m(o).parent()).offset().top+o.outerHeight()),n=l+Math.min(Math.abs(s-l)/2,g.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else{o=e.parent();var p=e.offset().top+e.height(),u=t.offset().top;if(u<p)return!1;n=(p+u)/2,a=o.outerWidth(),r=o.offset().left}if(g.opts.iframe){var c=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),d=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));r+=g.$iframe.offset().left-g.helpers.scrollLeft()+d,n+=g.$iframe.offset().top-g.helpers.scrollTop()+c}g.$box.append(v),v.css("top",n-g.win.pageYOffset),v.css("left",r-g.win.pageXOffset),v.css("width",a),v.data("tag1",e),v.data("tag2",t),v.addClass("fr-visible").data("instance",g)}function l(e){if(e){var t=m(e);if(0===g.$el.find(t).length)return null;if(e.nodeType!=Node.TEXT_NODE&&t.is(g.opts.lineBreakerTags.join(",")))return t;if(0<t.parents(g.opts.lineBreakerTags.join(",")).length)return e=t.parents(g.opts.lineBreakerTags.join(",")).get(0),0!==g.$el.find(m(e)).length&&m(e).is(g.opts.lineBreakerTags.join(","))?m(e):null}return null}function o(e,t){var n=g.doc.elementFromPoint(e,t);return n&&!m(n).closest(".fr-line-breaker").length&&!g.node.isElement(n)&&n!=g.$wp.get(0)&&function r(e){if("undefined"!=typeof e.inFroalaWrapper)return e.inFroalaWrapper;for(var t=e;e.parentNode&&e.parentNode!==g.$wp.get(0);)e=e.parentNode;return t.inFroalaWrapper=e.parentNode==g.$wp.get(0),t.inFroalaWrapper}(n)?n:null}function i(e,t,n){for(var r=n,a=null;r<=g.opts.lineBreakerOffset&&!a;)(a=o(e,t-r))||(a=o(e,t+r)),r+=n;return a}function p(e,t,n){for(var r=null,a=100;!r&&e>g.$box.offset().left&&e<g.$box.offset().left+g.$box.outerWidth()&&0<a;)(r=o(e,t))||(r=i(e,t,5)),"left"==n?e-=g.opts.lineBreakerHorizontalOffset:e+=g.opts.lineBreakerHorizontalOffset,a-=g.opts.lineBreakerHorizontalOffset;return r}function n(e){var t=a=null,n=null,r=g.doc.elementFromPoint(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset);(t=r&&("HTML"==r.tagName||"BODY"==r.tagName||g.node.isElement(r)||0<=(r.getAttribute("class")||"").indexOf("fr-line-breaker"))?((n=i(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset,1))||(n=p(e.pageX-g.win.pageXOffset-g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"left")),n||(n=p(e.pageX-g.win.pageXOffset+g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"right")),l(n)):l(r))?function s(e,t){var n,r,a=e.offset().top,o=e.offset().top+e.outerHeight();if(Math.abs(o-t)<=g.opts.lineBreakerOffset||Math.abs(t-a)<=g.opts.lineBreakerOffset)if(Math.abs(o-t)<Math.abs(t-a)){for(var i=(r=e.get(0)).nextSibling;i&&i.nodeType==Node.TEXT_NODE&&0===i.textContent.length;)i=i.nextSibling;if(!i)return f(e,null),!0;if(n=l(i))return f(e,n),!0}else{if(!(r=e.get(0)).previousSibling)return f(null,e),!0;if(n=l(r.previousSibling))return f(n,e),!0}v.removeClass("fr-visible").removeData("instance")}(t,e.pageY):g.core.sameInstance(v)&&v.removeClass("fr-visible").removeData("instance")}function r(e){return!(v.hasClass("fr-visible")&&!g.core.sameInstance(v))&&(g.popups.areVisible()||g.el.querySelector(".fr-selected-cell")?(v.removeClass("fr-visible"),!0):void(!1!==t||g.edit.isDisabled()||(a&&clearTimeout(a),a=setTimeout(n,30,e))))}function s(){a&&clearTimeout(a),v&&v.hasClass("fr-visible")&&v.removeClass("fr-visible").removeData("instance")}var u=function u(){t=!0,s()},c=function c(){t=!1};function d(e){e.preventDefault();var t=v.data("instance")||g;v.removeClass("fr-visible").removeData("instance");var n=v.data("tag1"),r=v.data("tag2"),a=g.html.defaultTag();null==n?a&&"TD"!=r.parent().get(0).tagName&&0===r.parents(a).length?r.before("<".concat(a,">").concat(b.MARKERS,"<br></").concat(a,">")):r.before("".concat(b.MARKERS,"<br>")):a&&"TD"!=n.parent().get(0).tagName&&0===n.parents(a).length?n.after("<".concat(a,">").concat(b.MARKERS,"<br></").concat(a,">")):n.after("".concat(b.MARKERS,"<br>")),t.selection.restore(),g.toolbar.enable()}return{_init:function h(){if(!g.$wp)return!1;!function e(){g.shared.$line_breaker||(g.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(g.language.translate("Break"),'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="17" y="7" width="2" height="8"/><rect x="10" y="13" width="7" height="2"/><path d="M10.000,10.000 L10.000,18.013 L5.000,14.031 L10.000,10.000 Z"/></svg></a>'))),v=g.shared.$line_breaker,g.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null},!0),g.events.on("destroy",function(){v.removeData("instance").removeClass("fr-visible"),m("body").first().append(v),clearTimeout(a)},!0),g.events.$on(v,"mousemove",function(e){e.stopPropagation()},!0),g.events.bindClick(v,"a",d)}(),t=!1,g.events.$on(g.$win,"mousemove",r),g.events.$on(m(g.win),"scroll",s),g.events.on("popups.show.table.edit",s),g.events.on("commands.after",s),g.events.$on(m(g.win),"mousedown",u),g.events.$on(m(g.win),"mouseup",c)}}}});
|
206
206
|
|
207
207
|
});
|
208
208
|
|
209
209
|
;/*!node_modules/froala-editor/js/plugins/line_height.min.js*/
|
210
|
-
amis.define('
|
210
|
+
amis.define('864cceb', function(require, exports, module, define) {
|
211
211
|
|
212
212
|
/*!
|
213
213
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -215,12 +215,12 @@ amis.define('ebfe5f3', function(require, exports, module, define) {
|
|
215
215
|
* Copyright 2014-2020 Froala Labs
|
216
216
|
*/
|
217
217
|
|
218
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
218
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),e.PLUGINS.lineHeight=function(n){var o=n.$;return{_init:function e(){},apply:function a(e){n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var t=n.selection.blocks();t.length&&o(t[0]).parent().is("td")&&n.format.applyStyle("line-height",e.toString()),n.selection.save();for(var i=0;i<t.length;i++)o(t[i]).css("line-height",e),""===o(t[i]).attr("style")&&o(t[i]).removeAttr("style");n.html.unwrap(),n.selection.restore()},refreshOnShow:function r(e,t){var i=n.selection.blocks();if(i.length){var l=o(i[0]);t.find(".fr-command").each(function(){var e=o(this).data("param1"),t=l.attr("style"),i=0<=(t||"").indexOf("line-height: "+e+";");if(t){var n=t.substring(t.indexOf("line-height")),a=n.substr(0,n.indexOf(";")),r=a&&a.split(":")[1];r&&r.length||"Default"!==l.text()||(i=!0)}t&&-1!==t.indexOf("line-height")||""!==e||(i=!0),o(this).toggleClass("fr-active",i).attr("aria-selected",i)})}}}},e.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var i in t)t.hasOwnProperty(i)&&(e+='<li role="presentation"><a class="fr-command '.concat(i,'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="').concat(t[i],'" title="').concat(this.language.translate(i),'">').concat(this.language.translate(i),"</a></li>"));return e+="</ul>"},title:"Line Height",callback:function(e,t){this.lineHeight.apply(t)},refreshOnShow:function(e,t){this.lineHeight.refreshOnShow(e,t)},plugin:"lineHeight"}),e.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"})});
|
219
219
|
|
220
220
|
});
|
221
221
|
|
222
222
|
;/*!node_modules/froala-editor/js/plugins/link.min.js*/
|
223
|
-
amis.define('
|
223
|
+
amis.define('ac92a96', function(require, exports, module, define) {
|
224
224
|
|
225
225
|
/*!
|
226
226
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -228,12 +228,12 @@ amis.define('9cebb3b', function(require, exports, module, define) {
|
|
228
228
|
* Copyright 2014-2020 Froala Labs
|
229
229
|
*/
|
230
230
|
|
231
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("fa8683a")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(y){"use strict";y=y&&y.hasOwnProperty("default")?y["default"]:y,Object.assign(y.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(y.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkNoOpener:!0,linkNoReferrer:!0,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),y.PLUGINS.link=function(u){var k=u.$;function g(){var e=u.image?u.image.get():null;if(e||!u.$wp)return"A"==u.el.tagName?u.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=u.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(u.el)||!u.el.contains(t)||u.el==t)&&(t=null)}catch(r){t=null}if(t&&"A"===t.tagName)return t;var n=u.selection.element(),i=u.selection.endElement();"A"==n.tagName||u.node.isElement(n)||(n=k(n).parentsUntil(u.$el,"a").first().get(0)),"A"==i.tagName||u.node.isElement(i)||(i=k(i).parentsUntil(u.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(u.el)||!u.el.contains(i)||u.el==i)&&(i=null)}catch(r){i=null}try{n&&(n.contains&&n.contains(u.el)||!u.el.contains(n)||u.el==n)&&(n=null)}catch(r){n=null}return i&&i==n&&"A"==i.tagName?(u.browser.msie||u.helpers.isMobile())&&(u.selection.info(n).atEnd||u.selection.info(n).atStart)?null:n:null}function h(){var e,t,n,i,r=u.image?u.image.get():null,a=[];if(r)"A"==r.get(0).parentNode.tagName&&a.push(r.get(0).parentNode);else if(u.win.getSelection){var l=u.win.getSelection();if(l.getRangeAt&&l.rangeCount){i=u.doc.createRange();for(var s=0;s<l.rangeCount;++s)if((t=(e=l.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a");for(var o=0;o<n.length;++o)i.selectNodeContents(n[o]),i.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<i.compareBoundaryPoints(e.START_TO_END,e)&&a.push(n[o])}}}else if(u.doc.selection&&"Control"!=u.doc.selection.type)if("a"==(t=(e=u.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a"),i=u.doc.body.createTextRange();for(var p=0;p<n.length;++p)i.moveToElementText(n[p]),-1<i.compareEndPoints("StartToEnd",e)&&i.compareEndPoints("EndToStart",e)<1&&a.push(n[p])}return a}function m(r){if(u.core.hasFocus()){if(a(),r&&"keyup"===r.type&&(r.altKey||r.which==y.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=g(),t=u.image?u.image.get():null;if(e&&!t){if(u.image){var n=u.node.contents(e);if(1==n.length&&"IMG"==n[0].tagName){var i=u.selection.ranges(0);return 0===i.startOffset&&0===i.endOffset?k(e).before(y.MARKERS):k(e).after(y.MARKERS),u.selection.restore(),!1}}r&&r.stopPropagation(),l(e)}}},u.helpers.isIOS()?100:0)}}function l(e){var t=u.popups.get("link.edit");t||(t=function a(){var e="";1<=u.opts.linkEditButtons.length&&("A"==u.el.tagName&&0<=u.opts.linkEditButtons.indexOf("linkRemove")&&u.opts.linkEditButtons.splice(u.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(u.button.buildList(u.opts.linkEditButtons),"</div>"));var t={buttons:e},n=u.popups.create("link.edit",t);u.$wp&&u.events.$on(u.$wp,"scroll.link-edit",function(){g()&&u.popups.isVisible("link.edit")&&l(g())});return n}());var n=k(e);u.popups.isVisible("link.edit")||u.popups.refresh("link.edit"),u.popups.setContainer("link.edit",u.$sc);var i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.edit",i,r,n.outerHeight(),!0)}function a(){u.popups.hide("link.edit")}function o(){var e=u.popups.get("link.insert"),t=g();if(t){var n,i,r=k(t),a=e.find('input.fr-link-attr[type="text"]'),l=e.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<a.length;n++)(i=k(a[n])).val(r.attr(i.attr("name")||""));for(l.attr("checked",!1),n=0;n<l.length;n++)i=k(l[n]),r.attr(i.attr("name"))==i.data("checked")&&i.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(u.selection.text());e.find("input.fr-link-attr").trigger("change"),(u.image?u.image.get():null)?e.find('.fr-link-attr[name="text"]').parent().hide():e.find('.fr-link-attr[name="text"]').parent().show()}function s(e){if(e)return u.popups.onRefresh("link.insert",o),!0;var t="";1<=u.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(u.button.buildList(u.opts.linkInsertButtons),"</div>"));var n="",i=0;for(var r in n='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(u.id,'">'),n+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(u.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("URL"),'" tabIndex="').concat(++i,'"></div>'),u.opts.linkText&&(n+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(u.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("Text"),'" tabIndex="').concat(++i,'"></div>')),u.opts.linkAttributes)if(u.opts.linkAttributes.hasOwnProperty(r)){var a=u.opts.linkAttributes[r];n+='<div class="fr-input-line"><input name="'.concat(r,'" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate(a),'" tabIndex="').concat(++i,'"></div>')}u.opts.linkAlwaysBlank||(n+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(u.id,'" tabIndex="').concat(++i,'"><span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span><label id="fr-label-target-').concat(u.id,'">').concat(u.language.translate("Open in new tab"),"</label></div>"));var l={buttons:t,input_layer:n+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'.concat(++i,'" type="button">').concat(u.language.translate("Insert"),"</button></div></div>")},s=u.popups.create("link.insert",l);return u.$wp&&u.events.$on(u.$wp,"scroll.link-insert",function(){(u.image?u.image.get():null)&&u.popups.isVisible("link.insert")&&f(),u.popups.isVisible("link.insert")&&c()}),s}function p(e,t,n){if(void 0===n&&(n={}),!1===u.events.trigger("link.beforeInsert",[e,t,n]))return!1;var i=u.image?u.image.get():null;i||"A"==u.el.tagName?"A"==u.el.tagName&&u.$el.focus():(u.selection.restore(),u.popups.hide("link.insert"));var r=e;u.opts.linkConvertEmailAddress&&u.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:".concat(e));if(""===u.opts.linkAutoPrefix||new RegExp("^("+y.LinkProtocols.join("|")+"):.","i").test(e)||/^data:image.*/i.test(e)||/^(https?:|ftps?:|file:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||["/","{","[","#","(","."].indexOf((e||"")[0])<0&&(e=u.opts.linkAutoPrefix+u.helpers.sanitizeURL(e)),e=u.helpers.sanitizeURL(e),u.opts.linkAlwaysBlank&&(n.target="_blank"),u.opts.linkAlwaysNoFollow&&(n.rel="nofollow"),u.helpers.isEmail(r)&&(n.target=null,n.rel=null),"_blank"==n.target?(u.opts.linkNoOpener&&(n.rel?n.rel+=" noopener":n.rel="noopener"),u.opts.linkNoReferrer&&(n.rel?n.rel+=" noreferrer":n.rel="noreferrer")):null==n.target&&(n.rel?n.rel=n.rel.replace(/noopener/,"").replace(/noreferrer/,""):n.rel=null),t=t||"",e===u.opts.linkAutoPrefix)return u.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),u.events.trigger("link.bad",[r]),!1;var a,l=g();if(l){if((a=k(l)).attr("href",e),0<t.length&&a.text()!=t&&!i){for(var s=a.get(0);1===s.childNodes.length&&s.childNodes[0].nodeType==Node.ELEMENT_NODE;)s=s.childNodes[0];k(s).text(t)}for(var o in i||a.prepend(y.START_MARKER).append(y.END_MARKER),n)n[o]?a.attr(o,n[o]):a.removeAttr(o);i||u.selection.restore()}else{i?(i.wrap('<a href="'.concat(e,'"></a>')),u.image.hasCaption()&&i.parent().append(i.parents(".fr-img-caption").find(".fr-inner"))):(u.format.remove("a"),u.selection.isCollapsed()?(t=0===t.length?r:t,u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&").replace(/</,"<",">",">")).concat(y.END_MARKER,"</a>")),u.selection.restore()):0<t.length&&t!=u.selection.text().replace(/\n/g,"")?(u.selection.remove(),u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&")).concat(y.END_MARKER,"</a>")),u.selection.restore()):(!function d(){if(!u.selection.isCollapsed()){u.selection.save();for(var e=u.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=k(e.pop());t.removeClass("fr-unprocessed");var n=u.node.deepestParent(t.get(0));if(n){for(var i=t.get(0),r="",a="";i=i.parentNode,u.node.isBlock(i)||(r+=u.node.closeTagString(i),a=u.node.openTagString(i)+a),i!=n;);var l=u.node.openTagString(t.get(0))+t.html()+u.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=n.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+l+a)).replace(a+r,""),n.outerHTML=s}e=u.$el.find(".fr-marker.fr-unprocessed").toArray()}u.html.cleanEmptyTags(),u.selection.restore()}}(),u.format.apply("a",{href:e})));for(var p=h(),c=0;c<p.length;c++)(a=k(p[c])).attr(n),a.removeAttr("_moz_dirty");1==p.length&&u.$wp&&!i&&(k(p[0]).prepend(y.START_MARKER).append(y.END_MARKER),u.selection.restore())}if(i){var f=u.popups.get("link.insert");f&&f.find("input:focus").blur(),u.image.edit(i)}else m()}function c(){a();var e=g();if(e){var t=u.popups.get("link.insert");t||(t=s()),u.popups.isVisible("link.insert")||(u.popups.refresh("link.insert"),u.selection.save(),u.helpers.isMobile()&&(u.events.disableBlur(),u.$el.blur(),u.events.enableBlur())),u.popups.setContainer("link.insert",u.$sc);var n=(u.image?u.image.get():null)||k(e),i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.insert",i,r,n.outerHeight(),!0)}}function f(){var e=u.image?u.image.getEl():null;if(e){var t=u.popups.get("link.insert");u.image.hasCaption()&&(e=e.find(".fr-img-wrap")),t||(t=s()),o(),u.popups.setContainer("link.insert",u.$sc);var n=e.offset().left+e.outerWidth()/2,i=e.offset().top+e.outerHeight();u.popups.show("link.insert",n,i,e.outerHeight(),!0)}}return{_init:function e(){u.events.on("keyup",function(e){e.which!=y.KEYCODE.ESC&&m(e)}),u.events.on("window.mouseup",m),u.events.$on(u.$el,"click","a",function(e){u.edit.isDisabled()&&e.preventDefault()}),u.helpers.isMobile()&&u.events.$on(u.$doc,"selectionchange",m),s(!0),"A"==u.el.tagName&&u.$el.addClass("fr-view"),u.events.on("toolbar.esc",function(){if(u.popups.isVisible("link.edit"))return u.events.disableBlur(),u.events.focus(),!1},!0)},remove:function n(){var e=g(),t=u.image?u.image.get():null;if(!1===u.events.trigger("link.beforeRemove",[e]))return!1;t&&e?(t.unwrap(),u.image.edit(t)):e&&(u.selection.save(),k(e).replaceWith(k(e).html()),u.selection.restore(),a())},showInsertPopup:function d(){var e=u.$tb.find('.fr-command[data-cmd="insertLink"]'),t=u.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(u.popups.refresh("link.insert"),u.popups.setContainer("link.insert",u.$tb||u.$sc),e.isVisible()){var n=u.button.getPosition(e),i=n.left,r=n.top;u.popups.show("link.insert",i,r,e.outerHeight())}else u.position.forSelection(t),u.popups.show("link.insert")},usePredefined:function v(e){var t,n,i=u.opts.linkList[e],r=u.popups.get("link.insert"),a=r.find('input.fr-link-attr[type="text"]'),l=r.find('input.fr-link-attr[type="checkbox"]');for(i.rel&&(r.rel=i.rel),n=0;n<a.length;n++)i[(t=k(a[n])).attr("name")]?(t.val(i[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(n=0;n<l.length;n++)(t=k(l[n])).attr("checked",t.data("checked")==i[t.attr("name")]);u.accessibility.focusPopup(r)},insertCallback:function b(){var e,t,n=u.popups.get("link.insert"),i=n.find('input.fr-link-attr[type="text"]'),r=n.find('input.fr-link-attr[type="checkbox"]'),a=(i.filter('[name="href"]').val()||"").trim(),l=i.filter('[name="text"]').val(),s={};for(t=0;t<i.length;t++)e=k(i[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=k(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;n.rel&&(s.rel=n.rel);var o=u.helpers.scrollTop();p(a,l,s),k(u.o_win).scrollTop(o)},insert:p,update:c,get:g,allSelected:h,back:function t(){u.image&&u.image.get()?u.image.back():(u.events.disableBlur(),u.selection.restore(),u.events.enableBlur(),g()&&u.$wp?(u.selection.restore(),a(),m()):"A"==u.el.tagName?(u.$el.focus(),m()):(u.popups.hide("link.insert"),u.toolbar.showInline()))},imageLink:f,applyStyle:function E(e,t,n){void 0===n&&(n=u.opts.linkMultipleStyles),void 0===t&&(t=u.opts.linkStyles);var i=g();if(!i)return!1;if(!n){var r=Object.keys(t);r.splice(r.indexOf(e),1),k(i).removeClass(r.join(" "))}k(i).toggleClass(e),m()}}},y.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterShortcut(y.KEYCODE.K,"insertLink",null,"K"),y.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()},plugin:"link"}),y.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),y.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},callback:function(){var e=this.link.get();e&&(-1!==e.href.indexOf("mailto:")?this.o_win.open(e.href).close():(e.target||(e.target="_self"),this.browser.msie||this.browser.edge?this.o_win.open(e.href,e.target):this.o_win.open(e.href,e.target,"noopener")),this.popups.hide("link.edit"))},plugin:"link"}),y.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),y.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.link.update()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),y.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),y.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(e){var t=this.link.get()&&this.doc.hasFocus();(this.image?this.image.get():null)||t||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),y.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkList,n=0;n<t.length;n++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'.concat(n,'">').concat(t[n].displayText||t[n].text,"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),y.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(e){this.link.get()?e.text(this.language.translate("Update")):e.text(this.language.translate("Insert"))},plugin:"link"}),y.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,popup:!0,callback:function(){this.link.imageLink()},refresh:function(e){var t;this.link.get()?((t=e.prev()).hasClass("fr-separator")&&t.removeClass("fr-hidden"),e.addClass("fr-hidden")):((t=e.prev()).hasClass("fr-separator")&&t.addClass("fr-hidden"),e.removeClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),y.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'.concat(n,'">').concat(this.language.translate(t[n]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,i=this.link.get();if(i){var r=n(i);t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)})}},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"})});
|
231
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(y){"use strict";y=y&&y.hasOwnProperty("default")?y["default"]:y,Object.assign(y.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(y.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkNoOpener:!0,linkNoReferrer:!0,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),y.PLUGINS.link=function(u){var k=u.$;function g(){var e=u.image?u.image.get():null;if(e||!u.$wp)return"A"==u.el.tagName?u.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=u.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(u.el)||!u.el.contains(t)||u.el==t)&&(t=null)}catch(r){t=null}if(t&&"A"===t.tagName)return t;var n=u.selection.element(),i=u.selection.endElement();"A"==n.tagName||u.node.isElement(n)||(n=k(n).parentsUntil(u.$el,"a").first().get(0)),"A"==i.tagName||u.node.isElement(i)||(i=k(i).parentsUntil(u.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(u.el)||!u.el.contains(i)||u.el==i)&&(i=null)}catch(r){i=null}try{n&&(n.contains&&n.contains(u.el)||!u.el.contains(n)||u.el==n)&&(n=null)}catch(r){n=null}return i&&i==n&&"A"==i.tagName?(u.browser.msie||u.helpers.isMobile())&&(u.selection.info(n).atEnd||u.selection.info(n).atStart)?null:n:null}function h(){var e,t,n,i,r=u.image?u.image.get():null,a=[];if(r)"A"==r.get(0).parentNode.tagName&&a.push(r.get(0).parentNode);else if(u.win.getSelection){var l=u.win.getSelection();if(l.getRangeAt&&l.rangeCount){i=u.doc.createRange();for(var s=0;s<l.rangeCount;++s)if((t=(e=l.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a");for(var o=0;o<n.length;++o)i.selectNodeContents(n[o]),i.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<i.compareBoundaryPoints(e.START_TO_END,e)&&a.push(n[o])}}}else if(u.doc.selection&&"Control"!=u.doc.selection.type)if("a"==(t=(e=u.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a"),i=u.doc.body.createTextRange();for(var p=0;p<n.length;++p)i.moveToElementText(n[p]),-1<i.compareEndPoints("StartToEnd",e)&&i.compareEndPoints("EndToStart",e)<1&&a.push(n[p])}return a}function m(r){if(u.core.hasFocus()){if(a(),r&&"keyup"===r.type&&(r.altKey||r.which==y.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=g(),t=u.image?u.image.get():null;if(e&&!t){if(u.image){var n=u.node.contents(e);if(1==n.length&&"IMG"==n[0].tagName){var i=u.selection.ranges(0);return 0===i.startOffset&&0===i.endOffset?k(e).before(y.MARKERS):k(e).after(y.MARKERS),u.selection.restore(),!1}}r&&r.stopPropagation(),l(e)}}},u.helpers.isIOS()?100:0)}}function l(e){var t=u.popups.get("link.edit");t||(t=function a(){var e="";1<=u.opts.linkEditButtons.length&&("A"==u.el.tagName&&0<=u.opts.linkEditButtons.indexOf("linkRemove")&&u.opts.linkEditButtons.splice(u.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(u.button.buildList(u.opts.linkEditButtons),"</div>"));var t={buttons:e},n=u.popups.create("link.edit",t);u.$wp&&u.events.$on(u.$wp,"scroll.link-edit",function(){g()&&u.popups.isVisible("link.edit")&&l(g())});return n}());var n=k(e);u.popups.isVisible("link.edit")||u.popups.refresh("link.edit"),u.popups.setContainer("link.edit",u.$sc);var i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.edit",i,r,n.outerHeight(),!0)}function a(){u.popups.hide("link.edit")}function o(){var e=u.popups.get("link.insert"),t=g();if(t){var n,i,r=k(t),a=e.find('input.fr-link-attr[type="text"]'),l=e.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<a.length;n++)(i=k(a[n])).val(r.attr(i.attr("name")||""));for(l.attr("checked",!1),n=0;n<l.length;n++)i=k(l[n]),r.attr(i.attr("name"))==i.data("checked")&&i.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(u.selection.text());e.find("input.fr-link-attr").trigger("change"),(u.image?u.image.get():null)?e.find('.fr-link-attr[name="text"]').parent().hide():e.find('.fr-link-attr[name="text"]').parent().show()}function s(e){if(e)return u.popups.onRefresh("link.insert",o),!0;var t="";1<=u.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(u.button.buildList(u.opts.linkInsertButtons),"</div>"));var n="",i=0;for(var r in n='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(u.id,'">'),n+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(u.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("URL"),'" tabIndex="').concat(++i,'"></div>'),u.opts.linkText&&(n+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(u.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("Text"),'" tabIndex="').concat(++i,'"></div>')),u.opts.linkAttributes)if(u.opts.linkAttributes.hasOwnProperty(r)){var a=u.opts.linkAttributes[r];n+='<div class="fr-input-line"><input name="'.concat(r,'" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate(a),'" tabIndex="').concat(++i,'"></div>')}u.opts.linkAlwaysBlank||(n+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(u.id,'" tabIndex="').concat(++i,'"><span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span><label id="fr-label-target-').concat(u.id,'">').concat(u.language.translate("Open in new tab"),"</label></div>"));var l={buttons:t,input_layer:n+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'.concat(++i,'" type="button">').concat(u.language.translate("Insert"),"</button></div></div>")},s=u.popups.create("link.insert",l);return u.$wp&&u.events.$on(u.$wp,"scroll.link-insert",function(){(u.image?u.image.get():null)&&u.popups.isVisible("link.insert")&&f(),u.popups.isVisible("link.insert")&&c()}),s}function p(e,t,n){if(void 0===n&&(n={}),!1===u.events.trigger("link.beforeInsert",[e,t,n]))return!1;var i=u.image?u.image.get():null;i||"A"==u.el.tagName?"A"==u.el.tagName&&u.$el.focus():(u.selection.restore(),u.popups.hide("link.insert"));var r=e;u.opts.linkConvertEmailAddress&&u.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:".concat(e));if(""===u.opts.linkAutoPrefix||new RegExp("^("+y.LinkProtocols.join("|")+"):.","i").test(e)||/^data:image.*/i.test(e)||/^(https?:|ftps?:|file:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||["/","{","[","#","(","."].indexOf((e||"")[0])<0&&(e=u.opts.linkAutoPrefix+u.helpers.sanitizeURL(e)),e=u.helpers.sanitizeURL(e),u.opts.linkAlwaysBlank&&(n.target="_blank"),u.opts.linkAlwaysNoFollow&&(n.rel="nofollow"),u.helpers.isEmail(r)&&(n.target=null,n.rel=null),"_blank"==n.target?(u.opts.linkNoOpener&&(n.rel?n.rel+=" noopener":n.rel="noopener"),u.opts.linkNoReferrer&&(n.rel?n.rel+=" noreferrer":n.rel="noreferrer")):null==n.target&&(n.rel?n.rel=n.rel.replace(/noopener/,"").replace(/noreferrer/,""):n.rel=null),t=t||"",e===u.opts.linkAutoPrefix)return u.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),u.events.trigger("link.bad",[r]),!1;var a,l=g();if(l){if((a=k(l)).attr("href",e),0<t.length&&a.text()!=t&&!i){for(var s=a.get(0);1===s.childNodes.length&&s.childNodes[0].nodeType==Node.ELEMENT_NODE;)s=s.childNodes[0];k(s).text(t)}for(var o in i||a.prepend(y.START_MARKER).append(y.END_MARKER),n)n[o]?a.attr(o,n[o]):a.removeAttr(o);i||u.selection.restore()}else{i?(i.wrap('<a href="'.concat(e,'"></a>')),u.image.hasCaption()&&i.parent().append(i.parents(".fr-img-caption").find(".fr-inner"))):(u.format.remove("a"),u.selection.isCollapsed()?(t=0===t.length?r:t,u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&").replace(/</,"<",">",">")).concat(y.END_MARKER,"</a>")),u.selection.restore()):0<t.length&&t!=u.selection.text().replace(/\n/g,"")?(u.selection.remove(),u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&")).concat(y.END_MARKER,"</a>")),u.selection.restore()):(!function d(){if(!u.selection.isCollapsed()){u.selection.save();for(var e=u.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=k(e.pop());t.removeClass("fr-unprocessed");var n=u.node.deepestParent(t.get(0));if(n){for(var i=t.get(0),r="",a="";i=i.parentNode,u.node.isBlock(i)||(r+=u.node.closeTagString(i),a=u.node.openTagString(i)+a),i!=n;);var l=u.node.openTagString(t.get(0))+t.html()+u.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=n.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+l+a)).replace(a+r,""),n.outerHTML=s}e=u.$el.find(".fr-marker.fr-unprocessed").toArray()}u.html.cleanEmptyTags(),u.selection.restore()}}(),u.format.apply("a",{href:e})));for(var p=h(),c=0;c<p.length;c++)(a=k(p[c])).attr(n),a.removeAttr("_moz_dirty");1==p.length&&u.$wp&&!i&&(k(p[0]).prepend(y.START_MARKER).append(y.END_MARKER),u.selection.restore())}if(i){var f=u.popups.get("link.insert");f&&f.find("input:focus").blur(),u.image.edit(i)}else m()}function c(){a();var e=g();if(e){var t=u.popups.get("link.insert");t||(t=s()),u.popups.isVisible("link.insert")||(u.popups.refresh("link.insert"),u.selection.save(),u.helpers.isMobile()&&(u.events.disableBlur(),u.$el.blur(),u.events.enableBlur())),u.popups.setContainer("link.insert",u.$sc);var n=(u.image?u.image.get():null)||k(e),i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.insert",i,r,n.outerHeight(),!0)}}function f(){var e=u.image?u.image.getEl():null;if(e){var t=u.popups.get("link.insert");u.image.hasCaption()&&(e=e.find(".fr-img-wrap")),t||(t=s()),o(),u.popups.setContainer("link.insert",u.$sc);var n=e.offset().left+e.outerWidth()/2,i=e.offset().top+e.outerHeight();u.popups.show("link.insert",n,i,e.outerHeight(),!0)}}return{_init:function e(){u.events.on("keyup",function(e){e.which!=y.KEYCODE.ESC&&m(e)}),u.events.on("window.mouseup",m),u.events.$on(u.$el,"click","a",function(e){u.edit.isDisabled()&&e.preventDefault()}),u.helpers.isMobile()&&u.events.$on(u.$doc,"selectionchange",m),s(!0),"A"==u.el.tagName&&u.$el.addClass("fr-view"),u.events.on("toolbar.esc",function(){if(u.popups.isVisible("link.edit"))return u.events.disableBlur(),u.events.focus(),!1},!0)},remove:function n(){var e=g(),t=u.image?u.image.get():null;if(!1===u.events.trigger("link.beforeRemove",[e]))return!1;t&&e?(t.unwrap(),u.image.edit(t)):e&&(u.selection.save(),k(e).replaceWith(k(e).html()),u.selection.restore(),a())},showInsertPopup:function d(){var e=u.$tb.find('.fr-command[data-cmd="insertLink"]'),t=u.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(u.popups.refresh("link.insert"),u.popups.setContainer("link.insert",u.$tb||u.$sc),e.isVisible()){var n=u.button.getPosition(e),i=n.left,r=n.top;u.popups.show("link.insert",i,r,e.outerHeight())}else u.position.forSelection(t),u.popups.show("link.insert")},usePredefined:function v(e){var t,n,i=u.opts.linkList[e],r=u.popups.get("link.insert"),a=r.find('input.fr-link-attr[type="text"]'),l=r.find('input.fr-link-attr[type="checkbox"]');for(i.rel&&(r.rel=i.rel),n=0;n<a.length;n++)i[(t=k(a[n])).attr("name")]?(t.val(i[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(n=0;n<l.length;n++)(t=k(l[n])).attr("checked",t.data("checked")==i[t.attr("name")]);u.accessibility.focusPopup(r)},insertCallback:function b(){var e,t,n=u.popups.get("link.insert"),i=n.find('input.fr-link-attr[type="text"]'),r=n.find('input.fr-link-attr[type="checkbox"]'),a=(i.filter('[name="href"]').val()||"").trim(),l=i.filter('[name="text"]').val(),s={};for(t=0;t<i.length;t++)e=k(i[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=k(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;n.rel&&(s.rel=n.rel);var o=u.helpers.scrollTop();p(a,l,s),k(u.o_win).scrollTop(o)},insert:p,update:c,get:g,allSelected:h,back:function t(){u.image&&u.image.get()?u.image.back():(u.events.disableBlur(),u.selection.restore(),u.events.enableBlur(),g()&&u.$wp?(u.selection.restore(),a(),m()):"A"==u.el.tagName?(u.$el.focus(),m()):(u.popups.hide("link.insert"),u.toolbar.showInline()))},imageLink:f,applyStyle:function E(e,t,n){void 0===n&&(n=u.opts.linkMultipleStyles),void 0===t&&(t=u.opts.linkStyles);var i=g();if(!i)return!1;if(!n){var r=Object.keys(t);r.splice(r.indexOf(e),1),k(i).removeClass(r.join(" "))}k(i).toggleClass(e),m()}}},y.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterShortcut(y.KEYCODE.K,"insertLink",null,"K"),y.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()},plugin:"link"}),y.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),y.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},callback:function(){var e=this.link.get();e&&(-1!==e.href.indexOf("mailto:")?this.o_win.open(e.href).close():(e.target||(e.target="_self"),this.browser.msie||this.browser.edge?this.o_win.open(e.href,e.target):this.o_win.open(e.href,e.target,"noopener")),this.popups.hide("link.edit"))},plugin:"link"}),y.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),y.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.link.update()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),y.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),y.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(e){var t=this.link.get()&&this.doc.hasFocus();(this.image?this.image.get():null)||t||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),y.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkList,n=0;n<t.length;n++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'.concat(n,'">').concat(t[n].displayText||t[n].text,"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),y.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(e){this.link.get()?e.text(this.language.translate("Update")):e.text(this.language.translate("Insert"))},plugin:"link"}),y.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,popup:!0,callback:function(){this.link.imageLink()},refresh:function(e){var t;this.link.get()?((t=e.prev()).hasClass("fr-separator")&&t.removeClass("fr-hidden"),e.addClass("fr-hidden")):((t=e.prev()).hasClass("fr-separator")&&t.addClass("fr-hidden"),e.removeClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),y.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'.concat(n,'">').concat(this.language.translate(t[n]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,i=this.link.get();if(i){var r=n(i);t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)})}},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"})});
|
232
232
|
|
233
233
|
});
|
234
234
|
|
235
235
|
;/*!node_modules/froala-editor/js/plugins/lists.min.js*/
|
236
|
-
amis.define('
|
236
|
+
amis.define('a921988', function(require, exports, module, define) {
|
237
237
|
|
238
238
|
/*!
|
239
239
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -241,12 +241,12 @@ amis.define('a0d93a6', function(require, exports, module, define) {
|
|
241
241
|
* Copyright 2014-2020 Froala Labs
|
242
242
|
*/
|
243
243
|
|
244
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
244
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(f){"use strict";f=f&&f.hasOwnProperty("default")?f["default"]:f,Object.assign(f.DEFAULTS,{listAdvancedTypes:!0}),f.PLUGINS.lists=function(p){var d=p.$;function g(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function m(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function o(e,t){!function c(e,t){for(var a=[],n=0;n<e.length;n++){var r=e[n].parentNode;"LI"==e[n].tagName&&r.tagName!=t&&a.indexOf(r)<0&&a.push(r)}for(var o=a.length-1;0<=o;o--){var i=d(a[o]);i.replaceWith("<".concat(t.toLowerCase()," ").concat(p.node.attributes(i.get(0)),">").concat(i.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var a,n=p.html.defaultTag(),r=null;e.length&&(a="rtl"==p.opts.direction||"rtl"==d(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o<e.length;o++)if("TD"!=e[o].tagName&&"TH"!=e[o].tagName&&"LI"!=e[o].tagName){var i=p.helpers.getPX(d(e[o]).css(a))||0;(e[o].style.marginLeft=null)===r&&(r=i);var s=0<r?"<".concat(t,' style="').concat(a,": ").concat(r,'px ">'):"<".concat(t,">"),l="</".concat(t,">");for(i-=r;0<i/p.opts.indentMargin;)s+="</".concat(t,">"),l+=l,i-=p.opts.indentMargin;n&&e[o].tagName.toLowerCase()==n?d(e[o]).replaceWith("".concat(s,"<li").concat(p.node.attributes(e[o]),">").concat(d(e[o]).html(),"</li>").concat(l)):d(e[o]).wrap("".concat(s,"<li></li>").concat(l))}p.clean.lists()}function i(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--)if(d(e[a]).find(e[t]).length||e[a]==e[t]){e.splice(t,1);break}var n=[];for(t=0;t<e.length;t++){var r=d(e[t]),o=e[t].parentNode,i=r.attr("class");if(r.before(m(o.tagName)),"LI"==o.parentNode.tagName)r.before(m("LI")),r.after(g("LI"));else{var s="";i&&(s+=' class="'.concat(i,'"'));var l="rtl"==p.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";p.helpers.getPX(d(o).css(l))&&0<=(d(o).attr("style")||"").indexOf("".concat(l,":"))&&(s+=' style="'.concat(l,":").concat(p.helpers.getPX(d(o).css(l)),'px;"')),p.html.defaultTag()&&0===r.find(p.html.blockTagsQuery()).length&&r.wrapInner(p.html.defaultTag()+s),p.node.isEmpty(r.get(0),!0)||0!==r.find(p.html.blockTagsQuery()).length||r.append("<br>"),r.append(g("LI")),r.prepend(m("LI"))}r.after(g(o.tagName)),"LI"==o.parentNode.tagName&&(o=o.parentNode.parentNode),n.indexOf(o)<0&&n.push(o)}for(t=0;t<n.length;t++){var c=d(n[t]),f=c.html();f=(f=f.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),c.replaceWith(p.node.openTagString(c.get(0))+f+p.node.closeTagString(c.get(0)))}p.$el.find("li:empty").remove(),p.$el.find("ul:empty, ol:empty").remove(),p.clean.lists(),p.html.wrap()}function s(e){p.selection.save();for(var t=0;t<e.length;t++){var a=e[t].previousSibling;if(a){var n=d(e[t]).find("> ul, > ol").last().get(0);if(n){var r=d(document.createElement("li"));d(n).prepend(r);for(var o=p.node.contents(e[t])[0];o&&!p.node.isList(o);){var i=o.nextSibling;r.append(o),o=i}d(a).append(d(n)),d(e[t]).remove()}else{var s=d(a).find("> ul, > ol").last().get(0);if(s)d(s).append(d(e[t]));else{var l=d("<".concat(e[t].parentNode.tagName,">"));d(a).append(l),l.append(d(e[t]))}}}}p.clean.lists(),p.selection.restore()}function l(e){p.selection.save(),i(e),p.selection.restore()}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=p.selection.blocks(),n=[],r=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("LI"==r.tagName||"LI"!=r.parentNode.tagName)return}else if(!a[0].previousSibling||"LI"!=a[0].previousSibling.tagName)return;for(var o=0;o<a.length;o++)"LI"==a[o].tagName?(t=!0,n.push(a[o])):"LI"==a[o].parentNode.tagName&&(t=!0,n.push(a[o].parentNode));t&&("indent"==e?s(n):l(n))}}return{_init:function t(){p.events.on("commands.after",e),p.events.on("keydown",function(e){if(e.which==f.KEYCODE.TAB){for(var t=p.selection.blocks(),a=[],n=0;n<t.length;n++)"LI"==t[n].tagName?a.push(t[n]):"LI"==t[n].parentNode.tagName&&a.push(t[n].parentNode);if(1<a.length||a.length&&(p.selection.info(a[0]).atStart||p.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?l(a):s(a),!1}},!0)},format:function c(e,t){var a,n;for(p.html.syncInputs(),p.selection.save(),p.html.wrap(!0,!0,!0,!0),p.selection.restore(),n=p.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(p.selection.save(),function r(e,t){for(var a=!0,n=0;n<e.length;n++){if("LI"!=e[n].tagName)return!1;e[n].parentNode.tagName!=t&&(a=!1)}return a}(n,e)?t||i(n):o(n,e),p.html.unwrap(),p.selection.restore(),t=t||"default"){for(n=p.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);for(a=0;a<n.length;a++)"LI"==n[a].tagName&&(d(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(d(n[a].parentNode).attr("style")||"").length&&d(n[a].parentNode).removeAttr("style"))}},refresh:function r(e,t){var a=d(p.selection.element());if(a.get(0)!=p.el){var n=a.get(0);(n="LI"!=n.tagName&&n.firstElementChild&&"LI"!=n.firstElementChild.tagName?a.parents("li").get(0):"LI"==n.tagName||n.firstElementChild?n.firstElementChild&&"LI"==n.firstElementChild.tagName?a.get(0).firstChild:a.get(0):a.parents("li").get(0))&&n.parentNode.tagName==t&&p.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},f.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),f.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),f.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),f.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),f.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),f.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"})});
|
245
245
|
|
246
246
|
});
|
247
247
|
|
248
248
|
;/*!node_modules/froala-editor/js/plugins/paragraph_format.min.js*/
|
249
|
-
amis.define('
|
249
|
+
amis.define('5fac325', function(require, exports, module, define) {
|
250
250
|
|
251
251
|
/*!
|
252
252
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -254,12 +254,12 @@ amis.define('4f7ac0b', function(require, exports, module, define) {
|
|
254
254
|
* Copyright 2014-2020 Froala Labs
|
255
255
|
*/
|
256
256
|
|
257
|
-
!function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
257
|
+
!function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),a.PLUGINS.paragraphFormat=function(h){var f=h.$;function g(a,t){var e=h.html.defaultTag();if(t&&t.toLowerCase()!=e)if(0<a.find("ul, ol").length){var r=f("<"+t+">");a.prepend(r);for(var n=h.node.contents(a.get(0))[0];n&&["UL","OL"].indexOf(n.tagName)<0;){var o=n.nextSibling;r.append(n),n=o}}else a.html("<"+t+">"+a.html()+"</"+t+">")}return{apply:function c(a){"N"==a&&(a=h.html.defaultTag()),h.selection.save(),h.html.wrap(!0,!0,!h.opts.paragraphFormat.BLOCKQUOTE,!0,!0),h.selection.restore();var t,e,r,n,o,i,l,p,s=h.selection.blocks();h.selection.save(),h.$el.find("pre").attr("skip",!0);for(var d=0;d<s.length;d++)if(s[d].tagName!=a&&!h.node.isList(s[d])){var m=f(s[d]);"LI"==s[d].tagName?g(m,a):"LI"==s[d].parentNode.tagName&&s[d]?(i=m,l=a,p=h.html.defaultTag(),l&&l.toLowerCase()!=p||(l='div class="fr-temp-div"'),i.replaceWith(f("<"+l+">").html(i.html()))):0<=["TD","TH"].indexOf(s[d].parentNode.tagName)?(r=m,n=a,o=h.html.defaultTag(),n||(n='div class="fr-temp-div"'+(h.node.isEmpty(r.get(0),!0)?' data-empty="true"':"")),n.toLowerCase()==o?(h.node.isEmpty(r.get(0),!0)||r.append("<br/>"),r.replaceWith(r.html())):r.replaceWith(f("<"+n+">").html(r.html()))):(t=m,(e=a)||(e='div class="fr-temp-div"'+(h.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),"H1"!=e&&"H2"!=e&&"H3"!=e&&"H4"!=e&&"H5"!=e||!h.node.attributes(t.get(0)).includes("font-size:")?t.replaceWith(f("<"+e+" "+h.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty")):t.replaceWith(f("<"+e+" "+h.node.attributes(t.get(0)).replace(/font-size:[0-9]+px;?/,"")+">").html(t.html()).removeAttr("data-empty")))}h.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){f(this).prev().append("<br>"+f(this).html()),f(this).remove()}),h.$el.find("pre").removeAttr("skip"),h.html.unwrap(),h.selection.restore()},refreshOnShow:function i(a,t){var e=h.selection.blocks();if(e.length){var r=e[0],n="N",o=h.html.defaultTag();r.tagName.toLowerCase()!=o&&r!=h.el&&(n=r.tagName),t.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function o(a){if(h.opts.paragraphFormatSelection){var t=h.selection.blocks();if(t.length){var e=t[0],r="N",n=h.html.defaultTag();e.tagName.toLowerCase()!=n&&e!=h.el&&(r=e.tagName),0<=["LI","TD","TH"].indexOf(r)&&(r="N"),a.find(">span").text(h.language.translate(h.opts.paragraphFormat[r]))}else a.find(">span").text(h.language.translate(h.opts.paragraphFormat.N))}}}},a.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(a){return a.opts.paragraphFormatSelection},defaultSelection:function(a){return a.language.translate(a.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var e in t)if(t.hasOwnProperty(e)){var r=this.shortcuts.get("paragraphFormat."+e);r=r?'<span class="fr-shortcut">'+r+"</span>":"",a+='<li role="presentation"><'+("N"==e?this.html.defaultTag()||"DIV":e)+' style="padding: 0 !important; margin: 0 !important;" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+e+'" title="'+this.language.translate(t[e])+'">'+this.language.translate(t[e])+"</a></"+("N"==e?this.html.defaultTag()||"DIV":e)+"></li>"}return a+="</ul>"},title:"Paragraph Format",callback:function(a,t){this.paragraphFormat.apply(t)},refresh:function(a){this.paragraphFormat.refresh(a)},refreshOnShow:function(a,t){this.paragraphFormat.refreshOnShow(a,t)},plugin:"paragraphFormat"}),a.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"})});
|
258
258
|
|
259
259
|
});
|
260
260
|
|
261
261
|
;/*!node_modules/froala-editor/js/plugins/paragraph_style.min.js*/
|
262
|
-
amis.define('
|
262
|
+
amis.define('21b9b08', function(require, exports, module, define) {
|
263
263
|
|
264
264
|
/*!
|
265
265
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -267,12 +267,12 @@ amis.define('22c6a6e', function(require, exports, module, define) {
|
|
267
267
|
* Copyright 2014-2020 Froala Labs
|
268
268
|
*/
|
269
269
|
|
270
|
-
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("
|
270
|
+
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),a.PLUGINS.paragraphStyle=function(n){var i=n.$;return{_init:function a(){},apply:function p(a,e,t){void 0===e&&(e=n.opts.paragraphStyles),void 0===t&&(t=n.opts.paragraphMultipleStyles);var r="";t||((r=Object.keys(e)).splice(r.indexOf(a),1),r=r.join(" ")),n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var s=n.selection.blocks();n.selection.save();for(var o=i(s[0]).hasClass(a),l=0;l<s.length;l++)i(s[l]).removeClass(r).toggleClass(a,!o),i(s[l]).hasClass("fr-temp-div")&&i(s[l]).removeClass("fr-temp-div"),""===i(s[l]).attr("class")&&i(s[l]).removeAttr("class");n.html.unwrap(),n.selection.restore()},refreshOnShow:function s(a,e){var t=n.selection.blocks();if(t.length){var r=i(t[0]);e.find(".fr-command").each(function(){var a=i(this).data("param1"),e=r.hasClass(a);i(this).toggleClass("fr-active",e).attr("aria-selected",e)})}}}},a.RegisterCommand("paragraphStyle",{type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.paragraphStyles;for(var t in e)e.hasOwnProperty(t)&&(a+='<li role="presentation"><a class="fr-command '.concat(t,'" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="').concat(t,'" title="').concat(this.language.translate(e[t]),'">').concat(this.language.translate(e[t]),"</a></li>"));return a+="</ul>"},title:"Paragraph Style",callback:function(a,e){this.paragraphStyle.apply(e)},refreshOnShow:function(a,e){this.paragraphStyle.refreshOnShow(a,e)},plugin:"paragraphStyle"}),a.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"})});
|
271
271
|
|
272
272
|
});
|
273
273
|
|
274
274
|
;/*!node_modules/froala-editor/js/plugins/print.min.js*/
|
275
|
-
amis.define('
|
275
|
+
amis.define('78ca1a9', function(require, exports, module, define) {
|
276
276
|
|
277
277
|
/*!
|
278
278
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -280,12 +280,12 @@ amis.define('a1b25ab', function(require, exports, module, define) {
|
|
280
280
|
* Copyright 2014-2020 Froala Labs
|
281
281
|
*/
|
282
282
|
|
283
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
283
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{html2pdf:window.html2pdf}),e.PLUGINS.print=function(a){return{run:function e(){!function l(e){var t=a.html.get(),n=null;a.shared.print_iframe?n=a.shared.print_iframe:((n=document.createElement("iframe")).name="fr-print",n.style.position="fixed",n.style.top="0",n.style.left="-9999px",n.style.height="100%",n.style.width="0",n.style.overflow="hidden",n.style["z-index"]="2147483647",n.style.tabIndex="-1",a.events.on("shared.destroy",function(){n.remove()}),a.shared.print_iframe=n);try{document.body.removeChild(n)}catch(d){}document.body.appendChild(n);var i=function i(){e(),n.removeEventListener("load",i)};n.addEventListener("load",i);var o=n.contentWindow;o.document.open(),o.document.write("<!DOCTYPE html><html "+(a.opts.documentReady?'style="margin: 0; padding: 0;"':"")+"><head><title>"+document.title+"</title>"),Array.prototype.forEach.call(document.querySelectorAll("style"),function(e){e=e.cloneNode(!0),o.document.write(e.outerHTML)});var r=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(r,function(e){var t=document.createElement("link");t.rel=e.rel,t.href=e.href,t.media="print",t.type="text/css",t.media="all",o.document.write(t.outerHTML)}),o.document.write('</head><body style="height:auto;text-align: '+("rtl"==a.opts.direction?"right":"left")+"; direction: "+a.opts.direction+"; "+(a.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),o.document.write(t),o.document.write("</div></body></html>"),o.document.close()}(function(){setTimeout(function(){a.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),a.$win.get(0).focus(),a.events.disableBlur(),a.events.focus()},0)})},toPDF:function t(){a.opts.html2pdf&&(a.$el.css("text-align","left"),a.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(a.el).save(),setTimeout(function(){a.$el.css("text-align","")},100))}}},e.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),e.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),e.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),e.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}})});
|
284
284
|
|
285
285
|
});
|
286
286
|
|
287
287
|
;/*!node_modules/froala-editor/js/plugins/quick_insert.min.js*/
|
288
|
-
amis.define('
|
288
|
+
amis.define('d3ab1c6', function(require, exports, module, define) {
|
289
289
|
|
290
290
|
/*!
|
291
291
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -293,12 +293,12 @@ amis.define('6a68072', function(require, exports, module, define) {
|
|
293
293
|
* Copyright 2014-2020 Froala Labs
|
294
294
|
*/
|
295
295
|
|
296
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
296
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(p){"use strict";p=p&&p.hasOwnProperty("default")?p["default"]:p,Object.assign(p.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),p.QUICK_INSERT_BUTTONS={},p.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),p.RegisterQuickInsertButton=function(e,t){p.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},p.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var e=this,t=e.$;e.shared.$qi_image_input||(e.shared.$qi_image_input=t(document.createElement("input")).attr("accept","image/"+e.opts.imageAllowedTypes.join(", image/").toLowerCase()).attr("name","quickInsertImage".concat(this.id)).attr("style","display: none;").attr("type","file"),t("body").first().append(e.shared.$qi_image_input),e.events.$on(e.shared.$qi_image_input,"change",function(){var e=t(this).data("inst");this.files&&(e.quickInsert.hide(),e.image.upload(this.files)),t(this).val("")},!0)),e.$qi_image_input=e.shared.$qi_image_input,e.helpers.isMobile()&&e.selection.save(),e.events.disableBlur(),e.$qi_image_input.data("inst",e)[0].click()}}),p.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of the video you want to insert."));e&&this.video.insertByURL(e)}}),p.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of any web content you want to insert."));e&&this.embedly.add(e)}}),p.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),p.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),p.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),p.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),p.PLUGINS.quickInsert=function(r){var a,l,c=r.$;function n(e){var t,n,i;(t=e.offset().top-r.$box.offset().top,n=(r.$iframe&&r.$iframe.offset().left||0)+e.offset().left<a.outerWidth()?e.offset().left+a.outerWidth():0-a.outerWidth(),r.opts.enter!=p.ENTER_BR)?i=(a.outerHeight()-e.outerHeight())/2:(c(document.createElement("span")).html(p.INVISIBLE_SPACE).insertAfter(e),i=(a.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(r.opts.iframe){var s=r.helpers.getPX(r.$wp.find(".fr-iframe").css("padding-top"));t+=r.$iframe.offset().top+s}a.hasClass("fr-on")&&0<=t&&l.css("top",t-i),0<=t&&t-Math.abs(i)<=r.$box.outerHeight()-e.outerHeight()?(a.hasClass("fr-hidden")&&(a.hasClass("fr-on")&&u(),a.removeClass("fr-hidden")),a.css("top",t-i)):a.hasClass("fr-visible")&&(a.addClass("fr-hidden"),d()),a.css("left",n)}function s(e){a||function t(){r.shared.$quick_insert||(r.shared.$quick_insert=c(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(r.language.translate("Quick Insert"),'">').concat(r.icon.create("quickInsert"),"</a>")));a=r.shared.$quick_insert,r.tooltip.bind(r.$box,".fr-quick-insert > a.fr-floating-btn"),r.events.on("destroy",function(){c("body").first().append(a.removeClass("fr-on")),l&&(d(),c("body").first().append(l.css("left",-9999).css("top",-9999)))},!0),r.events.on("shared.destroy",function(){a.html("").removeData().remove(),a=null,l&&(l.html("").removeData().remove(),l=null)},!0),r.events.on("commands.before",o),r.events.on("commands.after",function(){r.popups.areVisible()||i()}),r.events.bindClick(r.$box,".fr-quick-insert > a",u),r.events.bindClick(r.$box,".fr-qi-helper > a.fr-btn",function(e){var t=c(e.currentTarget).data("cmd");if(!1===r.events.trigger("quickInsert.commands.before",[t]))return!1;p.QUICK_INSERT_BUTTONS[t].callback.apply(r,[e.currentTarget]),p.QUICK_INSERT_BUTTONS[t].undo&&r.undo.saveStep(),r.events.trigger("quickInsert.commands.after",[t]),r.quickInsert.hide()}),r.events.$on(r.$wp,"scroll",f),r.events.$on(r.$tb,"transitionend",".fr-more-toolbar",f)}(),a.hasClass("fr-on")&&d(),r.$box.append(a),n(e),a.data("tag",e),a.addClass("fr-visible")}function i(){if(r.core.hasFocus()){var e=r.selection.element();if(r.opts.enter==p.ENTER_BR||r.node.isBlock(e)||(e=r.node.blockParent(e)),r.opts.enter==p.ENTER_BR&&!r.node.isBlock(e)){var t=r.node.deepestParent(e);t&&(e=t)}var n=function n(){return r.opts.enter!=p.ENTER_BR&&r.node.isEmpty(e)&&0<=r.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},i=function i(){return r.opts.enter==p.ENTER_BR&&("BR"==e.tagName&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))||r.node.isEmpty(e)&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))&&(!e.nextSibling||"BR"==e.nextSibling.tagName||r.node.isBlock(e.nextSibling)))};e&&(n()||i())?a&&a.data("tag").is(c(e))&&a.hasClass("fr-on")?d():r.selection.isCollapsed()&&s(c(e)):o()}}function o(){a&&(a.hasClass("fr-on")&&d(),a.removeClass("fr-visible fr-on"),a.css("left",-9999).css("top",-9999))}function u(e){if(e&&e.preventDefault(),a.hasClass("fr-on")&&!a.hasClass("fr-hidden"))d();else{if(!r.shared.$qi_helper){for(var t=r.opts.quickInsertButtons,n='<div class="fr-qi-helper">',i=0,s=0;s<t.length;s++){var o=p.QUICK_INSERT_BUTTONS[t[s]];o&&(!o.requiredPlugin||p.PLUGINS[o.requiredPlugin]&&0<=r.opts.pluginsEnabled.indexOf(o.requiredPlugin))&&(n+='<a class="fr-btn fr-floating-btn" role="button" title="'.concat(r.language.translate(o.title),'" tabIndex="-1" data-cmd="').concat(t[s],'" style="transition-delay: ').concat(.025*i++,'s;">').concat(r.icon.create(o.icon),"</a>"))}n+="</div>",r.shared.$qi_helper=c(n),r.tooltip.bind(r.shared.$qi_helper,"a.fr-btn"),r.events.$on(r.shared.$qi_helper,"mousedown",function(e){e.preventDefault()},!0)}l=r.shared.$qi_helper,r.$box.append(l),setTimeout(function(){l.css("top",parseFloat(a.css("top"))),l.css("left",parseFloat(a.css("left"))+a.outerWidth()),l.find("a").addClass("fr-size-1"),a.addClass("fr-on")},10)}}function d(){var n=r.$box.find(".fr-qi-helper");n.length&&function(){for(var t=n.find("a"),e=0;e<t.length;e++)!function(e){setTimeout(function(){n.children().eq(t.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){n.css("left",-9999),a&&!a.hasClass("fr-hidden")&&a.removeClass("fr-on")},25*e)}()}function f(){a.hasClass("fr-visible")&&n(a.data("tag"))}return{_init:function e(){if(!r.$wp||!r.opts.quickInsertEnabled)return!1;r.popups.onShow("image.edit",o),r.events.on("mouseup",i),r.helpers.isMobile()&&r.events.$on(c(r.o_doc),"selectionchange",i),r.events.on("blur",o),r.events.on("keyup",i),r.events.on("keydown",function(){setTimeout(function(){i()},0)})},hide:o}}});
|
297
297
|
|
298
298
|
});
|
299
299
|
|
300
300
|
;/*!node_modules/froala-editor/js/plugins/quote.min.js*/
|
301
|
-
amis.define('
|
301
|
+
amis.define('311e141', function(require, exports, module, define) {
|
302
302
|
|
303
303
|
/*!
|
304
304
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -306,12 +306,12 @@ amis.define('00e7733', function(require, exports, module, define) {
|
|
306
306
|
* Copyright 2014-2020 Froala Labs
|
307
307
|
*/
|
308
308
|
|
309
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
309
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.quote=function(r){var a=r.$;function c(e){for(;e.parentNode&&e.parentNode!=r.el;)e=e.parentNode;return e}return{apply:function t(e){r.selection.save(),r.html.wrap(!0,!0,!0,!0),r.selection.restore(),"increase"==e?function n(){var e,t=r.selection.blocks();for(e=0;e<t.length;e++)t[e]=c(t[e]);r.selection.save();var o=a(document.createElement("blockquote"));for(o.insertBefore(t[0]),e=0;e<t.length;e++)o.append(t[e]);r.html.unwrap(),r.selection.restore()}():"decrease"==e&&function o(){var e,t=r.selection.blocks();for(e=0;e<t.length;e++)"BLOCKQUOTE"!=t[e].tagName&&(t[e]=a(t[e]).parentsUntil(r.$el,"BLOCKQUOTE").get(0));for(r.selection.save(),e=0;e<t.length;e++)t[e]&&a(t[e]).replaceWith(t[e].innerHTML);r.html.unwrap(),r.selection.restore()}()}}},e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),e.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var o in t)if(t.hasOwnProperty(o)){var n=this.shortcuts.get("quote.".concat(o));e+='<li role="presentation"><a class="fr-command fr-active '.concat(o,'" tabIndex="-1" role="option" data-cmd="quote" data-param1="').concat(o,'" title="').concat(t[o],'">').concat(this.language.translate(t[o])).concat(n?'<span class="fr-shortcut">'.concat(n,"</span>"):"","</a></li>")}return e+="</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),e.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"})});
|
310
310
|
|
311
311
|
});
|
312
312
|
|
313
313
|
;/*!node_modules/froala-editor/js/plugins/save.min.js*/
|
314
|
-
amis.define('
|
314
|
+
amis.define('e465b87', function(require, exports, module, define) {
|
315
315
|
|
316
316
|
/*!
|
317
317
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -319,12 +319,12 @@ amis.define('e98087c', function(require, exports, module, define) {
|
|
319
319
|
* Copyright 2014-2020 Froala Labs
|
320
320
|
*/
|
321
321
|
|
322
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
322
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),e.PLUGINS.save=function(i){var v=i.$,e=null,f=null,t=!1,u=1,l=2,s={};function c(e,t){i.events.trigger("save.error",[{code:e,message:s[e]},t])}function a(e){void 0===e&&(e=i.html.get());var a=e,t=i.events.trigger("save.before",[e]);if(!1===t)return!1;if("string"==typeof t&&(e=t),i.opts.saveURL){var s={};for(var n in i.opts.saveParams)if(i.opts.saveParams.hasOwnProperty(n)){var o=i.opts.saveParams[n];s[n]="function"==typeof o?o.call(this):o}var r={};r[i.opts.saveParam]=e,v(this).ajax({method:i.opts.saveMethod,url:i.opts.saveURL,data:Object.assign(r,s),crossDomain:i.opts.requestWithCORS,withCredentials:i.opts.requestWithCredentials,headers:i.opts.requestHeaders,done:function(e,t,s){f=a,i.events.trigger("save.after",[e])},fail:function(e){c(l,e.response||e.responseText)}})}else c(u)}function n(){clearTimeout(e),e=setTimeout(function(){var e=i.html.get();(f!=e||t)&&(t=!1,a(f=e))},0)}return s[u]="Missing saveURL option.",s[l]="Something went wrong during save.",{_init:function o(){i.opts.saveInterval&&(f=i.html.get(),i.events.on("contentChanged",function(){setTimeout(n,i.opts.saveInterval)}),i.events.on("keydown destroy",function(){clearTimeout(e)}))},save:a,reset:function r(){n(),t=!1},force:function d(){t=!0}}},e.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),e.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"})});
|
323
323
|
|
324
324
|
});
|
325
325
|
|
326
326
|
;/*!node_modules/froala-editor/js/plugins/special_characters.min.js*/
|
327
|
-
amis.define('
|
327
|
+
amis.define('74e84ae', function(require, exports, module, define) {
|
328
328
|
|
329
329
|
/*!
|
330
330
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -332,12 +332,12 @@ amis.define('b21d944', function(require, exports, module, define) {
|
|
332
332
|
* Copyright 2014-2020 Froala Labs
|
333
333
|
*/
|
334
334
|
|
335
|
-
!function(c,E){"object"==typeof exports&&"undefined"!=typeof module?E(require("fa8683a")):"function"==typeof define&&define.amd?define(["froala-editor"],E):E(c.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{specialCharactersSets:[{title:"Latin","char":"¡",list:[{"char":"¡",desc:"INVERTED EXCLAMATION MARK"},{"char":"¢",desc:"CENT SIGN"},{"char":"£",desc:"POUND SIGN"},{"char":"¤",desc:"CURRENCY SIGN"},{"char":"¥",desc:"YEN SIGN"},{"char":"¦",desc:"BROKEN BAR"},{"char":"§",desc:"SECTION SIGN"},{"char":"¨",desc:"DIAERESIS"},{"char":"©",desc:"COPYRIGHT SIGN"},{"char":"™",desc:"TRADEMARK SIGN"},{"char":"ª",desc:"FEMININE ORDINAL INDICATOR"},{"char":"«",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¬",desc:"NOT SIGN"},{"char":"®",desc:"REGISTERED SIGN"},{"char":"¯",desc:"MACRON"},{"char":"°",desc:"DEGREE SIGN"},{"char":"±",desc:"PLUS-MINUS SIGN"},{"char":"²",desc:"SUPERSCRIPT TWO"},{"char":"³",desc:"SUPERSCRIPT THREE"},{"char":"´",desc:"ACUTE ACCENT"},{"char":"µ",desc:"MICRO SIGN"},{"char":"¶",desc:"PILCROW SIGN"},{"char":"·",desc:"MIDDLE DOT"},{"char":"¸",desc:"CEDILLA"},{"char":"¹",desc:"SUPERSCRIPT ONE"},{"char":"º",desc:"MASCULINE ORDINAL INDICATOR"},{"char":"»",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¼",desc:"VULGAR FRACTION ONE QUARTER"},{"char":"½",desc:"VULGAR FRACTION ONE HALF"},{"char":"¾",desc:"VULGAR FRACTION THREE QUARTERS"},{"char":"¿",desc:"INVERTED QUESTION MARK"},{"char":"À",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{"char":"Á",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{"char":"Â",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{"char":"Ã",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{"char":"Ä",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{"char":"Å",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{"char":"Æ",desc:"LATIN CAPITAL LETTER AE"},{"char":"Ç",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{"char":"È",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{"char":"É",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{"char":"Ê",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{"char":"Ë",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{"char":"Ì",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{"char":"Í",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{"char":"Î",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{"char":"Ï",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{"char":"Ð",desc:"LATIN CAPITAL LETTER ETH"},{"char":"Ñ",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{"char":"Ò",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{"char":"Ó",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{"char":"Ô",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{"char":"Õ",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{"char":"Ö",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{"char":"×",desc:"MULTIPLICATION SIGN"},{"char":"Ø",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{"char":"Ù",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{"char":"Ú",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{"char":"Û",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{"char":"Ü",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{"char":"Ý",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{"char":"Þ",desc:"LATIN CAPITAL LETTER THORN"},{"char":"ß",desc:"LATIN SMALL LETTER SHARP S"},{"char":"à",desc:"LATIN SMALL LETTER A WITH GRAVE"},{"char":"á",desc:"LATIN SMALL LETTER A WITH ACUTE "},{"char":"â",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{"char":"ã",desc:"LATIN SMALL LETTER A WITH TILDE"},{"char":"ä",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{"char":"å",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{"char":"æ",desc:"LATIN SMALL LETTER AE"},{"char":"ç",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{"char":"è",desc:"LATIN SMALL LETTER E WITH GRAVE"},{"char":"é",desc:"LATIN SMALL LETTER E WITH ACUTE"},{"char":"ê",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{"char":"ë",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{"char":"ì",desc:"LATIN SMALL LETTER I WITH GRAVE"},{"char":"í",desc:"LATIN SMALL LETTER I WITH ACUTE"},{"char":"î",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{"char":"ï",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{"char":"ð",desc:"LATIN SMALL LETTER ETH"},{"char":"ñ",desc:"LATIN SMALL LETTER N WITH TILDE"},{"char":"ò",desc:"LATIN SMALL LETTER O WITH GRAVE"},{"char":"ó",desc:"LATIN SMALL LETTER O WITH ACUTE"},{"char":"ô",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{"char":"õ",desc:"LATIN SMALL LETTER O WITH TILDE"},{"char":"ö",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{"char":"÷",desc:"DIVISION SIGN"},{"char":"ø",desc:"LATIN SMALL LETTER O WITH STROKE"},{"char":"ù",desc:"LATIN SMALL LETTER U WITH GRAVE"},{"char":"ú",desc:"LATIN SMALL LETTER U WITH ACUTE"},{"char":"û",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{"char":"ü",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{"char":"ý",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{"char":"þ",desc:"LATIN SMALL LETTER THORN"},{"char":"ÿ",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek","char":"Α",list:[{"char":"Α",desc:"GREEK CAPITAL LETTER ALPHA"},{"char":"Β",desc:"GREEK CAPITAL LETTER BETA"},{"char":"Γ",desc:"GREEK CAPITAL LETTER GAMMA"},{"char":"Δ",desc:"GREEK CAPITAL LETTER DELTA"},{"char":"Ε",desc:"GREEK CAPITAL LETTER EPSILON"},{"char":"Ζ",desc:"GREEK CAPITAL LETTER ZETA"},{"char":"Η",desc:"GREEK CAPITAL LETTER ETA"},{"char":"Θ",desc:"GREEK CAPITAL LETTER THETA"},{"char":"Ι",desc:"GREEK CAPITAL LETTER IOTA"},{"char":"Κ",desc:"GREEK CAPITAL LETTER KAPPA"},{"char":"Λ",desc:"GREEK CAPITAL LETTER LAMBDA"},{"char":"Μ",desc:"GREEK CAPITAL LETTER MU"},{"char":"Ν",desc:"GREEK CAPITAL LETTER NU"},{"char":"Ξ",desc:"GREEK CAPITAL LETTER XI"},{"char":"Ο",desc:"GREEK CAPITAL LETTER OMICRON"},{"char":"Π",desc:"GREEK CAPITAL LETTER PI"},{"char":"Ρ",desc:"GREEK CAPITAL LETTER RHO"},{"char":"Σ",desc:"GREEK CAPITAL LETTER SIGMA"},{"char":"Τ",desc:"GREEK CAPITAL LETTER TAU"},{"char":"Υ",desc:"GREEK CAPITAL LETTER UPSILON"},{"char":"Φ",desc:"GREEK CAPITAL LETTER PHI"},{"char":"Χ",desc:"GREEK CAPITAL LETTER CHI"},{"char":"Ψ",desc:"GREEK CAPITAL LETTER PSI"},{"char":"Ω",desc:"GREEK CAPITAL LETTER OMEGA"},{"char":"α",desc:"GREEK SMALL LETTER ALPHA"},{"char":"β",desc:"GREEK SMALL LETTER BETA"},{"char":"γ",desc:"GREEK SMALL LETTER GAMMA"},{"char":"δ",desc:"GREEK SMALL LETTER DELTA"},{"char":"ε",desc:"GREEK SMALL LETTER EPSILON"},{"char":"ζ",desc:"GREEK SMALL LETTER ZETA"},{"char":"η",desc:"GREEK SMALL LETTER ETA"},{"char":"θ",desc:"GREEK SMALL LETTER THETA"},{"char":"ι",desc:"GREEK SMALL LETTER IOTA"},{"char":"κ",desc:"GREEK SMALL LETTER KAPPA"},{"char":"λ",desc:"GREEK SMALL LETTER LAMBDA"},{"char":"μ",desc:"GREEK SMALL LETTER MU"},{"char":"ν",desc:"GREEK SMALL LETTER NU"},{"char":"ξ",desc:"GREEK SMALL LETTER XI"},{"char":"ο",desc:"GREEK SMALL LETTER OMICRON"},{"char":"π",desc:"GREEK SMALL LETTER PI"},{"char":"ρ",desc:"GREEK SMALL LETTER RHO"},{"char":"ς",desc:"GREEK SMALL LETTER FINAL SIGMA"},{"char":"σ",desc:"GREEK SMALL LETTER SIGMA"},{"char":"τ",desc:"GREEK SMALL LETTER TAU"},{"char":"υ",desc:"GREEK SMALL LETTER UPSILON"},{"char":"φ",desc:"GREEK SMALL LETTER PHI"},{"char":"χ",desc:"GREEK SMALL LETTER CHI"},{"char":"ψ",desc:"GREEK SMALL LETTER PSI"},{"char":"ω",desc:"GREEK SMALL LETTER OMEGA"},{"char":"ϑ",desc:"GREEK THETA SYMBOL"},{"char":"ϒ",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{"char":"ϕ",desc:"GREEK PHI SYMBOL"},{"char":"ϖ",desc:"GREEK PI SYMBOL"},{"char":"Ϝ",desc:"GREEK LETTER DIGAMMA"},{"char":"ϝ",desc:"GREEK SMALL LETTER DIGAMMA"},{"char":"ϰ",desc:"GREEK KAPPA SYMBOL"},{"char":"ϱ",desc:"GREEK RHO SYMBOL"},{"char":"ϵ",desc:"GREEK LUNATE EPSILON SYMBOL"},{"char":"϶",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic","char":"Ѐ",list:[{"char":"Ѐ",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{"char":"Ё",desc:"CYRILLIC CAPITAL LETTER IO"},{"char":"Ђ",desc:"CYRILLIC CAPITAL LETTER DJE"},{"char":"Ѓ",desc:"CYRILLIC CAPITAL LETTER GJE"},{"char":"Є",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{"char":"Ѕ",desc:"CYRILLIC CAPITAL LETTER DZE"},{"char":"І",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"Ї",desc:"CYRILLIC CAPITAL LETTER YI"},{"char":"Ј",desc:"CYRILLIC CAPITAL LETTER JE"},{"char":"Љ",desc:"CYRILLIC CAPITAL LETTER LJE"},{"char":"Њ",desc:"CYRILLIC CAPITAL LETTER NJE"},{"char":"Ћ",desc:"CYRILLIC CAPITAL LETTER TSHE"},{"char":"Ќ",desc:"CYRILLIC CAPITAL LETTER KJE"},{"char":"Ѝ",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{"char":"Ў",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{"char":"Џ",desc:"CYRILLIC CAPITAL LETTER DZHE"},{"char":"А",desc:"CYRILLIC CAPITAL LETTER A"},{"char":"Б",desc:"CYRILLIC CAPITAL LETTER BE"},{"char":"В",desc:"CYRILLIC CAPITAL LETTER VE"},{"char":"Г",desc:"CYRILLIC CAPITAL LETTER GHE"},{"char":"Д",desc:"CYRILLIC CAPITAL LETTER DE"},{"char":"Е",desc:"CYRILLIC CAPITAL LETTER IE"},{"char":"Ж",desc:"CYRILLIC CAPITAL LETTER ZHE"},{"char":"З",desc:"CYRILLIC CAPITAL LETTER ZE"},{"char":"И",desc:"CYRILLIC CAPITAL LETTER I"},{"char":"Й",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{"char":"К",desc:"CYRILLIC CAPITAL LETTER KA"},{"char":"Л",desc:"CYRILLIC CAPITAL LETTER EL"},{"char":"М",desc:"CYRILLIC CAPITAL LETTER EM"},{"char":"Н",desc:"CYRILLIC CAPITAL LETTER EN"},{"char":"О",desc:"CYRILLIC CAPITAL LETTER O"},{"char":"П",desc:"CYRILLIC CAPITAL LETTER PE"},{"char":"Р",desc:"CYRILLIC CAPITAL LETTER ER"},{"char":"С",desc:"CYRILLIC CAPITAL LETTER ES"},{"char":"Т",desc:"CYRILLIC CAPITAL LETTER TE"},{"char":"У",desc:"CYRILLIC CAPITAL LETTER U"},{"char":"Ф",desc:"CYRILLIC CAPITAL LETTER EF"},{"char":"Х",desc:"CYRILLIC CAPITAL LETTER HA"},{"char":"Ц",desc:"CYRILLIC CAPITAL LETTER TSE"},{"char":"Ч",desc:"CYRILLIC CAPITAL LETTER CHE"},{"char":"Ш",desc:"CYRILLIC CAPITAL LETTER SHA"},{"char":"Щ",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{"char":"Ъ",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{"char":"Ы",desc:"CYRILLIC CAPITAL LETTER YERU"},{"char":"Ь",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{"char":"Э",desc:"CYRILLIC CAPITAL LETTER E"},{"char":"Ю",desc:"CYRILLIC CAPITAL LETTER YU"},{"char":"Я",desc:"CYRILLIC CAPITAL LETTER YA"},{"char":"а",desc:"CYRILLIC SMALL LETTER A"},{"char":"б",desc:"CYRILLIC SMALL LETTER BE"},{"char":"в",desc:"CYRILLIC SMALL LETTER VE"},{"char":"г",desc:"CYRILLIC SMALL LETTER GHE"},{"char":"д",desc:"CYRILLIC SMALL LETTER DE"},{"char":"е",desc:"CYRILLIC SMALL LETTER IE"},{"char":"ж",desc:"CYRILLIC SMALL LETTER ZHE"},{"char":"з",desc:"CYRILLIC SMALL LETTER ZE"},{"char":"и",desc:"CYRILLIC SMALL LETTER I"},{"char":"й",desc:"CYRILLIC SMALL LETTER SHORT I"},{"char":"к",desc:"CYRILLIC SMALL LETTER KA"},{"char":"л",desc:"CYRILLIC SMALL LETTER EL"},{"char":"м",desc:"CYRILLIC SMALL LETTER EM"},{"char":"н",desc:"CYRILLIC SMALL LETTER EN"},{"char":"о",desc:"CYRILLIC SMALL LETTER O"},{"char":"п",desc:"CYRILLIC SMALL LETTER PE"},{"char":"р",desc:"CYRILLIC SMALL LETTER ER"},{"char":"с",desc:"CYRILLIC SMALL LETTER ES"},{"char":"т",desc:"CYRILLIC SMALL LETTER TE"},{"char":"у",desc:"CYRILLIC SMALL LETTER U"},{"char":"ф",desc:"CYRILLIC SMALL LETTER EF"},{"char":"х",desc:"CYRILLIC SMALL LETTER HA"},{"char":"ц",desc:"CYRILLIC SMALL LETTER TSE"},{"char":"ч",desc:"CYRILLIC SMALL LETTER CHE"},{"char":"ш",desc:"CYRILLIC SMALL LETTER SHA"},{"char":"щ",desc:"CYRILLIC SMALL LETTER SHCHA"},{"char":"ъ",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{"char":"ы",desc:"CYRILLIC SMALL LETTER YERU"},{"char":"ь",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{"char":"э",desc:"CYRILLIC SMALL LETTER E"},{"char":"ю",desc:"CYRILLIC SMALL LETTER YU"},{"char":"я",desc:"CYRILLIC SMALL LETTER YA"},{"char":"ѐ",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{"char":"ё",desc:"CYRILLIC SMALL LETTER IO"},{"char":"ђ",desc:"CYRILLIC SMALL LETTER DJE"},{"char":"ѓ",desc:"CYRILLIC SMALL LETTER GJE"},{"char":"є",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{"char":"ѕ",desc:"CYRILLIC SMALL LETTER DZE"},{"char":"і",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"ї",desc:"CYRILLIC SMALL LETTER YI"},{"char":"ј",desc:"CYRILLIC SMALL LETTER JE"},{"char":"љ",desc:"CYRILLIC SMALL LETTER LJE"},{"char":"њ",desc:"CYRILLIC SMALL LETTER NJE"},{"char":"ћ",desc:"CYRILLIC SMALL LETTER TSHE"},{"char":"ќ",desc:"CYRILLIC SMALL LETTER KJE"},{"char":"ѝ",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{"char":"ў",desc:"CYRILLIC SMALL LETTER SHORT U"},{"char":"џ",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation","char":"–",list:[{"char":"–",desc:"EN DASH"},{"char":"—",desc:"EM DASH"},{"char":"‘",desc:"LEFT SINGLE QUOTATION MARK"},{"char":"’",desc:"RIGHT SINGLE QUOTATION MARK"},{"char":"‚",desc:"SINGLE LOW-9 QUOTATION MARK"},{"char":"“",desc:"LEFT DOUBLE QUOTATION MARK"},{"char":"”",desc:"RIGHT DOUBLE QUOTATION MARK"},{"char":"„",desc:"DOUBLE LOW-9 QUOTATION MARK"},{"char":"†",desc:"DAGGER"},{"char":"‡",desc:"DOUBLE DAGGER"},{"char":"•",desc:"BULLET"},{"char":"…",desc:"HORIZONTAL ELLIPSIS"},{"char":"‰",desc:"PER MILLE SIGN"},{"char":"′",desc:"PRIME"},{"char":"″",desc:"DOUBLE PRIME"},{"char":"‹",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{"char":"›",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{"char":"‾",desc:"OVERLINE"},{"char":"⁄",desc:"FRACTION SLASH"}]},{title:"Currency","char":"₠",list:[{"char":"₠",desc:"EURO-CURRENCY SIGN"},{"char":"₡",desc:"COLON SIGN"},{"char":"₢",desc:"CRUZEIRO SIGN"},{"char":"₣",desc:"FRENCH FRANC SIGN"},{"char":"₤",desc:"LIRA SIGN"},{"char":"₥",desc:"MILL SIGN"},{"char":"₦",desc:"NAIRA SIGN"},{"char":"₧",desc:"PESETA SIGN"},{"char":"₨",desc:"RUPEE SIGN"},{"char":"₩",desc:"WON SIGN"},{"char":"₪",desc:"NEW SHEQEL SIGN"},{"char":"₫",desc:"DONG SIGN"},{"char":"€",desc:"EURO SIGN"},{"char":"₭",desc:"KIP SIGN"},{"char":"₮",desc:"TUGRIK SIGN"},{"char":"₯",desc:"DRACHMA SIGN"},{"char":"₰",desc:"GERMAN PENNY SYMBOL"},{"char":"₱",desc:"PESO SIGN"},{"char":"₲",desc:"GUARANI SIGN"},{"char":"₳",desc:"AUSTRAL SIGN"},{"char":"₴",desc:"HRYVNIA SIGN"},{"char":"₵",desc:"CEDI SIGN"},{"char":"₶",desc:"LIVRE TOURNOIS SIGN"},{"char":"₷",desc:"SPESMILO SIGN"},{"char":"₸",desc:"TENGE SIGN"},{"char":"₹",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows","char":"←",list:[{"char":"←",desc:"LEFTWARDS ARROW"},{"char":"↑",desc:"UPWARDS ARROW"},{"char":"→",desc:"RIGHTWARDS ARROW"},{"char":"↓",desc:"DOWNWARDS ARROW"},{"char":"↔",desc:"LEFT RIGHT ARROW"},{"char":"↕",desc:"UP DOWN ARROW"},{"char":"↖",desc:"NORTH WEST ARROW"},{"char":"↗",desc:"NORTH EAST ARROW"},{"char":"↘",desc:"SOUTH EAST ARROW"},{"char":"↙",desc:"SOUTH WEST ARROW"},{"char":"↚",desc:"LEFTWARDS ARROW WITH STROKE"},{"char":"↛",desc:"RIGHTWARDS ARROW WITH STROKE"},{"char":"↜",desc:"LEFTWARDS WAVE ARROW"},{"char":"↝",desc:"RIGHTWARDS WAVE ARROW"},{"char":"↞",desc:"LEFTWARDS TWO HEADED ARROW"},{"char":"↟",desc:"UPWARDS TWO HEADED ARROW"},{"char":"↠",desc:"RIGHTWARDS TWO HEADED ARROW"},{"char":"↡",desc:"DOWNWARDS TWO HEADED ARROW"},{"char":"↢",desc:"LEFTWARDS ARROW WITH TAIL"},{"char":"↣",desc:"RIGHTWARDS ARROW WITH TAIL"},{"char":"↤",desc:"LEFTWARDS ARROW FROM BAR"},{"char":"↥",desc:"UPWARDS ARROW FROM BAR"},{"char":"↦",desc:"RIGHTWARDS ARROW FROM BAR"},{"char":"↧",desc:"DOWNWARDS ARROW FROM BAR"},{"char":"↨",desc:"UP DOWN ARROW WITH BASE"},{"char":"↩",desc:"LEFTWARDS ARROW WITH HOOK"},{"char":"↪",desc:"RIGHTWARDS ARROW WITH HOOK"},{"char":"↫",desc:"LEFTWARDS ARROW WITH LOOP"},{"char":"↬",desc:"RIGHTWARDS ARROW WITH LOOP"},{"char":"↭",desc:"LEFT RIGHT WAVE ARROW"},{"char":"↮",desc:"LEFT RIGHT ARROW WITH STROKE"},{"char":"↯",desc:"DOWNWARDS ZIGZAG ARROW"},{"char":"↰",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↱",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↲",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↳",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↴",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{"char":"↵",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{"char":"↶",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↷",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↸",desc:"NORTH WEST ARROW TO LONG BAR"},{"char":"↹",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{"char":"↺",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{"char":"↻",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{"char":"↼",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{"char":"↽",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"↾",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"↿",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇀",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{"char":"⇁",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"⇂",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"⇃",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇄",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{"char":"⇅",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{"char":"⇆",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{"char":"⇇",desc:"LEFTWARDS PAIRED ARROWS"},{"char":"⇈",desc:"UPWARDS PAIRED ARROWS"},{"char":"⇉",desc:"RIGHTWARDS PAIRED ARROWS"},{"char":"⇊",desc:"DOWNWARDS PAIRED ARROWS"},{"char":"⇋",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{"char":"⇌",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{"char":"⇍",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇎",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{"char":"⇏",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇐",desc:"LEFTWARDS DOUBLE ARROW"},{"char":"⇑",desc:"UPWARDS DOUBLE ARROW"},{"char":"⇒",desc:"RIGHTWARDS DOUBLE ARROW"},{"char":"⇓",desc:"DOWNWARDS DOUBLE ARROW"},{"char":"⇔",desc:"LEFT RIGHT DOUBLE ARROW"},{"char":"⇕",desc:"UP DOWN DOUBLE ARROW"},{"char":"⇖",desc:"NORTH WEST DOUBLE ARROW"},{"char":"⇗",desc:"NORTH EAST DOUBLE ARROW"},{"char":"⇘",desc:"SOUTH EAST DOUBLE ARROW"},{"char":"⇙",desc:"SOUTH WEST DOUBLE ARROW"},{"char":"⇚",desc:"LEFTWARDS TRIPLE ARROW"},{"char":"⇛",desc:"RIGHTWARDS TRIPLE ARROW"},{"char":"⇜",desc:"LEFTWARDS SQUIGGLE ARROW"},{"char":"⇝",desc:"RIGHTWARDS SQUIGGLE ARROW"},{"char":"⇞",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇟",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇠",desc:"LEFTWARDS DASHED ARROW"},{"char":"⇡",desc:"UPWARDS DASHED ARROW"},{"char":"⇢",desc:"RIGHTWARDS DASHED ARROW"},{"char":"⇣",desc:"DOWNWARDS DASHED ARROW"},{"char":"⇤",desc:"LEFTWARDS ARROW TO BAR"},{"char":"⇥",desc:"RIGHTWARDS ARROW TO BAR"},{"char":"⇦",desc:"LEFTWARDS WHITE ARROW"},{"char":"⇧",desc:"UPWARDS WHITE ARROW"},{"char":"⇨",desc:"RIGHTWARDS WHITE ARROW"},{"char":"⇩",desc:"DOWNWARDS WHITE ARROW"},{"char":"⇪",desc:"UPWARDS WHITE ARROW FROM BAR"},{"char":"⇫",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{"char":"⇬",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{"char":"⇭",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{"char":"⇮",desc:"UPWARDS WHITE DOUBLE ARROW"},{"char":"⇯",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{"char":"⇰",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{"char":"⇱",desc:"NORTH WEST ARROW TO CORNER"},{"char":"⇲",desc:"SOUTH EAST ARROW TO CORNER"},{"char":"⇳",desc:"UP DOWN WHITE ARROW"},{"char":"⇴",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{"char":"⇵",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{"char":"⇶",desc:"THREE RIGHTWARDS ARROWS"},{"char":"⇷",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇸",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇹",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{"char":"⇺",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇻",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇼",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇽",desc:"LEFTWARDS OPEN-HEADED ARROW"},{"char":"⇾",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{"char":"⇿",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math","char":"∀",list:[{"char":"∀",desc:"FOR ALL"},{"char":"∂",desc:"PARTIAL DIFFERENTIAL"},{"char":"∃",desc:"THERE EXISTS"},{"char":"∅",desc:"EMPTY SET"},{"char":"∇",desc:"NABLA"},{"char":"∈",desc:"ELEMENT OF"},{"char":"∉",desc:"NOT AN ELEMENT OF"},{"char":"∋",desc:"CONTAINS AS MEMBER"},{"char":"∏",desc:"N-ARY PRODUCT"},{"char":"∑",desc:"N-ARY SUMMATION"},{"char":"−",desc:"MINUS SIGN"},{"char":"∗",desc:"ASTERISK OPERATOR"},{"char":"√",desc:"SQUARE ROOT"},{"char":"∝",desc:"PROPORTIONAL TO"},{"char":"∞",desc:"INFINITY"},{"char":"∠",desc:"ANGLE"},{"char":"∧",desc:"LOGICAL AND"},{"char":"∨",desc:"LOGICAL OR"},{"char":"∩",desc:"INTERSECTION"},{"char":"∪",desc:"UNION"},{"char":"∫",desc:"INTEGRAL"},{"char":"∴",desc:"THEREFORE"},{"char":"∼",desc:"TILDE OPERATOR"},{"char":"≅",desc:"APPROXIMATELY EQUAL TO"},{"char":"≈",desc:"ALMOST EQUAL TO"},{"char":"≠",desc:"NOT EQUAL TO"},{"char":"≡",desc:"IDENTICAL TO"},{"char":"≤",desc:"LESS-THAN OR EQUAL TO"},{"char":"≥",desc:"GREATER-THAN OR EQUAL TO"},{"char":"⊂",desc:"SUBSET OF"},{"char":"⊃",desc:"SUPERSET OF"},{"char":"⊄",desc:"NOT A SUBSET OF"},{"char":"⊆",desc:"SUBSET OF OR EQUAL TO"},{"char":"⊇",desc:"SUPERSET OF OR EQUAL TO"},{"char":"⊕",desc:"CIRCLED PLUS"},{"char":"⊗",desc:"CIRCLED TIMES"},{"char":"⊥",desc:"UP TACK"}]},{title:"Misc","char":"♠",list:[{"char":"♠",desc:"BLACK SPADE SUIT"},{"char":"♣",desc:"BLACK CLUB SUIT"},{"char":"♥",desc:"BLACK HEART SUIT"},{"char":"♦",desc:"BLACK DIAMOND SUIT"},{"char":"♩",desc:"QUARTER NOTE"},{"char":"♪",desc:"EIGHTH NOTE"},{"char":"♫",desc:"BEAMED EIGHTH NOTES"},{"char":"♬",desc:"BEAMED SIXTEENTH NOTES"},{"char":"♭",desc:"MUSIC FLAT SIGN"},{"char":"♮",desc:"MUSIC NATURAL SIGN"},{"char":"☀",desc:"BLACK SUN WITH RAYS"},{"char":"☁",desc:"CLOUD"},{"char":"☂",desc:"UMBRELLA"},{"char":"☃",desc:"SNOWMAN"},{"char":"☕",desc:"HOT BEVERAGE"},{"char":"☘",desc:"SHAMROCK"},{"char":"☯",desc:"YIN YANG"},{"char":"✔",desc:"HEAVY CHECK MARK"},{"char":"✖",desc:"HEAVY MULTIPLICATION X"},{"char":"❄",desc:"SNOWFLAKE"},{"char":"❛",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❜",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❝",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❞",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❤",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(t.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),t.PLUGINS.specialCharacters=function(W){var N=W.$,T=W.opts.specialCharactersSets[0],L=W.opts.specialCharactersSets,a="";function I(){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function E(c,T){var R="";return c.forEach(function(c){var E={elementClass:c.title===T.title?"fr-active fr-active-tab":"",title:c.title,dataParam1:c.title,desc:c["char"]};R+='<button class="fr-command fr-btn fr-special-character-category '.concat(E.elementClass,'" title="').concat(E.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(E.dataParam1,'"><span>').concat(E.desc,"</span></button>")}),R}(L,T),'\n </div>\n <div class="fr-icon-container fr-sc-container">\n ').concat(function R(c){var T="";return c.list.forEach(function(c){var E={dataParam1:c["char"],title:c.desc,splCharValue:c["char"]};T+='<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(E.dataParam1,'" \n title="').concat(E.title,'">').concat(E.splCharValue,"</span>")}),T}(T),"\n </div>")}return{setSpecialCharacterCategory:function R(E){T=L.filter(function(c){return c.title===E})[0],function c(){W.popups.get("specialCharacters").html(a+I())}()},showSpecialCharsPopup:function e(){var c=W.popups.get("specialCharacters");if(c||(c=function A(){W.opts.toolbarInline&&0<W.opts.specialCharButtons.length&&(a='<div class="fr-buttons fr-tabs">'.concat(W.button.buildList(W.opts.specialCharButtons),"</div>"));var c={buttons:a,custom_layer:I()},E=W.popups.create("specialCharacters",c);return function T(S){W.events.on("popup.tab",function(c){var E=N(c.currentTarget);if(!W.popups.isVisible("specialCharacters")||!E.is("span, a"))return!0;var T,R,L,A=c.which;if(t.KEYCODE.TAB==A){if(E.is("span.fr-icon")&&c.shiftKey||E.is("a")&&!c.shiftKey){var a=S.find(".fr-buttons");T=!W.accessibility.focusToolbar(a,!!c.shiftKey)}if(!1!==T){var I=S.find("span.fr-icon:focus").first().concat(S.findVisible(" span.fr-icon").first().concat(S.find("a")));E.is("span.fr-icon")&&(I=I.not("span.fr-icon:not(:focus)")),R=I.index(E),R=c.shiftKey?((R-1)%I.length+I.length)%I.length:(R+1)%I.length,L=I.get(R),W.events.disableBlur(),L.focus(),T=!1}}else if(t.KEYCODE.ARROW_UP==A||t.KEYCODE.ARROW_DOWN==A||t.KEYCODE.ARROW_LEFT==A||t.KEYCODE.ARROW_RIGHT==A){if(E.is("span.fr-icon")){var e=E.parent().find("span.fr-icon");R=e.index(E);var r=11,s=Math.floor(e.length/r),h=R%r,d=Math.floor(R/r),C=d*r+h,O=s*r;t.KEYCODE.ARROW_UP==A?C=((C-r)%O+O)%O:t.KEYCODE.ARROW_DOWN==A?C=(C+r)%O:t.KEYCODE.ARROW_LEFT==A?C=((C-1)%O+O)%O:t.KEYCODE.ARROW_RIGHT==A&&(C=(C+1)%O),L=N(e.get(C)),W.events.disableBlur(),L.focus(),T=!1}}else t.KEYCODE.ENTER==A&&(E.is("a")?E[0].click():W.button.exec(E),T=!1);return!1===T&&(c.preventDefault(),c.stopPropagation()),T},!0)}(E),E}()),!c.hasClass("fr-active")){W.popups.refresh("specialCharacters"),W.popups.setContainer("specialCharacters",W.$tb);var E=W.$tb.find('.fr-command[data-cmd="specialCharacters"]'),T=W.button.getPosition(E),R=T.left,L=T.top;W.popups.show("specialCharacters",R,L,outerHeight)}},back:function c(){W.popups.hide("specialCharacters"),W.toolbar.showInline()}}},t.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),t.RegisterCommand("specialCharacters",{title:"Special Characters",icon:"specialCharacters",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,plugin:"specialCharacters",showOnMobile:!0,callback:function(){this.popups.isVisible("specialCharacters")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("specialCharacters")):this.specialCharacters.showSpecialCharsPopup()}}),t.RegisterCommand("insertSpecialCharacter",{callback:function(c,E){this.undo.saveStep(),this.html.insert(E),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),t.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(c,E){this.specialCharacters.setSpecialCharacterCategory(E)}}),t.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}})});
|
335
|
+
!function(c,E){"object"==typeof exports&&"undefined"!=typeof module?E(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],E):E(c.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{specialCharactersSets:[{title:"Latin","char":"¡",list:[{"char":"¡",desc:"INVERTED EXCLAMATION MARK"},{"char":"¢",desc:"CENT SIGN"},{"char":"£",desc:"POUND SIGN"},{"char":"¤",desc:"CURRENCY SIGN"},{"char":"¥",desc:"YEN SIGN"},{"char":"¦",desc:"BROKEN BAR"},{"char":"§",desc:"SECTION SIGN"},{"char":"¨",desc:"DIAERESIS"},{"char":"©",desc:"COPYRIGHT SIGN"},{"char":"™",desc:"TRADEMARK SIGN"},{"char":"ª",desc:"FEMININE ORDINAL INDICATOR"},{"char":"«",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¬",desc:"NOT SIGN"},{"char":"®",desc:"REGISTERED SIGN"},{"char":"¯",desc:"MACRON"},{"char":"°",desc:"DEGREE SIGN"},{"char":"±",desc:"PLUS-MINUS SIGN"},{"char":"²",desc:"SUPERSCRIPT TWO"},{"char":"³",desc:"SUPERSCRIPT THREE"},{"char":"´",desc:"ACUTE ACCENT"},{"char":"µ",desc:"MICRO SIGN"},{"char":"¶",desc:"PILCROW SIGN"},{"char":"·",desc:"MIDDLE DOT"},{"char":"¸",desc:"CEDILLA"},{"char":"¹",desc:"SUPERSCRIPT ONE"},{"char":"º",desc:"MASCULINE ORDINAL INDICATOR"},{"char":"»",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¼",desc:"VULGAR FRACTION ONE QUARTER"},{"char":"½",desc:"VULGAR FRACTION ONE HALF"},{"char":"¾",desc:"VULGAR FRACTION THREE QUARTERS"},{"char":"¿",desc:"INVERTED QUESTION MARK"},{"char":"À",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{"char":"Á",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{"char":"Â",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{"char":"Ã",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{"char":"Ä",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{"char":"Å",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{"char":"Æ",desc:"LATIN CAPITAL LETTER AE"},{"char":"Ç",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{"char":"È",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{"char":"É",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{"char":"Ê",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{"char":"Ë",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{"char":"Ì",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{"char":"Í",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{"char":"Î",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{"char":"Ï",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{"char":"Ð",desc:"LATIN CAPITAL LETTER ETH"},{"char":"Ñ",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{"char":"Ò",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{"char":"Ó",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{"char":"Ô",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{"char":"Õ",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{"char":"Ö",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{"char":"×",desc:"MULTIPLICATION SIGN"},{"char":"Ø",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{"char":"Ù",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{"char":"Ú",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{"char":"Û",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{"char":"Ü",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{"char":"Ý",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{"char":"Þ",desc:"LATIN CAPITAL LETTER THORN"},{"char":"ß",desc:"LATIN SMALL LETTER SHARP S"},{"char":"à",desc:"LATIN SMALL LETTER A WITH GRAVE"},{"char":"á",desc:"LATIN SMALL LETTER A WITH ACUTE "},{"char":"â",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{"char":"ã",desc:"LATIN SMALL LETTER A WITH TILDE"},{"char":"ä",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{"char":"å",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{"char":"æ",desc:"LATIN SMALL LETTER AE"},{"char":"ç",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{"char":"è",desc:"LATIN SMALL LETTER E WITH GRAVE"},{"char":"é",desc:"LATIN SMALL LETTER E WITH ACUTE"},{"char":"ê",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{"char":"ë",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{"char":"ì",desc:"LATIN SMALL LETTER I WITH GRAVE"},{"char":"í",desc:"LATIN SMALL LETTER I WITH ACUTE"},{"char":"î",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{"char":"ï",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{"char":"ð",desc:"LATIN SMALL LETTER ETH"},{"char":"ñ",desc:"LATIN SMALL LETTER N WITH TILDE"},{"char":"ò",desc:"LATIN SMALL LETTER O WITH GRAVE"},{"char":"ó",desc:"LATIN SMALL LETTER O WITH ACUTE"},{"char":"ô",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{"char":"õ",desc:"LATIN SMALL LETTER O WITH TILDE"},{"char":"ö",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{"char":"÷",desc:"DIVISION SIGN"},{"char":"ø",desc:"LATIN SMALL LETTER O WITH STROKE"},{"char":"ù",desc:"LATIN SMALL LETTER U WITH GRAVE"},{"char":"ú",desc:"LATIN SMALL LETTER U WITH ACUTE"},{"char":"û",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{"char":"ü",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{"char":"ý",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{"char":"þ",desc:"LATIN SMALL LETTER THORN"},{"char":"ÿ",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek","char":"Α",list:[{"char":"Α",desc:"GREEK CAPITAL LETTER ALPHA"},{"char":"Β",desc:"GREEK CAPITAL LETTER BETA"},{"char":"Γ",desc:"GREEK CAPITAL LETTER GAMMA"},{"char":"Δ",desc:"GREEK CAPITAL LETTER DELTA"},{"char":"Ε",desc:"GREEK CAPITAL LETTER EPSILON"},{"char":"Ζ",desc:"GREEK CAPITAL LETTER ZETA"},{"char":"Η",desc:"GREEK CAPITAL LETTER ETA"},{"char":"Θ",desc:"GREEK CAPITAL LETTER THETA"},{"char":"Ι",desc:"GREEK CAPITAL LETTER IOTA"},{"char":"Κ",desc:"GREEK CAPITAL LETTER KAPPA"},{"char":"Λ",desc:"GREEK CAPITAL LETTER LAMBDA"},{"char":"Μ",desc:"GREEK CAPITAL LETTER MU"},{"char":"Ν",desc:"GREEK CAPITAL LETTER NU"},{"char":"Ξ",desc:"GREEK CAPITAL LETTER XI"},{"char":"Ο",desc:"GREEK CAPITAL LETTER OMICRON"},{"char":"Π",desc:"GREEK CAPITAL LETTER PI"},{"char":"Ρ",desc:"GREEK CAPITAL LETTER RHO"},{"char":"Σ",desc:"GREEK CAPITAL LETTER SIGMA"},{"char":"Τ",desc:"GREEK CAPITAL LETTER TAU"},{"char":"Υ",desc:"GREEK CAPITAL LETTER UPSILON"},{"char":"Φ",desc:"GREEK CAPITAL LETTER PHI"},{"char":"Χ",desc:"GREEK CAPITAL LETTER CHI"},{"char":"Ψ",desc:"GREEK CAPITAL LETTER PSI"},{"char":"Ω",desc:"GREEK CAPITAL LETTER OMEGA"},{"char":"α",desc:"GREEK SMALL LETTER ALPHA"},{"char":"β",desc:"GREEK SMALL LETTER BETA"},{"char":"γ",desc:"GREEK SMALL LETTER GAMMA"},{"char":"δ",desc:"GREEK SMALL LETTER DELTA"},{"char":"ε",desc:"GREEK SMALL LETTER EPSILON"},{"char":"ζ",desc:"GREEK SMALL LETTER ZETA"},{"char":"η",desc:"GREEK SMALL LETTER ETA"},{"char":"θ",desc:"GREEK SMALL LETTER THETA"},{"char":"ι",desc:"GREEK SMALL LETTER IOTA"},{"char":"κ",desc:"GREEK SMALL LETTER KAPPA"},{"char":"λ",desc:"GREEK SMALL LETTER LAMBDA"},{"char":"μ",desc:"GREEK SMALL LETTER MU"},{"char":"ν",desc:"GREEK SMALL LETTER NU"},{"char":"ξ",desc:"GREEK SMALL LETTER XI"},{"char":"ο",desc:"GREEK SMALL LETTER OMICRON"},{"char":"π",desc:"GREEK SMALL LETTER PI"},{"char":"ρ",desc:"GREEK SMALL LETTER RHO"},{"char":"ς",desc:"GREEK SMALL LETTER FINAL SIGMA"},{"char":"σ",desc:"GREEK SMALL LETTER SIGMA"},{"char":"τ",desc:"GREEK SMALL LETTER TAU"},{"char":"υ",desc:"GREEK SMALL LETTER UPSILON"},{"char":"φ",desc:"GREEK SMALL LETTER PHI"},{"char":"χ",desc:"GREEK SMALL LETTER CHI"},{"char":"ψ",desc:"GREEK SMALL LETTER PSI"},{"char":"ω",desc:"GREEK SMALL LETTER OMEGA"},{"char":"ϑ",desc:"GREEK THETA SYMBOL"},{"char":"ϒ",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{"char":"ϕ",desc:"GREEK PHI SYMBOL"},{"char":"ϖ",desc:"GREEK PI SYMBOL"},{"char":"Ϝ",desc:"GREEK LETTER DIGAMMA"},{"char":"ϝ",desc:"GREEK SMALL LETTER DIGAMMA"},{"char":"ϰ",desc:"GREEK KAPPA SYMBOL"},{"char":"ϱ",desc:"GREEK RHO SYMBOL"},{"char":"ϵ",desc:"GREEK LUNATE EPSILON SYMBOL"},{"char":"϶",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic","char":"Ѐ",list:[{"char":"Ѐ",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{"char":"Ё",desc:"CYRILLIC CAPITAL LETTER IO"},{"char":"Ђ",desc:"CYRILLIC CAPITAL LETTER DJE"},{"char":"Ѓ",desc:"CYRILLIC CAPITAL LETTER GJE"},{"char":"Є",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{"char":"Ѕ",desc:"CYRILLIC CAPITAL LETTER DZE"},{"char":"І",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"Ї",desc:"CYRILLIC CAPITAL LETTER YI"},{"char":"Ј",desc:"CYRILLIC CAPITAL LETTER JE"},{"char":"Љ",desc:"CYRILLIC CAPITAL LETTER LJE"},{"char":"Њ",desc:"CYRILLIC CAPITAL LETTER NJE"},{"char":"Ћ",desc:"CYRILLIC CAPITAL LETTER TSHE"},{"char":"Ќ",desc:"CYRILLIC CAPITAL LETTER KJE"},{"char":"Ѝ",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{"char":"Ў",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{"char":"Џ",desc:"CYRILLIC CAPITAL LETTER DZHE"},{"char":"А",desc:"CYRILLIC CAPITAL LETTER A"},{"char":"Б",desc:"CYRILLIC CAPITAL LETTER BE"},{"char":"В",desc:"CYRILLIC CAPITAL LETTER VE"},{"char":"Г",desc:"CYRILLIC CAPITAL LETTER GHE"},{"char":"Д",desc:"CYRILLIC CAPITAL LETTER DE"},{"char":"Е",desc:"CYRILLIC CAPITAL LETTER IE"},{"char":"Ж",desc:"CYRILLIC CAPITAL LETTER ZHE"},{"char":"З",desc:"CYRILLIC CAPITAL LETTER ZE"},{"char":"И",desc:"CYRILLIC CAPITAL LETTER I"},{"char":"Й",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{"char":"К",desc:"CYRILLIC CAPITAL LETTER KA"},{"char":"Л",desc:"CYRILLIC CAPITAL LETTER EL"},{"char":"М",desc:"CYRILLIC CAPITAL LETTER EM"},{"char":"Н",desc:"CYRILLIC CAPITAL LETTER EN"},{"char":"О",desc:"CYRILLIC CAPITAL LETTER O"},{"char":"П",desc:"CYRILLIC CAPITAL LETTER PE"},{"char":"Р",desc:"CYRILLIC CAPITAL LETTER ER"},{"char":"С",desc:"CYRILLIC CAPITAL LETTER ES"},{"char":"Т",desc:"CYRILLIC CAPITAL LETTER TE"},{"char":"У",desc:"CYRILLIC CAPITAL LETTER U"},{"char":"Ф",desc:"CYRILLIC CAPITAL LETTER EF"},{"char":"Х",desc:"CYRILLIC CAPITAL LETTER HA"},{"char":"Ц",desc:"CYRILLIC CAPITAL LETTER TSE"},{"char":"Ч",desc:"CYRILLIC CAPITAL LETTER CHE"},{"char":"Ш",desc:"CYRILLIC CAPITAL LETTER SHA"},{"char":"Щ",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{"char":"Ъ",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{"char":"Ы",desc:"CYRILLIC CAPITAL LETTER YERU"},{"char":"Ь",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{"char":"Э",desc:"CYRILLIC CAPITAL LETTER E"},{"char":"Ю",desc:"CYRILLIC CAPITAL LETTER YU"},{"char":"Я",desc:"CYRILLIC CAPITAL LETTER YA"},{"char":"а",desc:"CYRILLIC SMALL LETTER A"},{"char":"б",desc:"CYRILLIC SMALL LETTER BE"},{"char":"в",desc:"CYRILLIC SMALL LETTER VE"},{"char":"г",desc:"CYRILLIC SMALL LETTER GHE"},{"char":"д",desc:"CYRILLIC SMALL LETTER DE"},{"char":"е",desc:"CYRILLIC SMALL LETTER IE"},{"char":"ж",desc:"CYRILLIC SMALL LETTER ZHE"},{"char":"з",desc:"CYRILLIC SMALL LETTER ZE"},{"char":"и",desc:"CYRILLIC SMALL LETTER I"},{"char":"й",desc:"CYRILLIC SMALL LETTER SHORT I"},{"char":"к",desc:"CYRILLIC SMALL LETTER KA"},{"char":"л",desc:"CYRILLIC SMALL LETTER EL"},{"char":"м",desc:"CYRILLIC SMALL LETTER EM"},{"char":"н",desc:"CYRILLIC SMALL LETTER EN"},{"char":"о",desc:"CYRILLIC SMALL LETTER O"},{"char":"п",desc:"CYRILLIC SMALL LETTER PE"},{"char":"р",desc:"CYRILLIC SMALL LETTER ER"},{"char":"с",desc:"CYRILLIC SMALL LETTER ES"},{"char":"т",desc:"CYRILLIC SMALL LETTER TE"},{"char":"у",desc:"CYRILLIC SMALL LETTER U"},{"char":"ф",desc:"CYRILLIC SMALL LETTER EF"},{"char":"х",desc:"CYRILLIC SMALL LETTER HA"},{"char":"ц",desc:"CYRILLIC SMALL LETTER TSE"},{"char":"ч",desc:"CYRILLIC SMALL LETTER CHE"},{"char":"ш",desc:"CYRILLIC SMALL LETTER SHA"},{"char":"щ",desc:"CYRILLIC SMALL LETTER SHCHA"},{"char":"ъ",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{"char":"ы",desc:"CYRILLIC SMALL LETTER YERU"},{"char":"ь",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{"char":"э",desc:"CYRILLIC SMALL LETTER E"},{"char":"ю",desc:"CYRILLIC SMALL LETTER YU"},{"char":"я",desc:"CYRILLIC SMALL LETTER YA"},{"char":"ѐ",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{"char":"ё",desc:"CYRILLIC SMALL LETTER IO"},{"char":"ђ",desc:"CYRILLIC SMALL LETTER DJE"},{"char":"ѓ",desc:"CYRILLIC SMALL LETTER GJE"},{"char":"є",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{"char":"ѕ",desc:"CYRILLIC SMALL LETTER DZE"},{"char":"і",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"ї",desc:"CYRILLIC SMALL LETTER YI"},{"char":"ј",desc:"CYRILLIC SMALL LETTER JE"},{"char":"љ",desc:"CYRILLIC SMALL LETTER LJE"},{"char":"њ",desc:"CYRILLIC SMALL LETTER NJE"},{"char":"ћ",desc:"CYRILLIC SMALL LETTER TSHE"},{"char":"ќ",desc:"CYRILLIC SMALL LETTER KJE"},{"char":"ѝ",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{"char":"ў",desc:"CYRILLIC SMALL LETTER SHORT U"},{"char":"џ",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation","char":"–",list:[{"char":"–",desc:"EN DASH"},{"char":"—",desc:"EM DASH"},{"char":"‘",desc:"LEFT SINGLE QUOTATION MARK"},{"char":"’",desc:"RIGHT SINGLE QUOTATION MARK"},{"char":"‚",desc:"SINGLE LOW-9 QUOTATION MARK"},{"char":"“",desc:"LEFT DOUBLE QUOTATION MARK"},{"char":"”",desc:"RIGHT DOUBLE QUOTATION MARK"},{"char":"„",desc:"DOUBLE LOW-9 QUOTATION MARK"},{"char":"†",desc:"DAGGER"},{"char":"‡",desc:"DOUBLE DAGGER"},{"char":"•",desc:"BULLET"},{"char":"…",desc:"HORIZONTAL ELLIPSIS"},{"char":"‰",desc:"PER MILLE SIGN"},{"char":"′",desc:"PRIME"},{"char":"″",desc:"DOUBLE PRIME"},{"char":"‹",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{"char":"›",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{"char":"‾",desc:"OVERLINE"},{"char":"⁄",desc:"FRACTION SLASH"}]},{title:"Currency","char":"₠",list:[{"char":"₠",desc:"EURO-CURRENCY SIGN"},{"char":"₡",desc:"COLON SIGN"},{"char":"₢",desc:"CRUZEIRO SIGN"},{"char":"₣",desc:"FRENCH FRANC SIGN"},{"char":"₤",desc:"LIRA SIGN"},{"char":"₥",desc:"MILL SIGN"},{"char":"₦",desc:"NAIRA SIGN"},{"char":"₧",desc:"PESETA SIGN"},{"char":"₨",desc:"RUPEE SIGN"},{"char":"₩",desc:"WON SIGN"},{"char":"₪",desc:"NEW SHEQEL SIGN"},{"char":"₫",desc:"DONG SIGN"},{"char":"€",desc:"EURO SIGN"},{"char":"₭",desc:"KIP SIGN"},{"char":"₮",desc:"TUGRIK SIGN"},{"char":"₯",desc:"DRACHMA SIGN"},{"char":"₰",desc:"GERMAN PENNY SYMBOL"},{"char":"₱",desc:"PESO SIGN"},{"char":"₲",desc:"GUARANI SIGN"},{"char":"₳",desc:"AUSTRAL SIGN"},{"char":"₴",desc:"HRYVNIA SIGN"},{"char":"₵",desc:"CEDI SIGN"},{"char":"₶",desc:"LIVRE TOURNOIS SIGN"},{"char":"₷",desc:"SPESMILO SIGN"},{"char":"₸",desc:"TENGE SIGN"},{"char":"₹",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows","char":"←",list:[{"char":"←",desc:"LEFTWARDS ARROW"},{"char":"↑",desc:"UPWARDS ARROW"},{"char":"→",desc:"RIGHTWARDS ARROW"},{"char":"↓",desc:"DOWNWARDS ARROW"},{"char":"↔",desc:"LEFT RIGHT ARROW"},{"char":"↕",desc:"UP DOWN ARROW"},{"char":"↖",desc:"NORTH WEST ARROW"},{"char":"↗",desc:"NORTH EAST ARROW"},{"char":"↘",desc:"SOUTH EAST ARROW"},{"char":"↙",desc:"SOUTH WEST ARROW"},{"char":"↚",desc:"LEFTWARDS ARROW WITH STROKE"},{"char":"↛",desc:"RIGHTWARDS ARROW WITH STROKE"},{"char":"↜",desc:"LEFTWARDS WAVE ARROW"},{"char":"↝",desc:"RIGHTWARDS WAVE ARROW"},{"char":"↞",desc:"LEFTWARDS TWO HEADED ARROW"},{"char":"↟",desc:"UPWARDS TWO HEADED ARROW"},{"char":"↠",desc:"RIGHTWARDS TWO HEADED ARROW"},{"char":"↡",desc:"DOWNWARDS TWO HEADED ARROW"},{"char":"↢",desc:"LEFTWARDS ARROW WITH TAIL"},{"char":"↣",desc:"RIGHTWARDS ARROW WITH TAIL"},{"char":"↤",desc:"LEFTWARDS ARROW FROM BAR"},{"char":"↥",desc:"UPWARDS ARROW FROM BAR"},{"char":"↦",desc:"RIGHTWARDS ARROW FROM BAR"},{"char":"↧",desc:"DOWNWARDS ARROW FROM BAR"},{"char":"↨",desc:"UP DOWN ARROW WITH BASE"},{"char":"↩",desc:"LEFTWARDS ARROW WITH HOOK"},{"char":"↪",desc:"RIGHTWARDS ARROW WITH HOOK"},{"char":"↫",desc:"LEFTWARDS ARROW WITH LOOP"},{"char":"↬",desc:"RIGHTWARDS ARROW WITH LOOP"},{"char":"↭",desc:"LEFT RIGHT WAVE ARROW"},{"char":"↮",desc:"LEFT RIGHT ARROW WITH STROKE"},{"char":"↯",desc:"DOWNWARDS ZIGZAG ARROW"},{"char":"↰",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↱",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↲",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↳",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↴",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{"char":"↵",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{"char":"↶",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↷",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↸",desc:"NORTH WEST ARROW TO LONG BAR"},{"char":"↹",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{"char":"↺",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{"char":"↻",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{"char":"↼",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{"char":"↽",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"↾",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"↿",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇀",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{"char":"⇁",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"⇂",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"⇃",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇄",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{"char":"⇅",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{"char":"⇆",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{"char":"⇇",desc:"LEFTWARDS PAIRED ARROWS"},{"char":"⇈",desc:"UPWARDS PAIRED ARROWS"},{"char":"⇉",desc:"RIGHTWARDS PAIRED ARROWS"},{"char":"⇊",desc:"DOWNWARDS PAIRED ARROWS"},{"char":"⇋",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{"char":"⇌",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{"char":"⇍",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇎",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{"char":"⇏",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇐",desc:"LEFTWARDS DOUBLE ARROW"},{"char":"⇑",desc:"UPWARDS DOUBLE ARROW"},{"char":"⇒",desc:"RIGHTWARDS DOUBLE ARROW"},{"char":"⇓",desc:"DOWNWARDS DOUBLE ARROW"},{"char":"⇔",desc:"LEFT RIGHT DOUBLE ARROW"},{"char":"⇕",desc:"UP DOWN DOUBLE ARROW"},{"char":"⇖",desc:"NORTH WEST DOUBLE ARROW"},{"char":"⇗",desc:"NORTH EAST DOUBLE ARROW"},{"char":"⇘",desc:"SOUTH EAST DOUBLE ARROW"},{"char":"⇙",desc:"SOUTH WEST DOUBLE ARROW"},{"char":"⇚",desc:"LEFTWARDS TRIPLE ARROW"},{"char":"⇛",desc:"RIGHTWARDS TRIPLE ARROW"},{"char":"⇜",desc:"LEFTWARDS SQUIGGLE ARROW"},{"char":"⇝",desc:"RIGHTWARDS SQUIGGLE ARROW"},{"char":"⇞",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇟",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇠",desc:"LEFTWARDS DASHED ARROW"},{"char":"⇡",desc:"UPWARDS DASHED ARROW"},{"char":"⇢",desc:"RIGHTWARDS DASHED ARROW"},{"char":"⇣",desc:"DOWNWARDS DASHED ARROW"},{"char":"⇤",desc:"LEFTWARDS ARROW TO BAR"},{"char":"⇥",desc:"RIGHTWARDS ARROW TO BAR"},{"char":"⇦",desc:"LEFTWARDS WHITE ARROW"},{"char":"⇧",desc:"UPWARDS WHITE ARROW"},{"char":"⇨",desc:"RIGHTWARDS WHITE ARROW"},{"char":"⇩",desc:"DOWNWARDS WHITE ARROW"},{"char":"⇪",desc:"UPWARDS WHITE ARROW FROM BAR"},{"char":"⇫",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{"char":"⇬",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{"char":"⇭",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{"char":"⇮",desc:"UPWARDS WHITE DOUBLE ARROW"},{"char":"⇯",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{"char":"⇰",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{"char":"⇱",desc:"NORTH WEST ARROW TO CORNER"},{"char":"⇲",desc:"SOUTH EAST ARROW TO CORNER"},{"char":"⇳",desc:"UP DOWN WHITE ARROW"},{"char":"⇴",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{"char":"⇵",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{"char":"⇶",desc:"THREE RIGHTWARDS ARROWS"},{"char":"⇷",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇸",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇹",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{"char":"⇺",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇻",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇼",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇽",desc:"LEFTWARDS OPEN-HEADED ARROW"},{"char":"⇾",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{"char":"⇿",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math","char":"∀",list:[{"char":"∀",desc:"FOR ALL"},{"char":"∂",desc:"PARTIAL DIFFERENTIAL"},{"char":"∃",desc:"THERE EXISTS"},{"char":"∅",desc:"EMPTY SET"},{"char":"∇",desc:"NABLA"},{"char":"∈",desc:"ELEMENT OF"},{"char":"∉",desc:"NOT AN ELEMENT OF"},{"char":"∋",desc:"CONTAINS AS MEMBER"},{"char":"∏",desc:"N-ARY PRODUCT"},{"char":"∑",desc:"N-ARY SUMMATION"},{"char":"−",desc:"MINUS SIGN"},{"char":"∗",desc:"ASTERISK OPERATOR"},{"char":"√",desc:"SQUARE ROOT"},{"char":"∝",desc:"PROPORTIONAL TO"},{"char":"∞",desc:"INFINITY"},{"char":"∠",desc:"ANGLE"},{"char":"∧",desc:"LOGICAL AND"},{"char":"∨",desc:"LOGICAL OR"},{"char":"∩",desc:"INTERSECTION"},{"char":"∪",desc:"UNION"},{"char":"∫",desc:"INTEGRAL"},{"char":"∴",desc:"THEREFORE"},{"char":"∼",desc:"TILDE OPERATOR"},{"char":"≅",desc:"APPROXIMATELY EQUAL TO"},{"char":"≈",desc:"ALMOST EQUAL TO"},{"char":"≠",desc:"NOT EQUAL TO"},{"char":"≡",desc:"IDENTICAL TO"},{"char":"≤",desc:"LESS-THAN OR EQUAL TO"},{"char":"≥",desc:"GREATER-THAN OR EQUAL TO"},{"char":"⊂",desc:"SUBSET OF"},{"char":"⊃",desc:"SUPERSET OF"},{"char":"⊄",desc:"NOT A SUBSET OF"},{"char":"⊆",desc:"SUBSET OF OR EQUAL TO"},{"char":"⊇",desc:"SUPERSET OF OR EQUAL TO"},{"char":"⊕",desc:"CIRCLED PLUS"},{"char":"⊗",desc:"CIRCLED TIMES"},{"char":"⊥",desc:"UP TACK"}]},{title:"Misc","char":"♠",list:[{"char":"♠",desc:"BLACK SPADE SUIT"},{"char":"♣",desc:"BLACK CLUB SUIT"},{"char":"♥",desc:"BLACK HEART SUIT"},{"char":"♦",desc:"BLACK DIAMOND SUIT"},{"char":"♩",desc:"QUARTER NOTE"},{"char":"♪",desc:"EIGHTH NOTE"},{"char":"♫",desc:"BEAMED EIGHTH NOTES"},{"char":"♬",desc:"BEAMED SIXTEENTH NOTES"},{"char":"♭",desc:"MUSIC FLAT SIGN"},{"char":"♮",desc:"MUSIC NATURAL SIGN"},{"char":"☀",desc:"BLACK SUN WITH RAYS"},{"char":"☁",desc:"CLOUD"},{"char":"☂",desc:"UMBRELLA"},{"char":"☃",desc:"SNOWMAN"},{"char":"☕",desc:"HOT BEVERAGE"},{"char":"☘",desc:"SHAMROCK"},{"char":"☯",desc:"YIN YANG"},{"char":"✔",desc:"HEAVY CHECK MARK"},{"char":"✖",desc:"HEAVY MULTIPLICATION X"},{"char":"❄",desc:"SNOWFLAKE"},{"char":"❛",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❜",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❝",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❞",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❤",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(t.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),t.PLUGINS.specialCharacters=function(W){var N=W.$,T=W.opts.specialCharactersSets[0],L=W.opts.specialCharactersSets,a="";function I(){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function E(c,T){var R="";return c.forEach(function(c){var E={elementClass:c.title===T.title?"fr-active fr-active-tab":"",title:c.title,dataParam1:c.title,desc:c["char"]};R+='<button class="fr-command fr-btn fr-special-character-category '.concat(E.elementClass,'" title="').concat(E.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(E.dataParam1,'"><span>').concat(E.desc,"</span></button>")}),R}(L,T),'\n </div>\n <div class="fr-icon-container fr-sc-container">\n ').concat(function R(c){var T="";return c.list.forEach(function(c){var E={dataParam1:c["char"],title:c.desc,splCharValue:c["char"]};T+='<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(E.dataParam1,'" \n title="').concat(E.title,'">').concat(E.splCharValue,"</span>")}),T}(T),"\n </div>")}return{setSpecialCharacterCategory:function R(E){T=L.filter(function(c){return c.title===E})[0],function c(){W.popups.get("specialCharacters").html(a+I())}()},showSpecialCharsPopup:function e(){var c=W.popups.get("specialCharacters");if(c||(c=function A(){W.opts.toolbarInline&&0<W.opts.specialCharButtons.length&&(a='<div class="fr-buttons fr-tabs">'.concat(W.button.buildList(W.opts.specialCharButtons),"</div>"));var c={buttons:a,custom_layer:I()},E=W.popups.create("specialCharacters",c);return function T(S){W.events.on("popup.tab",function(c){var E=N(c.currentTarget);if(!W.popups.isVisible("specialCharacters")||!E.is("span, a"))return!0;var T,R,L,A=c.which;if(t.KEYCODE.TAB==A){if(E.is("span.fr-icon")&&c.shiftKey||E.is("a")&&!c.shiftKey){var a=S.find(".fr-buttons");T=!W.accessibility.focusToolbar(a,!!c.shiftKey)}if(!1!==T){var I=S.find("span.fr-icon:focus").first().concat(S.findVisible(" span.fr-icon").first().concat(S.find("a")));E.is("span.fr-icon")&&(I=I.not("span.fr-icon:not(:focus)")),R=I.index(E),R=c.shiftKey?((R-1)%I.length+I.length)%I.length:(R+1)%I.length,L=I.get(R),W.events.disableBlur(),L.focus(),T=!1}}else if(t.KEYCODE.ARROW_UP==A||t.KEYCODE.ARROW_DOWN==A||t.KEYCODE.ARROW_LEFT==A||t.KEYCODE.ARROW_RIGHT==A){if(E.is("span.fr-icon")){var e=E.parent().find("span.fr-icon");R=e.index(E);var r=11,s=Math.floor(e.length/r),h=R%r,d=Math.floor(R/r),C=d*r+h,O=s*r;t.KEYCODE.ARROW_UP==A?C=((C-r)%O+O)%O:t.KEYCODE.ARROW_DOWN==A?C=(C+r)%O:t.KEYCODE.ARROW_LEFT==A?C=((C-1)%O+O)%O:t.KEYCODE.ARROW_RIGHT==A&&(C=(C+1)%O),L=N(e.get(C)),W.events.disableBlur(),L.focus(),T=!1}}else t.KEYCODE.ENTER==A&&(E.is("a")?E[0].click():W.button.exec(E),T=!1);return!1===T&&(c.preventDefault(),c.stopPropagation()),T},!0)}(E),E}()),!c.hasClass("fr-active")){W.popups.refresh("specialCharacters"),W.popups.setContainer("specialCharacters",W.$tb);var E=W.$tb.find('.fr-command[data-cmd="specialCharacters"]'),T=W.button.getPosition(E),R=T.left,L=T.top;W.popups.show("specialCharacters",R,L,outerHeight)}},back:function c(){W.popups.hide("specialCharacters"),W.toolbar.showInline()}}},t.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),t.RegisterCommand("specialCharacters",{title:"Special Characters",icon:"specialCharacters",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,plugin:"specialCharacters",showOnMobile:!0,callback:function(){this.popups.isVisible("specialCharacters")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("specialCharacters")):this.specialCharacters.showSpecialCharsPopup()}}),t.RegisterCommand("insertSpecialCharacter",{callback:function(c,E){this.undo.saveStep(),this.html.insert(E),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),t.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(c,E){this.specialCharacters.setSpecialCharacterCategory(E)}}),t.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}})});
|
336
336
|
|
337
337
|
});
|
338
338
|
|
339
339
|
;/*!node_modules/froala-editor/js/plugins/table.min.js*/
|
340
|
-
amis.define('
|
340
|
+
amis.define('eb4800e', function(require, exports, module, define) {
|
341
341
|
|
342
342
|
/*!
|
343
343
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -345,12 +345,12 @@ amis.define('6caf980', function(require, exports, module, define) {
|
|
345
345
|
* Copyright 2014-2020 Froala Labs
|
346
346
|
*/
|
347
347
|
|
348
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("fa8683a")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(me){"use strict";me=me&&me.hasOwnProperty("default")?me["default"]:me,Object.assign(me.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(me.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableRemove","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableDefaultWidth:"100%",tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,tableInsertHelperOffset:15}),me.PLUGINS.table=function(R){var O,f,n,r,l,o,A,x=R.$;function h(){var e=_();if(e){var t=R.popups.get("table.edit");if(t||(t=p()),t){R.popups.setContainer("table.edit",R.$sc);var a=S(e),l=a.left+(a.right-a.left)/2,n=a.bottom;R.popups.show("table.edit",l,n,a.bottom-a.top,!0),R.edit.isDisabled()&&(1<Z().length&&R.toolbar.disable(),R.$el.removeClass("fr-no-selection"),R.edit.on(),R.button.bulkRefresh(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore())}}}function s(){var e=_();if(e){var t=R.popups.get("table.colors");t||(t=function o(){var e="";0<R.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableColorsButtons),"</div>"));var t="";R.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'.concat(R.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(R.id,'" type="text" placeholder="').concat(R.language.translate("HEX Color"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">').concat(R.language.translate("OK"),"</button></div></div>"));var a={buttons:e,colors:function n(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<R.opts.tableColors.length;t++)0!==t&&t%R.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=R.opts.tableColors[t]?e+='<span class="fr-command" style="background: '.concat(R.opts.tableColors[t],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(R.opts.tableColors[t],'"><span class="fr-sr-only">').concat(R.language.translate("Color")," ").concat(R.opts.tableColors[t]," </span></span>"):e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'.concat(R.language.translate("Clear Formatting"),'">').concat(R.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(R.language.translate("Clear Formatting"),"</span></span>");return e+="</div>"}(),custom_color:t},l=R.popups.create("table.colors",a);return R.events.$on(R.$wp,"scroll.table-colors",function(){R.popups.isVisible("table.colors")&&s()}),function r(u){R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.colors")||!t.is("span"))return!0;var a=e.which,l=!0;if(me.KEYCODE.TAB==a){var n=u.find(".fr-buttons");l=!R.accessibility.focusToolbar(n,!!e.shiftKey)}else if(me.KEYCODE.ARROW_UP==a||me.KEYCODE.ARROW_DOWN==a||me.KEYCODE.ARROW_LEFT==a||me.KEYCODE.ARROW_RIGHT==a){var r=t.parent().find("span.fr-command"),o=r.index(t),s=R.opts.colorsStep,i=Math.floor(r.length/s),f=o%s,c=Math.floor(o/s),d=c*s+f,p=i*s;me.KEYCODE.ARROW_UP==a?d=((d-s)%p+p)%p:me.KEYCODE.ARROW_DOWN==a?d=(d+s)%p:me.KEYCODE.ARROW_LEFT==a?d=((d-1)%p+p)%p:me.KEYCODE.ARROW_RIGHT==a&&(d=(d+1)%p);var h=x(r.get(d));R.events.disableBlur(),h.focus(),l=!1}else me.KEYCODE.ENTER==a&&(R.button.exec(t),l=!1);return!1===l&&(e.preventDefault(),e.stopPropagation()),l},!0)}(l),l}()),R.popups.setContainer("table.colors",R.$sc);var a=S(e),l=(a.left+a.right)/2,n=a.bottom;!function r(){var e=R.popups.get("table.colors"),t=R.$el.find(".fr-selected-cell").first(),a=R.helpers.RGBToHex(t.css("background-color")),l=e.find(".fr-table-colors-hex-layer input");e.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"),e.find('span[data-param1="'.concat(a,'"]')).addClass("fr-selected-color fr-active-item"),l.val(a).trigger("change")}(),R.popups.show("table.colors",l,n,a.bottom-a.top,!0)}}function i(){0===Z().length&&R.toolbar.enable()}function c(e){if(e)return R.popups.onHide("table.insert",function(){R.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")}),!0;var t="";0<R.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableInsertButtons),"</div>"));var a={buttons:t,rows_columns:function r(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 × 1</div><div class="fr-select-table-size">',t=1;t<=R.opts.tableInsertMaxSize;t++){for(var a=1;a<=R.opts.tableInsertMaxSize;a++){var l="inline-block";2<t&&!R.helpers.isMobile()&&(l="none");var n="fr-table-cell ";1==t&&1==a&&(n+=" hover"),e+='<span class="fr-command '.concat(n,'" tabIndex="-1" data-cmd="tableInsert" data-row="').concat(t,'" data-col="').concat(a,'" data-param1="').concat(t,'" data-param2="').concat(a,'" style="display: ').concat(l,';" role="button"><span></span><span class="fr-sr-only">').concat(t," × ").concat(a," </span></span>")}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},l=R.popups.create("table.insert",a);return R.events.$on(l,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){d(x(e.currentTarget))},!0),function n(e){R.events.$on(e,"focus","[tabIndex]",function(e){var t=x(e.currentTarget);d(t)}),R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var a,l=e.which;if(me.KEYCODE.ARROW_UP==l||me.KEYCODE.ARROW_DOWN==l||me.KEYCODE.ARROW_LEFT==l||me.KEYCODE.ARROW_RIGHT==l){if(t.is("span.fr-table-cell")){var n=t.parent().find("span.fr-table-cell"),r=n.index(t),o=R.opts.tableInsertMaxSize,s=r%o,i=Math.floor(r/o);me.KEYCODE.ARROW_UP==l?i=Math.max(0,i-1):me.KEYCODE.ARROW_DOWN==l?i=Math.min(R.opts.tableInsertMaxSize-1,i+1):me.KEYCODE.ARROW_LEFT==l?s=Math.max(0,s-1):me.KEYCODE.ARROW_RIGHT==l&&(s=Math.min(R.opts.tableInsertMaxSize-1,s+1));var f=i*o+s,c=x(n.get(f));d(c),R.events.disableBlur(),c.focus(),a=!1}}else me.KEYCODE.ENTER==l&&(R.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(l),l}function d(e){var t=e.data("row");null!==t&&(t=parseInt(t));var a=e.data("col");null!==a&&(a=parseInt(a));var l=e.parent();l.siblings(".fr-table-size-info").html("".concat(t," × ").concat(a)),l.find("> span").removeClass("hover fr-active-item");for(var n=1;n<=R.opts.tableInsertMaxSize;n++)for(var r=0;r<=R.opts.tableInsertMaxSize;r++){var o=l.find('> span[data-row="'.concat(n,'"][data-col="').concat(r,'"]'));n<=t&&r<=a?o.addClass("hover"):n<=t+1||n<=2&&!R.helpers.isMobile()?o.css("display","inline-block"):2<n&&!R.helpers.isMobile()&&o.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return R.popups.onHide("table.edit",i),!0;if(0<R.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(R.button.buildList(R.opts.tableEditButtons),"</div>")},a=R.popups.create("table.edit",t);return R.events.$on(R.$wp,"scroll.table-edit",function(){R.popups.isVisible("table.edit")&&h()}),a}return!1}function u(){if(0<Z().length){var e=Q();R.selection.setBefore(e.get(0))||R.selection.setAfter(e.get(0)),R.selection.restore(),R.popups.hide("table.edit"),e.remove(),R.toolbar.enable()}}function b(e){var t=Q();if(0<t.length){if(0<R.$el.find("th.fr-selected-cell").length&&"above"==e)return;var a,l,n,r=_(),o=M(r);if(null==o)return;l="above"==e?o.min_i:o.max_i;var s="<tr>";for(a=0;a<r[l].length;a++){if("below"==e&&l<r.length-1&&r[l][a]==r[l+1][a]||"above"==e&&0<l&&r[l][a]==r[l-1][a]){if(0===a||0<a&&r[l][a]!=r[l][a-1]){var i=x(r[l][a]);i.attr("rowspan",parseInt(i.attr("rowspan"),10)+1)}}else s+='<td style="'+x(r[l][a]).attr("style")+'" ><br></td>'}s+="</tr>",n=0<R.$el.find("th.fr-selected-cell").length&&"below"==e?x(t.find("tbody").not(t.find("> table tbody"))):x(t.find("tr").not(t.find("> table tr")).get(l)),"below"==e?"TBODY"==n.attr("tagName")?n.prepend(s):n[0].parentNode&&n[0].insertAdjacentHTML("afterend",s):"above"==e&&(n.before(s),R.popups.isVisible("table.edit")&&h())}}function g(e,t,a){var l,n,r,o,s,i=0,f=_(a);if(e<(t=Math.min(t,f[0].length-1)))for(n=e;n<=t;n++)if(!(e<n&&f[0][n]==f[0][n-1])&&1<(o=Math.min(parseInt(f[0][n].getAttribute("colspan"),10)||1,t-e+1))&&f[0][n]==f[0][n+1])for(i=o-1,l=1;l<f.length;l++)if(f[l][n]!=f[l-1][n]){for(r=n;r<n+o;r++)if(1<(s=parseInt(f[l][r].getAttribute("colspan"),10)||1)&&f[l][r]==f[l][r+1])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"colspan",0,f.length-1,e,t)}function m(e,t,a){var l,n,r,o,s,i=0,f=_(a);if(e<(t=Math.min(t,f.length-1)))for(l=e;l<=t;l++)if(!(e<l&&f[l][0]==f[l-1][0])&&1<(o=Math.min(parseInt(f[l][0].getAttribute("rowspan"),10)||1,t-e+1))&&f[l][0]==f[l+1][0])for(i=o-1,n=1;n<f[0].length;n++)if(f[l][n]!=f[l][n-1]){for(r=l;r<l+o;r++)if(1<(s=parseInt(f[r][n].getAttribute("rowspan"),10)||1)&&f[r][n]==f[r+1][n])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"rowspan",e,t,0,f[0].length-1)}function v(e,t,a,l,n,r,o){var s,i,f;for(s=l;s<=n;s++)for(i=r;i<=o;i++)l<s&&e[s][i]==e[s-1][i]||r<i&&e[s][i]==e[s][i-1]||1<(f=parseInt(e[s][i].getAttribute(a),10)||1)&&(1<f-t?e[s][i].setAttribute(a,f-t):e[s][i].removeAttribute(a))}function w(e,t,a,l,n){m(e,t,n),g(a,l,n)}function t(e){var t=R.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",R.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function _(e){var f=[];return null==(e=e||null)&&0<Z().length&&(e=Q()),e&&e.findVisible("tr").not(e.find("> table tr")).each(function(s,e){var t=x(e),i=0;t.find("> th, > td").each(function(e,t){for(var a=x(t),l=parseInt(a.attr("colspan"),10)||1,n=parseInt(a.attr("rowspan"),10)||1,r=s;r<s+n;r++)for(var o=i;o<i+l;o++)f[r]||(f[r]=[]),f[r][o]?i++:f[r][o]=t;i+=l})}),f}function $(e,t){for(var a=0;a<t.length;a++)for(var l=0;l<t[a].length;l++)if(t[a][l]==e)return{row:a,col:l}}function D(e,t,a){for(var l=e+1,n=t+1;l<a.length;){if(a[l][t]!=a[e][t]){l--;break}l++}for(l==a.length&&l--;n<a[e].length;){if(a[e][n]!=a[e][t]){n--;break}n++}return n==a[e].length&&n--,{row:l,col:n}}function C(){R.el.querySelector(".fr-cell-fixed")&&R.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")&&R.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function E(){var e=R.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=x(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),C()}function y(){R.events.disableBlur(),R.selection.clear(),R.$el.addClass("fr-no-selection"),R.$el.blur(),R.events.enableBlur()}function M(e){var t=R.$el.find(".fr-selected-cell");if(0<t.length){var a,l=e.length,n=0,r=e[0].length,o=0;for(a=0;a<t.length;a++){var s=$(t[a],e),i=D(s.row,s.col,e);l=Math.min(s.row,l),n=Math.max(i.row,n),r=Math.min(s.col,r),o=Math.max(i.col,o)}return{min_i:l,max_i:n,min_j:r,max_j:o}}return null}function S(e){var t=M(e);if(null!=t){var a=x(e[t.min_i][t.min_j]),l=x(e[t.min_i][t.max_j]),n=x(e[t.max_i][t.min_j]);return{left:a.length&&a.offset().left,right:l.length&&l.offset().left+l.outerWidth(),top:a.length&&a.offset().top,bottom:n.length&&n.offset().top+n.outerHeight()}}}function I(e,t){if(x(e).is(t))E(),x(e).addClass("fr-selected-cell");else{y(),R.edit.off();var a=_(),l=$(e,a),n=$(t,a),r=function h(e,t,a,l,n){var r,o,s,i,f=e,c=t,d=a,p=l;for(r=f;r<=c;r++)(1<(parseInt(x(n[r][d]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][d]).attr("colspan"),10)||1))&&(i=D((s=$(n[r][d],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[r][p]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][p]).attr("colspan"),10)||1))&&(i=D((s=$(n[r][p],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));for(o=d;o<=p;o++)(1<(parseInt(x(n[f][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[f][o]).attr("colspan"),10)||1))&&(i=D((s=$(n[f][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[c][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[c][o]).attr("colspan"),10)||1))&&(i=D((s=$(n[c][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));return f==e&&c==t&&d==a&&p==l?{min_i:e,max_i:t,min_j:a,max_j:l}:h(f,c,d,p,n)}(Math.min(l.row,n.row),Math.max(l.row,n.row),Math.min(l.col,n.col),Math.max(l.col,n.col),a);E(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var o=r.min_i;o<=r.max_i;o++)for(var s=r.min_j;s<=r.max_j;s++)x(a[o][s]).addClass("fr-selected-cell")}}function N(e){var t=null,a=x(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<a.closest("th",a.closest("thead")[0]).length?t=a.closest("th",a.closest("thead")[0]).get(0):0<a.closest("td",a.closest("tr")[0]).length&&(t=a.closest("td",a.closest("tr")[0]).get(0)),-1===R.$el.html.toString().search(t)?null:t}function T(){E(),R.popups.hide("table.edit")}function e(e){var t=N(e);if("false"==x(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<Z().length&&!t&&T(),!R.edit.isDisabled()||R.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)&&t&&T();else if(r=!0,t){0<Z().length&&!e.shiftKey&&T(),e.stopPropagation(),R.events.trigger("image.hideResizer"),R.events.trigger("video.hideResizer"),n=!0;var a=t.tagName.toLowerCase();e.shiftKey&&0<R.$el.find("".concat(a,".fr-selected-cell")).length?x(R.$el.find("".concat(a,".fr-selected-cell")).closest("table")).is(x(t).closest("table"))?I(l,t):y():((R.keys.ctrlKey(e)||e.shiftKey)&&(1<Z().length||0===x(t).find(R.selection.element()).length&&!x(t).is(R.selection.element()))&&y(),l=t,0<R.opts.tableEditButtons.length&&I(l,l))}}function a(e){if(!R.edit.isDisabled()&&R.popups.areVisible())return!0;if(n||R.$tb.is(e.target)||R.$tb.is(x(e.target).closest(".fr-toolbar"))||(0<Z().length&&R.toolbar.enable(),E()),!(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)){if(r=!1,n)n=!1,N(e)||1!=Z().length?0<Z().length&&(R.selection.isCollapsed()?h():(E(),R.edit.on())):E();if(A){A=!1,O.removeClass("fr-moving"),R.$el.removeClass("fr-no-selection"),R.edit.on();var t=parseFloat(O.css("left"))+R.opts.tableResizerOffset+R.$wp.offset().left;R.opts.iframe&&(t-=R.$iframe.offset().left),O.data("release-position",t),O.removeData("max-left"),O.removeData("max-right"),function C(){var e=O.data("origin"),t=O.data("release-position");if(e!==t){var a=O.data("first"),l=O.data("second"),n=O.data("table"),r=n.outerWidth();if(R.undo.canDo()||R.undo.saveStep(),null!=a&&null!=l){var o,s,i,f=_(n),c=[],d=[],p=[],h=[];for(o=0;o<f.length;o++)s=x(f[o][a]),i=x(f[o][l]),c[o]=s.outerWidth(),p[o]=i.outerWidth(),d[o]=c[o]/r*100,h[o]=p[o]/r*100;for(o=0;o<f.length;o++)if(s=x(f[o][a]),i=x(f[o][l]),f[o][a]!=f[o][l]){var u=(d[o]*(c[o]+t-e)/c[o]).toFixed(4);s.css("width",u+"%"),i.css("width",(d[o]+h[o]-u).toFixed(4)+"%")}}else{var b,g=n.parent(),m=r/g.width()*100,v=(parseInt(n.css("margin-left"),10)||0)/g.width()*100,w=(parseInt(n.css("margin-right"),10)||0)/g.width()*100;"rtl"==R.opts.direction&&0===l||"rtl"!=R.opts.direction&&0!==l?(b=(r+t-e)/r*m,n.css("margin-right","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(v).toFixed(4),"%)"))):("rtl"==R.opts.direction&&0!==l||"rtl"!=R.opts.direction&&0===l)&&(b=(r-t+e)/r*m,n.css("margin-left","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(w).toFixed(4),"%)"))),n.css("width","".concat(Math.round(b).toFixed(4),"%"))}R.selection.restore(),R.undo.saveStep(),R.events.trigger("table.resized",[n.get(0)])}O.removeData("origin"),O.removeData("release-position"),O.removeData("first"),O.removeData("second"),O.removeData("table")}(),Y()}}}function K(e){if(R.events.$on(x("input"),"click",ee),!0===n&&0<R.opts.tableEditButtons.length){if(x(e.currentTarget).closest("table").is(Q())){if("TD"==e.currentTarget.tagName&&0===R.$el.find("th.fr-selected-cell").length)return void I(l,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===R.$el.find("td.fr-selected-cell").length)return void I(l,e.currentTarget)}y()}}function B(e,t,a,l){for(var n,r=t;r!=R.el&&"TD"!=r.tagName&&"TH"!=r.tagName&&("up"==l?n=r.previousElementSibling:"down"==l&&(n=r.nextElementSibling),!n);)r=r.parentNode;"TD"==r.tagName||"TH"==r.tagName?function o(e,t){for(var a=e;a&&"TABLE"!=a.tagName&&a.parentNode!=R.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName){var l=_(x(a));"up"==t?z($(e,l),a,l):"down"==t&&k($(e,l),a,l)}}(r,l):n&&("up"==l&&R.selection.setAtEnd(n),"down"==l&&R.selection.setAtStart(n))}function z(e,t,a){0<e.row?R.selection.setAtEnd(a[e.row-1][e.col]):B(0,t,0,"up")}function k(e,t,a){var l=parseInt(a[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<a.length-l?R.selection.setAtStart(a[e.row+l][e.col]):B(0,t,0,"down")}function Y(){O&&(O.find("div").css("opacity",0),O.css("top",0),O.css("left",0),O.css("height",0),O.find("div").css("height",0),O.hide())}function W(){f&&f.removeClass("fr-visible").css("left","-9999px")}function L(e,t){var a=x(t),l=a.closest("table"),n=l.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<a.closest("td").length?t=a.closest("td"):0<a.closest("th").length&&(t=a.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)O&&a.get(0)!=O.get(0)&&a.parent().get(0)!=O.get(0)&&R.core.sameInstance(O)&&Y();else{if(a=x(t),0===R.$el.find(a).length)return!1;var r=a.offset().left-1,o=r+a.outerWidth();if(Math.abs(e.pageX-r)<=R.opts.tableResizerOffset||Math.abs(o-e.pageX)<=R.opts.tableResizerOffset){var s,i,f,c,d,p=_(l),h=$(t,p),u=D(h.row,h.col,p),b=l.offset().top,g=l.outerHeight()-1;"rtl"!=R.opts.direction?e.pageX-r<=R.opts.tableResizerOffset?(f=r,0<h.col?(c=r-j(h.col-1,p)+R.opts.tableResizingLimit,d=r+j(h.col,p)-R.opts.tableResizingLimit,s=h.col-1,i=h.col):(s=null,i=0,c=l.offset().left-1-parseInt(l.css("margin-left"),10),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)):o-e.pageX<=R.opts.tableResizerOffset&&(f=o,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=o-j(u.col,p)+R.opts.tableResizingLimit,d=o+j(u.col+1,p)-R.opts.tableResizingLimit,s=u.col,i=u.col+1):(s=u.col,i=null,c=l.offset().left-1+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):o-e.pageX<=R.opts.tableResizerOffset?(f=o,0<h.col?(c=o-j(h.col,p)+R.opts.tableResizingLimit,d=o+j(h.col-1,p)-R.opts.tableResizingLimit,s=h.col,i=h.col-1):(s=null,i=0,c=l.offset().left+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):e.pageX-r<=R.opts.tableResizerOffset&&(f=r,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=r-j(u.col+1,p)+R.opts.tableResizingLimit,d=r+j(u.col,p)-R.opts.tableResizingLimit,s=u.col+1,i=u.col):(s=u.col,i=null,c=n.offset().left+parseFloat(n.css("padding-left")),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)),O||function E(){R.shared.$table_resizer||(R.shared.$table_resizer=x(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),O=R.shared.$table_resizer,R.events.$on(O,"mousedown",function(e){return!R.core.sameInstance(O)||(0<Z().length&&T(),1==e.which?(R.selection.save(),A=!0,O.addClass("fr-moving"),y(),R.edit.off(),O.find("div").css("opacity",1),!1):void 0)}),R.events.$on(O,"mousemove",function(e){if(!R.core.sameInstance(O))return!0;A&&(R.opts.iframe&&(e.pageX-=R.$iframe.offset().left),G(e))}),R.events.on("shared.destroy",function(){O.html("").removeData().remove(),O=null},!0),R.events.on("destroy",function(){R.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),x("body").first().append(O.hide())},!0)}(),O.data("table",l),O.data("first",s),O.data("second",i),O.data("instance",R),R.$wp.append(O);var m=f-R.win.pageXOffset-R.opts.tableResizerOffset-R.$wp.offset().left,v=b-R.$wp.offset().top+R.$wp.scrollTop();if(R.opts.iframe){var w=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),C=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));m+=R.$iframe.offset().left+C,v+=R.$iframe.offset().top+w,c+=R.$iframe.offset().left,d+=R.$iframe.offset().left}O.data("max-left",c),O.data("max-right",d),O.data("origin",f-R.win.pageXOffset),O.css("top",v),O.css("left",m),O.css("height",g),O.find("div").css("height",g),O.css("padding-left",R.opts.tableResizerOffset),O.css("padding-right",R.opts.tableResizerOffset),O.show()}else R.core.sameInstance(O)&&Y()}}function F(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t).find("tr").first(),n=e.pageX,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("th, td").each(function(){var e=x(this);return e.offset().left<=n&&n<e.offset().left+e.outerWidth()/2?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left-a/2),f.data("selected-cell",e),f.data("position","before"),f.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=n&&n<e.offset().left+e.outerWidth()?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left+e.outerWidth()-a/2),f.data("selected-cell",e),f.data("position","after"),f.addClass("fr-visible"),!1):void 0})}function H(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t),n=e.pageY,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("tr").each(function(){var e=x(this);return e.offset().top<=n&&n<e.offset().top+e.outerHeight()/2?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a/2),f.css("left",r+e.offset().left-R.$box.offset().left-a-5),f.data("selected-cell",e.find("td").first()),f.data("position","above"),f.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=n&&n<e.offset().top+e.outerHeight()?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top+e.outerHeight()-a/2),f.css("left",r+e.offset().left-R.$box.offset().left-a-5),f.data("selected-cell",e.find("td").first()),f.data("position","below"),f.addClass("fr-visible"),!1):void 0})}function V(e){o=null;var t=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset);R.opts.tableResizer&&(!R.popups.areVisible()||R.popups.areVisible()&&R.popups.isVisible("table.edit"))&&L(e,t),!R.opts.tableInsertHelper||R.popups.areVisible()||R.$tb.hasClass("fr-inline")&&R.$tb.isVisible()||function r(e,t){if(0===Z().length){var a,l,n;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||R.node.isElement(t)))for(a=1;a<=R.opts.tableInsertHelperOffset;a++){if(l=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset+a),x(l).hasClass("fr-tooltip"))return!0;if(l&&("TH"==l.tagName||"TD"==l.tagName||"TABLE"==l.tagName)&&(x(l).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(l).closest("table").attr("contenteditable"))return F(e,x(l).closest("table")),!0;if(n=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset+a,e.pageY-R.win.pageYOffset),x(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(x(n).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(n).closest("table").attr("contenteditable"))return H(e,x(n).closest("table")),!0}R.core.sameInstance(f)&&W()}}(e,t)}function P(){if(A){var e=O.data("table").offset().top-R.win.pageYOffset;if(R.opts.iframe){var t=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top"));e+=R.$iframe.offset().top-R.helpers.scrollTop()+t}O.css("top",e)}}function j(e,t){var a,l=x(t[0][e]).outerWidth();for(a=1;a<t.length;a++)l=Math.min(l,x(t[a][e]).outerWidth());return l}function X(e,t,a){var l,n=0;for(l=e;l<=t;l++)n+=j(l,a);return n}function G(e){if(1<Z().length&&r&&y(),!1===r&&!1===n&&!1===A)o&&clearTimeout(o),R.edit.isDisabled()&&!R.popups.isVisible("table.edit")||(o=setTimeout(V,30,e));else if(A){var t=e.pageX-R.win.pageXOffset;R.opts.iframe&&(t+=R.$iframe.offset().left);var a=O.data("max-left"),l=O.data("max-right");a<=t&&t<=l?O.css("left",t-R.opts.tableResizerOffset-R.$wp.offset().left):t<a&&parseFloat(O.css("left"),10)>a-R.opts.tableResizerOffset?O.css("left",a-R.opts.tableResizerOffset-R.$wp.offset().left):l<t&&parseFloat(O.css("left"),10)<l-R.opts.tableResizerOffset&&O.css("left",l-R.opts.tableResizerOffset-R.$wp.offset().left)}else r&&W()}function U(e){R.node.isEmpty(e.get(0))?e.prepend(me.MARKERS):e.prepend(me.START_MARKER).append(me.END_MARKER)}function q(){R.shared.$ti_helper||(R.shared.$ti_helper=x(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(R.language.translate("Insert"),'"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>')),R.events.bindClick(R.shared.$ti_helper,"a",function(){var e=f.data("selected-cell"),t=f.data("position"),a=f.data("instance")||R;"before"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"after"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"above"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"below"==t&&(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()),W()}),R.events.on("shared.destroy",function(){R.shared.$ti_helper.html("").removeData().remove(),R.shared.$ti_helper=null},!0),R.events.$on(R.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),R.events.$on(x(R.o_win),"scroll",function(){W()},!0),R.events.$on(R.$wp,"scroll",function(){W()},!0)),f=R.shared.$ti_helper,R.events.on("destroy",function(){f=null}),R.tooltip.bind(R.$box,".fr-insert-helper > a.fr-floating-btn")}function J(){l=null,clearTimeout(o)}function Z(){return R.el.querySelectorAll(".fr-selected-cell")}function Q(){var e=Z();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=R.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?x(t):x([])}return x([])}function ee(e){n=!1}return{_init:function te(){if(!R.$wp)return!1;if(!R.helpers.isMobile()){A=n=r=!1,R.events.$on(R.$el,"mousedown",e),R.popups.onShow("image.edit",function(){E(),n=r=!1}),R.popups.onShow("link.edit",function(){E(),n=r=!1}),R.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&E()}),R.events.$on(R.$el,"mouseover","th, td",K),R.events.$on(R.$win,"mouseup",a),R.opts.iframe&&R.events.$on(x(R.o_win),"mouseup",a),R.events.$on(R.$win,"mousemove",G),R.events.$on(x(R.o_win),"scroll",P),R.events.on("contentChanged",function(){0<Z().length&&(h(),R.$el.find("img").on("load.selected-cells",function(){x(this).off("load.selected-cells"),0<Z().length&&h()}))}),R.events.$on(x(R.o_win),"resize",function(){E()}),R.events.on("toolbar.esc",function(){if(0<Z().length)return R.events.disableBlur(),R.events.focus(),!1},!0),R.events.$on(x(R.o_win),"keydown",function(){r&&n&&(n=r=!1,R.$el.removeClass("fr-no-selection"),R.edit.on(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore(),E())}),R.events.$on(R.$el,"keydown",function(e){e.shiftKey?!1===function o(e){var t=Z();if(null!=t&&0<t.length){var a,l=_(),n=e.which,r=$(1==t.length?a=t[0]:(a=R.el.querySelector(".fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")),l);if(me.KEYCODE.ARROW_RIGHT==n){if(r.col<l[0].length-1)return I(a,l[r.row][r.col+1]),!1}else if(me.KEYCODE.ARROW_DOWN==n){if(r.row<l.length-1)return I(a,l[r.row+1][r.col]),!1}else if(me.KEYCODE.ARROW_LEFT==n){if(0<r.col)return I(a,l[r.row][r.col-1]),!1}else if(me.KEYCODE.ARROW_UP==n&&0<r.row)return I(a,l[r.row-1][r.col]),!1}}(e)&&setTimeout(function(){h()},0):function s(e){var t=e.which,a=R.selection.blocks();if(a.length&&("TD"==(a=a[0]).tagName||"TH"==a.tagName)){for(var l=a;l&&"TABLE"!=l.tagName&&l.parentNode!=R.el;)l=l.parentNode;if(l&&"TABLE"==l.tagName&&(me.KEYCODE.ARROW_LEFT==t||me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_RIGHT==t||me.KEYCODE.ARROW_DOWN==t)&&(0<Z().length&&T(),R.browser.webkit&&(me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_DOWN==t))){var n=R.selection.ranges(0).startContainer;if(n.nodeType==Node.TEXT_NODE&&(me.KEYCODE.ARROW_UP==t&&(n.previousSibling&&"BR"!==n.previousSibling.tagName||n.previousSibling&&"BR"===n.previousSibling.tagName&&n.previousSibling.previousSibling)||me.KEYCODE.ARROW_DOWN==t&&(n.nextSibling&&"BR"!==n.nextSibling.tagName||n.nextSibling&&"BR"===n.nextSibling.tagName&&n.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var r=_(x(l)),o=$(a,r);return me.KEYCODE.ARROW_UP==t?z(o,l,r):me.KEYCODE.ARROW_DOWN==t&&k(o,l,r),R.selection.restore(),!1}}}(e)}),R.events.on("keydown",function(e){if(!1===function l(e){if(e.which==me.KEYCODE.TAB){var t;if(0<Z().length)t=R.$el.find(".fr-selected-cell").last();else{var a=R.selection.element();"TD"==a.tagName||"TH"==a.tagName?t=x(a):a!=R.el&&(0<x(a).parentsUntil(R.$el,"td").length?t=x(a).parents("td").first():0<x(a).parentsUntil(R.$el,"th").length&&(t=x(a).parents("th").first()))}if(t)return e.preventDefault(),!!(0===R.selection.get().focusOffset&&0<x(R.selection.element()).parentsUntil(R.$el,"ol, ul").length&&(0<x(R.selection.element()).closest("li").prev().length||x(R.selection.element()).is("li")&&0<x(R.selection.element()).prev().length))||(T(),e.shiftKey?0<t.prev().length?U(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?U(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&U(t.closest("table").find("thead tr th").last()):0<t.next().length?U(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?U(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?U(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),b("below"),E(),U(t.closest("tr").next().find("td").first())),R.selection.restore(),!1)}}(e))return!1;var t=Z();if(0<t.length){if(0<t.length&&R.keys.ctrlKey(e)&&e.which==me.KEYCODE.A)return E(),R.popups.isVisible("table.edit")&&R.popups.hide("table.edit"),t=[],!0;if(e.which==me.KEYCODE.ESC&&R.popups.isVisible("table.edit"))return E(),R.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==me.KEYCODE.BACKSPACE||e.which==me.KEYCODE.DELETE)){R.undo.saveStep();for(var a=0;a<t.length;a++)x(t[a]).html("<br>"),a==t.length-1&&x(t[a]).prepend(me.MARKERS);return R.selection.restore(),R.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=me.KEYCODE.F10&&!R.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function n(e){if(e.altKey&&e.which==me.KEYCODE.SPACE){var t,a=R.selection.element();if("TD"==a.tagName||"TH"==a.tagName?t=a:0<x(a).closest("td").length?t=x(a).closest("td").get(0):0<x(a).closest("th").length&&(t=x(a).closest("th").get(0)),t)return e.preventDefault(),I(t,t),h(),!1}}(e))return!1},!0);var t=[];R.events.on("html.beforeGet",function(){t=Z();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),R.events.on("html.afterGet",function(){for(var e=0;e<t.length;e++)t[e].className=(t[e].className?t[e].className.trim()+" ":"")+"fr-selected-cell";t=[]}),c(!0),p(!0)}R.events.on("destroy",J)},insert:function ae(e,t){var a,l,n="<table "+(R.opts.tableDefaultWidth?'style="width: '+R.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',r=100/t;for(a=0;a<e;a++){for(n+="<tr>",l=0;l<t;l++)n+="<td"+(R.opts.tableDefaultWidth?' style="width: '+r.toFixed(4)+'%;"':"")+">",0===a&&0===l&&(n+=me.MARKERS),n+="<br></td>";n+="</tr>"}n+="</tbody></table>",R.html.insert(n),R.selection.restore();var o=R.$el.find(".fr-inserted-table");o.removeClass("fr-inserted-table"),R.events.trigger("table.inserted",[o.get(0)])},remove:u,insertRow:b,deleteRow:function le(){var e=Q();if(0<e.length){var t,a,l,n=_(),r=M(n);if(null==r)return;if(0===r.min_i&&r.max_i==n.length-1)u();else{for(t=r.max_i;t>=r.min_i;t--){for(l=x(e.find("tr").not(e.find("> table tr")).get(t)),a=0;a<n[t].length;a++)if(0===a||n[t][a]!=n[t][a-1]){var o=x(n[t][a]);if(1<parseInt(o.attr("rowspan"),10)){var s=parseInt(o.attr("rowspan"),10)-1;1==s?o.removeAttr("rowspan"):o.attr("rowspan",s)}if(t<n.length-1&&n[t][a]==n[t+1][a]&&(0===t||n[t][a]!=n[t-1][a])){for(var i=n[t][a],f=a;0<f&&n[t][f]==n[t][f-1];)f--;0===f?x(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(i):x(n[t+1][f-1])[0].parentNode&&x(n[t+1][f-1])[0].insertAdjacentElement("afterend",i)}}var c=l.parent();l.remove(),0===c.find("tr").length&&c.remove(),n=_(e)}w(0,n.length-1,0,n[0].length-1,e),0<r.min_i?R.selection.setAtEnd(n[r.min_i-1][0]):R.selection.setAtEnd(n[0][0]),R.selection.restore(),R.popups.hide("table.edit")}}},insertColumn:function ne(i){var e=Q();if(0<e.length){var f,c=_(),t=M(c);f="before"==i?t.min_j:t.max_j;var a,d=100/c[0].length,p=100/(c[0].length+1);e.find("th, td").each(function(){(a=x(this)).data("old-width",a.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,a=x(this),l=0,n=0;l-1<f;){if(!(t=a.find("> th, > td").get(n))){t=null;break}t==c[e][l]?(l+=parseInt(x(t).attr("colspan"),10)||1,n++):(l+=parseInt(x(c[e][l]).attr("colspan"),10)||1,"after"==i&&(t=0===n?-1:a.find("> th, > td").get(n-1)))}var r,o=x(t);if("after"==i&&f<l-1||"before"==i&&0<f&&c[e][f]==c[e][f-1]){if(0===e||0<e&&c[e][f]!=c[e-1][f]){var s=parseInt(o.attr("colspan"),10)+1;o.attr("colspan",s),o.css("width",(o.data("old-width")*p/d+p).toFixed(4)+"%"),o.removeData("old-width")}}else r=0<a.find("th").length?'<th style="width: '.concat(p.toFixed(4),'%;"><br></th>'):'<td style="width: '.concat(p.toFixed(4),'%;"><br></td>'),-1==t?a.prepend(r):null==t?a.append(r):"before"==i?o.before(r):"after"==i&&o[0].parentNode&&o[0].insertAdjacentHTML("afterend",r)}),e.find("th, td").each(function(){(a=x(this)).data("old-width")&&(a.css("width",(a.data("old-width")*p/d).toFixed(4)+"%"),a.removeData("old-width"))}),R.popups.isVisible("table.edit")&&h()}},deleteColumn:function re(){var e=Q();if(0<e.length){var t,a,l,n=_(),r=M(n);if(null==r)return;if(0===r.min_j&&r.max_j==n[0].length-1)u();else{var o=0;for(t=0;t<n.length;t++)for(a=0;a<n[0].length;a++)(l=x(n[t][a])).hasClass("fr-selected-cell")||(l.data("old-width",l.outerWidth()/e.outerWidth()*100),(a<r.min_j||a>r.max_j)&&(o+=l.outerWidth()/e.outerWidth()*100));for(o/=n.length,a=r.max_j;a>=r.min_j;a--)for(t=0;t<n.length;t++)if(0===t||n[t][a]!=n[t-1][a])if(l=x(n[t][a]),1<(parseInt(l.attr("colspan"),10)||1)){var s=parseInt(l.attr("colspan"),10)-1;1==s?l.removeAttr("colspan"):l.attr("colspan",s),l.css("width",(100*(l.data("old-width")-j(a,n))/o).toFixed(4)+"%"),l.removeData("old-width")}else{var i=x(l.parent().get(0));l.remove(),0===i.find("> th, > td").length&&(0===i.prev().length||0===i.next().length||i.prev().find("> th[rowspan], > td[rowspan]").length<i.prev().find("> th, > td").length)&&i.remove()}w(0,n.length-1,0,n[0].length-1,e),0<r.min_j?R.selection.setAtEnd(n[r.min_i][r.min_j-1]):R.selection.setAtEnd(n[r.min_i][0]),R.selection.restore(),R.popups.hide("table.edit"),e.find("th, td").each(function(){(l=x(this)).data("old-width")&&(l.css("width",(100*l.data("old-width")/o).toFixed(4)+"%"),l.removeData("old-width"))})}}},mergeCells:function oe(){if(1<Z().length&&(0===R.$el.find("th.fr-selected-cell").length||0===R.$el.find("td.fr-selected-cell").length)){C();var e,t,a=M(_());if(null==a)return;var l=R.$el.find(".fr-selected-cell"),n=x(l[0]),r=n.parent().find(".fr-selected-cell"),o=n.closest("table"),s=n.html(),i=0;for(e=0;e<r.length;e++)i+=x(r[e]).outerWidth();for(n.css("width",Math.min(100,i/o.outerWidth()*100).toFixed(4)+"%"),a.min_j<a.max_j&&n.attr("colspan",a.max_j-a.min_j+1),a.min_i<a.max_i&&n.attr("rowspan",a.max_i-a.min_i+1),e=1;e<l.length;e++)"<br>"!=(t=x(l[e])).html()&&""!==t.html()&&(s+="<br>".concat(t.html())),t.remove();n.html(s),R.selection.setAtEnd(n.get(0)),R.selection.restore(),R.toolbar.enable(),m(a.min_i,a.max_i,o);var f=o.find("tr:empty");for(e=f.length-1;0<=e;e--)x(f[e]).remove();g(a.min_j,a.max_j,o),h()}},splitCellVertically:function se(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,a=e.parent().outerWidth(),l=e.outerWidth(),n=e.clone().html("<br>"),r=_(),o=$(e.get(0),r);if(1<t){var s=Math.ceil(t/2);l=X(o.col,o.col+s-1,r)/a*100;var i=X(o.col+s,o.col+t-1,r)/a*100;1<s?e.attr("colspan",s):e.removeAttr("colspan"),1<t-s?n.attr("colspan",t-s):n.removeAttr("colspan"),e.css("width",l.toFixed(4)+"%"),n.css("width",i.toFixed(4)+"%")}else{var f;for(f=0;f<r.length;f++)if(0===f||r[f][o.col]!=r[f-1][o.col]){var c=x(r[f][o.col]);if(!c.is(e)){var d=(parseInt(c.attr("colspan"),10)||1)+1;c.attr("colspan",d)}}l=l/a*100/2,e.css("width","".concat(l.toFixed(4),"%")),n.css("width","".concat(l.toFixed(4),"%"))}e[0].parentNode&&e[0].insertAdjacentElement("afterend",n[0]),E(),R.popups.hide("table.edit")}},splitCellHorizontally:function ie(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=e.parent(),a=e.closest("table"),l=parseInt(e.attr("rowspan"),10),n=_(),r=$(e.get(0),n),o=e.clone().html("<br>");if(1<l){var s=Math.ceil(l/2);1<s?e.attr("rowspan",s):e.removeAttr("rowspan"),1<l-s?o.attr("rowspan",l-s):o.removeAttr("rowspan");for(var i=r.row+s,f=0===r.col?r.col:r.col-1;0<=f&&(n[i][f]==n[i][f-1]||0<i&&n[i][f]==n[i-1][f]);)f--;-1==f?x(a.find("tr").not(a.find("> table tr")).get(i)).prepend(o):x(n[i][f])[0].parentNode&&x(n[i][f])[0].insertAdjacentElement("afterend",o[0])}else{var c,d=x(document.createElement("tr")).append(o);for(c=0;c<n[0].length;c++)if(0===c||n[r.row][c]!=n[r.row][c-1]){var p=x(n[r.row][c]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",d[0])}E(),R.popups.hide("table.edit")}},addHeader:function fe(){var e=Q();if(0<e.length&&0===e.find("th").length){var t,a="<thead><tr>",l=0;for(e.find("tr").first().find("> td").each(function(){var e=x(this);l+=parseInt(e.attr("colspan"),10)||1}),t=0;t<l;t++)a+="<th><br></th>";a+="</tr></thead>",e.prepend(a),h()}},removeHeader:function ce(){var e=Q(),t=e.find("thead");if(0<t.length)if(0===e.find("tbody tr").length)u();else if(t.remove(),0<Z().length)h();else{R.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(R.selection.setAtEnd(a),R.selection.restore())}},setBackground:t,showInsertPopup:function de(){var e=R.$tb.find('.fr-command[data-cmd="insertTable"]'),t=R.popups.get("table.insert");if(t||(t=c()),!t.hasClass("fr-active")){R.popups.refresh("table.insert"),R.popups.setContainer("table.insert",R.$tb);var a=R.button.getPosition(e),l=a.left,n=a.top;R.popups.show("table.insert",l,n,e.outerHeight())}},showEditPopup:h,showColorsPopup:s,back:function pe(){0<Z().length?h():(R.popups.hide("table.insert"),R.toolbar.showInline())},verticalAlign:function he(e){R.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function ue(e){R.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function be(e,t,a,l){if(0<t.length){if(!a){var n=Object.keys(l);n.splice(n.indexOf(e),1),t.removeClass(n.join(" "))}t.toggleClass(e)}},selectedTable:Q,selectedCells:Z,customColor:function ge(){var e=R.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:I}},me.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),me.RegisterCommand("insertTable",{title:"Insert Table",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("table.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("table.insert")):this.table.showInsertPopup()},plugin:"table"}),me.RegisterCommand("tableInsert",{callback:function(e,t,a){this.table.insert(t,a),this.popups.hide("table.insert")}}),me.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),me.RegisterCommand("tableHeader",{title:"Table Header",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active")?this.table.removeHeader():this.table.addHeader()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("th").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),me.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),me.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below","delete":"Delete row"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableRows.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),me.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),me.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after","delete":"Delete column"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableColumns.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),me.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),me.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCells.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"merge"==t?this.table.mergeCells():"vertical-split"==t?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(e,t){1<this.$el.find(".fr-selected-cell").length?(t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled",!1)):(t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled",!1),t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled",!1))}}),me.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),me.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),me.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),me.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").closest("table");l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),me.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),me.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),me.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),me.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(e){0!==this.table.selectedCells().length||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),me.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),me.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellVerticalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'.concat(a.toLowerCase(),'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.verticalAlign(t)},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),me.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),me.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),me.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellHorizontalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),a=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-".concat(this.helpers.getAlignment(a(t[0])))))},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first())+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),me.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableCellStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").first();l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),me.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"})});
|
348
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(me){"use strict";me=me&&me.hasOwnProperty("default")?me["default"]:me,Object.assign(me.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(me.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableRemove","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableDefaultWidth:"100%",tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,tableInsertHelperOffset:15}),me.PLUGINS.table=function(R){var O,f,n,r,l,o,A,x=R.$;function h(){var e=_();if(e){var t=R.popups.get("table.edit");if(t||(t=p()),t){R.popups.setContainer("table.edit",R.$sc);var a=S(e),l=a.left+(a.right-a.left)/2,n=a.bottom;R.popups.show("table.edit",l,n,a.bottom-a.top,!0),R.edit.isDisabled()&&(1<Z().length&&R.toolbar.disable(),R.$el.removeClass("fr-no-selection"),R.edit.on(),R.button.bulkRefresh(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore())}}}function s(){var e=_();if(e){var t=R.popups.get("table.colors");t||(t=function o(){var e="";0<R.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableColorsButtons),"</div>"));var t="";R.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'.concat(R.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(R.id,'" type="text" placeholder="').concat(R.language.translate("HEX Color"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">').concat(R.language.translate("OK"),"</button></div></div>"));var a={buttons:e,colors:function n(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<R.opts.tableColors.length;t++)0!==t&&t%R.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=R.opts.tableColors[t]?e+='<span class="fr-command" style="background: '.concat(R.opts.tableColors[t],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(R.opts.tableColors[t],'"><span class="fr-sr-only">').concat(R.language.translate("Color")," ").concat(R.opts.tableColors[t]," </span></span>"):e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'.concat(R.language.translate("Clear Formatting"),'">').concat(R.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(R.language.translate("Clear Formatting"),"</span></span>");return e+="</div>"}(),custom_color:t},l=R.popups.create("table.colors",a);return R.events.$on(R.$wp,"scroll.table-colors",function(){R.popups.isVisible("table.colors")&&s()}),function r(u){R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.colors")||!t.is("span"))return!0;var a=e.which,l=!0;if(me.KEYCODE.TAB==a){var n=u.find(".fr-buttons");l=!R.accessibility.focusToolbar(n,!!e.shiftKey)}else if(me.KEYCODE.ARROW_UP==a||me.KEYCODE.ARROW_DOWN==a||me.KEYCODE.ARROW_LEFT==a||me.KEYCODE.ARROW_RIGHT==a){var r=t.parent().find("span.fr-command"),o=r.index(t),s=R.opts.colorsStep,i=Math.floor(r.length/s),f=o%s,c=Math.floor(o/s),d=c*s+f,p=i*s;me.KEYCODE.ARROW_UP==a?d=((d-s)%p+p)%p:me.KEYCODE.ARROW_DOWN==a?d=(d+s)%p:me.KEYCODE.ARROW_LEFT==a?d=((d-1)%p+p)%p:me.KEYCODE.ARROW_RIGHT==a&&(d=(d+1)%p);var h=x(r.get(d));R.events.disableBlur(),h.focus(),l=!1}else me.KEYCODE.ENTER==a&&(R.button.exec(t),l=!1);return!1===l&&(e.preventDefault(),e.stopPropagation()),l},!0)}(l),l}()),R.popups.setContainer("table.colors",R.$sc);var a=S(e),l=(a.left+a.right)/2,n=a.bottom;!function r(){var e=R.popups.get("table.colors"),t=R.$el.find(".fr-selected-cell").first(),a=R.helpers.RGBToHex(t.css("background-color")),l=e.find(".fr-table-colors-hex-layer input");e.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"),e.find('span[data-param1="'.concat(a,'"]')).addClass("fr-selected-color fr-active-item"),l.val(a).trigger("change")}(),R.popups.show("table.colors",l,n,a.bottom-a.top,!0)}}function i(){0===Z().length&&R.toolbar.enable()}function c(e){if(e)return R.popups.onHide("table.insert",function(){R.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")}),!0;var t="";0<R.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableInsertButtons),"</div>"));var a={buttons:t,rows_columns:function r(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 × 1</div><div class="fr-select-table-size">',t=1;t<=R.opts.tableInsertMaxSize;t++){for(var a=1;a<=R.opts.tableInsertMaxSize;a++){var l="inline-block";2<t&&!R.helpers.isMobile()&&(l="none");var n="fr-table-cell ";1==t&&1==a&&(n+=" hover"),e+='<span class="fr-command '.concat(n,'" tabIndex="-1" data-cmd="tableInsert" data-row="').concat(t,'" data-col="').concat(a,'" data-param1="').concat(t,'" data-param2="').concat(a,'" style="display: ').concat(l,';" role="button"><span></span><span class="fr-sr-only">').concat(t," × ").concat(a," </span></span>")}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},l=R.popups.create("table.insert",a);return R.events.$on(l,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){d(x(e.currentTarget))},!0),function n(e){R.events.$on(e,"focus","[tabIndex]",function(e){var t=x(e.currentTarget);d(t)}),R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var a,l=e.which;if(me.KEYCODE.ARROW_UP==l||me.KEYCODE.ARROW_DOWN==l||me.KEYCODE.ARROW_LEFT==l||me.KEYCODE.ARROW_RIGHT==l){if(t.is("span.fr-table-cell")){var n=t.parent().find("span.fr-table-cell"),r=n.index(t),o=R.opts.tableInsertMaxSize,s=r%o,i=Math.floor(r/o);me.KEYCODE.ARROW_UP==l?i=Math.max(0,i-1):me.KEYCODE.ARROW_DOWN==l?i=Math.min(R.opts.tableInsertMaxSize-1,i+1):me.KEYCODE.ARROW_LEFT==l?s=Math.max(0,s-1):me.KEYCODE.ARROW_RIGHT==l&&(s=Math.min(R.opts.tableInsertMaxSize-1,s+1));var f=i*o+s,c=x(n.get(f));d(c),R.events.disableBlur(),c.focus(),a=!1}}else me.KEYCODE.ENTER==l&&(R.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(l),l}function d(e){var t=e.data("row");null!==t&&(t=parseInt(t));var a=e.data("col");null!==a&&(a=parseInt(a));var l=e.parent();l.siblings(".fr-table-size-info").html("".concat(t," × ").concat(a)),l.find("> span").removeClass("hover fr-active-item");for(var n=1;n<=R.opts.tableInsertMaxSize;n++)for(var r=0;r<=R.opts.tableInsertMaxSize;r++){var o=l.find('> span[data-row="'.concat(n,'"][data-col="').concat(r,'"]'));n<=t&&r<=a?o.addClass("hover"):n<=t+1||n<=2&&!R.helpers.isMobile()?o.css("display","inline-block"):2<n&&!R.helpers.isMobile()&&o.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return R.popups.onHide("table.edit",i),!0;if(0<R.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(R.button.buildList(R.opts.tableEditButtons),"</div>")},a=R.popups.create("table.edit",t);return R.events.$on(R.$wp,"scroll.table-edit",function(){R.popups.isVisible("table.edit")&&h()}),a}return!1}function u(){if(0<Z().length){var e=Q();R.selection.setBefore(e.get(0))||R.selection.setAfter(e.get(0)),R.selection.restore(),R.popups.hide("table.edit"),e.remove(),R.toolbar.enable()}}function b(e){var t=Q();if(0<t.length){if(0<R.$el.find("th.fr-selected-cell").length&&"above"==e)return;var a,l,n,r=_(),o=M(r);if(null==o)return;l="above"==e?o.min_i:o.max_i;var s="<tr>";for(a=0;a<r[l].length;a++){if("below"==e&&l<r.length-1&&r[l][a]==r[l+1][a]||"above"==e&&0<l&&r[l][a]==r[l-1][a]){if(0===a||0<a&&r[l][a]!=r[l][a-1]){var i=x(r[l][a]);i.attr("rowspan",parseInt(i.attr("rowspan"),10)+1)}}else s+='<td style="'+x(r[l][a]).attr("style")+'" ><br></td>'}s+="</tr>",n=0<R.$el.find("th.fr-selected-cell").length&&"below"==e?x(t.find("tbody").not(t.find("> table tbody"))):x(t.find("tr").not(t.find("> table tr")).get(l)),"below"==e?"TBODY"==n.attr("tagName")?n.prepend(s):n[0].parentNode&&n[0].insertAdjacentHTML("afterend",s):"above"==e&&(n.before(s),R.popups.isVisible("table.edit")&&h())}}function g(e,t,a){var l,n,r,o,s,i=0,f=_(a);if(e<(t=Math.min(t,f[0].length-1)))for(n=e;n<=t;n++)if(!(e<n&&f[0][n]==f[0][n-1])&&1<(o=Math.min(parseInt(f[0][n].getAttribute("colspan"),10)||1,t-e+1))&&f[0][n]==f[0][n+1])for(i=o-1,l=1;l<f.length;l++)if(f[l][n]!=f[l-1][n]){for(r=n;r<n+o;r++)if(1<(s=parseInt(f[l][r].getAttribute("colspan"),10)||1)&&f[l][r]==f[l][r+1])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"colspan",0,f.length-1,e,t)}function m(e,t,a){var l,n,r,o,s,i=0,f=_(a);if(e<(t=Math.min(t,f.length-1)))for(l=e;l<=t;l++)if(!(e<l&&f[l][0]==f[l-1][0])&&1<(o=Math.min(parseInt(f[l][0].getAttribute("rowspan"),10)||1,t-e+1))&&f[l][0]==f[l+1][0])for(i=o-1,n=1;n<f[0].length;n++)if(f[l][n]!=f[l][n-1]){for(r=l;r<l+o;r++)if(1<(s=parseInt(f[r][n].getAttribute("rowspan"),10)||1)&&f[r][n]==f[r+1][n])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"rowspan",e,t,0,f[0].length-1)}function v(e,t,a,l,n,r,o){var s,i,f;for(s=l;s<=n;s++)for(i=r;i<=o;i++)l<s&&e[s][i]==e[s-1][i]||r<i&&e[s][i]==e[s][i-1]||1<(f=parseInt(e[s][i].getAttribute(a),10)||1)&&(1<f-t?e[s][i].setAttribute(a,f-t):e[s][i].removeAttribute(a))}function w(e,t,a,l,n){m(e,t,n),g(a,l,n)}function t(e){var t=R.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",R.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function _(e){var f=[];return null==(e=e||null)&&0<Z().length&&(e=Q()),e&&e.findVisible("tr").not(e.find("> table tr")).each(function(s,e){var t=x(e),i=0;t.find("> th, > td").each(function(e,t){for(var a=x(t),l=parseInt(a.attr("colspan"),10)||1,n=parseInt(a.attr("rowspan"),10)||1,r=s;r<s+n;r++)for(var o=i;o<i+l;o++)f[r]||(f[r]=[]),f[r][o]?i++:f[r][o]=t;i+=l})}),f}function $(e,t){for(var a=0;a<t.length;a++)for(var l=0;l<t[a].length;l++)if(t[a][l]==e)return{row:a,col:l}}function D(e,t,a){for(var l=e+1,n=t+1;l<a.length;){if(a[l][t]!=a[e][t]){l--;break}l++}for(l==a.length&&l--;n<a[e].length;){if(a[e][n]!=a[e][t]){n--;break}n++}return n==a[e].length&&n--,{row:l,col:n}}function C(){R.el.querySelector(".fr-cell-fixed")&&R.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")&&R.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function E(){var e=R.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=x(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),C()}function y(){R.events.disableBlur(),R.selection.clear(),R.$el.addClass("fr-no-selection"),R.$el.blur(),R.events.enableBlur()}function M(e){var t=R.$el.find(".fr-selected-cell");if(0<t.length){var a,l=e.length,n=0,r=e[0].length,o=0;for(a=0;a<t.length;a++){var s=$(t[a],e),i=D(s.row,s.col,e);l=Math.min(s.row,l),n=Math.max(i.row,n),r=Math.min(s.col,r),o=Math.max(i.col,o)}return{min_i:l,max_i:n,min_j:r,max_j:o}}return null}function S(e){var t=M(e);if(null!=t){var a=x(e[t.min_i][t.min_j]),l=x(e[t.min_i][t.max_j]),n=x(e[t.max_i][t.min_j]);return{left:a.length&&a.offset().left,right:l.length&&l.offset().left+l.outerWidth(),top:a.length&&a.offset().top,bottom:n.length&&n.offset().top+n.outerHeight()}}}function I(e,t){if(x(e).is(t))E(),x(e).addClass("fr-selected-cell");else{y(),R.edit.off();var a=_(),l=$(e,a),n=$(t,a),r=function h(e,t,a,l,n){var r,o,s,i,f=e,c=t,d=a,p=l;for(r=f;r<=c;r++)(1<(parseInt(x(n[r][d]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][d]).attr("colspan"),10)||1))&&(i=D((s=$(n[r][d],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[r][p]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][p]).attr("colspan"),10)||1))&&(i=D((s=$(n[r][p],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));for(o=d;o<=p;o++)(1<(parseInt(x(n[f][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[f][o]).attr("colspan"),10)||1))&&(i=D((s=$(n[f][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[c][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[c][o]).attr("colspan"),10)||1))&&(i=D((s=$(n[c][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));return f==e&&c==t&&d==a&&p==l?{min_i:e,max_i:t,min_j:a,max_j:l}:h(f,c,d,p,n)}(Math.min(l.row,n.row),Math.max(l.row,n.row),Math.min(l.col,n.col),Math.max(l.col,n.col),a);E(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var o=r.min_i;o<=r.max_i;o++)for(var s=r.min_j;s<=r.max_j;s++)x(a[o][s]).addClass("fr-selected-cell")}}function N(e){var t=null,a=x(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<a.closest("th",a.closest("thead")[0]).length?t=a.closest("th",a.closest("thead")[0]).get(0):0<a.closest("td",a.closest("tr")[0]).length&&(t=a.closest("td",a.closest("tr")[0]).get(0)),-1===R.$el.html.toString().search(t)?null:t}function T(){E(),R.popups.hide("table.edit")}function e(e){var t=N(e);if("false"==x(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<Z().length&&!t&&T(),!R.edit.isDisabled()||R.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)&&t&&T();else if(r=!0,t){0<Z().length&&!e.shiftKey&&T(),e.stopPropagation(),R.events.trigger("image.hideResizer"),R.events.trigger("video.hideResizer"),n=!0;var a=t.tagName.toLowerCase();e.shiftKey&&0<R.$el.find("".concat(a,".fr-selected-cell")).length?x(R.$el.find("".concat(a,".fr-selected-cell")).closest("table")).is(x(t).closest("table"))?I(l,t):y():((R.keys.ctrlKey(e)||e.shiftKey)&&(1<Z().length||0===x(t).find(R.selection.element()).length&&!x(t).is(R.selection.element()))&&y(),l=t,0<R.opts.tableEditButtons.length&&I(l,l))}}function a(e){if(!R.edit.isDisabled()&&R.popups.areVisible())return!0;if(n||R.$tb.is(e.target)||R.$tb.is(x(e.target).closest(".fr-toolbar"))||(0<Z().length&&R.toolbar.enable(),E()),!(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)){if(r=!1,n)n=!1,N(e)||1!=Z().length?0<Z().length&&(R.selection.isCollapsed()?h():(E(),R.edit.on())):E();if(A){A=!1,O.removeClass("fr-moving"),R.$el.removeClass("fr-no-selection"),R.edit.on();var t=parseFloat(O.css("left"))+R.opts.tableResizerOffset+R.$wp.offset().left;R.opts.iframe&&(t-=R.$iframe.offset().left),O.data("release-position",t),O.removeData("max-left"),O.removeData("max-right"),function C(){var e=O.data("origin"),t=O.data("release-position");if(e!==t){var a=O.data("first"),l=O.data("second"),n=O.data("table"),r=n.outerWidth();if(R.undo.canDo()||R.undo.saveStep(),null!=a&&null!=l){var o,s,i,f=_(n),c=[],d=[],p=[],h=[];for(o=0;o<f.length;o++)s=x(f[o][a]),i=x(f[o][l]),c[o]=s.outerWidth(),p[o]=i.outerWidth(),d[o]=c[o]/r*100,h[o]=p[o]/r*100;for(o=0;o<f.length;o++)if(s=x(f[o][a]),i=x(f[o][l]),f[o][a]!=f[o][l]){var u=(d[o]*(c[o]+t-e)/c[o]).toFixed(4);s.css("width",u+"%"),i.css("width",(d[o]+h[o]-u).toFixed(4)+"%")}}else{var b,g=n.parent(),m=r/g.width()*100,v=(parseInt(n.css("margin-left"),10)||0)/g.width()*100,w=(parseInt(n.css("margin-right"),10)||0)/g.width()*100;"rtl"==R.opts.direction&&0===l||"rtl"!=R.opts.direction&&0!==l?(b=(r+t-e)/r*m,n.css("margin-right","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(v).toFixed(4),"%)"))):("rtl"==R.opts.direction&&0!==l||"rtl"!=R.opts.direction&&0===l)&&(b=(r-t+e)/r*m,n.css("margin-left","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(w).toFixed(4),"%)"))),n.css("width","".concat(Math.round(b).toFixed(4),"%"))}R.selection.restore(),R.undo.saveStep(),R.events.trigger("table.resized",[n.get(0)])}O.removeData("origin"),O.removeData("release-position"),O.removeData("first"),O.removeData("second"),O.removeData("table")}(),Y()}}}function K(e){if(R.events.$on(x("input"),"click",ee),!0===n&&0<R.opts.tableEditButtons.length){if(x(e.currentTarget).closest("table").is(Q())){if("TD"==e.currentTarget.tagName&&0===R.$el.find("th.fr-selected-cell").length)return void I(l,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===R.$el.find("td.fr-selected-cell").length)return void I(l,e.currentTarget)}y()}}function B(e,t,a,l){for(var n,r=t;r!=R.el&&"TD"!=r.tagName&&"TH"!=r.tagName&&("up"==l?n=r.previousElementSibling:"down"==l&&(n=r.nextElementSibling),!n);)r=r.parentNode;"TD"==r.tagName||"TH"==r.tagName?function o(e,t){for(var a=e;a&&"TABLE"!=a.tagName&&a.parentNode!=R.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName){var l=_(x(a));"up"==t?z($(e,l),a,l):"down"==t&&k($(e,l),a,l)}}(r,l):n&&("up"==l&&R.selection.setAtEnd(n),"down"==l&&R.selection.setAtStart(n))}function z(e,t,a){0<e.row?R.selection.setAtEnd(a[e.row-1][e.col]):B(0,t,0,"up")}function k(e,t,a){var l=parseInt(a[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<a.length-l?R.selection.setAtStart(a[e.row+l][e.col]):B(0,t,0,"down")}function Y(){O&&(O.find("div").css("opacity",0),O.css("top",0),O.css("left",0),O.css("height",0),O.find("div").css("height",0),O.hide())}function W(){f&&f.removeClass("fr-visible").css("left","-9999px")}function L(e,t){var a=x(t),l=a.closest("table"),n=l.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<a.closest("td").length?t=a.closest("td"):0<a.closest("th").length&&(t=a.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)O&&a.get(0)!=O.get(0)&&a.parent().get(0)!=O.get(0)&&R.core.sameInstance(O)&&Y();else{if(a=x(t),0===R.$el.find(a).length)return!1;var r=a.offset().left-1,o=r+a.outerWidth();if(Math.abs(e.pageX-r)<=R.opts.tableResizerOffset||Math.abs(o-e.pageX)<=R.opts.tableResizerOffset){var s,i,f,c,d,p=_(l),h=$(t,p),u=D(h.row,h.col,p),b=l.offset().top,g=l.outerHeight()-1;"rtl"!=R.opts.direction?e.pageX-r<=R.opts.tableResizerOffset?(f=r,0<h.col?(c=r-j(h.col-1,p)+R.opts.tableResizingLimit,d=r+j(h.col,p)-R.opts.tableResizingLimit,s=h.col-1,i=h.col):(s=null,i=0,c=l.offset().left-1-parseInt(l.css("margin-left"),10),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)):o-e.pageX<=R.opts.tableResizerOffset&&(f=o,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=o-j(u.col,p)+R.opts.tableResizingLimit,d=o+j(u.col+1,p)-R.opts.tableResizingLimit,s=u.col,i=u.col+1):(s=u.col,i=null,c=l.offset().left-1+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):o-e.pageX<=R.opts.tableResizerOffset?(f=o,0<h.col?(c=o-j(h.col,p)+R.opts.tableResizingLimit,d=o+j(h.col-1,p)-R.opts.tableResizingLimit,s=h.col,i=h.col-1):(s=null,i=0,c=l.offset().left+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):e.pageX-r<=R.opts.tableResizerOffset&&(f=r,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=r-j(u.col+1,p)+R.opts.tableResizingLimit,d=r+j(u.col,p)-R.opts.tableResizingLimit,s=u.col+1,i=u.col):(s=u.col,i=null,c=n.offset().left+parseFloat(n.css("padding-left")),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)),O||function E(){R.shared.$table_resizer||(R.shared.$table_resizer=x(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),O=R.shared.$table_resizer,R.events.$on(O,"mousedown",function(e){return!R.core.sameInstance(O)||(0<Z().length&&T(),1==e.which?(R.selection.save(),A=!0,O.addClass("fr-moving"),y(),R.edit.off(),O.find("div").css("opacity",1),!1):void 0)}),R.events.$on(O,"mousemove",function(e){if(!R.core.sameInstance(O))return!0;A&&(R.opts.iframe&&(e.pageX-=R.$iframe.offset().left),G(e))}),R.events.on("shared.destroy",function(){O.html("").removeData().remove(),O=null},!0),R.events.on("destroy",function(){R.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),x("body").first().append(O.hide())},!0)}(),O.data("table",l),O.data("first",s),O.data("second",i),O.data("instance",R),R.$wp.append(O);var m=f-R.win.pageXOffset-R.opts.tableResizerOffset-R.$wp.offset().left,v=b-R.$wp.offset().top+R.$wp.scrollTop();if(R.opts.iframe){var w=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),C=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));m+=R.$iframe.offset().left+C,v+=R.$iframe.offset().top+w,c+=R.$iframe.offset().left,d+=R.$iframe.offset().left}O.data("max-left",c),O.data("max-right",d),O.data("origin",f-R.win.pageXOffset),O.css("top",v),O.css("left",m),O.css("height",g),O.find("div").css("height",g),O.css("padding-left",R.opts.tableResizerOffset),O.css("padding-right",R.opts.tableResizerOffset),O.show()}else R.core.sameInstance(O)&&Y()}}function F(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t).find("tr").first(),n=e.pageX,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("th, td").each(function(){var e=x(this);return e.offset().left<=n&&n<e.offset().left+e.outerWidth()/2?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left-a/2),f.data("selected-cell",e),f.data("position","before"),f.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=n&&n<e.offset().left+e.outerWidth()?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left+e.outerWidth()-a/2),f.data("selected-cell",e),f.data("position","after"),f.addClass("fr-visible"),!1):void 0})}function H(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t),n=e.pageY,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("tr").each(function(){var e=x(this);return e.offset().top<=n&&n<e.offset().top+e.outerHeight()/2?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a/2),f.css("left",r+e.offset().left-R.$box.offset().left-a-5),f.data("selected-cell",e.find("td").first()),f.data("position","above"),f.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=n&&n<e.offset().top+e.outerHeight()?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top+e.outerHeight()-a/2),f.css("left",r+e.offset().left-R.$box.offset().left-a-5),f.data("selected-cell",e.find("td").first()),f.data("position","below"),f.addClass("fr-visible"),!1):void 0})}function V(e){o=null;var t=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset);R.opts.tableResizer&&(!R.popups.areVisible()||R.popups.areVisible()&&R.popups.isVisible("table.edit"))&&L(e,t),!R.opts.tableInsertHelper||R.popups.areVisible()||R.$tb.hasClass("fr-inline")&&R.$tb.isVisible()||function r(e,t){if(0===Z().length){var a,l,n;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||R.node.isElement(t)))for(a=1;a<=R.opts.tableInsertHelperOffset;a++){if(l=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset+a),x(l).hasClass("fr-tooltip"))return!0;if(l&&("TH"==l.tagName||"TD"==l.tagName||"TABLE"==l.tagName)&&(x(l).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(l).closest("table").attr("contenteditable"))return F(e,x(l).closest("table")),!0;if(n=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset+a,e.pageY-R.win.pageYOffset),x(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(x(n).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(n).closest("table").attr("contenteditable"))return H(e,x(n).closest("table")),!0}R.core.sameInstance(f)&&W()}}(e,t)}function P(){if(A){var e=O.data("table").offset().top-R.win.pageYOffset;if(R.opts.iframe){var t=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top"));e+=R.$iframe.offset().top-R.helpers.scrollTop()+t}O.css("top",e)}}function j(e,t){var a,l=x(t[0][e]).outerWidth();for(a=1;a<t.length;a++)l=Math.min(l,x(t[a][e]).outerWidth());return l}function X(e,t,a){var l,n=0;for(l=e;l<=t;l++)n+=j(l,a);return n}function G(e){if(1<Z().length&&r&&y(),!1===r&&!1===n&&!1===A)o&&clearTimeout(o),R.edit.isDisabled()&&!R.popups.isVisible("table.edit")||(o=setTimeout(V,30,e));else if(A){var t=e.pageX-R.win.pageXOffset;R.opts.iframe&&(t+=R.$iframe.offset().left);var a=O.data("max-left"),l=O.data("max-right");a<=t&&t<=l?O.css("left",t-R.opts.tableResizerOffset-R.$wp.offset().left):t<a&&parseFloat(O.css("left"),10)>a-R.opts.tableResizerOffset?O.css("left",a-R.opts.tableResizerOffset-R.$wp.offset().left):l<t&&parseFloat(O.css("left"),10)<l-R.opts.tableResizerOffset&&O.css("left",l-R.opts.tableResizerOffset-R.$wp.offset().left)}else r&&W()}function U(e){R.node.isEmpty(e.get(0))?e.prepend(me.MARKERS):e.prepend(me.START_MARKER).append(me.END_MARKER)}function q(){R.shared.$ti_helper||(R.shared.$ti_helper=x(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(R.language.translate("Insert"),'"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>')),R.events.bindClick(R.shared.$ti_helper,"a",function(){var e=f.data("selected-cell"),t=f.data("position"),a=f.data("instance")||R;"before"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"after"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"above"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"below"==t&&(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()),W()}),R.events.on("shared.destroy",function(){R.shared.$ti_helper.html("").removeData().remove(),R.shared.$ti_helper=null},!0),R.events.$on(R.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),R.events.$on(x(R.o_win),"scroll",function(){W()},!0),R.events.$on(R.$wp,"scroll",function(){W()},!0)),f=R.shared.$ti_helper,R.events.on("destroy",function(){f=null}),R.tooltip.bind(R.$box,".fr-insert-helper > a.fr-floating-btn")}function J(){l=null,clearTimeout(o)}function Z(){return R.el.querySelectorAll(".fr-selected-cell")}function Q(){var e=Z();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=R.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?x(t):x([])}return x([])}function ee(e){n=!1}return{_init:function te(){if(!R.$wp)return!1;if(!R.helpers.isMobile()){A=n=r=!1,R.events.$on(R.$el,"mousedown",e),R.popups.onShow("image.edit",function(){E(),n=r=!1}),R.popups.onShow("link.edit",function(){E(),n=r=!1}),R.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&E()}),R.events.$on(R.$el,"mouseover","th, td",K),R.events.$on(R.$win,"mouseup",a),R.opts.iframe&&R.events.$on(x(R.o_win),"mouseup",a),R.events.$on(R.$win,"mousemove",G),R.events.$on(x(R.o_win),"scroll",P),R.events.on("contentChanged",function(){0<Z().length&&(h(),R.$el.find("img").on("load.selected-cells",function(){x(this).off("load.selected-cells"),0<Z().length&&h()}))}),R.events.$on(x(R.o_win),"resize",function(){E()}),R.events.on("toolbar.esc",function(){if(0<Z().length)return R.events.disableBlur(),R.events.focus(),!1},!0),R.events.$on(x(R.o_win),"keydown",function(){r&&n&&(n=r=!1,R.$el.removeClass("fr-no-selection"),R.edit.on(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore(),E())}),R.events.$on(R.$el,"keydown",function(e){e.shiftKey?!1===function o(e){var t=Z();if(null!=t&&0<t.length){var a,l=_(),n=e.which,r=$(1==t.length?a=t[0]:(a=R.el.querySelector(".fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")),l);if(me.KEYCODE.ARROW_RIGHT==n){if(r.col<l[0].length-1)return I(a,l[r.row][r.col+1]),!1}else if(me.KEYCODE.ARROW_DOWN==n){if(r.row<l.length-1)return I(a,l[r.row+1][r.col]),!1}else if(me.KEYCODE.ARROW_LEFT==n){if(0<r.col)return I(a,l[r.row][r.col-1]),!1}else if(me.KEYCODE.ARROW_UP==n&&0<r.row)return I(a,l[r.row-1][r.col]),!1}}(e)&&setTimeout(function(){h()},0):function s(e){var t=e.which,a=R.selection.blocks();if(a.length&&("TD"==(a=a[0]).tagName||"TH"==a.tagName)){for(var l=a;l&&"TABLE"!=l.tagName&&l.parentNode!=R.el;)l=l.parentNode;if(l&&"TABLE"==l.tagName&&(me.KEYCODE.ARROW_LEFT==t||me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_RIGHT==t||me.KEYCODE.ARROW_DOWN==t)&&(0<Z().length&&T(),R.browser.webkit&&(me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_DOWN==t))){var n=R.selection.ranges(0).startContainer;if(n.nodeType==Node.TEXT_NODE&&(me.KEYCODE.ARROW_UP==t&&(n.previousSibling&&"BR"!==n.previousSibling.tagName||n.previousSibling&&"BR"===n.previousSibling.tagName&&n.previousSibling.previousSibling)||me.KEYCODE.ARROW_DOWN==t&&(n.nextSibling&&"BR"!==n.nextSibling.tagName||n.nextSibling&&"BR"===n.nextSibling.tagName&&n.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var r=_(x(l)),o=$(a,r);return me.KEYCODE.ARROW_UP==t?z(o,l,r):me.KEYCODE.ARROW_DOWN==t&&k(o,l,r),R.selection.restore(),!1}}}(e)}),R.events.on("keydown",function(e){if(!1===function l(e){if(e.which==me.KEYCODE.TAB){var t;if(0<Z().length)t=R.$el.find(".fr-selected-cell").last();else{var a=R.selection.element();"TD"==a.tagName||"TH"==a.tagName?t=x(a):a!=R.el&&(0<x(a).parentsUntil(R.$el,"td").length?t=x(a).parents("td").first():0<x(a).parentsUntil(R.$el,"th").length&&(t=x(a).parents("th").first()))}if(t)return e.preventDefault(),!!(0===R.selection.get().focusOffset&&0<x(R.selection.element()).parentsUntil(R.$el,"ol, ul").length&&(0<x(R.selection.element()).closest("li").prev().length||x(R.selection.element()).is("li")&&0<x(R.selection.element()).prev().length))||(T(),e.shiftKey?0<t.prev().length?U(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?U(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&U(t.closest("table").find("thead tr th").last()):0<t.next().length?U(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?U(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?U(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),b("below"),E(),U(t.closest("tr").next().find("td").first())),R.selection.restore(),!1)}}(e))return!1;var t=Z();if(0<t.length){if(0<t.length&&R.keys.ctrlKey(e)&&e.which==me.KEYCODE.A)return E(),R.popups.isVisible("table.edit")&&R.popups.hide("table.edit"),t=[],!0;if(e.which==me.KEYCODE.ESC&&R.popups.isVisible("table.edit"))return E(),R.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==me.KEYCODE.BACKSPACE||e.which==me.KEYCODE.DELETE)){R.undo.saveStep();for(var a=0;a<t.length;a++)x(t[a]).html("<br>"),a==t.length-1&&x(t[a]).prepend(me.MARKERS);return R.selection.restore(),R.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=me.KEYCODE.F10&&!R.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function n(e){if(e.altKey&&e.which==me.KEYCODE.SPACE){var t,a=R.selection.element();if("TD"==a.tagName||"TH"==a.tagName?t=a:0<x(a).closest("td").length?t=x(a).closest("td").get(0):0<x(a).closest("th").length&&(t=x(a).closest("th").get(0)),t)return e.preventDefault(),I(t,t),h(),!1}}(e))return!1},!0);var t=[];R.events.on("html.beforeGet",function(){t=Z();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),R.events.on("html.afterGet",function(){for(var e=0;e<t.length;e++)t[e].className=(t[e].className?t[e].className.trim()+" ":"")+"fr-selected-cell";t=[]}),c(!0),p(!0)}R.events.on("destroy",J)},insert:function ae(e,t){var a,l,n="<table "+(R.opts.tableDefaultWidth?'style="width: '+R.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',r=100/t;for(a=0;a<e;a++){for(n+="<tr>",l=0;l<t;l++)n+="<td"+(R.opts.tableDefaultWidth?' style="width: '+r.toFixed(4)+'%;"':"")+">",0===a&&0===l&&(n+=me.MARKERS),n+="<br></td>";n+="</tr>"}n+="</tbody></table>",R.html.insert(n),R.selection.restore();var o=R.$el.find(".fr-inserted-table");o.removeClass("fr-inserted-table"),R.events.trigger("table.inserted",[o.get(0)])},remove:u,insertRow:b,deleteRow:function le(){var e=Q();if(0<e.length){var t,a,l,n=_(),r=M(n);if(null==r)return;if(0===r.min_i&&r.max_i==n.length-1)u();else{for(t=r.max_i;t>=r.min_i;t--){for(l=x(e.find("tr").not(e.find("> table tr")).get(t)),a=0;a<n[t].length;a++)if(0===a||n[t][a]!=n[t][a-1]){var o=x(n[t][a]);if(1<parseInt(o.attr("rowspan"),10)){var s=parseInt(o.attr("rowspan"),10)-1;1==s?o.removeAttr("rowspan"):o.attr("rowspan",s)}if(t<n.length-1&&n[t][a]==n[t+1][a]&&(0===t||n[t][a]!=n[t-1][a])){for(var i=n[t][a],f=a;0<f&&n[t][f]==n[t][f-1];)f--;0===f?x(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(i):x(n[t+1][f-1])[0].parentNode&&x(n[t+1][f-1])[0].insertAdjacentElement("afterend",i)}}var c=l.parent();l.remove(),0===c.find("tr").length&&c.remove(),n=_(e)}w(0,n.length-1,0,n[0].length-1,e),0<r.min_i?R.selection.setAtEnd(n[r.min_i-1][0]):R.selection.setAtEnd(n[0][0]),R.selection.restore(),R.popups.hide("table.edit")}}},insertColumn:function ne(i){var e=Q();if(0<e.length){var f,c=_(),t=M(c);f="before"==i?t.min_j:t.max_j;var a,d=100/c[0].length,p=100/(c[0].length+1);e.find("th, td").each(function(){(a=x(this)).data("old-width",a.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,a=x(this),l=0,n=0;l-1<f;){if(!(t=a.find("> th, > td").get(n))){t=null;break}t==c[e][l]?(l+=parseInt(x(t).attr("colspan"),10)||1,n++):(l+=parseInt(x(c[e][l]).attr("colspan"),10)||1,"after"==i&&(t=0===n?-1:a.find("> th, > td").get(n-1)))}var r,o=x(t);if("after"==i&&f<l-1||"before"==i&&0<f&&c[e][f]==c[e][f-1]){if(0===e||0<e&&c[e][f]!=c[e-1][f]){var s=parseInt(o.attr("colspan"),10)+1;o.attr("colspan",s),o.css("width",(o.data("old-width")*p/d+p).toFixed(4)+"%"),o.removeData("old-width")}}else r=0<a.find("th").length?'<th style="width: '.concat(p.toFixed(4),'%;"><br></th>'):'<td style="width: '.concat(p.toFixed(4),'%;"><br></td>'),-1==t?a.prepend(r):null==t?a.append(r):"before"==i?o.before(r):"after"==i&&o[0].parentNode&&o[0].insertAdjacentHTML("afterend",r)}),e.find("th, td").each(function(){(a=x(this)).data("old-width")&&(a.css("width",(a.data("old-width")*p/d).toFixed(4)+"%"),a.removeData("old-width"))}),R.popups.isVisible("table.edit")&&h()}},deleteColumn:function re(){var e=Q();if(0<e.length){var t,a,l,n=_(),r=M(n);if(null==r)return;if(0===r.min_j&&r.max_j==n[0].length-1)u();else{var o=0;for(t=0;t<n.length;t++)for(a=0;a<n[0].length;a++)(l=x(n[t][a])).hasClass("fr-selected-cell")||(l.data("old-width",l.outerWidth()/e.outerWidth()*100),(a<r.min_j||a>r.max_j)&&(o+=l.outerWidth()/e.outerWidth()*100));for(o/=n.length,a=r.max_j;a>=r.min_j;a--)for(t=0;t<n.length;t++)if(0===t||n[t][a]!=n[t-1][a])if(l=x(n[t][a]),1<(parseInt(l.attr("colspan"),10)||1)){var s=parseInt(l.attr("colspan"),10)-1;1==s?l.removeAttr("colspan"):l.attr("colspan",s),l.css("width",(100*(l.data("old-width")-j(a,n))/o).toFixed(4)+"%"),l.removeData("old-width")}else{var i=x(l.parent().get(0));l.remove(),0===i.find("> th, > td").length&&(0===i.prev().length||0===i.next().length||i.prev().find("> th[rowspan], > td[rowspan]").length<i.prev().find("> th, > td").length)&&i.remove()}w(0,n.length-1,0,n[0].length-1,e),0<r.min_j?R.selection.setAtEnd(n[r.min_i][r.min_j-1]):R.selection.setAtEnd(n[r.min_i][0]),R.selection.restore(),R.popups.hide("table.edit"),e.find("th, td").each(function(){(l=x(this)).data("old-width")&&(l.css("width",(100*l.data("old-width")/o).toFixed(4)+"%"),l.removeData("old-width"))})}}},mergeCells:function oe(){if(1<Z().length&&(0===R.$el.find("th.fr-selected-cell").length||0===R.$el.find("td.fr-selected-cell").length)){C();var e,t,a=M(_());if(null==a)return;var l=R.$el.find(".fr-selected-cell"),n=x(l[0]),r=n.parent().find(".fr-selected-cell"),o=n.closest("table"),s=n.html(),i=0;for(e=0;e<r.length;e++)i+=x(r[e]).outerWidth();for(n.css("width",Math.min(100,i/o.outerWidth()*100).toFixed(4)+"%"),a.min_j<a.max_j&&n.attr("colspan",a.max_j-a.min_j+1),a.min_i<a.max_i&&n.attr("rowspan",a.max_i-a.min_i+1),e=1;e<l.length;e++)"<br>"!=(t=x(l[e])).html()&&""!==t.html()&&(s+="<br>".concat(t.html())),t.remove();n.html(s),R.selection.setAtEnd(n.get(0)),R.selection.restore(),R.toolbar.enable(),m(a.min_i,a.max_i,o);var f=o.find("tr:empty");for(e=f.length-1;0<=e;e--)x(f[e]).remove();g(a.min_j,a.max_j,o),h()}},splitCellVertically:function se(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,a=e.parent().outerWidth(),l=e.outerWidth(),n=e.clone().html("<br>"),r=_(),o=$(e.get(0),r);if(1<t){var s=Math.ceil(t/2);l=X(o.col,o.col+s-1,r)/a*100;var i=X(o.col+s,o.col+t-1,r)/a*100;1<s?e.attr("colspan",s):e.removeAttr("colspan"),1<t-s?n.attr("colspan",t-s):n.removeAttr("colspan"),e.css("width",l.toFixed(4)+"%"),n.css("width",i.toFixed(4)+"%")}else{var f;for(f=0;f<r.length;f++)if(0===f||r[f][o.col]!=r[f-1][o.col]){var c=x(r[f][o.col]);if(!c.is(e)){var d=(parseInt(c.attr("colspan"),10)||1)+1;c.attr("colspan",d)}}l=l/a*100/2,e.css("width","".concat(l.toFixed(4),"%")),n.css("width","".concat(l.toFixed(4),"%"))}e[0].parentNode&&e[0].insertAdjacentElement("afterend",n[0]),E(),R.popups.hide("table.edit")}},splitCellHorizontally:function ie(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=e.parent(),a=e.closest("table"),l=parseInt(e.attr("rowspan"),10),n=_(),r=$(e.get(0),n),o=e.clone().html("<br>");if(1<l){var s=Math.ceil(l/2);1<s?e.attr("rowspan",s):e.removeAttr("rowspan"),1<l-s?o.attr("rowspan",l-s):o.removeAttr("rowspan");for(var i=r.row+s,f=0===r.col?r.col:r.col-1;0<=f&&(n[i][f]==n[i][f-1]||0<i&&n[i][f]==n[i-1][f]);)f--;-1==f?x(a.find("tr").not(a.find("> table tr")).get(i)).prepend(o):x(n[i][f])[0].parentNode&&x(n[i][f])[0].insertAdjacentElement("afterend",o[0])}else{var c,d=x(document.createElement("tr")).append(o);for(c=0;c<n[0].length;c++)if(0===c||n[r.row][c]!=n[r.row][c-1]){var p=x(n[r.row][c]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",d[0])}E(),R.popups.hide("table.edit")}},addHeader:function fe(){var e=Q();if(0<e.length&&0===e.find("th").length){var t,a="<thead><tr>",l=0;for(e.find("tr").first().find("> td").each(function(){var e=x(this);l+=parseInt(e.attr("colspan"),10)||1}),t=0;t<l;t++)a+="<th><br></th>";a+="</tr></thead>",e.prepend(a),h()}},removeHeader:function ce(){var e=Q(),t=e.find("thead");if(0<t.length)if(0===e.find("tbody tr").length)u();else if(t.remove(),0<Z().length)h();else{R.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(R.selection.setAtEnd(a),R.selection.restore())}},setBackground:t,showInsertPopup:function de(){var e=R.$tb.find('.fr-command[data-cmd="insertTable"]'),t=R.popups.get("table.insert");if(t||(t=c()),!t.hasClass("fr-active")){R.popups.refresh("table.insert"),R.popups.setContainer("table.insert",R.$tb);var a=R.button.getPosition(e),l=a.left,n=a.top;R.popups.show("table.insert",l,n,e.outerHeight())}},showEditPopup:h,showColorsPopup:s,back:function pe(){0<Z().length?h():(R.popups.hide("table.insert"),R.toolbar.showInline())},verticalAlign:function he(e){R.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function ue(e){R.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function be(e,t,a,l){if(0<t.length){if(!a){var n=Object.keys(l);n.splice(n.indexOf(e),1),t.removeClass(n.join(" "))}t.toggleClass(e)}},selectedTable:Q,selectedCells:Z,customColor:function ge(){var e=R.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:I}},me.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),me.RegisterCommand("insertTable",{title:"Insert Table",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("table.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("table.insert")):this.table.showInsertPopup()},plugin:"table"}),me.RegisterCommand("tableInsert",{callback:function(e,t,a){this.table.insert(t,a),this.popups.hide("table.insert")}}),me.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),me.RegisterCommand("tableHeader",{title:"Table Header",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active")?this.table.removeHeader():this.table.addHeader()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("th").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),me.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),me.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below","delete":"Delete row"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableRows.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),me.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),me.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after","delete":"Delete column"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableColumns.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),me.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),me.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCells.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"merge"==t?this.table.mergeCells():"vertical-split"==t?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(e,t){1<this.$el.find(".fr-selected-cell").length?(t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled",!1)):(t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled",!1),t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled",!1))}}),me.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),me.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),me.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),me.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").closest("table");l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),me.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),me.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),me.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),me.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(e){0!==this.table.selectedCells().length||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),me.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),me.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellVerticalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'.concat(a.toLowerCase(),'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.verticalAlign(t)},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),me.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),me.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),me.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellHorizontalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),a=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-".concat(this.helpers.getAlignment(a(t[0])))))},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first())+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),me.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableCellStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").first();l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),me.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"})});
|
349
349
|
|
350
350
|
});
|
351
351
|
|
352
352
|
;/*!node_modules/froala-editor/js/plugins/url.min.js*/
|
353
|
-
amis.define('
|
353
|
+
amis.define('9497956', function(require, exports, module, define) {
|
354
354
|
|
355
355
|
/*!
|
356
356
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -358,12 +358,12 @@ amis.define('32c33e5', function(require, exports, module, define) {
|
|
358
358
|
* Copyright 2014-2020 Froala Labs
|
359
359
|
*/
|
360
360
|
|
361
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("
|
361
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(r){"use strict";(r=r&&r.hasOwnProperty("default")?r["default"]:r).URLRegEx="(^| |\\u00A0)(".concat(r.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),r.PLUGINS.url=function(a){var i=a.$,l=null;function t(e,t,n){for(var r="";n.length&&"."==n[n.length-1];)r+=".",n=n.substring(0,n.length-1);var o=n;if(a.opts.linkConvertEmailAddress)a.helpers.isEmail(o)&&!/^mailto:.*/i.test(o)&&(o="mailto:".concat(o));else if(a.helpers.isEmail(o))return t+n;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(o)||(o="//".concat(o)),(t||"")+"<a".concat(a.opts.linkAlwaysBlank?' target="_blank"':"").concat(l?' rel="'.concat(l,'"'):"",' data-fr-linked="true" href="').concat(o,'">').concat(n.replace(/&/g,"&").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"</a>").concat(r)}var s=function s(){return new RegExp(r.URLRegEx,"gi")};function p(e){return a.opts.linkAlwaysNoFollow&&(l="nofollow"),a.opts.linkAlwaysBlank&&(a.opts.linkNoOpener&&(l?l+=" noopener":l="noopener"),a.opts.linkNoReferrer&&(l?l+=" noreferrer":l="noreferrer")),e.replace(s(),t)}function c(e){var t=e.split(" ");return t[t.length-1]}function n(){var e=a.selection.ranges(0),t=e.startContainer;if(!t||t.nodeType!==Node.TEXT_NODE||e.startOffset!==(t.textContent||"").length)return!1;if(function o(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==a.el)&&o(e.parentNode))}(t))return!1;if(s().test(c(t.textContent))){i(t).before(p(t.textContent));var n=i(t.parentNode).find("a[data-fr-linked]");n.removeAttr("data-fr-linked"),t.parentNode.removeChild(t),a.events.trigger("url.linked",[n.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var r=t.previousSibling.innerText+t.textContent;s().test(c(r))&&(i(t.previousSibling).replaceWith(p(r)),t.parentNode.removeChild(t))}}return{_init:function e(){a.events.on("keypress",function(e){!a.selection.isCollapsed()||"."!=e.key&&")"!=e.key&&"("!=e.key||n()},!0),a.events.on("keydown",function(e){var t=e.which;!a.selection.isCollapsed()||t!=r.KEYCODE.ENTER&&t!=r.KEYCODE.SPACE||n()},!0),a.events.on("paste.beforeCleanup",function(e){if(a.helpers.isURL(e)){var t=null;return a.opts.linkAlwaysBlank&&(a.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),a.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(a.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}})}}}});
|
362
362
|
|
363
363
|
});
|
364
364
|
|
365
365
|
;/*!node_modules/froala-editor/js/plugins/video.min.js*/
|
366
|
-
amis.define('
|
366
|
+
amis.define('b2be72e', function(require, exports, module, define) {
|
367
367
|
|
368
368
|
/*!
|
369
369
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -371,12 +371,12 @@ amis.define('185fc21', function(require, exports, module, define) {
|
|
371
371
|
* Copyright 2014-2020 Froala Labs
|
372
372
|
*/
|
373
373
|
|
374
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("fa8683a")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(me){"use strict";me=me&&me.hasOwnProperty("default")?me["default"]:me,Object.assign(me.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(me.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadURL:null}),me.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],me.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,me.PLUGINS.video=function(c){var s,f,v,p,i,o,u=c.$,d="https://i.froala.com/upload",h=2,g=3,m=4,l=5,b=6,r={};function y(){var e=c.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var t=e.find(".fr-video-embed-layer textarea");t.val("").trigger("change"),(t=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function n(){var e=c.popups.get("video.edit");if(e||(e=function r(){var e="";if(0<c.opts.videoEditButtons.length){c.opts.videoResponsive&&(-1<c.opts.videoEditButtons.indexOf("videoSize")&&c.opts.videoEditButtons.splice(c.opts.videoEditButtons.indexOf("videoSize"),1),-1<c.opts.videoEditButtons.indexOf("videoDisplay")&&c.opts.videoEditButtons.splice(c.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<c.opts.videoEditButtons.indexOf("videoAlign")&&c.opts.videoEditButtons.splice(c.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(c.button.buildList(c.opts.videoEditButtons)," \n </div>")},o=c.popups.create("video.edit",t);return c.events.$on(c.$wp,"scroll.video-edit",function(){p&&c.popups.isVisible("video.edit")&&(c.events.disableBlur(),R(p))}),o}return!1}()),e){c.popups.setContainer("video.edit",c.$sc),c.popups.refresh("video.edit");var t=p.find("iframe, embed, video"),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();c.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function a(e){if(e)return c.popups.onRefresh("video.insert",y),c.popups.onHide("video.insert",q),!0;var t="";c.opts.videoUpload||-1===c.opts.videoInsertButtons.indexOf("videoUpload")||c.opts.videoInsertButtons.splice(c.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=c.button.buildList(c.opts.videoInsertButtons);""!==o&&(t='<div class="fr-buttons">'+o+"</div>");var i,r="",n=c.opts.videoInsertButtons.indexOf("videoUpload"),a=c.opts.videoInsertButtons.indexOf("videoByURL"),s=c.opts.videoInsertButtons.indexOf("videoEmbed");0<=a&&(i=" fr-active",(n<a&&0<=n||s<a&&0<=s)&&(i=""),r='<div class="fr-video-by-url-layer fr-layer'.concat(i,'" id="fr-video-by-url-layer-').concat(c.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(c.id,'" type="text" placeholder="').concat(c.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(c.language.translate("Insert"),"</button></div></div>"));var d="";0<=s&&(i=" fr-active",(n<s&&0<=n||a<s&&0<=a)&&(i=""),d='<div class="fr-video-embed-layer fr-layer'.concat(i,'" id="fr-video-embed-layer-').concat(c.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(c.id,'" type="text" placeholder="').concat(c.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(c.language.translate("Insert"),"</button></div></div>"));var l="";0<=n&&(i=" fr-active",(s<n&&0<=s||a<n&&0<=a)&&(i=""),l='<div class="fr-video-upload-layer fr-layer'.concat(i,'" id="fr-video-upload-layer-').concat(c.id,'"><strong>').concat(c.language.translate("Drop video"),"</strong><br>(").concat(c.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(c.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(c.id,'" role="button"></div></div>'));var f={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},v=c.popups.create("video.insert",f);return function p(i){c.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return u(this).addClass("fr-drop"),!1},!0),c.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return u(this).removeClass("fr-drop"),!1},!0),c.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),u(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||c;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),c.helpers.isIOS()&&c.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){u(this).trigger("click")},!0);c.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||c;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}u(this).val("")},!0)}(v),v}function w(e){c.events.focus(!0),c.selection.restore();var t=!1;p&&(j(),t=!0),c.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,c.opts.videoSplitHTML),c.popups.hide("video.insert");var o=c.$el.find(".fr-jiv");o.removeClass("fr-jiv"),o.toggleClass("fr-rv",c.opts.videoResponsive),Z(o,c.opts.videoDefaultDisplay,c.opts.videoDefaultAlign),o.toggleClass("fr-draggable",c.opts.videoMove),c.events.trigger(t?"video.replaced":"video.inserted",[o])}function E(){var e=u(this);c.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),R(e.parent()),c.events.trigger("video.loaded",[e.parent()])}function C(s,e,l,f,v){c.edit.off(),A("Loading video"),e&&(s=c.helpers.sanitizeURL(s));var p=function p(){var e,t;if(f){c.undo.canDo()||f.find("video").hasClass("fr-uploading")||c.undo.saveStep();var o=f.find("video").data("fr-old-src"),i=f.data("fr-replaced");f.data("fr-replaced",!1),c.$wp?((e=f.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&f.find("video").attr("src",o),f.replaceWith(e)):e=f;for(var r=e.find("video").get(0).attributes,n=0;n<r.length;n++){var a=r[n];0===a.nodeName.indexOf("data-")&&e.find("video").removeAttr(a.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),l[t]);e.find("video").on("canplay",E),e.find("video").attr("src",s),c.edit.on(),z(),c.undo.saveStep(),c.$el.blur(),c.events.trigger(i?"video.replaced":"video.inserted",[e,v])}else e=function d(e,t,o){var i,r="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(r+=" data-".concat(i,'="').concat(t[i],'"'));var n=c.opts.videoDefaultWidth;n&&"auto"!=n&&(n="".concat(n,"px"));var a=u(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+c.opts.videoDefaultDisplay[0]+("center"!=c.opts.videoDefaultAlign?" fr-fv"+c.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(n?' style="width: '+n+';" ':"")+" controls>"+c.language.translate("Your browser does not support HTML5 video.")+"</video>");a.toggleClass("fr-draggable",c.opts.videoMove),c.edit.on(),c.events.focus(!0),c.selection.restore(),c.undo.saveStep(),c.opts.videoSplitHTML?c.markers.split():c.markers.insert();c.html.wrap();var s=c.$el.find(".fr-marker");c.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent());s.replaceWith(a),c.selection.clear(),a.find("video").get(0).readyState>a.find("video").get(0).HAVE_FUTURE_DATA||c.helpers.isIOS()?o.call(a.find("video").get(0)):a.find("video").on("canplaythrough load",o);return a}(s,l,E),z(),c.undo.saveStep(),c.events.trigger("video.inserted",[e,v])};_("Loading video"),p()}function _(e){var t=c.popups.get("video.insert");if(t||(t=a()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),p){var o=p.find("video");c.popups.setContainer("video.insert",c.$sc);var i=o.offset().left,r=o.offset().top+o.height();c.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&A(c.language.translate("Uploading"),0)}function S(e){var t=c.popups.get("video.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||c.$el.find("video.fr-error").length)){if(c.events.focus(),c.$el.find("video.fr-error").length&&(c.$el.find("video.fr-error").parent().remove(),c.undo.saveStep(),c.undo.run(),c.undo.dropRedo()),!c.$wp&&p){var o=p;M(!0),c.selection.setAfter(o.find("video").get(0)),c.selection.restore()}c.popups.hide("video.insert")}}function A(e,t){var o=c.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function x(e){_();var t=c.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),c.events.disableBlur(),o.focus()}function R(e){t.call(e.get(0))}function D(e){A("Loading video");var t=this.status,o=this.response,i=this.responseXML,r=this.responseText;try{if(c.opts.videoUploadToS3)if(201==t){var n=function s(e){try{var t=u(e).find("Location").text(),o=u(e).find("Key").text();return!1===c.events.trigger("video.uploadedToS3",[t,o,e],!0)?(c.edit.on(),!1):t}catch(i){return X(m,e),!1}}(i);n&&C(n,!1,[],e,o||i)}else X(m,o||i);else if(200<=t&&t<300){var a=function d(e){try{if(!1===c.events.trigger("video.uploaded",[e],!0))return c.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(X(h,e),!1)}catch(o){return X(m,e),!1}}(r);a&&C(a.link,!1,a,e,o||r)}else X(g,o||r)}catch(l){X(m,o||r)}}function U(){X(m,this.response||this.responseText||this.responseXML)}function B(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;A(c.language.translate("Uploading"),t)}}function $(){c.edit.on(),S(!0)}function I(e){if(!c.core.sameInstance(v))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=c.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,n=!1;try{n=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(a){}n&&r.frameElement&&(t+=c.helpers.getPX(u(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+c.helpers.getPX(u(r.frameElement).offset().top)+r.frameElement.clientTop)}c.undo.canDo()||c.undo.saveStep(),(f=u(this)).data("start-x",t),f.data("start-y",o),s.show(),c.popups.hideAll(),Y()}function k(e){if(!c.core.sameInstance(v))return!0;if(f){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=f.data("start-x"),r=f.data("start-y");f.data("start-x",t),f.data("start-y",o);var n=t-i,a=o-r,s=p.find("iframe, embed, video"),d=s.width(),l=s.height();(f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(n=0-n),(f.hasClass("fr-hnw")||f.hasClass("fr-hne"))&&(a=0-a),s.css("width",d+n),s.css("height",l+a),s.removeAttr("width"),s.removeAttr("height"),T()}}function O(e){if(!c.core.sameInstance(v))return!0;f&&p&&(e&&e.stopPropagation(),f=null,s.hide(),T(),n(),c.undo.saveStep())}function L(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function P(e,t,o,i){return e.pageX=t,e.pageY=t,I.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),k.call(this,e),O.call(this,e),++i}function z(){var e,t=Array.prototype.slice.call(c.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("src")),u(t[e]).toggleClass("fr-draggable",c.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("src"))<0&&c.events.trigger("video.removed",[u(i[e])]);i=t}function T(){v||function a(){var e;if(c.shared.$video_resizer?(v=c.shared.$video_resizer,s=c.shared.$vid_overlay,c.events.on("destroy",function(){u("body").first().append(v.removeClass("fr-active"))},!0)):(c.shared.$video_resizer=u(document.createElement("div")).attr("class","fr-video-resizer"),v=c.shared.$video_resizer,c.events.$on(v,"mousedown",function(e){e.stopPropagation()},!0),c.opts.videoResize&&(v.append(L("nw")+L("ne")+L("sw")+L("se")),c.shared.$vid_overlay=u(document.createElement("div")).attr("class","fr-video-overlay"),s=c.shared.$vid_overlay,e=v.get(0).ownerDocument,u(e).find("body").first().append(s))),c.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null,c.opts.videoResize&&(s.remove(),s=null)},!0),c.helpers.isMobile()||c.events.$on(u(c.o_win),"resize.video",function(){M(!0)}),c.opts.videoResize){e=v.get(0).ownerDocument,c.events.$on(v,c._mousedown,".fr-handler",I),c.events.$on(u(e),c._mousemove,k),c.events.$on(u(e.defaultView||e.parentWindow),c._mouseup,O),c.events.$on(s,"mouseleave",O);var i=1,r=null,n=0;c.events.on("keydown",function(e){if(p){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,o=e.which;(o!==r||200<e.timeStamp-n)&&(i=1),(o==me.KEYCODE.EQUALS||c.browser.mozilla&&o==me.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=P.call(this,e,1,1,i):(o==me.KEYCODE.HYPHEN||c.browser.mozilla&&o==me.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(i=P.call(this,e,2,-1,i)),r=o,n=e.timeStamp}}),c.events.on("keyup",function(){i=1})}}(),(c.$wp||c.$sc).append(v),v.data("instance",c);var e=p.find("iframe, embed, video"),t=0,o=0;c.opts.iframe&&(o=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-top")),t=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-left"))),v.css("top",(c.opts.iframe?e.offset().top+o-1:e.offset().top-c.$wp.offset().top-1)+c.$wp.scrollTop()).css("left",(c.opts.iframe?e.offset().left+t-1:e.offset().left-c.$wp.offset().left-1)+c.$wp.scrollLeft()).css("width",e.get(0).getBoundingClientRect().width).css("height",e.get(0).getBoundingClientRect().height).addClass("fr-active")}function t(e){if(e&&"touchend"==e.type&&o)return!0;if(e&&c.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(c.edit.isDisabled())return!1;for(var t=0;t<me.INSTANCES.length;t++)me.INSTANCES[t]!=c&&me.INSTANCES[t].events.trigger("video.hideResizer");c.toolbar.disable(),c.helpers.isMobile()&&(c.events.disableBlur(),c.$el.blur(),c.events.enableBlur()),c.$el.find(".fr-video.fr-active").removeClass("fr-active"),(p=u(this)).addClass("fr-active"),c.opts.iframe&&c.size.syncIframe(),Q(),T(),n(),c.selection.clear(),c.button.bulkRefresh(),c.events.trigger("image.hideResizer")}function M(e){p&&(function t(){return c.shared.vid_exit_flag}()||!0===e)&&(v.removeClass("fr-active"),c.toolbar.enable(),p.removeClass("fr-active"),p=null,Y())}function V(){c.shared.vid_exit_flag=!0}function Y(){c.shared.vid_exit_flag=!1}function N(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!c.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;c.markers.remove(),c.markers.insertAtPoint(e.originalEvent),c.$el.find(".fr-marker").replaceWith(me.MARKERS),c.popups.hideAll();var i=c.popups.get("video.insert");return i||(i=a()),c.popups.setContainer("video.insert",c.$sc),c.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),_(),0<=c.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?K(t.files):X(b),e.preventDefault(),e.stopPropagation(),!1}}}function K(e){if(void 0!==e&&0<e.length){if(!1===c.events.trigger("video.beforeUpload",[e]))return!1;var t,o=e[0];if((null===c.opts.videoUploadURL||c.opts.videoUploadURL==d)&&!c.opts.videoUploadToS3)return function s(i){p&&p.find("iframe")&&p.find("iframe").length&&j();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],o=0;o<e.length;o++)t.push(e.charCodeAt(o));C(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:i.type})),!1,null,p)},_(),r.readAsDataURL(i)}(o),!1;if(o.size>c.opts.videoMaxSize)return X(l),!1;if(c.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return X(b),!1;if(c.drag_support.formdata&&(t=c.drag_support.formdata?new FormData:null),t){var i;if(!1!==c.opts.videoUploadToS3)for(i in t.append("key",c.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),c.opts.videoUploadToS3.params)c.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,c.opts.videoUploadToS3.params[i]);for(i in c.opts.videoUploadParams)c.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,c.opts.videoUploadParams[i]);t.append(c.opts.videoUploadParam,o);var r=c.opts.videoUploadURL;c.opts.videoUploadToS3&&(r=c.opts.videoUploadToS3.uploadURL?c.opts.videoUploadToS3.uploadURL:"https://".concat(c.opts.videoUploadToS3.region,".amazonaws.com/").concat(c.opts.videoUploadToS3.bucket));var n=c.core.getXHR(r,c.opts.videoUploadMethod);n.onload=function(){D.call(n,p)},n.onerror=U,n.upload.onprogress=B,n.onabort=$,_(),c.events.disableBlur(),c.edit.off(),c.events.enableBlur();var a=c.popups.get("video.insert");a&&u(a.off("abortUpload")).on("abortUpload",function(){4!=n.readyState&&n.abort()}),n.send(t)}}}function X(e,t){c.edit.on(),p&&p.find("video").addClass("fr-error"),x(c.language.translate("Something went wrong. Please try again.")),c.events.trigger("video.error",[{code:e,message:r[e]},t])}function H(){if(p){var e=c.popups.get("video.size"),t=p.find("iframe, embed, video");e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function G(e){if(e)return c.popups.onRefresh("video.size",H),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(c.button.buildList(c.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(c.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(c.id,'" type="text" name="width" placeholder="').concat(c.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(c.id,'" type="text" name="height" placeholder="').concat(c.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(c.language.translate("Update"),"</button></div></div>")},o=c.popups.create("video.size",t);return c.events.$on(c.$wp,"scroll",function(){p&&c.popups.isVisible("video.size")&&(c.events.disableBlur(),R(p))}),o}function F(e){if(void 0===e&&(e=p),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function W(e){void 0===e&&(e=p);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function j(){if(p&&!1!==c.events.trigger("video.beforeRemove",[p])){var e=p;c.popups.hideAll(),M(!0),c.selection.setBefore(e.get(0))||c.selection.setAfter(e.get(0)),e.remove(),c.selection.restore(),c.html.fillEmptyBlocks()}}function q(){S()}function Z(e,t,o){!c.opts.htmlUntouched&&c.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function J(){var e=c.$el.find("video").filter(function(){return 0===u(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(u(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),c.$el.find("embed, iframe").filter(function(){if(c.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<u(this).parents("span.fr-video").length)return!1;for(var e=u(this).attr("src"),t=0;t<me.VIDEO_PROVIDERS.length;t++){var o=me.VIDEO_PROVIDERS[t];if(o.test_regex.test(e)&&new RegExp(c.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1}).map(function(){return 0===u(this).parents("object").length?this:u(this).parents("object").get(0)}).wrap(u(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,o,i,r,n=c.$el.find("span.fr-video, video"),a=0;a<n.length;a++){var s=u(n[a]);!c.opts.htmlUntouched&&c.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(F(r)[0])),r.addClass("fr-dv".concat(W(r)[0]))),c.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):c.opts.htmlUntouched||c.opts.useClasses||(void 0,o=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,i=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":F(t),Z(t,o,i),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}n.toggleClass("fr-draggable",c.opts.videoMove)}}function Q(){if(p){c.selection.clear();var e=c.doc.createRange();e.selectNode(p.get(0)),c.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[h]="No link in upload response.",r[g]="Error during file upload.",r[m]="Parsing response failed.",r[l]="File is too large.",r[b]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",c.shared.vid_exit_flag=!1,{_init:function ee(){c.opts.videoResponsive&&(c.opts.videoResize=!1),function e(){c.events.on("drop",N,!0),c.events.on("mousedown window.mousedown",V),c.events.on("window.touchmove",Y),c.events.on("mouseup window.mouseup",M),c.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&M()}),c.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){M(!0)})}(),c.helpers.isMobile()&&(c.events.$on(c.$el,"touchstart","span.fr-video",function(){o=!1}),c.events.$on(c.$el,"touchmove",function(){o=!0})),c.events.on("html.set",J),J(),c.events.$on(c.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(c.browser.msie||c.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),c.events.$on(c.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==u(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),c.events.on("keydown",function(e){var t=e.which;return!p||t!=me.KEYCODE.BACKSPACE&&t!=me.KEYCODE.DELETE?p&&t==me.KEYCODE.ESC?(M(!0),e.preventDefault(),!1):p&&t!=me.KEYCODE.F10&&!c.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),j(),c.undo.saveStep(),!1)},!0),c.events.on("toolbar.esc",function(){if(p)return c.events.disableBlur(),c.events.focus(),!1},!0),c.events.on("toolbar.focusEditor",function(){if(p)return!1},!0),c.events.on("keydown",function(){c.$el.find("span.fr-video:empty").remove()}),c.$wp&&(z(),c.events.on("contentChanged",z)),a(!0),G(!0)},showInsertPopup:function te(){var e=c.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=c.popups.get("video.insert");if(t||(t=a()),S(),!t.hasClass("fr-active"))if(c.popups.refresh("video.insert"),c.popups.setContainer("video.insert",c.$tb),e.isVisible()){var o=c.button.getPosition(e),i=o.left,r=o.top;c.popups.show("video.insert",i,r,e.outerHeight())}else c.position.forSelection(t),c.popups.show("video.insert")},showLayer:function oe(e){var t,o,i=c.popups.get("video.insert");if(!p&&!c.opts.toolbarInline){var r=c.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,o=r.offset().top+(c.opts.toolbarBottom?10:r.outerHeight()-10)}c.opts.toolbarInline&&(o=i.offset().top-c.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(o+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),c.popups.show("video.insert",t,o,0),c.accessibility.focusPopup(i)},refreshByURLButton:function ie(e){var t=c.popups.get("video.insert");t&&t.find(".fr-video-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function re(e){var t=c.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function ne(e){var t=c.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:K,insertByURL:function ae(e){void 0===e&&(e=(c.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var t=null;if(/^http/.test(e)||(e="https://".concat(e)),c.helpers.isURL(e))for(var o=0;o<me.VIDEO_PROVIDERS.length;o++){var i=me.VIDEO_PROVIDERS[o];if(i.test_regex.test(e)&&new RegExp(c.opts.videoAllowedProviders.join("|")).test(i.provider)){t=e.replace(i.url_regex,i.url_text),t=i.html.replace(/\{url\}/,t);break}}t?w(t):(x(c.language.translate("Something went wrong. Please try again.")),c.events.trigger("video.linkError",[e]))},insertEmbed:function se(e){void 0===e&&(e=c.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&me.VIDEO_EMBED_REGEX.test(e)?w(e):(x(c.language.translate("Something went wrong. Please try again.")),c.events.trigger("video.codeError",[e]))},insert:w,align:function de(e){p.removeClass("fr-fvr fr-fvl"),!c.opts.htmlUntouched&&c.opts.useClasses?"left"==e?p.addClass("fr-fvl"):"right"==e&&p.addClass("fr-fvr"):Z(p,W(),e),Q(),T(),n(),c.selection.clear()},refreshAlign:function le(e){if(!p)return!1;e.find(">*").first().replaceWith(c.icon.create("video-align-".concat(F())))},refreshAlignOnShow:function fe(e,t){p&&t.find('.fr-command[data-param1="'.concat(F(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ve(e){p.removeClass("fr-dvi fr-dvb"),!c.opts.htmlUntouched&&c.opts.useClasses?"inline"==e?p.addClass("fr-dvi"):"block"==e&&p.addClass("fr-dvb"):Z(p,e,F()),Q(),T(),n(),c.selection.clear()},refreshDisplayOnShow:function pe(e,t){p&&t.find('.fr-command[data-param1="'.concat(W(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:j,hideProgressBar:S,showSizePopup:function ce(){var e=c.popups.get("video.size");e||(e=G()),S(),c.popups.refresh("video.size"),c.popups.setContainer("video.size",c.$sc);var t=p.find("iframe, embed, video"),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();c.popups.show("video.size",o,i,t.height(),!0)},replace:function ue(){var e=c.popups.get("video.insert");e||(e=a()),c.popups.isVisible("video.insert")||(S(),c.popups.refresh("video.insert"),c.popups.setContainer("video.insert",c.$sc));var t=p.offset().left+p.outerWidth()/2,o=p.offset().top+p.height();c.popups.show("video.insert",t,o,p.outerHeight(),!0)},back:function e(){p?(c.events.disableBlur(),p[0].click()):(c.events.disableBlur(),c.selection.restore(),c.events.enableBlur(),c.popups.hide("video.insert"),c.toolbar.showInline())},setSize:function he(e,t){if(p){var o=c.popups.get("video.size"),i=p.find("iframe, embed, video");i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){p.trigger("click")},c.helpers.isAndroid()?50:0)}},get:function ge(){return p},showProgressBar:_}},me.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),me.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),me.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),me.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),me.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),me.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),me.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),me.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),me.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),me.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),me.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),me.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),me.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),me.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),me.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),me.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),me.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.videoAlign.options;for(var o in t)t.hasOwnProperty(o)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(o,'" title="').concat(this.language.translate(t[o]),'">').concat(this.icon.create("video-align-".concat(o)),'<span class="fr-sr-only">').concat(this.language.translate(t[o]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),me.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),me.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),me.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),me.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),me.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),me.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),me.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),me.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),me.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),me.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
|
374
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(me){"use strict";me=me&&me.hasOwnProperty("default")?me["default"]:me,Object.assign(me.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(me.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadURL:null}),me.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],me.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,me.PLUGINS.video=function(c){var s,f,v,p,i,o,u=c.$,d="https://i.froala.com/upload",h=2,g=3,m=4,l=5,b=6,r={};function y(){var e=c.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var t=e.find(".fr-video-embed-layer textarea");t.val("").trigger("change"),(t=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function n(){var e=c.popups.get("video.edit");if(e||(e=function r(){var e="";if(0<c.opts.videoEditButtons.length){c.opts.videoResponsive&&(-1<c.opts.videoEditButtons.indexOf("videoSize")&&c.opts.videoEditButtons.splice(c.opts.videoEditButtons.indexOf("videoSize"),1),-1<c.opts.videoEditButtons.indexOf("videoDisplay")&&c.opts.videoEditButtons.splice(c.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<c.opts.videoEditButtons.indexOf("videoAlign")&&c.opts.videoEditButtons.splice(c.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(c.button.buildList(c.opts.videoEditButtons)," \n </div>")},o=c.popups.create("video.edit",t);return c.events.$on(c.$wp,"scroll.video-edit",function(){p&&c.popups.isVisible("video.edit")&&(c.events.disableBlur(),R(p))}),o}return!1}()),e){c.popups.setContainer("video.edit",c.$sc),c.popups.refresh("video.edit");var t=p.find("iframe, embed, video"),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();c.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function a(e){if(e)return c.popups.onRefresh("video.insert",y),c.popups.onHide("video.insert",q),!0;var t="";c.opts.videoUpload||-1===c.opts.videoInsertButtons.indexOf("videoUpload")||c.opts.videoInsertButtons.splice(c.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=c.button.buildList(c.opts.videoInsertButtons);""!==o&&(t='<div class="fr-buttons">'+o+"</div>");var i,r="",n=c.opts.videoInsertButtons.indexOf("videoUpload"),a=c.opts.videoInsertButtons.indexOf("videoByURL"),s=c.opts.videoInsertButtons.indexOf("videoEmbed");0<=a&&(i=" fr-active",(n<a&&0<=n||s<a&&0<=s)&&(i=""),r='<div class="fr-video-by-url-layer fr-layer'.concat(i,'" id="fr-video-by-url-layer-').concat(c.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(c.id,'" type="text" placeholder="').concat(c.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(c.language.translate("Insert"),"</button></div></div>"));var d="";0<=s&&(i=" fr-active",(n<s&&0<=n||a<s&&0<=a)&&(i=""),d='<div class="fr-video-embed-layer fr-layer'.concat(i,'" id="fr-video-embed-layer-').concat(c.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(c.id,'" type="text" placeholder="').concat(c.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(c.language.translate("Insert"),"</button></div></div>"));var l="";0<=n&&(i=" fr-active",(s<n&&0<=s||a<n&&0<=a)&&(i=""),l='<div class="fr-video-upload-layer fr-layer'.concat(i,'" id="fr-video-upload-layer-').concat(c.id,'"><strong>').concat(c.language.translate("Drop video"),"</strong><br>(").concat(c.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(c.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(c.id,'" role="button"></div></div>'));var f={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},v=c.popups.create("video.insert",f);return function p(i){c.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return u(this).addClass("fr-drop"),!1},!0),c.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return u(this).removeClass("fr-drop"),!1},!0),c.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),u(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||c;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),c.helpers.isIOS()&&c.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){u(this).trigger("click")},!0);c.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||c;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}u(this).val("")},!0)}(v),v}function w(e){c.events.focus(!0),c.selection.restore();var t=!1;p&&(j(),t=!0),c.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,c.opts.videoSplitHTML),c.popups.hide("video.insert");var o=c.$el.find(".fr-jiv");o.removeClass("fr-jiv"),o.toggleClass("fr-rv",c.opts.videoResponsive),Z(o,c.opts.videoDefaultDisplay,c.opts.videoDefaultAlign),o.toggleClass("fr-draggable",c.opts.videoMove),c.events.trigger(t?"video.replaced":"video.inserted",[o])}function E(){var e=u(this);c.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),R(e.parent()),c.events.trigger("video.loaded",[e.parent()])}function C(s,e,l,f,v){c.edit.off(),A("Loading video"),e&&(s=c.helpers.sanitizeURL(s));var p=function p(){var e,t;if(f){c.undo.canDo()||f.find("video").hasClass("fr-uploading")||c.undo.saveStep();var o=f.find("video").data("fr-old-src"),i=f.data("fr-replaced");f.data("fr-replaced",!1),c.$wp?((e=f.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&f.find("video").attr("src",o),f.replaceWith(e)):e=f;for(var r=e.find("video").get(0).attributes,n=0;n<r.length;n++){var a=r[n];0===a.nodeName.indexOf("data-")&&e.find("video").removeAttr(a.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),l[t]);e.find("video").on("canplay",E),e.find("video").attr("src",s),c.edit.on(),z(),c.undo.saveStep(),c.$el.blur(),c.events.trigger(i?"video.replaced":"video.inserted",[e,v])}else e=function d(e,t,o){var i,r="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(r+=" data-".concat(i,'="').concat(t[i],'"'));var n=c.opts.videoDefaultWidth;n&&"auto"!=n&&(n="".concat(n,"px"));var a=u(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+c.opts.videoDefaultDisplay[0]+("center"!=c.opts.videoDefaultAlign?" fr-fv"+c.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(n?' style="width: '+n+';" ':"")+" controls>"+c.language.translate("Your browser does not support HTML5 video.")+"</video>");a.toggleClass("fr-draggable",c.opts.videoMove),c.edit.on(),c.events.focus(!0),c.selection.restore(),c.undo.saveStep(),c.opts.videoSplitHTML?c.markers.split():c.markers.insert();c.html.wrap();var s=c.$el.find(".fr-marker");c.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent());s.replaceWith(a),c.selection.clear(),a.find("video").get(0).readyState>a.find("video").get(0).HAVE_FUTURE_DATA||c.helpers.isIOS()?o.call(a.find("video").get(0)):a.find("video").on("canplaythrough load",o);return a}(s,l,E),z(),c.undo.saveStep(),c.events.trigger("video.inserted",[e,v])};_("Loading video"),p()}function _(e){var t=c.popups.get("video.insert");if(t||(t=a()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),p){var o=p.find("video");c.popups.setContainer("video.insert",c.$sc);var i=o.offset().left,r=o.offset().top+o.height();c.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&A(c.language.translate("Uploading"),0)}function S(e){var t=c.popups.get("video.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||c.$el.find("video.fr-error").length)){if(c.events.focus(),c.$el.find("video.fr-error").length&&(c.$el.find("video.fr-error").parent().remove(),c.undo.saveStep(),c.undo.run(),c.undo.dropRedo()),!c.$wp&&p){var o=p;M(!0),c.selection.setAfter(o.find("video").get(0)),c.selection.restore()}c.popups.hide("video.insert")}}function A(e,t){var o=c.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function x(e){_();var t=c.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),c.events.disableBlur(),o.focus()}function R(e){t.call(e.get(0))}function D(e){A("Loading video");var t=this.status,o=this.response,i=this.responseXML,r=this.responseText;try{if(c.opts.videoUploadToS3)if(201==t){var n=function s(e){try{var t=u(e).find("Location").text(),o=u(e).find("Key").text();return!1===c.events.trigger("video.uploadedToS3",[t,o,e],!0)?(c.edit.on(),!1):t}catch(i){return X(m,e),!1}}(i);n&&C(n,!1,[],e,o||i)}else X(m,o||i);else if(200<=t&&t<300){var a=function d(e){try{if(!1===c.events.trigger("video.uploaded",[e],!0))return c.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(X(h,e),!1)}catch(o){return X(m,e),!1}}(r);a&&C(a.link,!1,a,e,o||r)}else X(g,o||r)}catch(l){X(m,o||r)}}function U(){X(m,this.response||this.responseText||this.responseXML)}function B(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;A(c.language.translate("Uploading"),t)}}function $(){c.edit.on(),S(!0)}function I(e){if(!c.core.sameInstance(v))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=c.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,n=!1;try{n=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(a){}n&&r.frameElement&&(t+=c.helpers.getPX(u(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+c.helpers.getPX(u(r.frameElement).offset().top)+r.frameElement.clientTop)}c.undo.canDo()||c.undo.saveStep(),(f=u(this)).data("start-x",t),f.data("start-y",o),s.show(),c.popups.hideAll(),Y()}function k(e){if(!c.core.sameInstance(v))return!0;if(f){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=f.data("start-x"),r=f.data("start-y");f.data("start-x",t),f.data("start-y",o);var n=t-i,a=o-r,s=p.find("iframe, embed, video"),d=s.width(),l=s.height();(f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(n=0-n),(f.hasClass("fr-hnw")||f.hasClass("fr-hne"))&&(a=0-a),s.css("width",d+n),s.css("height",l+a),s.removeAttr("width"),s.removeAttr("height"),T()}}function O(e){if(!c.core.sameInstance(v))return!0;f&&p&&(e&&e.stopPropagation(),f=null,s.hide(),T(),n(),c.undo.saveStep())}function L(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function P(e,t,o,i){return e.pageX=t,e.pageY=t,I.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),k.call(this,e),O.call(this,e),++i}function z(){var e,t=Array.prototype.slice.call(c.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("src")),u(t[e]).toggleClass("fr-draggable",c.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("src"))<0&&c.events.trigger("video.removed",[u(i[e])]);i=t}function T(){v||function a(){var e;if(c.shared.$video_resizer?(v=c.shared.$video_resizer,s=c.shared.$vid_overlay,c.events.on("destroy",function(){u("body").first().append(v.removeClass("fr-active"))},!0)):(c.shared.$video_resizer=u(document.createElement("div")).attr("class","fr-video-resizer"),v=c.shared.$video_resizer,c.events.$on(v,"mousedown",function(e){e.stopPropagation()},!0),c.opts.videoResize&&(v.append(L("nw")+L("ne")+L("sw")+L("se")),c.shared.$vid_overlay=u(document.createElement("div")).attr("class","fr-video-overlay"),s=c.shared.$vid_overlay,e=v.get(0).ownerDocument,u(e).find("body").first().append(s))),c.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null,c.opts.videoResize&&(s.remove(),s=null)},!0),c.helpers.isMobile()||c.events.$on(u(c.o_win),"resize.video",function(){M(!0)}),c.opts.videoResize){e=v.get(0).ownerDocument,c.events.$on(v,c._mousedown,".fr-handler",I),c.events.$on(u(e),c._mousemove,k),c.events.$on(u(e.defaultView||e.parentWindow),c._mouseup,O),c.events.$on(s,"mouseleave",O);var i=1,r=null,n=0;c.events.on("keydown",function(e){if(p){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,o=e.which;(o!==r||200<e.timeStamp-n)&&(i=1),(o==me.KEYCODE.EQUALS||c.browser.mozilla&&o==me.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=P.call(this,e,1,1,i):(o==me.KEYCODE.HYPHEN||c.browser.mozilla&&o==me.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(i=P.call(this,e,2,-1,i)),r=o,n=e.timeStamp}}),c.events.on("keyup",function(){i=1})}}(),(c.$wp||c.$sc).append(v),v.data("instance",c);var e=p.find("iframe, embed, video"),t=0,o=0;c.opts.iframe&&(o=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-top")),t=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-left"))),v.css("top",(c.opts.iframe?e.offset().top+o-1:e.offset().top-c.$wp.offset().top-1)+c.$wp.scrollTop()).css("left",(c.opts.iframe?e.offset().left+t-1:e.offset().left-c.$wp.offset().left-1)+c.$wp.scrollLeft()).css("width",e.get(0).getBoundingClientRect().width).css("height",e.get(0).getBoundingClientRect().height).addClass("fr-active")}function t(e){if(e&&"touchend"==e.type&&o)return!0;if(e&&c.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(c.edit.isDisabled())return!1;for(var t=0;t<me.INSTANCES.length;t++)me.INSTANCES[t]!=c&&me.INSTANCES[t].events.trigger("video.hideResizer");c.toolbar.disable(),c.helpers.isMobile()&&(c.events.disableBlur(),c.$el.blur(),c.events.enableBlur()),c.$el.find(".fr-video.fr-active").removeClass("fr-active"),(p=u(this)).addClass("fr-active"),c.opts.iframe&&c.size.syncIframe(),Q(),T(),n(),c.selection.clear(),c.button.bulkRefresh(),c.events.trigger("image.hideResizer")}function M(e){p&&(function t(){return c.shared.vid_exit_flag}()||!0===e)&&(v.removeClass("fr-active"),c.toolbar.enable(),p.removeClass("fr-active"),p=null,Y())}function V(){c.shared.vid_exit_flag=!0}function Y(){c.shared.vid_exit_flag=!1}function N(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!c.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;c.markers.remove(),c.markers.insertAtPoint(e.originalEvent),c.$el.find(".fr-marker").replaceWith(me.MARKERS),c.popups.hideAll();var i=c.popups.get("video.insert");return i||(i=a()),c.popups.setContainer("video.insert",c.$sc),c.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),_(),0<=c.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?K(t.files):X(b),e.preventDefault(),e.stopPropagation(),!1}}}function K(e){if(void 0!==e&&0<e.length){if(!1===c.events.trigger("video.beforeUpload",[e]))return!1;var t,o=e[0];if((null===c.opts.videoUploadURL||c.opts.videoUploadURL==d)&&!c.opts.videoUploadToS3)return function s(i){p&&p.find("iframe")&&p.find("iframe").length&&j();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],o=0;o<e.length;o++)t.push(e.charCodeAt(o));C(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:i.type})),!1,null,p)},_(),r.readAsDataURL(i)}(o),!1;if(o.size>c.opts.videoMaxSize)return X(l),!1;if(c.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return X(b),!1;if(c.drag_support.formdata&&(t=c.drag_support.formdata?new FormData:null),t){var i;if(!1!==c.opts.videoUploadToS3)for(i in t.append("key",c.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),c.opts.videoUploadToS3.params)c.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,c.opts.videoUploadToS3.params[i]);for(i in c.opts.videoUploadParams)c.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,c.opts.videoUploadParams[i]);t.append(c.opts.videoUploadParam,o);var r=c.opts.videoUploadURL;c.opts.videoUploadToS3&&(r=c.opts.videoUploadToS3.uploadURL?c.opts.videoUploadToS3.uploadURL:"https://".concat(c.opts.videoUploadToS3.region,".amazonaws.com/").concat(c.opts.videoUploadToS3.bucket));var n=c.core.getXHR(r,c.opts.videoUploadMethod);n.onload=function(){D.call(n,p)},n.onerror=U,n.upload.onprogress=B,n.onabort=$,_(),c.events.disableBlur(),c.edit.off(),c.events.enableBlur();var a=c.popups.get("video.insert");a&&u(a.off("abortUpload")).on("abortUpload",function(){4!=n.readyState&&n.abort()}),n.send(t)}}}function X(e,t){c.edit.on(),p&&p.find("video").addClass("fr-error"),x(c.language.translate("Something went wrong. Please try again.")),c.events.trigger("video.error",[{code:e,message:r[e]},t])}function H(){if(p){var e=c.popups.get("video.size"),t=p.find("iframe, embed, video");e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function G(e){if(e)return c.popups.onRefresh("video.size",H),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(c.button.buildList(c.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(c.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(c.id,'" type="text" name="width" placeholder="').concat(c.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(c.id,'" type="text" name="height" placeholder="').concat(c.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(c.language.translate("Update"),"</button></div></div>")},o=c.popups.create("video.size",t);return c.events.$on(c.$wp,"scroll",function(){p&&c.popups.isVisible("video.size")&&(c.events.disableBlur(),R(p))}),o}function F(e){if(void 0===e&&(e=p),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function W(e){void 0===e&&(e=p);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function j(){if(p&&!1!==c.events.trigger("video.beforeRemove",[p])){var e=p;c.popups.hideAll(),M(!0),c.selection.setBefore(e.get(0))||c.selection.setAfter(e.get(0)),e.remove(),c.selection.restore(),c.html.fillEmptyBlocks()}}function q(){S()}function Z(e,t,o){!c.opts.htmlUntouched&&c.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function J(){var e=c.$el.find("video").filter(function(){return 0===u(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(u(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),c.$el.find("embed, iframe").filter(function(){if(c.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<u(this).parents("span.fr-video").length)return!1;for(var e=u(this).attr("src"),t=0;t<me.VIDEO_PROVIDERS.length;t++){var o=me.VIDEO_PROVIDERS[t];if(o.test_regex.test(e)&&new RegExp(c.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1}).map(function(){return 0===u(this).parents("object").length?this:u(this).parents("object").get(0)}).wrap(u(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,o,i,r,n=c.$el.find("span.fr-video, video"),a=0;a<n.length;a++){var s=u(n[a]);!c.opts.htmlUntouched&&c.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(F(r)[0])),r.addClass("fr-dv".concat(W(r)[0]))),c.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):c.opts.htmlUntouched||c.opts.useClasses||(void 0,o=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,i=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":F(t),Z(t,o,i),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}n.toggleClass("fr-draggable",c.opts.videoMove)}}function Q(){if(p){c.selection.clear();var e=c.doc.createRange();e.selectNode(p.get(0)),c.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[h]="No link in upload response.",r[g]="Error during file upload.",r[m]="Parsing response failed.",r[l]="File is too large.",r[b]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",c.shared.vid_exit_flag=!1,{_init:function ee(){c.opts.videoResponsive&&(c.opts.videoResize=!1),function e(){c.events.on("drop",N,!0),c.events.on("mousedown window.mousedown",V),c.events.on("window.touchmove",Y),c.events.on("mouseup window.mouseup",M),c.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&M()}),c.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){M(!0)})}(),c.helpers.isMobile()&&(c.events.$on(c.$el,"touchstart","span.fr-video",function(){o=!1}),c.events.$on(c.$el,"touchmove",function(){o=!0})),c.events.on("html.set",J),J(),c.events.$on(c.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(c.browser.msie||c.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),c.events.$on(c.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==u(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),c.events.on("keydown",function(e){var t=e.which;return!p||t!=me.KEYCODE.BACKSPACE&&t!=me.KEYCODE.DELETE?p&&t==me.KEYCODE.ESC?(M(!0),e.preventDefault(),!1):p&&t!=me.KEYCODE.F10&&!c.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),j(),c.undo.saveStep(),!1)},!0),c.events.on("toolbar.esc",function(){if(p)return c.events.disableBlur(),c.events.focus(),!1},!0),c.events.on("toolbar.focusEditor",function(){if(p)return!1},!0),c.events.on("keydown",function(){c.$el.find("span.fr-video:empty").remove()}),c.$wp&&(z(),c.events.on("contentChanged",z)),a(!0),G(!0)},showInsertPopup:function te(){var e=c.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=c.popups.get("video.insert");if(t||(t=a()),S(),!t.hasClass("fr-active"))if(c.popups.refresh("video.insert"),c.popups.setContainer("video.insert",c.$tb),e.isVisible()){var o=c.button.getPosition(e),i=o.left,r=o.top;c.popups.show("video.insert",i,r,e.outerHeight())}else c.position.forSelection(t),c.popups.show("video.insert")},showLayer:function oe(e){var t,o,i=c.popups.get("video.insert");if(!p&&!c.opts.toolbarInline){var r=c.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,o=r.offset().top+(c.opts.toolbarBottom?10:r.outerHeight()-10)}c.opts.toolbarInline&&(o=i.offset().top-c.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(o+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),c.popups.show("video.insert",t,o,0),c.accessibility.focusPopup(i)},refreshByURLButton:function ie(e){var t=c.popups.get("video.insert");t&&t.find(".fr-video-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function re(e){var t=c.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function ne(e){var t=c.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:K,insertByURL:function ae(e){void 0===e&&(e=(c.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var t=null;if(/^http/.test(e)||(e="https://".concat(e)),c.helpers.isURL(e))for(var o=0;o<me.VIDEO_PROVIDERS.length;o++){var i=me.VIDEO_PROVIDERS[o];if(i.test_regex.test(e)&&new RegExp(c.opts.videoAllowedProviders.join("|")).test(i.provider)){t=e.replace(i.url_regex,i.url_text),t=i.html.replace(/\{url\}/,t);break}}t?w(t):(x(c.language.translate("Something went wrong. Please try again.")),c.events.trigger("video.linkError",[e]))},insertEmbed:function se(e){void 0===e&&(e=c.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&me.VIDEO_EMBED_REGEX.test(e)?w(e):(x(c.language.translate("Something went wrong. Please try again.")),c.events.trigger("video.codeError",[e]))},insert:w,align:function de(e){p.removeClass("fr-fvr fr-fvl"),!c.opts.htmlUntouched&&c.opts.useClasses?"left"==e?p.addClass("fr-fvl"):"right"==e&&p.addClass("fr-fvr"):Z(p,W(),e),Q(),T(),n(),c.selection.clear()},refreshAlign:function le(e){if(!p)return!1;e.find(">*").first().replaceWith(c.icon.create("video-align-".concat(F())))},refreshAlignOnShow:function fe(e,t){p&&t.find('.fr-command[data-param1="'.concat(F(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ve(e){p.removeClass("fr-dvi fr-dvb"),!c.opts.htmlUntouched&&c.opts.useClasses?"inline"==e?p.addClass("fr-dvi"):"block"==e&&p.addClass("fr-dvb"):Z(p,e,F()),Q(),T(),n(),c.selection.clear()},refreshDisplayOnShow:function pe(e,t){p&&t.find('.fr-command[data-param1="'.concat(W(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:j,hideProgressBar:S,showSizePopup:function ce(){var e=c.popups.get("video.size");e||(e=G()),S(),c.popups.refresh("video.size"),c.popups.setContainer("video.size",c.$sc);var t=p.find("iframe, embed, video"),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();c.popups.show("video.size",o,i,t.height(),!0)},replace:function ue(){var e=c.popups.get("video.insert");e||(e=a()),c.popups.isVisible("video.insert")||(S(),c.popups.refresh("video.insert"),c.popups.setContainer("video.insert",c.$sc));var t=p.offset().left+p.outerWidth()/2,o=p.offset().top+p.height();c.popups.show("video.insert",t,o,p.outerHeight(),!0)},back:function e(){p?(c.events.disableBlur(),p[0].click()):(c.events.disableBlur(),c.selection.restore(),c.events.enableBlur(),c.popups.hide("video.insert"),c.toolbar.showInline())},setSize:function he(e,t){if(p){var o=c.popups.get("video.size"),i=p.find("iframe, embed, video");i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){p.trigger("click")},c.helpers.isAndroid()?50:0)}},get:function ge(){return p},showProgressBar:_}},me.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),me.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),me.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),me.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),me.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),me.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),me.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),me.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),me.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),me.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),me.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),me.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),me.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),me.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),me.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),me.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),me.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.videoAlign.options;for(var o in t)t.hasOwnProperty(o)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(o,'" title="').concat(this.language.translate(t[o]),'">').concat(this.icon.create("video-align-".concat(o)),'<span class="fr-sr-only">').concat(this.language.translate(t[o]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),me.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),me.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),me.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),me.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),me.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),me.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),me.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),me.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),me.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),me.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
|
375
375
|
|
376
376
|
});
|
377
377
|
|
378
378
|
;/*!node_modules/froala-editor/js/plugins/word_paste.min.js*/
|
379
|
-
amis.define('
|
379
|
+
amis.define('5d9b596', function(require, exports, module, define) {
|
380
380
|
|
381
381
|
/*!
|
382
382
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
@@ -384,16 +384,16 @@ amis.define('9866d43', function(require, exports, module, define) {
|
|
384
384
|
* Copyright 2014-2020 Froala Labs
|
385
385
|
*/
|
386
386
|
|
387
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("fa8683a")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),w.PLUGINS.wordPaste=function(C){var l,n,d=C.$,s="word_paste",u={};function t(e){var t=C.opts.wordAllowedStyleProps;e||(C.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=a(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+=" ";return r}),C.paste.getRtfClipboard());var r=C.doc.createElement("DIV");r.innerHTML=n,C.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=C.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){C.modals.hide(s)}(),C.paste.clean(n,!0,!0),C.opts.wordAllowedStyleProps=t}function N(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,p(i,t),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function H(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function O(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function I(e,i){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var r=document.createElement(e.tagName.toLowerCase());r.setAttribute("style",e.getAttribute("style")),r.innerHTML=t.innerHTML,t.innerHTML=r.outerHTML}p(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(C.browser.msie||C.browser.safari||C.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=i.match(new RegExp(e+":.*(;|)"));t&&(r+=t[0]+";")});return r}(e)),h(e,i)),!0});var n=t.innerHTML;return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function y(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function A(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function E(e){return e.replace(/\n|\r|\n\r|"/g,"")}function T(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var c=null;function f(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",s=0;s<a.length&&"\\"!==a[s]&&"{"!==a[s]&&" "!==a[s]&&"\r"!==a[s]&&"\n"!==a[s];)l+=a[s],s++;var o=a.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");c[t+l]={image_hex:u,image_type:d}}}}function m(e,t){if(t){var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&C.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=u[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),r){!function s(e){c={},f(e,"i","\\shppict"),f(e,"s","\\shp{")}(t);var n=c[r.substring(7)];if(n){var a=function o(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):d(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function h(e,t){var r=e.tagName,i=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?y(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&y(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return N(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],a=0;a<n.length;a++)if(-1!==r.indexOf(n[a]))return e.innerHTML&&(e.outerHTML=e.innerHTML),N(e),!1;if("TD"!==r){var l=e.getAttribute("class")||"MsoNormal";if(t&&l){for(var s=(l=E(l)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var g=0;g<d.length;g++)t[d[g]]&&T(e,t[d[g]])}e.removeAttribute("class")}t&&t[i]&&T(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var u=e.getAttribute("class");if(u&&(t&&t[r.toLowerCase()+"."+u]&&T(e,t[r.toLowerCase()+"."+u]),-1!==u.toLowerCase().indexOf("mso"))){var p=E(u);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",p):e.removeAttribute("class")}var c=e.getAttribute("style");if(c){var m=c.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}A(e)}if("TR"===r&&function x(e,t){C.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&N(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&A(l),l=l.nextElementSibling;if(t){var o=r.getAttribute("class");if(o){var d=(o=E(o)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&T(r,t[f])}}t.td&&T(r,t.td)}var g=r.getAttribute("style");g&&(g=E(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var m=g.match(/text-align:.+?[; "]{1,1}/gi);m&&(c=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var h=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(h=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),y=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),y&&r.setAttribute("rowspan",y),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),h&&(r.style["background-color"]=h),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img"))for(var h=e.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=E(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function a(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function f(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],u[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,s=function g(e){var t={},r=e.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var a=i[n],l=a.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=a.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");l=l.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),l=l.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=l.split(", "),d=0;d<o.length;d++)t[o[d]]=s}}return t}(i);p(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(N(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),p(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||m(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);p(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(H(e)){var t=e.parentNode,r=e.previousSibling,i=function M(e,t,r,i){var n,a,l=/[0-9a-zA-Z]./gi,s=!1,o=navigator.userAgent.toLowerCase();-1!=o.indexOf("safari")&&(o=-1<o.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var d,f,g,u,p=e.querySelector('span[style="mso-list:Ignore"]');null==p&&"safari"==o&&(p=e.querySelector('span[lang="PT-BR"]'));var c;p&&(s=s||l.test(p.textContent)),null!==p&&(c=p.textContent.trim().split(".")[0]),g=1==s?("1"==(c=p.textContent.trim().split(".")[0])?u="decimal;":"i"==c?u="lower-roman;":"I"==c?u="upper-roman;":"o"==c?u="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?u="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(u="upper-alpha;")),u="list-style-type: "+u,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?u="square;":"\xb7"==c&&(u="disc;"),u="list-style-type: "+u,"ul");var m,h="";p==undefined||p.textContent==undefined||isNaN(parseInt(p.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ');var v,b=O(e),y=e.style.marginLeft;if(y.includes("in")?(v="in",y=parseFloat(y)-.5):y.includes("pt")&&(v="px",y=parseFloat(y)-10),1==b)if(m=u?"<"+g+' style = "'+u+"; margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==u){var x=c.charCodeAt(0)-64;m=u?"<"+g+h+' start="'+x+'" style = "'+u+" margin-left:"+y+v+';">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var C=c.charCodeAt(0)-96;m=u?"<"+g+h+' start="'+C+'" style = "'+u+"margin-left:"+y+v+';">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+";margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==u){var N=c.charCodeAt(0)-64;m=u?"<"+g+h+' style = "'+u+' start="'+N+'">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var A=c.charCodeAt(0)-96;m=u?"<"+g+h+' style = "'+u+' start="'+A+'">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+'">':"<"+g+">";for(var E=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var T=O(e);if((r=r||T)<T)m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(T<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0,n=l.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(w=!0),i=e.style.marginLeft,w||n===undefined?(d=I(e,t),e.nextSibling.innerText==undefined||e.nextSibling.innerText==undefined||m.includes('class="decimal_type"')||isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(m=m.substring(3,0)+' class="decimal_type"'+m.substring(3,m.length)),m+="<li>"+d+"</li>"):(1==T&&(m+="</"+g+">",E=!0,a=null),m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var S=e&&e.nextElementSibling;if(S&&(a=S.previousElementSibling),e&&!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}e&&e.parentNode&&e.parentNode.removeChild(e),e=S}}E||(m+="</"+g+">");var L=document.createElement("div");return L.innerHTML=m,{el:L,currentNode:e}}(e,s).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=y(e,"span")),h(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&N(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var l=document.createElement("input");l.type="checkbox",e.parentNode.insertBefore(l,e.nextSibling)}return N(e),!1}),p(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var r=e.parentNode;r&&(N(e),!(e=r).innerHTML);)r=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=E(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var a=r[n].split(":");2===a.length&&("text-align"===a[0]&&"SPAN"===e.tagName||(i[a[0]]=a[1]))}var l="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(d){o=null}o&&(o=Math.round(1.33*o),i[s]=o+"px;")}l+=s+":"+i[s]}l&&e.setAttribute("style",l)}}}(e)}return!0}),p(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var o=n.outerHTML,d=C.opts.htmlAllowedStyleProps;return C.opts.htmlAllowedStyleProps=C.opts.wordAllowedStyleProps,o=C.clean.html(o,C.opts.wordDeniedTags,C.opts.wordDeniedAttrs,!1),C.opts.htmlAllowedStyleProps=d,o}return{_init:function e(){C.events.on("paste.wordPaste",function(e){return n=e,C.opts.wordPasteModal?function a(){if(!l){var e='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+C.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+C.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",e+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+C.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+C.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=C.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),C.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||C;e.wordPaste.clean()}),C.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||C;e.wordPaste.clean(!0)}),C.events.$on(d(C.o_win),"resize",function(){C.modals.resize(s)})}C.modals.show(s),C.modals.resize(s)}():t(C.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});
|
387
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("ac195f5")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),w.PLUGINS.wordPaste=function(C){var l,n,d=C.$,s="word_paste",u={};function t(e){var t=C.opts.wordAllowedStyleProps;e||(C.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=a(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+=" ";return r}),C.paste.getRtfClipboard());var r=C.doc.createElement("DIV");r.innerHTML=n,C.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=C.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){C.modals.hide(s)}(),C.paste.clean(n,!0,!0),C.opts.wordAllowedStyleProps=t}function N(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,p(i,t),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function H(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function O(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function I(e,i){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var r=document.createElement(e.tagName.toLowerCase());r.setAttribute("style",e.getAttribute("style")),r.innerHTML=t.innerHTML,t.innerHTML=r.outerHTML}p(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(C.browser.msie||C.browser.safari||C.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=i.match(new RegExp(e+":.*(;|)"));t&&(r+=t[0]+";")});return r}(e)),h(e,i)),!0});var n=t.innerHTML;return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function y(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function A(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function E(e){return e.replace(/\n|\r|\n\r|"/g,"")}function T(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var c=null;function f(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",s=0;s<a.length&&"\\"!==a[s]&&"{"!==a[s]&&" "!==a[s]&&"\r"!==a[s]&&"\n"!==a[s];)l+=a[s],s++;var o=a.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");c[t+l]={image_hex:u,image_type:d}}}}function m(e,t){if(t){var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&C.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=u[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),r){!function s(e){c={},f(e,"i","\\shppict"),f(e,"s","\\shp{")}(t);var n=c[r.substring(7)];if(n){var a=function o(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):d(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function h(e,t){var r=e.tagName,i=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?y(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&y(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return N(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],a=0;a<n.length;a++)if(-1!==r.indexOf(n[a]))return e.innerHTML&&(e.outerHTML=e.innerHTML),N(e),!1;if("TD"!==r){var l=e.getAttribute("class")||"MsoNormal";if(t&&l){for(var s=(l=E(l)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var g=0;g<d.length;g++)t[d[g]]&&T(e,t[d[g]])}e.removeAttribute("class")}t&&t[i]&&T(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var u=e.getAttribute("class");if(u&&(t&&t[r.toLowerCase()+"."+u]&&T(e,t[r.toLowerCase()+"."+u]),-1!==u.toLowerCase().indexOf("mso"))){var p=E(u);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",p):e.removeAttribute("class")}var c=e.getAttribute("style");if(c){var m=c.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}A(e)}if("TR"===r&&function x(e,t){C.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&N(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&A(l),l=l.nextElementSibling;if(t){var o=r.getAttribute("class");if(o){var d=(o=E(o)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&T(r,t[f])}}t.td&&T(r,t.td)}var g=r.getAttribute("style");g&&(g=E(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var m=g.match(/text-align:.+?[; "]{1,1}/gi);m&&(c=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var h=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(h=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),y=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),y&&r.setAttribute("rowspan",y),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),h&&(r.style["background-color"]=h),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img"))for(var h=e.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=E(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function a(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function f(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],u[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,s=function g(e){var t={},r=e.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var a=i[n],l=a.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=a.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");l=l.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),l=l.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=l.split(", "),d=0;d<o.length;d++)t[o[d]]=s}}return t}(i);p(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(N(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),p(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||m(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);p(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(H(e)){var t=e.parentNode,r=e.previousSibling,i=function M(e,t,r,i){var n,a,l=/[0-9a-zA-Z]./gi,s=!1,o=navigator.userAgent.toLowerCase();-1!=o.indexOf("safari")&&(o=-1<o.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var d,f,g,u,p=e.querySelector('span[style="mso-list:Ignore"]');null==p&&"safari"==o&&(p=e.querySelector('span[lang="PT-BR"]'));var c;p&&(s=s||l.test(p.textContent)),null!==p&&(c=p.textContent.trim().split(".")[0]),g=1==s?("1"==(c=p.textContent.trim().split(".")[0])?u="decimal;":"i"==c?u="lower-roman;":"I"==c?u="upper-roman;":"o"==c?u="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?u="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(u="upper-alpha;")),u="list-style-type: "+u,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?u="square;":"\xb7"==c&&(u="disc;"),u="list-style-type: "+u,"ul");var m,h="";p==undefined||p.textContent==undefined||isNaN(parseInt(p.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ');var v,b=O(e),y=e.style.marginLeft;if(y.includes("in")?(v="in",y=parseFloat(y)-.5):y.includes("pt")&&(v="px",y=parseFloat(y)-10),1==b)if(m=u?"<"+g+' style = "'+u+"; margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==u){var x=c.charCodeAt(0)-64;m=u?"<"+g+h+' start="'+x+'" style = "'+u+" margin-left:"+y+v+';">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var C=c.charCodeAt(0)-96;m=u?"<"+g+h+' start="'+C+'" style = "'+u+"margin-left:"+y+v+';">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+";margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==u){var N=c.charCodeAt(0)-64;m=u?"<"+g+h+' style = "'+u+' start="'+N+'">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var A=c.charCodeAt(0)-96;m=u?"<"+g+h+' style = "'+u+' start="'+A+'">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+'">':"<"+g+">";for(var E=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var T=O(e);if((r=r||T)<T)m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(T<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0,n=l.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(w=!0),i=e.style.marginLeft,w||n===undefined?(d=I(e,t),e.nextSibling.innerText==undefined||e.nextSibling.innerText==undefined||m.includes('class="decimal_type"')||isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(m=m.substring(3,0)+' class="decimal_type"'+m.substring(3,m.length)),m+="<li>"+d+"</li>"):(1==T&&(m+="</"+g+">",E=!0,a=null),m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var S=e&&e.nextElementSibling;if(S&&(a=S.previousElementSibling),e&&!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}e&&e.parentNode&&e.parentNode.removeChild(e),e=S}}E||(m+="</"+g+">");var L=document.createElement("div");return L.innerHTML=m,{el:L,currentNode:e}}(e,s).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=y(e,"span")),h(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&N(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var l=document.createElement("input");l.type="checkbox",e.parentNode.insertBefore(l,e.nextSibling)}return N(e),!1}),p(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var r=e.parentNode;r&&(N(e),!(e=r).innerHTML);)r=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=E(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var a=r[n].split(":");2===a.length&&("text-align"===a[0]&&"SPAN"===e.tagName||(i[a[0]]=a[1]))}var l="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(d){o=null}o&&(o=Math.round(1.33*o),i[s]=o+"px;")}l+=s+":"+i[s]}l&&e.setAttribute("style",l)}}}(e)}return!0}),p(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var o=n.outerHTML,d=C.opts.htmlAllowedStyleProps;return C.opts.htmlAllowedStyleProps=C.opts.wordAllowedStyleProps,o=C.clean.html(o,C.opts.wordDeniedTags,C.opts.wordDeniedAttrs,!1),C.opts.htmlAllowedStyleProps=d,o}return{_init:function e(){C.events.on("paste.wordPaste",function(e){return n=e,C.opts.wordPasteModal?function a(){if(!l){var e='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+C.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+C.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",e+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+C.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+C.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=C.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),C.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||C;e.wordPaste.clean()}),C.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||C;e.wordPaste.clean(!0)}),C.events.$on(d(C.o_win),"resize",function(){C.modals.resize(s)})}C.modals.show(s),C.modals.resize(s)}():t(C.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});
|
388
388
|
|
389
389
|
});
|
390
390
|
|
391
391
|
;/*!node_modules/froala-editor/js/languages/zh_cn.js*/
|
392
|
-
amis.define("
|
392
|
+
amis.define("5e2b5ea",(function(e,i,a,t){
|
393
393
|
/*!
|
394
394
|
* froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor)
|
395
395
|
* License https://froala.com/wysiwyg-editor/terms/
|
396
396
|
* Copyright 2014-2020 Froala Labs
|
397
|
-
*/var n,o;n=this,o=function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e.default:e).LANGUAGE.zh_cn={translation:{"Type something":"输入内容",Bold:"粗体",Italic:"斜体",Underline:"下划线",Strikethrough:"删除线",Insert:"插入",Delete:"删除",Cancel:"取消",OK:"确定",Back:"后退",Remove:"删除",More:"更多",Update:"更新",Style:"样式","Font Family":"字体","Font Size":"字号",Colors:"颜色",Background:"背景",Text:"字体","HEX Color":"十六进制颜色","Paragraph Format":"段落格式",Normal:"正文",Code:"代码","Heading 1":"标题1","Heading 2":"标题2","Heading 3":"标题3","Heading 4":"标题4","Paragraph Style":"段落样式","Inline Style":"内联样式",Align:"对齐方式","Align Left":"左对齐","Align Center":"居中","Align Right":"右对齐","Align Justify":"两端对齐",None:"无","Ordered List":"编号","Unordered List":"项目符号","Decrease Indent":"减少缩进量","Increase Indent":"增加缩进量","Insert Link":"插入超链接","Open in new tab":"在新标签页中打开","Open Link":"打开超链接","Edit Link":"编辑超链接",Unlink:"删除超链接","Choose Link":"选择超链接","Insert Image":"插入图片","Upload Image":"上传图片","By URL":"通过 URL",Browse:"浏览","Drop image":"拖入图片","or click":"或点击","Manage Images":"管理图片",Loading:"加载中",Deleting:"删除中",Tags:"标签","Are you sure? Image will be deleted.":"图片将会被删除,是否确认?",Replace:"替换",Uploading:"上传中","Loading image":"图片加载中",Display:"显示",Inline:"嵌入型","Break Text":"上下型环绕","Alternative Text":"替换文字","Change Size":"改变大小",Width:"宽度",Height:"高度","Something went wrong. Please try again.":"发生错误,请重试。","Image Caption":"图片标题","Advanced Edit":"高级编辑","Insert Video":"插入视频","Embedded Code":"嵌入代码","Paste in a video URL":"粘贴视频网址","Drop video":"拖入视频","Your browser does not support HTML5 video.":"您的浏览器不支持 HTML5 视频。","Upload Video":"上传视频","Insert Table":"插入表格","Table Header":"表头","Remove Table":"删除表格","Table Style":"表格样式","Horizontal Align":"水平对齐方式",Row:"行","Insert row above":"在上方插入","Insert row below":"在下方插入","Delete row":"删除行",Column:"列","Insert column before":"在左侧插入","Insert column after":"在右侧插入","Delete column":"删除列",Cell:"单元格","Merge cells":"合并单元格","Horizontal split":"水平分割","Vertical split":"垂直分割","Cell Background":"单元格背景","Vertical Align":"垂直对齐方式",Top:"靠上",Middle:"居中",Bottom:"靠下","Align Top":"靠上对齐","Align Middle":"居中对齐","Align Bottom":"靠下对齐","Cell Style":"单元格样式","Upload File":"上传文件","Drop file":"拖入文件",Emoticons:"表情符号","Grinning face":"露齿笑脸","Grinning face with smiling eyes":"露齿笑到眯起眼","Face with tears of joy":"笑哭","Smiling face with open mouth":"张嘴微笑","Smiling face with open mouth and smiling eyes":"眯眼张嘴微笑","Smiling face with open mouth and cold sweat":"带冷汗的张嘴微笑","Smiling face with open mouth and tightly-closed eyes":"紧闭双眼张嘴微笑","Smiling face with halo":"带光环微笑","Smiling face with horns":"带牛角的微笑","Winking face":"眨眼","Smiling face with smiling eyes":"眯眼微笑","Face savoring delicious food":"馋","Relieved face":"如释重负","Smiling face with heart-shaped eyes":"桃心眼微笑","Smiling face with sunglasses":"戴太阳镜微笑","Smirking face":"得意地笑","Neutral face":"中性脸","Expressionless face":"面无表情","Unamused face":"不高兴","Face with cold sweat":"冷汗","Pensive face":"沉思","Confused face":"迷惑","Confounded face":"困惑","Kissing face":"嘴巴嘟嘟","Face throwing a kiss":"飞吻","Kissing face with smiling eyes":"眯眼接吻","Kissing face with closed eyes":"闭眼接吻","Face with stuck out tongue":"吐舌","Face with stuck out tongue and winking eye":"眨眼吐舌","Face with stuck out tongue and tightly-closed eyes":"眯眼吐舌","Disappointed face":"失望","Worried face":"担心","Angry face":"生气","Pouting face":"撅嘴","Crying face":"大哭","Persevering face":"坚强","Face with look of triumph":"扬眉吐气","Disappointed but relieved face":"失望","Frowning face with open mouth":"皱眉","Anguished face":"痛苦","Fearful face":"害怕","Weary face":"疲惫","Sleepy face":"困了","Tired face":"累了","Grimacing face":"扭曲脸","Loudly crying face":"大哭","Face with open mouth":"张开嘴","Hushed face":"安静","Face with open mouth and cold sweat":"冷汗","Face screaming in fear":"害怕尖叫","Astonished face":"惊讶","Flushed face":"脸红","Sleeping face":"熟睡","Dizzy face":"眩晕","Face without mouth":"没有嘴的脸","Face with medical mask":"口罩脸",Break:"换行",Subscript:"下标",Superscript:"上标",Fullscreen:"全屏","Insert Horizontal Line":"插入水平线","Clear Formatting":"清除格式",Save:"保存",Undo:"撤消",Redo:"恢复","Select All":"全选","Code View":"代码视图",Quote:"引用",Increase:"增加引用级别",Decrease:"减少引用级别","Quick Insert":"快速插入","Special Characters":"特殊字符",Latin:"拉丁字母",Greek:"希腊字母",Cyrillic:"西里尔字母",Punctuation:"标点",Currency:"货币",Arrows:"箭头",Math:"数学",Misc:"杂项",Print:"打印","Spell Checker":"拼写检查器",Help:"帮助",Shortcuts:"快捷键","Inline Editor":"内联编辑器","Show the editor":"显示编辑器","Common actions":"常用操作",Copy:"复制",Cut:"剪切",Paste:"粘贴","Basic Formatting":"基本格式","Increase quote level":"增加引用级别","Decrease quote level":"减少引用级别","Image / Video":"图像/视频","Resize larger":"放大","Resize smaller":"缩小",Table:"表格","Select table cell":"选择单元格","Extend selection one cell":"增加选中的单元格","Extend selection one row":"增加选中的行",Navigation:"导航","Focus popup / toolbar":"焦点弹出/工具栏","Return focus to previous position":"将焦点返回到上一个位置","Embed URL":"嵌入网址","Paste in a URL to embed":"粘贴要嵌入的网址","The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?":"粘贴的内容来自微软 Word 文档。你想保留还是清除格式?",Keep:"保留",Clean:"清除","Word Paste Detected":"检测到粘贴自 Word 的内容",Characters:"字数统计","More Text":" 更多文字","More Paragraph":"更多段落","More Rich":"更多丰富","More Misc":"更多杂项"},direction:"ltr"}},"object"==typeof i&&void 0!==a?o(e("
|
397
|
+
*/var n,o;n=this,o=function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e.default:e).LANGUAGE.zh_cn={translation:{"Type something":"输入内容",Bold:"粗体",Italic:"斜体",Underline:"下划线",Strikethrough:"删除线",Insert:"插入",Delete:"删除",Cancel:"取消",OK:"确定",Back:"后退",Remove:"删除",More:"更多",Update:"更新",Style:"样式","Font Family":"字体","Font Size":"字号",Colors:"颜色",Background:"背景",Text:"字体","HEX Color":"十六进制颜色","Paragraph Format":"段落格式",Normal:"正文",Code:"代码","Heading 1":"标题1","Heading 2":"标题2","Heading 3":"标题3","Heading 4":"标题4","Paragraph Style":"段落样式","Inline Style":"内联样式",Align:"对齐方式","Align Left":"左对齐","Align Center":"居中","Align Right":"右对齐","Align Justify":"两端对齐",None:"无","Ordered List":"编号","Unordered List":"项目符号","Decrease Indent":"减少缩进量","Increase Indent":"增加缩进量","Insert Link":"插入超链接","Open in new tab":"在新标签页中打开","Open Link":"打开超链接","Edit Link":"编辑超链接",Unlink:"删除超链接","Choose Link":"选择超链接","Insert Image":"插入图片","Upload Image":"上传图片","By URL":"通过 URL",Browse:"浏览","Drop image":"拖入图片","or click":"或点击","Manage Images":"管理图片",Loading:"加载中",Deleting:"删除中",Tags:"标签","Are you sure? Image will be deleted.":"图片将会被删除,是否确认?",Replace:"替换",Uploading:"上传中","Loading image":"图片加载中",Display:"显示",Inline:"嵌入型","Break Text":"上下型环绕","Alternative Text":"替换文字","Change Size":"改变大小",Width:"宽度",Height:"高度","Something went wrong. Please try again.":"发生错误,请重试。","Image Caption":"图片标题","Advanced Edit":"高级编辑","Insert Video":"插入视频","Embedded Code":"嵌入代码","Paste in a video URL":"粘贴视频网址","Drop video":"拖入视频","Your browser does not support HTML5 video.":"您的浏览器不支持 HTML5 视频。","Upload Video":"上传视频","Insert Table":"插入表格","Table Header":"表头","Remove Table":"删除表格","Table Style":"表格样式","Horizontal Align":"水平对齐方式",Row:"行","Insert row above":"在上方插入","Insert row below":"在下方插入","Delete row":"删除行",Column:"列","Insert column before":"在左侧插入","Insert column after":"在右侧插入","Delete column":"删除列",Cell:"单元格","Merge cells":"合并单元格","Horizontal split":"水平分割","Vertical split":"垂直分割","Cell Background":"单元格背景","Vertical Align":"垂直对齐方式",Top:"靠上",Middle:"居中",Bottom:"靠下","Align Top":"靠上对齐","Align Middle":"居中对齐","Align Bottom":"靠下对齐","Cell Style":"单元格样式","Upload File":"上传文件","Drop file":"拖入文件",Emoticons:"表情符号","Grinning face":"露齿笑脸","Grinning face with smiling eyes":"露齿笑到眯起眼","Face with tears of joy":"笑哭","Smiling face with open mouth":"张嘴微笑","Smiling face with open mouth and smiling eyes":"眯眼张嘴微笑","Smiling face with open mouth and cold sweat":"带冷汗的张嘴微笑","Smiling face with open mouth and tightly-closed eyes":"紧闭双眼张嘴微笑","Smiling face with halo":"带光环微笑","Smiling face with horns":"带牛角的微笑","Winking face":"眨眼","Smiling face with smiling eyes":"眯眼微笑","Face savoring delicious food":"馋","Relieved face":"如释重负","Smiling face with heart-shaped eyes":"桃心眼微笑","Smiling face with sunglasses":"戴太阳镜微笑","Smirking face":"得意地笑","Neutral face":"中性脸","Expressionless face":"面无表情","Unamused face":"不高兴","Face with cold sweat":"冷汗","Pensive face":"沉思","Confused face":"迷惑","Confounded face":"困惑","Kissing face":"嘴巴嘟嘟","Face throwing a kiss":"飞吻","Kissing face with smiling eyes":"眯眼接吻","Kissing face with closed eyes":"闭眼接吻","Face with stuck out tongue":"吐舌","Face with stuck out tongue and winking eye":"眨眼吐舌","Face with stuck out tongue and tightly-closed eyes":"眯眼吐舌","Disappointed face":"失望","Worried face":"担心","Angry face":"生气","Pouting face":"撅嘴","Crying face":"大哭","Persevering face":"坚强","Face with look of triumph":"扬眉吐气","Disappointed but relieved face":"失望","Frowning face with open mouth":"皱眉","Anguished face":"痛苦","Fearful face":"害怕","Weary face":"疲惫","Sleepy face":"困了","Tired face":"累了","Grimacing face":"扭曲脸","Loudly crying face":"大哭","Face with open mouth":"张开嘴","Hushed face":"安静","Face with open mouth and cold sweat":"冷汗","Face screaming in fear":"害怕尖叫","Astonished face":"惊讶","Flushed face":"脸红","Sleeping face":"熟睡","Dizzy face":"眩晕","Face without mouth":"没有嘴的脸","Face with medical mask":"口罩脸",Break:"换行",Subscript:"下标",Superscript:"上标",Fullscreen:"全屏","Insert Horizontal Line":"插入水平线","Clear Formatting":"清除格式",Save:"保存",Undo:"撤消",Redo:"恢复","Select All":"全选","Code View":"代码视图",Quote:"引用",Increase:"增加引用级别",Decrease:"减少引用级别","Quick Insert":"快速插入","Special Characters":"特殊字符",Latin:"拉丁字母",Greek:"希腊字母",Cyrillic:"西里尔字母",Punctuation:"标点",Currency:"货币",Arrows:"箭头",Math:"数学",Misc:"杂项",Print:"打印","Spell Checker":"拼写检查器",Help:"帮助",Shortcuts:"快捷键","Inline Editor":"内联编辑器","Show the editor":"显示编辑器","Common actions":"常用操作",Copy:"复制",Cut:"剪切",Paste:"粘贴","Basic Formatting":"基本格式","Increase quote level":"增加引用级别","Decrease quote level":"减少引用级别","Image / Video":"图像/视频","Resize larger":"放大","Resize smaller":"缩小",Table:"表格","Select table cell":"选择单元格","Extend selection one cell":"增加选中的单元格","Extend selection one row":"增加选中的行",Navigation:"导航","Focus popup / toolbar":"焦点弹出/工具栏","Return focus to previous position":"将焦点返回到上一个位置","Embed URL":"嵌入网址","Paste in a URL to embed":"粘贴要嵌入的网址","The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?":"粘贴的内容来自微软 Word 文档。你想保留还是清除格式?",Keep:"保留",Clean:"清除","Word Paste Detected":"检测到粘贴自 Word 的内容",Characters:"字数统计","More Text":" 更多文字","More Paragraph":"更多段落","More Rich":"更多丰富","More Misc":"更多杂项"},direction:"ltr"}},"object"==typeof i&&void 0!==a?o(e("ac195f5")):"function"==typeof t&&t.amd?t(["froala-editor"],o):o(n.FroalaEditor)}));
|
398
398
|
;/*!node_modules/amis-ui/lib/components/RichText.js*/
|
399
|
-
amis.define("
|
399
|
+
amis.define("a801a30",(function(t,e,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=t("9a586ef"),s=t("ce101d6"),r=t("6f9c7d0"),d=t("ac195f5"),l=t("ac195f5");function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}t("1fe5b85"),t("9e8b99b"),t("cf50745"),t("3906d17"),t("fdb39f3"),t("4132b3b"),t("1c1c8c8"),t("bf9c132"),t("46f6506"),t("20edd43"),t("8d9ead6"),t("70e0f2a"),t("a74c656"),t("ed54733"),t("79b65a7"),t("864cceb"),t("ac92a96"),t("a921988"),t("5fac325"),t("21b9b08"),t("78ca1a9"),t("d3ab1c6"),t("311e141"),t("e465b87"),t("74e84ae"),t("eb4800e"),t("9497956"),t("b2be72e"),t("5d9b596"),t("5e2b5ea");var c=a(s),f=a(r),h=a(d),p=a(l),u=t("ce101d6"),g=(u.default||u).createElement;(u.default||u).Fragment;var v=function(t){function e(e){var i=t.call(this,e)||this;return i.listeningEvents=[],i.element=null,i.editor=null,i.config={immediateReactModelUpdate:!1,reactIgnoreAttrs:null},i.editorInitialized=!1,i.INNER_HTML_ATTR="innerHTML",i.oldModel=null,i}return o.__extends(e,t),e.prototype.componentDidMount=function(){this.createEditor()},e.prototype.componentWillUnmount=function(){this.destroyEditor()},e.prototype.componentDidUpdate=function(t){if(!f.default(this.props.config,t.config))return this.destroyEditor(),void this.createEditor();JSON.stringify(this.oldModel)!=JSON.stringify(this.props.model)&&this.setContent()},e.prototype.clone=function(t){var e,i=this;if(!t)return t;if([Number,String,Boolean].forEach((function(i){t instanceof i&&(e=i(t))})),void 0===e)if("[object Array]"===Object.prototype.toString.call(t))e=[],t.forEach((function(t,n,o){e[n]=i.clone(t)}));else if("object"==typeof t)if(t.nodeType&&"function"==typeof t.cloneNode)e=t.cloneNode(!0);else if(t.prototype)e=t;else if(t instanceof Date)e=new Date(t);else for(var n in e={},t)e[n]=i.clone(t[n]);else e=t;return e},e.prototype.createEditor=function(){var t=this;this.editorInitialized||(this.config=this.clone(this.props.config||this.config),this.config=o.__assign({},this.config),this.element=this.el,this.props.model&&(this.element.innerHTML=this.props.model),this.setContent(),this.registerEvent("initialized",this.config.events&&this.config.events.initialized),this.config.events||(this.config.events={}),this.config.events.initialized=function(){t.editorInitialized=!0,t.initListeners()},this.editor=new h.default(this.element,this.config))},e.prototype.setContent=function(){var t=this;(this.props.model||""==this.props.model)&&(this.oldModel=this.props.model,this.editorInitialized?this.setNormalTagContent():(this._initEvents||(this._initEvents=[]),this._initEvents.push((function(){return t.setNormalTagContent()}))))},e.prototype.setNormalTagContent=function(){var t=this;t.editor.html&&t.editor.html.set(t.props.model||""),t.editorInitialized&&t.editor.undo&&(t.editor.undo.reset(),t.editor.undo.saveStep())},e.prototype.destroyEditor=function(){this.element&&(this.editor.destroy&&this.editor.destroy(),this.listeningEvents.length=0,this.element=null,this.editorInitialized=!1,this._initEvents=[])},e.prototype.getEditor=function(){return this.element?this.editor:null},e.prototype.updateModel=function(){if(this.props.onModelChange){var t="",e=this.editor.html.get();"string"==typeof e&&(t=e),this.oldModel!==t&&(this.oldModel=t,this.props.onModelChange(t))}},e.prototype.initListeners=function(){var t=this;if(this.editor.events.on("contentChanged",(function(){t.updateModel()})),this.config.immediateReactModelUpdate&&this.editor.events.on("keyup",(function(){t.updateModel()})),this._initEvents)for(var e=0;e<this._initEvents.length;e++)this._initEvents[e].call(this.editor)},e.prototype.registerEvent=function(t,e){t&&e&&("initialized"==t?(this._initEvents||(this._initEvents=[]),this._initEvents.push(e)):(this.config.events||(this.config.events={}),this.config.events[t]=e))},e.prototype.render=function(){var t=this;return g("textarea",{ref:function(e){return t.el=e}},this.props.children)},e}(c.default.Component),m=function(t){function e(e){var i=t.call(this,e)||this;return p.default.VIDEO_PROVIDERS=[{test_regex:/.*/,url_regex:"",url_text:"",html:'<span class="fr-video fr-dvb fr-draggable" contenteditable="false" draggable="true"><video class="fr-draggable" controls="" data-msg="ok" data-status="0" src="{url}" style="width: 600px;"></video></span>'}],i}return o.__extends(e,t),e.prototype.render=function(){return g(v,{config:this.props.config,model:this.props.model,onModelChange:this.props.onModelChange})},e}(c.default.Component);e.default=m}));
|