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EAAM,iBACN,EAAiB,IAAI,EAAQ,OAC7B,EAAkB,IAAI,EAAQ,OAC/B,IAEA,EAAkB,GAAG,SAAS,WAiEhC,IAA4B,EAAiB,EAAoB,EAhE1D,GACH,EAAiB,KA+DO,EA/DgB,KAAK,MA+DJ,EA/DW,EAAQ,aA+DC,EA/Da,EAAQ,cAgE9E,SAAS,GAAmB,EAAqB,GAAsB,KA9D7E,IAEA,EAAiB,GAAG,SAAS,WACxB,GACH,EAAkB,IAAI,EAAoB,KAAK,MAAO,EAAQ,aAAc,EAAQ,eAEtF,IAEA,EAAG,cAAc,EAAK,SAAS,WAC9B,EAAQ,aAAa,gBAErB,EAAS,GAAG,SAAS,SAAU,GAC9B,EAAM,iBACN,EAAS,QAAQ,CAChB,MAAO,EAAY,MACnB,IAAK,EAAU,MACf,QAAS,EAAc,MACvB,MAAO,EAAiB,MACxB,OAAQ,EAAkB,OAE5B,IAEA,EAAY,IAAI,EAAQ,OAAO,QAAQ,SACvC,EAAK,aAAa,EAAa,GAE/B,EAAU,IAAI,EAAQ,KACtB,EAAK,aAAa,EAAW,GAE7B,EAAc,IAAI,EAAQ,SAC1B,EAAK,aAAa,EAAe,GAEjC,EAAiB,IAAI,EAAQ,OAC7B,EAAK,aAAa,EAAkB,GAEpC,EAAkB,IAAI,EAAQ,QAC9B,EAAK,aAAa,EAAmB,EAEtC,IAEA,EAAG,eAAe,EAAK,SAAS,WAC/B,EAAS,IAAI,SACb,EAAiB,IAAI,SACrB,EAAkB,IAAI,SACtB,EAAY,IAAI,SAChB,EAAiB,IAAI,SACrB,EAAY,IAAI,SAChB,EAAU,IAAI,SAGW,YAArB,EAAS,SACZ,EAAS,QAEX,IACA,EAAG,WAAW,EAAK,QACpB,GACD,CASD,GAEF","file":"/npm/summernote-image-attributes-editor@1.2.1/summernote-image-attributes.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/summernote-image-attributes-editor@1.2.1/summernote-image-attributes.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\n/* https://github.com/adeelhussain/summernote-image-attribute-editor */\n(function (factory) {\n\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(['jquery'], factory)\n\t} else if (typeof module === 'object' && module.exports) {\n\t\tmodule.exports = factory(require('jquery'));\n\t} else {\n\t\tfactory(window.jQuery)\n\t}\n}\n\t(function ($) {\n\t\t// TODO: Add more languages!\n\t\t$.extend(true, $.summernote.lang, {\n\t\t\t'en-US': {\n\t\t\t\timageAttributes: {\n\t\t\t\t\tedit: 'Edit Attributes',\n\t\t\t\t\ttitleLabel: 'Title',\n\t\t\t\t\taltLabel: 'Alternative Text',\n\t\t\t\t\tcaptionLabel: 'Caption',\n\t\t\t\t\ttooltip: 'Edit Image',\n\t\t\t\t\tdialogSaveBtnMessage: 'Save',\n\t\t\t\t\tdialogTitle: 'Change Image Attributes'\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t$.extend($.summernote.options, {\n\t\t\timageAttributes: {\n\t\t\t\ticon: '<i class=\"note-icon\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\" width=\"14\" height=\"14\"><path d=\"M 8.781,11.11 7,11.469 7.3595,9.688 8.781,11.11 Z M 7.713,9.334 9.135,10.7565 13,6.8915 11.5775,5.469 7.713,9.334 Z M 6.258,9.5 8.513,7.12 7.5,5.5 6.24,7.5 5,6.52 3,9.5 6.258,9.5 Z M 4.5,5.25 C 4.5,4.836 4.164,4.5 3.75,4.5 3.336,4.5 3,4.836 3,5.25 3,5.6645 3.336,6 3.75,6 4.164,6 4.5,5.6645 4.5,5.25 Z m 1.676,5.25 -4.176,0 0,-7 9,0 0,1.156 1,0 0,-2.156 -11,0 0,9 4.9845,0 0.1915,-1 z\"/></svg></i>',\n\t\t\t\tfigureClass: '',\n\t\t\t\tfigcaptionClass: '',\n\t\t\t\tcaptionText: 'Caption Goes Here.'\n\t\t\t}\n\t\t});\n\t\t$.extend($.summernote.plugins, {\n\t\t\t'imageAttributes': function (context) {\n\t\t\t\tvar self = this;\n\t\t\t\tvar ui = $.summernote.ui,\n\t\t\t\t\t$editable = context.layoutInfo.editable,\n\t\t\t\t\toptions = context.options,\n\t\t\t\t\t$editor = context.layoutInfo.editor,\n\t\t\t\t\tlang = options.langInfo,\n\t\t\t\t\t$note = context.layoutInfo.note;\n\n\t\t\t\tcontext.memo('button.imageAttributes', function () {\n\t\t\t\t\tvar button = ui.button({\n\t\t\t\t\t\tcontents: options.imageAttributes.icon,\n\t\t\t\t\t\tcontainer: false,\n\t\t\t\t\t\ttooltip: lang.imageAttributes.tooltip,\n\t\t\t\t\t\tclick: function () {\n\t\t\t\t\t\t\tcontext.invoke('imageAttributes.show');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\treturn button.render();\n\t\t\t\t});\n\n\t\t\t\tthis.initialize = function () {\n\t\t\t\t\t// Either the modal appends in Body or Inside the Editor\n\t\t\t\t\tvar $container = options.imageAttributes.dialogsInBody ? $(document.body) : $editor;\n\n\t\t\t\t\tvar body = ` <div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label class=\"note-form-label\">${lang.imageAttributes.titleLabel}</label>\n\t\t\t\t\t\t\t\t\t<input class=\"form-control note-input note-image-title-text\" type=\"text\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label class=\"note-form-label\">${lang.imageAttributes.altLabel}</label>\n\t\t\t\t\t\t\t\t\t<input class=\"form-control note-input note-image-alt-text\" type=\"text\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t\t\t\t\t<label class=\"note-form-label\">${lang.imageAttributes.captionLabel}</label>\n\t\t\t\t\t\t\t\t\t<input class=\"form-control note-input note-image-caption-text\" type=\"text\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"form-group col-sm-4\">\n\t\t\t\t\t\t\t\t\t\t<label class=\"note-form-label\">${lang.imageAttributes.widthLabel}</label>\n\t\t\t\t\t\t\t\t\t\t<input class=\"form-control note-input note-image-width\" type=\"number\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"form-group col-sm-4\">\n\t\t\t\t\t\t\t\t\t\t<label class=\"note-form-label\">${lang.imageAttributes.heightLabel}</label>\n\t\t\t\t\t\t\t\t\t\t<input class=\"form-control note-input note-image-height\" type=\"number\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"form-group col-sm-4\">\n\t\t\t\t\t\t\t\t\t\t<label class=\"note-form-label\">${lang.imageAttributes.imageLockLabel}</label>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-default btn-md lock-button\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span><i class=\"note-icon icon-lock\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14px\" height=\"13.600px\" viewBox=\"0 0 1000 1000\" enable-background=\"new 0 0 1000 1000\" xml:space=\"preserve\"> <g><path d=\"M321.8,455.5h356.4V321.8c0-49.2-17.4-91.2-52.2-126c-34.8-34.8-76.8-52.2-126-52.2c-49.2,0-91.2,17.4-126,52.2c-34.8,34.8-52.2,76.8-52.2,126L321.8,455.5L321.8,455.5z M900.9,522.3v400.9c0,18.6-6.5,34.3-19.5,47.3c-13,13-28.8,19.5-47.3,19.5H165.9c-18.6,0-34.3-6.5-47.3-19.5c-13-13-19.5-28.8-19.5-47.3V522.3c0-18.6,6.5-34.3,19.5-47.3c13-13,28.8-19.5,47.3-19.5h22.3V321.8c0-85.4,30.6-158.7,91.9-219.9C341.3,40.7,414.7,10,500,10c85.3,0,158.7,30.6,219.9,91.9c61.3,61.3,91.9,134.6,91.9,219.9v133.6h22.3c18.6,0,34.3,6.5,47.3,19.5C894.4,488,900.9,503.7,900.9,522.3L900.9,522.3z\"/></g></svg></i></span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span><i class=\"note-icon icon-unlock hide\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14px\" height=\"13.600px\" viewBox=\"0 0 438.533 438.533\" style=\"width: 13px;enable-background:new 0 0 438.533 438.533;\" xml:space=\"preserve\"><g><path d=\"M375.721,227.259c-5.331-5.331-11.8-7.992-19.417-7.992H146.176v-91.36c0-20.179,7.139-37.402,21.415-51.678   c14.277-14.273,31.501-21.411,51.678-21.411c20.175,0,37.402,7.137,51.673,21.411c14.277,14.276,21.416,31.5,21.416,51.678   c0,4.947,1.807,9.229,5.42,12.845c3.621,3.617,7.905,5.426,12.847,5.426h18.281c4.945,0,9.227-1.809,12.848-5.426   c3.606-3.616,5.42-7.898,5.42-12.845c0-35.216-12.515-65.331-37.541-90.362C284.603,12.513,254.48,0,219.269,0   c-35.214,0-65.334,12.513-90.366,37.544c-25.028,25.028-37.542,55.146-37.542,90.362v91.36h-9.135   c-7.611,0-14.084,2.667-19.414,7.992c-5.33,5.325-7.994,11.8-7.994,19.414v164.452c0,7.617,2.665,14.089,7.994,19.417   c5.33,5.325,11.803,7.991,19.414,7.991h274.078c7.617,0,14.092-2.666,19.417-7.991c5.325-5.328,7.994-11.8,7.994-19.417V246.673   C383.719,239.059,381.053,232.591,375.721,227.259z\"/></g></svg></i></span>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-default btn-md reset-size-buttton\" aria-label=\"Resize\" data-toggle=\"tooltip\" title=\"${lang.imageAttributes.resizeLabel}\">\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-repeat\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>`;\n\n\t\t\t\t\tvar footer = `<button href=\"#\" class=\"btn btn-primary note-image-title-btn note-btn\">${lang.imageAttributes.dialogSaveBtnMessage}</button>`;\n\n\t\t\t\t\tthis.$dialog = ui.dialog({\n\t\t\t\t\t\ttitle: lang.imageAttributes.dialogTitle,\n\t\t\t\t\t\tbody: body,\n\t\t\t\t\t\tfooter: footer\n\t\t\t\t\t}).render().appendTo($container);\n\n\t\t\t\t};\n\n\t\t\t\tthis.destroy = function () {\n\t\t\t\t\tui.hideDialog(this.$dialog);\n\t\t\t\t\tthis.$dialog.remove();\n\t\t\t\t};\n\n\t\t\t\tthis.bindEnterKey = function ($input, $btn) {\n\t\t\t\t\t$input.on('keypress', function (event) {\n\t\t\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\t\t\t$btn.trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\tthis.show = function () {\n\t\t\t\t\tvar $img = $($editable.data('target'));\n\t\t\t\t\tvar _imgInfo = {\n\t\t\t\t\t\ttitle: $img.attr('title'),\n\t\t\t\t\t\talt: $img.attr('alt'),\n\t\t\t\t\t\tcaption: $img.next('figcaption').text(),\n\t\t\t\t\t\twidth: $img.width(),\n\t\t\t\t\t\theight: $img.height()\n\t\t\t\t\t};\n\n\t\t\t\t\tvar img = new Image();\n\t\t\t\t\timg.onload = function () {\n\t\t\t\t\t\t_imgInfo.naturalWidth = img.width\n\t\t\t\t\t\t_imgInfo.naturalHeight = img.height;\n\t\t\t\t\t}\n\t\t\t\t\timg.src = $img.attr('src');\n\t\t\t\t\t\n\n\t\t\t\t\tthis.showLinkDialog(_imgInfo)\n\t\t\t\t\t\t.then(function (imgInfo) {\n\t\t\t\t\t\t\tui.hideDialog(self.$dialog);\n\t\t\t\t\t\t\tvar isAnyChangeMade = false;\n\n\t\t\t\t\t\t\t// NOTE: Must add more conditions if any new field is being added!\n\t\t\t\t\t\t\tif (_imgInfo.title != imgInfo.title || _imgInfo.alt != imgInfo.alt || _imgInfo.caption != imgInfo.caption\n\t\t\t\t\t\t\t\t|| _imgInfo.width != imgInfo.width || _imgInfo.height != imgInfo.height) {\n\t\t\t\t\t\t\t\tisAnyChangeMade = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (imgInfo.alt) {\n\t\t\t\t\t\t\t\t$img.attr('alt', imgInfo.alt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$img.removeAttr('alt');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (imgInfo.title) {\n\t\t\t\t\t\t\t\t$img.attr('title', imgInfo.title);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$img.removeAttr('title');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (imgInfo.width) {\n\t\t\t\t\t\t\t\t$img.css('width', imgInfo.width);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (imgInfo.height) {\n\t\t\t\t\t\t\t\t$img.css('height', imgInfo.height);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar captionText = imgInfo.caption;\n\t\t\t\t\t\t\tvar $parentAnchorLink = $img.parent();\n\n\t\t\t\t\t\t\t// If caption are not same, then its mean need to update!\n\t\t\t\t\t\t\tvar isUpdateCaption = (captionText !== _imgInfo.caption);\n\n\t\t\t\t\t\t\t// If image already have a caption and is equal to old one, then remove that!\n\t\t\t\t\t\t\tvar $imgFigure = $img.closest('figure');\n\t\t\t\t\t\t\tif ($imgFigure.length && isUpdateCaption) {\n\n\t\t\t\t\t\t\t\t// Means image wrpped in figure\n\t\t\t\t\t\t\t\t$imgFigure.find('figcaption').remove();\n\t\t\t\t\t\t\t\t$imgFigure.children().first().unwrap();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// If caption text is present then add that caption, otherwise don't do any thing\n\t\t\t\t\t\t\tif (isUpdateCaption && captionText) {\n\t\t\t\t\t\t\t\tvar $newFigure;\n\t\t\t\t\t\t\t\tif ($parentAnchorLink.is('a')) {\n\t\t\t\t\t\t\t\t\t$newFigure = $parentAnchorLink.wrap(`<figure class=\"${options.imageAttributes.figureClass}\"></figure>`).parent();\n\t\t\t\t\t\t\t\t\t$newFigure.append(`<figcaption class=\"${options.imageAttributes.figcaptionClass}\"> ${captionText}</figcaption>`);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$newFigure = $img.wrap(`<figure class=\"${options.imageAttributes.figureClass}\"></figure>`).parent();\n\t\t\t\t\t\t\t\t\t$img.after(`<figcaption class=\"${options.imageAttributes.figcaptionClass}\">${captionText}</figcaption>`);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (isAnyChangeMade) {\n\t\t\t\t\t\t\t\tvar _content = context.invoke('code');\n\n\t\t\t\t\t\t\t\t$note.val(_content);\n\t\t\t\t\t\t\t\t$note.trigger('summernote.change', _content);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\tthis.showLinkDialog = function (imgInfo) {\n\t\t\t\t\treturn $.Deferred(function (deferred) {\n\t\t\t\t\t\tvar $imageTitle = self.$dialog.find('.note-image-title-text');\n\t\t\t\t\t\tvar $imageCaption = self.$dialog.find('.note-image-caption-text');\n\t\t\t\t\t\tvar $imageAlt = self.$dialog.find('.note-image-alt-text');\n\t\t\t\t\t\tvar $editBtn = self.$dialog.find('.note-image-title-btn');\n\t\t\t\t\t\tvar $imageWidthInput = self.$dialog.find('.note-image-width');\n\t\t\t\t\t\tvar $imageHeightInput = self.$dialog.find('.note-image-height');\n\t\t\t\t\t\tvar $lockButton = self.$dialog.find('.lock-button');\n\t\t\t\t\t\tvar $resetSizeButton = self.$dialog.find('.reset-size-buttton');\n\t\t\t\t\t\tvar $unlockIcon = $lockButton.find('.icon-unlock');\n\t\t\t\t\t\tvar $lockIcon = $lockButton.find('.icon-lock');\n\n\t\t\t\t\t\tvar isLocked = (typeof options.imageAttributes.manageAspectRatio === 'undefined') ? true: options.imageAttributes.manageAspectRatio;\n\t\t\t\t\t\tif(isLocked){\n\t\t\t\t\t\t\t$unlockIcon.addClass('hide').removeClass('show');\n\t\t\t\t\t\t\t$lockIcon.addClass('show').removeClass('hide');\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$unlockIcon.addClass('show').removeClass('hide');\n\t\t\t\t\t\t\t$lockIcon.addClass('hide').removeClass('show');\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$lockButton.on('click', function (event) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tisLocked = !isLocked;\n\n\t\t\t\t\t\t\tif (isLocked) {\n\n\t\t\t\t\t\t\t\t$unlockIcon.addClass('hide').removeClass('show')\n\t\t\t\t\t\t\t\t$lockIcon.addClass('show').removeClass('hide')\n\n\t\t\t\t\t\t\t\t$imageHeightInput.val(imageAdjustedHeight($imageWidthInput.val(), imgInfo.naturalWidth, imgInfo.naturalHeight));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t$unlockIcon.addClass('show').removeClass('hide')\n\t\t\t\t\t\t\t\t$lockIcon.addClass('hide').removeClass('show')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$resetSizeButton.on('click', function (event) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t$imageWidthInput.val(imgInfo.width);\n\t\t\t\t\t\t\t$imageHeightInput.val(imgInfo.height);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$imageHeightInput.on(\"input\", function () {\n\t\t\t\t\t\t\tif (isLocked) {\n\t\t\t\t\t\t\t\t$imageWidthInput.val(imageAdjustedWidth(this.value, imgInfo.naturalWidth, imgInfo.naturalHeight));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$imageWidthInput.on(\"input\", function () {\n\t\t\t\t\t\t\tif (isLocked) {\n\t\t\t\t\t\t\t\t$imageHeightInput.val(imageAdjustedHeight(this.value, imgInfo.naturalWidth, imgInfo.naturalHeight));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tui.onDialogShown(self.$dialog, function () {\n\t\t\t\t\t\t\tcontext.triggerEvent('dialog.shown');\n\n\t\t\t\t\t\t\t$editBtn.on('click', function (event) {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\tdeferred.resolve({\n\t\t\t\t\t\t\t\t\ttitle: $imageTitle.val(),\n\t\t\t\t\t\t\t\t\talt: $imageAlt.val(),\n\t\t\t\t\t\t\t\t\tcaption: $imageCaption.val(),\n\t\t\t\t\t\t\t\t\twidth: $imageWidthInput.val(),\n\t\t\t\t\t\t\t\t\theight: $imageHeightInput.val(),\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t$imageTitle.val(imgInfo.title).trigger('focus');\n\t\t\t\t\t\t\tself.bindEnterKey($imageTitle, $editBtn);\n\n\t\t\t\t\t\t\t$imageAlt.val(imgInfo.alt);\n\t\t\t\t\t\t\tself.bindEnterKey($imageAlt, $editBtn);\n\n\t\t\t\t\t\t\t$imageCaption.val(imgInfo.caption);\n\t\t\t\t\t\t\tself.bindEnterKey($imageCaption, $editBtn);\n\n\t\t\t\t\t\t\t$imageWidthInput.val(imgInfo.width);\n\t\t\t\t\t\t\tself.bindEnterKey($imageWidthInput, $editBtn);\n\n\t\t\t\t\t\t\t$imageHeightInput.val(imgInfo.height);\n\t\t\t\t\t\t\tself.bindEnterKey($imageHeightInput, $editBtn);\n\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tui.onDialogHidden(self.$dialog, function () {\n\t\t\t\t\t\t\t$editBtn.off('click');\n\t\t\t\t\t\t\t$imageWidthInput.off('input');\n\t\t\t\t\t\t\t$imageHeightInput.off('input');\n\t\t\t\t\t\t\t$lockButton.off('click');\n\t\t\t\t\t\t\t$resetSizeButton.off('click');\n\t\t\t\t\t\t\t$unlockIcon.off('click');\n\t\t\t\t\t\t\t$lockIcon.off('click');\n\n\n\t\t\t\t\t\t\tif (deferred.state() === 'pending') {\n\t\t\t\t\t\t\t\tdeferred.reject();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tui.showDialog(self.$dialog);\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\tfunction imageAdjustedHeight(heightInputValue, imageOriginalWidth, imageOriginalHeight) {\n\t\t\t\t\treturn parseInt(heightInputValue * (imageOriginalHeight / imageOriginalWidth), 10)\n\t\t\t\t}\n\n\t\t\t\tfunction imageAdjustedWidth(widthInputValue, imageOriginalWidth, imageOriginalHeight) {\n\t\t\t\t\treturn parseInt(widthInputValue * (imageOriginalWidth / imageOriginalHeight), 10)\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}));"]}