wp_back/wp-content/plugins/wp-smushit/app/assets/js/smush-media.min.js.map

1 line
7.5 KiB
Plaintext
Raw Normal View History

2024-05-20 15:37:46 +03:00
{"version":3,"file":"js/smush-media.min.js","mappings":"CAMA,SAAWA,EAAGC,GACb,aAGA,IAAMC,EAAaC,GAAGC,MAMrBC,EAAWJ,EAAEI,SAJZ,+IAYIC,EAAkB,SAAUC,GAKjC,OAAOF,EAAS,CACfG,MAAOC,WAAWC,QAAQC,YAC1BC,MAAOL,GAET,EAEA,QACC,IAAuBL,EAAWW,WAClC,IAAuBX,EAAWW,KAAKC,WAAWC,QAAQC,UACzD,CAED,IAAMC,EACLf,EAAWW,KAAKC,WAAWC,QAAQC,UAUpCd,EAAWW,KAAKC,WAAWC,QAAQC,UAAYC,EAAoBC,OAClE,CACCC,WAAU,WACTF,EAAoBG,UAAUD,WAAWE,MAAMC,KAAMC,WACrDD,KAAKE,SAASF,KAAKG,MAAO,eAAgBH,KAAKI,OAChD,EAEAA,OAAM,WAELxB,EAAWW,KAAKC,WAAWM,UAAUM,OAAOL,MAC3CC,KACAC,WAGD,IAAMhB,EAAYe,KAAKG,MAAME,IAAI,SACjC,YAAyB,IAAdpB,IAIXe,KAAKG,MAAMG,QAMXN,KAAKO,MAAMC,SACXR,KAAKS,IACHC,KAAK,aACLC,OAAO3B,EAAgBC,IACzBe,KAAKO,MAAMH,UAbHJ,IAgBT,GAGH,CAGA,IAAMY,EAAyBhC,EAAWW,KAAKC,WAAWC,QAK1Db,EAAWW,KAAKC,WAAWC,QAAUmB,EAAuBhB,OAAO,CAClEC,WAAU,WACTe,EAAuBd,UAAUD,WAAWE,MAAMC,KAAMC,WACxDD,KAAKE,SAASF,KAAKG,MAAO,eAAgBH,KAAKI,OAChD,EAEAA,OAAM,WAELxB,EAAWW,KAAKC,WAAWM,UAAUM,OAAOL,MAAMC,KAAMC,WAExD,IAAMhB,EAAYe,KAAKG,MAAME,IAAI,SACjC,YAAyB,IAAdpB,IAIXe,KAAKG,MAAMG,QAMXN,KAAKO,MAAMC,SACXR,KAAKS,IAAIE,OAAO3B,EAAgBC,KAVxBe,IAaT,IAQD,IAAMa,EAA6BhC,GAAGC,MAAMS,KAAKuB,kBAAkBlB,OAAO,CACzEmB,GAAI,gCAEJC,cAAa,WACZhB,KAAKiB,QAAU,CACdC,IAAK,CACJC,KAAMhC,WAAWC,QAAQgC,WACzBC,MAAO,CAAEC,MAAO,OAChBC,SAAU,IAGXC,UAAW,CACVL,KAAMhC,WAAWC,QAAQqC,qBACzBJ,MAAO,CAAEC,MAAO,aAChBC,SAAU,IAGXG,SAAU,CACTP,KAAMhC,WAAWC,QAAQuC,YACzBN,MAAO,CAAEC,MAAO,YAChBC,SAAU,IAGXK,OAAQ,CACPT,KAAMhC,WAAWC,QAAQyC,cACzBR,MAAO,CAAEC,MAAO,qBAChBC,SAAU,IAGb,IAQKO,EAAqBjD,GAAGC,MAAMS,KAAKuC,mBACzCjD,GAAGC,MAAMS,KAAKuC,mBAAqBjD,GAAGC,MAAMS,KAAKuC,mBAAmBlC,OAAO,CAC1EmC,cAAa,WAEZD,EAAmBhC,UAAUiC,cAAcC,KAAKhC,MAChDA,KAAKiC,QAAQC,IACZ,6BACA,IAAIrB,EAA2B,CAC9BsB,WAAYnC,KAAKmC,WACjBhC,MAAOH,KAAKoC,WAAWf,MACvBE,UAAW,KACTnB,SAEL,GAED,CA7KD,CA6KGiC,OAAQ1D","sources":["webpack://wp-smushit/./_src/js/smush/media.js"],"sourcesContent":["/* global smush_vars */\n/* global _ */\n\n/**\n * Adds a Smush Now button and displays stats in Media Attachment Details Screen\n */\n(function ($, _) {\n\t'use strict';\n\n\t// Local reference to the WordPress media namespace.\n\tconst smushMedia = wp.media,\n\t\tsharedTemplate =\n\t\t\t\"<span class='setting smush-stats' data-setting='smush'>\" +\n\t\t\t\"<span class='name'><%= label %></span>\" +\n\t\t\t\"<span class='value'><%= value %></span>\" +\n\t\t\t'</span>',\n\t\ttemplate = _.template(sharedTemplate);\n\n\t/**\n\t * Create the template.\n\t *\n\t * @param {string} smushHTML\n\t * @return {Object} Template object\n\t */\n\tconst prepareTemplate = function (smushHTML) {\n\t\t/**\n\t\t * @param {Array} smush_vars.strings Localization strings.\n\t\t * @param {Object} smush_vars Object from wp_localize_script()\n\t\t */\n\t\treturn template({\n\t\t\tlabel: smush_vars.strings.stats_label,\n\t\t\tvalue: smushHTML,\n\t\t});\n\t};\n\n\tif (\n\t\t'undefined' !== typeof smushMedia.view &&\n\t\t'undefined' !== typeof smushMedia.view.Attachment.Details.TwoColumn\n\t) {\n\t\t// Local instance of the Attachment Details TwoColumn used in the edit attachment modal view\n\t\tconst smushMediaTwoColumn =\n\t\t\tsmushMedia.view.Attachment.Details.TwoColumn;\n\n\t\t/**\n\t\t * Add Smush details to attachment.\n\t\t *\n\t\t * A similar view to media.view.Attachment.Details\n\t\t * for use in the Edit Attachment modal.\n\t\t *\n\t\t * @see wp-includes/js/media-grid.js\n\t\t */\n\t\tsmushMedia.view.Attachment.Details.TwoColumn = smushMediaTwoColumn.extend(\n\t\t\t{\n\t\t\t\tinitialize() {\n\t\t\t\t\tsmushMediaTwoColumn.prototype.initialize.apply(this, arguments);\n\t\t\t\t\tthis.listenTo(this.model, 'change:smush', this.render);\n\t\t\t\t},\n\n\t\t\t\trender() {\n\t\t\t\t\t// Ensure that the main attachment fields are rendered.\n\t\t\t\t\tsmushMedia.view.Attachment.prototype.render.apply(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\targuments\n\t\t\t\t\t);\n\n\t\t\t\t\tconst smushHTML = this.model.get('smush');\n\t\t\t\t\tif (typeof smushHTML === 'undefined') {\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.model.fetch();\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Detach the views, append our custom fields, make sure that our data is fully update