CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.3.81

Version Description

(2021-05-07) = * Added: New attribute Product Description (with HTML) added. This attribute will return product description with HTML tags.

Download this release

Release Info

Developer wahid0003
Plugin Icon 128x128 CTX Feed – WooCommerce Product Feed Manager Plugin
Version 4.3.81
Comparing to
See all releases

Code changes from version 4.3.80 to 4.3.81

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Cata
5
  Requires at least: 3.6
6
  Tested Up To: 5.7
7
  Requires PHP: 5.6
8
- Stable tag: 4.3.80
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -501,6 +501,9 @@ Using pro version:
501
 
502
  == Changelog ==
503
 
 
 
 
504
  = 4.3.80 (2021-05-06) =
505
  * Added: GoedGeplaatst.nl template default attributes added.
506
 
5
  Requires at least: 3.6
6
  Tested Up To: 5.7
7
  Requires PHP: 5.6
8
+ Stable tag: 4.3.81
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
501
 
502
  == Changelog ==
503
 
504
+ = 4.3.81 (2021-05-07) =
505
+ * Added: New attribute Product Description (with HTML) added. This attribute will return product description with HTML tags.
506
+
507
  = 4.3.80 (2021-05-06) =
508
  * Added: GoedGeplaatst.nl template default attributes added.
509
 
admin/js/fancy-select.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["fancy-select.js"],"names":["$","window","document","FancySelect","$select","options","self","settings","extend","defaults","optgroups","items","placeholder","delimiter","splitOn","persist","diacritics","create","createOnBlur","createFilter","highlight","openOnFocus","maxOptions","maxItems","maxItemShow","hideSelected","addPrecedence","selectOnTab","preload","allowEmptyOption","closeAfterSelect","scrollDuration","loadThrottle","loadingClass","dataAttr","optgroupField","valueField","labelField","disabledField","optgroupLabelField","optgroupValueField","lockOptgroupOrder","sortField","searchField","searchConjunction","mode","wrapperClass","inputClass","dropdownClass","dropdownContentClass","dropdownParent","copyClassesToDropdown","render","select","computedStyle","dir","attr","test","navigator","createElement","debounce","delay","timeout","optionsMap","optHelper","readData","$el","data","JSON","addOption","$option","group","value","hash_key","arr","isArray","field_optgroup","option","addGroup","$optgroup","i","n","id","optgroup","$options","tabIndex","tagType","rtl","multiple","eventNS","highlightedValue","isBlurring","isOpen","isDisabled","isRequired","isInvalid","isLocked","isFocused","isInputHidden","isSetup","isRendered","isShiftDown","isCmdDown","isCtrlDown","ignoreFocus","ignoreBlur","ignoreHover","hasOptions","currentResults","lastValue","caretPos","loading","loadedSearches","$activeOption","$activeItems","userOptions","renderCache","onSearchChange","args","fn","apply","children","length","tagName","addClass","$wrapper","width","appendTo","setup","$children","tabindex","hide","after","a","b","e","trigger","target","closest","preventDefault","current","selected","removeClass","getSelectedOptionData","filter","x","sort","$dropdownContent","find","updatePlaceholder","updateOriginalInput","getComputedStyle","hasOwnProperty","optClass","isSelected","this","dropdownItems","_loop","push","concat","group_options","item","ii","_i","html","join","placeholderData","originalPlaceholder","text","slice","forEach","dataPlaceholder","title","dataCountPlaceholder","removeAttr","changed","silent","input","destroy","append","revertSettings","removeData","$testInput","off","body","fancySelect","prototype","bind","event","fct","_events","unbind","indexOf","Array","call","arguments","user_options","jQuery"],"mappings":"AAAA,cAQA,SAACA,EAAAC,EAAAC,GAWIC,SAAJA,EAAeC,EAAAC,GACd,IAAAC,EAAIA,KAAJC,EAAAA,EA+CCA,QAAQC,EAAKA,GA/CdC,CAEEJ,QAAAA,GACAK,UAAAA,GACAC,MAAAA,GACAC,YAAAA,GACAC,UAAAA,IACAC,QAAAA,KACAC,SAAAA,EACAC,YAAAA,EACAC,QAAAA,EACAC,cAAAA,EACAC,aAAAA,KACAC,WAAAA,EACAC,aAAAA,EACAC,WAAAA,IACAC,SAAAA,KACAC,YAAAA,EACAC,aAAAA,KACAC,eAAAA,EACAC,aAAAA,EACAC,SAAAA,EACAC,kBAAAA,EACAC,kBAAAA,EACAC,eAAAA,GACAC,aAA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GAAqBvG,IAErB+C,QAAA,SAAAoD,GA1OF,GA2OEjC,KAAAmC,QAAAnC,KAAAmC,SAAA,GA3OFF,KAAAjC,KAAAmC,UAAA,EA+OA,IAAA,IAAA9G,EAAA,EAAAA,EAAA2E,KAAAmC,QAAAA,GAAAF,OAAAlE,IAyBGiC,KAAAmC,QAAKA,GAAQF,GAAbpE,MAAuBA,KAAMyE,MAAMA,UAAMP,MAAUjB,KAAMyB,UAAKC,OASjEnM,EAACuH,GAADkE,YAAA,SAAmBW,GAxBnBpM,OAAAA,KAAEQ,KAAOL,WACRwL,KAAAA,aACC,WAAAhC,KAAAhC,QAAeA,eACf,IAAAxH,EAAAA,EAAAwJ,MAAaiC,MApehB,CAseGS,OAL8BpM,OAAAC","file":"fancy-select.min.js","sourcesContent":["\"use strict\";\r\n/**!\r\n * WooFeed Fancy Select\r\n * @version 1.0.0\r\n * @copyright 2020 WebAppick\r\n * @author Kudratullah <mhamudul.hk@gmail.com>\r\n */\r\n\r\n(function($, window, document) {\r\n\t// @TODO if multiple select has required attribute and only one item is selected then return false (user should not able to deselect the last one).\r\n\t// @TODO make the place holder with input field like selectize so we can set the required attribute if the select has required attribute, which can be useful for showing required warning.\r\n\t\"use strict\";\r\n\t\r\n\t/**\r\n\t * FancySelect Constructor\r\n\t * @param {jQuery|HTMLElement} $select\r\n\t * @param {Object} [options]\r\n\t * @constructor\r\n\t */\r\n\tlet FancySelect = function FancySelect($select, options) {\r\n\t\tlet self = this,\r\n\t\t\tdefaults = {\r\n\t\t\t\toptions: [],\r\n\t\t\t\toptgroups: [],\r\n\t\t\t\titems: [],\r\n\t\t\t\tplaceholder: '',\r\n\t\t\t\tdelimiter: ',',\r\n\t\t\t\tsplitOn: null,\r\n\t\t\t\tpersist: !0,\r\n\t\t\t\tdiacritics: !0,\r\n\t\t\t\tcreate: !1,\r\n\t\t\t\tcreateOnBlur: !1,\r\n\t\t\t\tcreateFilter: null,\r\n\t\t\t\thighlight: !0,\r\n\t\t\t\topenOnFocus: !0,\r\n\t\t\t\tmaxOptions: 1e3,\r\n\t\t\t\tmaxItems: null,\r\n\t\t\t\tmaxItemShow: 3,\r\n\t\t\t\thideSelected: null,\r\n\t\t\t\taddPrecedence: !1,\r\n\t\t\t\tselectOnTab: !1,\r\n\t\t\t\tpreload: !1,\r\n\t\t\t\tallowEmptyOption: !1,\r\n\t\t\t\tcloseAfterSelect: !1,\r\n\t\t\t\tscrollDuration: 60,\r\n\t\t\t\tloadThrottle: 300,\r\n\t\t\t\tloadingClass: \"loading\",\r\n\t\t\t\tdataAttr: \"data-data\",\r\n\t\t\t\toptgroupField: \"optgroup\",\r\n\t\t\t\tvalueField: \"value\",\r\n\t\t\t\tlabelField: \"text\",\r\n\t\t\t\tdisabledField: \"disabled\",\r\n\t\t\t\toptgroupLabelField: \"label\",\r\n\t\t\t\toptgroupValueField: \"value\",\r\n\t\t\t\tlockOptgroupOrder: !1,\r\n\t\t\t\tsortField: \"$order\",\r\n\t\t\t\tsearchField: [\"text\"],\r\n\t\t\t\tsearchConjunction: \"and\",\r\n\t\t\t\tmode: null,\r\n\t\t\t\twrapperClass: \"selectize-control\",\r\n\t\t\t\tinputClass: \"selectize-input\",\r\n\t\t\t\tdropdownClass: \"selectize-dropdown\",\r\n\t\t\t\tdropdownContentClass: \"selectize-dropdown-content\",\r\n\t\t\t\tdropdownParent: null,\r\n\t\t\t\tcopyClassesToDropdown: !0,\r\n\t\t\t\trender: {}\r\n\t\t\t},\r\n\t\t\tsettings = $.extend(true, {}, defaults, options),\r\n\t\t\tselect = $select[0];\r\n\t\tselect.fancySelect = self;\r\n\t\tself.order = 0;\r\n\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(select, null);\r\n\t\tlet dir = computedStyle ? computedStyle.getPropertyValue('direction') : select.currentStyle && select.currentStyle.direction;\r\n\t\tdir = dir || $select.parents('[dir]:first').attr('dir') || '';\r\n\t\tself.computedStyle = computedStyle; // for now, android support in general is too spotty to support validity\r\n\r\n\t\tconst SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !! document.createElement('input').validity; // helper (private) methods\r\n\r\n\t\tconst debounce = function (fn, delay) {\r\n\t\t\tlet timeout;\r\n\t\t\treturn function() {\r\n\t\t\t\tlet self = this;\r\n\t\t\t\tlet args = arguments;\r\n\t\t\t\twindow.clearTimeout(timeout);\r\n\t\t\t\ttimeout = window.setTimeout(function() {\r\n\t\t\t\t\tfn.apply(self, args);\r\n\t\t\t\t}, delay);\r\n\t\t\t};\r\n\t\t};\r\n\t\t\r\n\t\tlet optionsMap = {},\r\n\t\t\toptHelper = {\r\n\t\t\t\treadData: function ($el) {\r\n\t\t\t\t\tlet data = self.dataAttr && $el.attr(self.dataAttr);\r\n\r\n\t\t\t\t\tif (typeof data === 'string' && data.length) {\r\n\t\t\t\t\t\treturn JSON.parse(data);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t},\r\n\t\t\t\taddOption: function ($option, group) {\r\n\t\t\t\t\t$option = $($option);\r\n\t\t\t\t\tlet value = self.hash_key($option.val());\r\n\t\t\t\t\tif (!value && !settings.allowEmptyOption) return; // if the option already exists, it's probably been\r\n\t\t\t\t\t// duplicated in another optgroup. in this case, push\r\n\t\t\t\t\t// the current group to the \"optgroup\" property on the\r\n\t\t\t\t\t// existing option so that it's rendered in both places.\r\n\r\n\t\t\t\t\tif (optionsMap.hasOwnProperty(value)) {\r\n\t\t\t\t\t\tif (group) {\r\n\t\t\t\t\t\t\tlet arr = optionsMap[value][field_optgroup];\r\n\r\n\t\t\t\t\t\t\tif (!arr) {\r\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = group;\r\n\t\t\t\t\t\t\t} else if (!$.isArray(arr)) {\r\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = [arr, group];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tarr.push(group);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet option = optHelper.readData($option) || {};\r\n\t\t\t\t\toption[self.settings.labelField] = option[self.settings.labelField] || $option.text();\r\n\t\t\t\t\toption[self.settings.valueField] = option[self.settings.valueField] || value;\r\n\t\t\t\t\toption[self.settings.disabledField] = option[self.settings.disabledField] || $option.prop('disabled');\r\n\t\t\t\t\toption[self.settings.optgroupField] = option[self.settings.optgroupField] || group;\r\n\t\t\t\t\toption.$order = ++self.order;\r\n\t\t\t\t\toptionsMap[value] = option;\r\n\t\t\t\t\tself.settings.options.push(option);\r\n\r\n\t\t\t\t\tif ($option.is(':selected')) {\r\n\t\t\t\t\t\tself.settings.items.push(option);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\taddGroup: function ($optgroup) {\r\n\t\t\t\t\tlet i, n, id, optgroup, $options;\r\n\t\t\t\t\t$optgroup = $($optgroup);\r\n\t\t\t\t\tid = $optgroup.attr('label');\r\n\r\n\t\t\t\t\tif (id) {\r\n\t\t\t\t\t\toptgroup = optHelper.readData($optgroup) || {};\r\n\t\t\t\t\t\toptgroup[self.settings.optgroupLabelField] = id;\r\n\t\t\t\t\t\toptgroup[self.settings.optgroupValueField] = id;\r\n\t\t\t\t\t\toptgroup[self.settings.disabledField] = $optgroup.prop('disabled');\r\n\t\t\t\t\t\toptgroup.$order = ++self.order;\r\n\t\t\t\t\t\tself.settings.optgroups.push(optgroup);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$options = $('option', $optgroup);\r\n\r\n\t\t\t\t\tfor (i = 0, n = $options.length; i < n; i++) {\r\n\t\t\t\t\t\toptHelper.addOption($options[i], id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}; // setup default state\r\n\t\t\r\n\t\t$.extend(self, {\r\n\t\t\tsettings: settings,\r\n\t\t\t$select: $select,\r\n\t\t\ttabIndex: $select.attr('tabindex') || '',\r\n\t\t\ttagType: 1,\r\n\t\t\trtl: /rtl/i.test(dir),\r\n\t\t\tmultiple: $select.attr('multiple'),\r\n\t\t\teventNS: '.FancySelect' + ++FancySelect.count,\r\n\t\t\thighlightedValue: null,\r\n\t\t\tisBlurring: false,\r\n\t\t\tisOpen: false,\r\n\t\t\tisDisabled: false,\r\n\t\t\tisRequired: $select.is('[required]'),\r\n\t\t\tisInvalid: false,\r\n\t\t\tisLocked: false,\r\n\t\t\tisFocused: false,\r\n\t\t\tisInputHidden: false,\r\n\t\t\tisSetup: false,\r\n\t\t\tisRendered: false,\r\n\t\t\tisShiftDown: false,\r\n\t\t\tisCmdDown: false,\r\n\t\t\tisCtrlDown: false,\r\n\t\t\tignoreFocus: false,\r\n\t\t\tignoreBlur: false,\r\n\t\t\tignoreHover: false,\r\n\t\t\thasOptions: false,\r\n\t\t\tcurrentResults: null,\r\n\t\t\tlastValue: '',\r\n\t\t\tcaretPos: 0,\r\n\t\t\tloading: 0,\r\n\t\t\tloadedSearches: {},\r\n\t\t\t$activeOption: null,\r\n\t\t\t$activeItems: [],\r\n\t\t\toptgroups: {},\r\n\t\t\toptions: {},\r\n\t\t\tuserOptions: {},\r\n\t\t\titems: {},\r\n\t\t\trenderCache: {},\r\n\t\t\tonSearchChange: settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)\r\n\t\t});\r\n\r\n\t\tif ('' === self.settings.placeholder) {\r\n\t\t\tself.settings.placeholder = $select.attr('placeholder') || $select.attr('data-placeholder');\r\n\r\n\t\t\tif (!self.settings.placeholder && !self.settings.allowEmptyOption) {\r\n\t\t\t\tself.settings.placeholder = $select.children('option[value=\"\"]').text();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tself.settings.maxItems = self.multiple ? null : 1;\r\n\r\n\t\tfor (let i = 0, n = self.$select.children().length; i < n; i++) {\r\n\t\t\tlet tagName = self.$select.children()[i].tagName.toLowerCase();\r\n\r\n\t\t\tif (tagName === 'optgroup') {\r\n\t\t\t\toptHelper.addGroup(self.$select.children()[i]);\r\n\t\t\t} else if (tagName === 'option') {\r\n\t\t\t\toptHelper.addOption(self.$select.children()[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tself.$wrapper = $('<div class=\"fancy-picker\">').addClass($select.attr('class'));\r\n\r\n\t\tif (self.computedStyle.hasOwnProperty('width')) {\r\n\t\t\tself.$wrapper.css({\r\n\t\t\t\twidth: self.computedStyle.width\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tself.$outputWrapper = $('<div class=\"fancy-picker-picked\">').appendTo(self.$wrapper);\r\n\t\tself.originalPlaceholder = $('<span class=\"fancy-picker-placeholder\">').appendTo(self.$outputWrapper);\r\n\t\tself.dataPlaceholder = $('<span class=\"fancy-picker-data\">').appendTo(self.$outputWrapper);\r\n\t\tself.dataCountPlaceholder = $('<span class=\"fancy-picker-count\">').appendTo(self.$outputWrapper);\r\n\t\tself.$dropdown = $('<div class=\"fancy-picker-ui\">').appendTo(self.$wrapper);\r\n\t\tself.$dropdownContent = $('<div class=\"fancy-picker-content\">').appendTo(self.$dropdown);\r\n\t\tself.setup();\r\n\t};\r\n\r\n\tFancySelect.count = 0;\r\n\t// public methods.\r\n\t$.extend(FancySelect.prototype, {\r\n\t\t/**\r\n\t\t * Creates all elements and sets up event bindings.\r\n\t\t * @return {void}\r\n\t\t */\r\n\t\tsetup: function () {\r\n\t\t\tlet self = this;\r\n\t\t\tself.revertSettings = {\r\n\t\t\t\t$children: self.$select.children().detach(),\r\n\t\t\t\ttabindex: self.$select.attr('tabindex')\r\n\t\t\t};\r\n\t\t\tself.$select.attr('tabindex', -1).hide().after(self.$wrapper);\r\n\t\t\tself.$select.data('FancySelect', self);\r\n\t\t\tself.$select.addClass('FancySelectInit');\r\n\t\t\t\r\n\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (self.preload) {\r\n\t\t\t\tself.render();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.updatePlaceholder();\r\n\t\t\tself.updateOriginalInput();\r\n\t\t\t\r\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-picked', function(e) {\r\n\t\t\t\tself.$select.trigger('show');\r\n\t\t\t\t\r\n\t\t\t\tif (!self.isRendered) {\r\n\t\t\t\t\tself.render();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tself.$wrapper.toggleClass('active');\r\n\t\t\t\tself.$select.trigger('shown');\r\n\t\t\t});\r\n\t\t\t$(document).on('click' + self.eventNS, function(e) {\r\n\t\t\t\tif (!$(e.target).closest(self.$wrapper).length) {\r\n\t\t\t\t\tself.$select.trigger('hide');\r\n\t\t\t\t\tself.$wrapper.removeClass('active');\r\n\t\t\t\t\tself.$select.trigger('hidden');\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-option:not(.disabled)', function(e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tlet current = $(this),\r\n\t\t\t\t\tselected = false,\r\n\t\t\t\t\tvalue = self.hash_key(current.data('value'));\r\n\t\t\t\t\r\n\t\t\t\tif (self.multiple) {\r\n\t\t\t\t\tif (!current.hasClass('selected')) {\r\n\t\t\t\t\t\tselected = true;\r\n\t\t\t\t\t\tcurrent.addClass('selected');\r\n\t\t\t\t\t} else current.removeClass('selected');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (selected) {\r\n\t\t\t\t\t\tself.settings.items.push( self.getSelectedOptionData( value ) );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tself.settings.items = self.settings.items.filter( x => x[self.settings.valueField] !== value );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself.$dropdownContent.find('.fancy-picker-option').not(current).removeClass('selected');\r\n\t\t\t\t\tcurrent.addClass('selected');\r\n\t\t\t\t\tselected = true;\r\n\t\t\t\t\tself.settings.items = [ self.getSelectedOptionData( value ) ];\r\n\t\t\t\t\tself.$wrapper.removeClass('active');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tself.updatePlaceholder();\r\n\t\t\t\tself.updateOriginalInput();\r\n\t\t\t});\r\n\t\t\t$(window).on('resize' + self.eventNS, function() {\r\n\t\t\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(self.$select[0], null);\r\n\t\t\t\t\r\n\t\t\t\tif (computedStyle.hasOwnProperty('width')) {\r\n\t\t\t\t\tself.$wrapper.css({\r\n\t\t\t\t\t\twidth: computedStyle.width\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tself.$select.trigger('initialize');\r\n\t\t},\r\n\t\t/**\r\n\t\t * Render The FancySelect UI\r\n\t\t * @return {void}\r\n\t\t */\r\n\t\trender: function () {\r\n\t\t\tlet self = this,\r\n\t\t\t\tdropdownItems = [];\r\n\t\t\tconst optgroup = self.settings.optgroups;\r\n\t\t\tconst options = self.settings.options;\r\n\t\t\tconst optClass = ( value ) => self.isSelected(value) ? 'fancy-picker-option selected' : 'fancy-picker-option';\r\n\t\t\tif ( optgroup.length ) {\r\n\t\t\t\tfor ( let i = 0; i < optgroup.length; i++ ) {\r\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group\">` );\r\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group-label\">${optgroup[i][self.settings.labelField]}</div>` );\r\n\t\t\t\t\tconst group_options = options.filter( item => item[self.settings.optgroupField] === optgroup[i][self.settings.valueField]);\r\n\t\t\t\t\tfor (let ii = 0; ii < group_options.length; ii++ ) {\r\n\t\t\t\t\t\tlet option = group_options[i];\r\n\t\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdropdownItems.push( `</div>` );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (let i = 0; i < options.length; i++) {\r\n\t\t\t\t\tlet option = options[i];\r\n\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.$dropdownContent.html(dropdownItems.join(''));\r\n\t\t\tself.$select.trigger('rendered');\r\n\t\t\tself.isRendered = true;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Set Placeholder & Update Selected Data Placeholder\r\n\t\t * @return {FancySelect}\r\n\t\t */\r\n\t\tupdatePlaceholder: function () {\r\n\t\t\tlet self = this,\r\n\t\t\t\tplaceholderData = [];\r\n\t\t\tconst items = self.settings.items;\r\n\t\t\tconst maxItemShow = items.length > self.settings.maxItemShow ? self.settings.maxItemShow - 1 : self.settings.maxItemShow;\r\n\t\t\tself.originalPlaceholder.text(self.settings.placeholder);\r\n\t\t\t\r\n\t\t\tif (items.length) {\r\n\t\t\t\tself.originalPlaceholder.hide();\r\n\t\t\t} else {\r\n\t\t\t\tself.originalPlaceholder.show();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\titems.slice(0, maxItemShow).forEach( (item) => {\r\n\t\t\t\tplaceholderData.push( `<span>${item[self.settings.labelField]}</span>` );\r\n\t\t\t});\r\n\t\t\tself.dataPlaceholder.html( placeholderData.join( `<span class=\"fancy-picker-separator\">${self.settings.delimiter}</span>` ) );\r\n\t\t\t\r\n\t\t\tif (items.length > self.settings.maxItemShow) {\r\n\t\t\t\tlet title = [];\r\n\t\t\t\titems.forEach( (item) => {\r\n\t\t\t\t\ttitle.push(item[self.settings.labelField]);\r\n\t\t\t\t});\r\n\t\t\t\tself.dataCountPlaceholder.attr('title', title.join(self.settings.delimiter.trim() + ' '));\r\n\t\t\t\tself.dataCountPlaceholder.html('+' + (items.length - maxItemShow) + ' More &hellip;');\r\n\t\t\t} else {\r\n\t\t\t\tself.dataCountPlaceholder.removeAttr('title');\r\n\t\t\t\tself.dataCountPlaceholder.html('');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.$select.trigger('placeholderChanged');\r\n\t\t\treturn self;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Update The Original Select Tag\r\n\t\t * @param {boolean} ?silent\r\n\t\t * @return {FancySelect}\r\n\t\t */\r\n\t\tupdateOriginalInput: function (silent) {\r\n\t\t\tlet self = this,\r\n\t\t\t\toptions = [],\r\n\t\t\t\tchanged = false;\r\n\t\t\tsilent = true === silent ? true : false;\r\n\t\t\tconst items = self.settings.items;\r\n\t\t\tfor (let i = 0; i < items.length; i++) {\r\n\t\t\t\toptions.push('<option value=\"' + items[i][self.settings.valueField] + '\" selected=\"selected\">' + items[i][self.settings.labelField] || '' + '</option>');\r\n\t\t\t\tchanged = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tself.$select.html(options.join(''));\r\n\t\t\t\r\n\t\t\tif (!silent && changed) {\r\n\t\t\t\tself.$select.trigger('change');\r\n\t\t\t}\r\n\t\t\treturn self;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Get Selected Option Data (value, label, etc.)\r\n\t\t * @param {string} hash_key\r\n\t\t * @return {object|boolean}\r\n\t\t */\r\n\t\tgetSelectedOptionData: function (hash_key) {\r\n\t\t\tlet self = this,\r\n\t\t\t\tselected = self.settings.options.filter( x => x[self.settings.valueField] === hash_key );\r\n\t\t\treturn selected.length ? selected[0] : false;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Check if input is selected (in the items list )\r\n\t\t * @param {string} hash_key\r\n\t\t * @return {boolean}\r\n\t\t */\r\n\t\tisSelected: function (hash_key) {\r\n\t\t\tlet self = this;\r\n\t\t\treturn self.settings.items.filter( x => x[self.settings.valueField] === hash_key ).length > 0;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Convert input to it's best string representation.\r\n\t\t * @param {string|*} input\r\n\t\t * @return {string}\r\n\t\t */\r\n\t\thash_key: (input) => input + '',\r\n\t\t/**\r\n\t\t * Completely destroys the control and\r\n\t\t * unbinds all event listeners so that it can\r\n\t\t * be garbage collected.\r\n\t\t */\r\n\t\tdestroy: function () {\r\n\t\t\tlet self = this;\r\n\t\t\tself.$select.trigger('destroy');\r\n\t\t\tself.trigger('destroy');\r\n\t\t\tself.off();\r\n\t\t\tself.$select\r\n\t\t\t\t.html('')\r\n\t\t\t\t.append(self.revertSettings.$children)\r\n\t\t\t\t.removeAttr('tabindex')\r\n\t\t\t\t.removeClass('FancySelectInit')\r\n\t\t\t\t.attr({tabindex: self.revertSettings.tabindex})\r\n\t\t\t\t.show();\r\n\t\t\tself.$select.removeData('FancySelect');\r\n\t\t\tself.$wrapper.remove();\r\n\t\t\t\r\n\t\t\tif (--FancySelect.count === 0 && FancySelect.$testInput) {\r\n\t\t\t\tFancySelect.$testInput.remove();\r\n\t\t\t\tFancySelect.$testInput = undefined;\r\n\t\t\t} // this doesn't fire on create feed. as fields are loaded via ajax.\r\n\t\t\t// add custom event with the form object (with namespace)\r\n\t\t\t// trigger event on form.init()\r\n\t\t\t// remove previous listener on from.init(). first. so multiple listener not executed.\r\n\t\t\t// see selectize https://github.com/selectize/selectize.js/blob/master/src/selectize.js#L2097\r\n\t\t\t// add event listener here...\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$(window).off(self.eventNS);\r\n\t\t\t$(document).off(self.eventNS);\r\n\t\t\t$(document.body).off(self.eventNS);\r\n\t\t\tdelete self.$select[0].fancySelect;\r\n\t\t},\r\n\t\t\r\n\t});\r\n\t\r\n\t/**\r\n\t * MicroEvent - to make any js object an event emitter\r\n\t *\r\n\t * - pure javascript - server compatible, browser compatible\r\n\t * - dont rely on the browser doms\r\n\t * - super simple - you get it immediatly, no mistery, no magic involved\r\n\t *\r\n\t * @author Jerome Etienne (https://github.com/jeromeetienne)\r\n\t * @link https://github.com/jeromeetienne/microevent.js\r\n\t */\r\n\t$.extend(FancySelect.prototype, {\r\n\t\tbind\t: function(event, fct){\r\n\t\t\tthis._events = this._events || {};\r\n\t\t\tthis._events[event] = this._events[event]\t|| [];\r\n\t\t\tthis._events[event].push(fct);\r\n\t\t},\r\n\t\tunbind\t: function(event, fct){\r\n\t\t\tthis._events = this._events || {};\r\n\t\t\tif( event in this._events === false )\treturn;\r\n\t\t\tthis._events[event].splice(this._events[event].indexOf(fct), 1);\r\n\t\t},\r\n\t\ttrigger\t: function(event /* , args... */){\r\n\t\t\tthis._events = this._events || {};\r\n\t\t\tif( event in this._events === false )\treturn;\r\n\t\t\tfor(let i = 0; i < this._events[event].length; i++){\r\n\t\t\t\tthis._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t/**\r\n\t * jQuery Wrapper\r\n\t * @param {Object} [user_options]\r\n\t * @returns {jquery|HTMLElement}\r\n\t */\r\n\t$.fn.fancySelect = function(user_options) {\r\n\t\treturn this.each(function() {\r\n\t\t\tif (this.fancySelect) return;\r\n\t\t\tif ('select' !== this.tagName.toLowerCase()) return;\r\n\t\t\tnew FancySelect($(this), user_options);\r\n\t\t});\r\n\t};\r\n})(jQuery, window, document);\r\n"]}
1
+ {"version":3,"sources":["fancy-select.js"],"names":["$","window","document","FancySelect","$select","options","self","settings","extend","defaults","optgroups","items","placeholder","delimiter","splitOn","persist","diacritics","create","createOnBlur","createFilter","highlight","openOnFocus","maxOptions","maxItems","maxItemShow","hideSelected","addPrecedence","selectOnTab","preload","allowEmptyOption","closeAfterSelect","scrollDuration","loadThrottle","loadingClass","dataAttr","optgroupField","valueField","labelField","disabledField","optgroupLabelField","optgroupValueField","lockOptgroupOrder","sortField","searchField","searchConjunction","mode","wrapperClass","inputClass","dropdownClass","dropdownContentClass","dropdownParent","copyClassesToDropdown","render","select","computedStyle","dir","attr","test","navigator","createElement","debounce","delay","timeout","optionsMap","optHelper","readData","$el","data","JSON","addOption","$option","group","value","hash_key","arr","isArray","field_optgroup","option","addGroup","$optgroup","i","n","id","optgroup","$options","tabIndex","tagType","rtl","multiple","eventNS","highlightedValue","isBlurring","isOpen","isDisabled","isRequired","isInvalid","isLocked","isFocused","isInputHidden","isSetup","isRendered","isShiftDown","isCmdDown","isCtrlDown","ignoreFocus","ignoreBlur","ignoreHover","hasOptions","currentResults","lastValue","caretPos","loading","loadedSearches","$activeOption","$activeItems","userOptions","renderCache","onSearchChange","args","fn","apply","children","length","tagName","addClass","$wrapper","width","appendTo","setup","$children","tabindex","hide","after","a","b","e","trigger","target","closest","preventDefault","current","selected","removeClass","getSelectedOptionData","filter","x","sort","$dropdownContent","find","updatePlaceholder","updateOriginalInput","getComputedStyle","hasOwnProperty","optClass","isSelected","this","dropdownItems","_loop","push","concat","group_options","item","ii","_i","html","join","placeholderData","originalPlaceholder","text","slice","forEach","dataPlaceholder","title","dataCountPlaceholder","removeAttr","changed","silent","input","destroy","append","revertSettings","removeData","$testInput","off","body","fancySelect","prototype","bind","event","fct","_events","unbind","indexOf","Array","call","arguments","user_options","jQuery"],"mappings":"AAAA,cAQA,SAACA,EAAAC,EAAAC,GAWIC,SAAJA,EAAeC,EAAAC,GACd,IAAAC,EAAIA,KAAJC,EAAAA,EA+CCA,QAAQC,EAAKA,GA/CdC,CAEEJ,QAAAA,GACAK,UAAAA,GACAC,MAAAA,GACAC,YAAAA,GACAC,UAAAA,IACAC,QAAAA,KACAC,SAAAA,EACAC,YAAAA,EACAC,QAAAA,EACAC,cAAAA,EACAC,aAAAA,KACAC,WAAAA,EACAC,aAAAA,EACAC,WAAAA,IACAC,SAAAA,KACAC,YAAAA,EACAC,aAAAA,KACAC,eAAAA,EACAC,aAAAA,EACAC,SAAAA,EACAC,kBAAAA,EACAC,kBAAAA,EACAC,eAAAA,GACAC,aAAAA,IACAC,aAAAA,UACAC,SAAAA,YACAC,cAAAA,WACAC,WAAAA,QACAC,WAAAA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AAmC,SAAA,GA3OFF,KAAAjC,KAAAmC,UAAA,EA+OA,IAAA,IAAA9G,EAAA,EAAAA,EAAA2E,KAAAmC,QAAAA,GAAAF,OAAAlE,IAyBGiC,KAAAmC,QAAKA,GAAQF,GAAbpE,MAAuBA,KAAMyE,MAAMA,UAAMP,MAAUjB,KAAMyB,UAAKC,OASjEnM,EAACuH,GAADkE,YAAA,SAAmBW,GAxBnBpM,OAAAA,KAAEQ,KAAOL,WACRwL,KAAAA,aACC,WAAAhC,KAAAhC,QAAeA,eACf,IAAAxH,EAAAA,EAAAwJ,MAAaiC,MApehB,CAseGS,OAL8BpM,OAAAC","file":"fancy-select.min.js","sourcesContent":["\"use strict\";\n/**!\n * WooFeed Fancy Select\n * @version 1.0.0\n * @copyright 2020 WebAppick\n * @author Kudratullah <mhamudul.hk@gmail.com>\n */\n\n(function($, window, document) {\n\t// @TODO if multiple select has required attribute and only one item is selected then return false (user should not able to deselect the last one).\n\t// @TODO make the place holder with input field like selectize so we can set the required attribute if the select has required attribute, which can be useful for showing required warning.\n\t\"use strict\";\n\t\n\t/**\n\t * FancySelect Constructor\n\t * @param {jQuery|HTMLElement} $select\n\t * @param {Object} [options]\n\t * @constructor\n\t */\n\tlet FancySelect = function FancySelect($select, options) {\n\t\tlet self = this,\n\t\t\tdefaults = {\n\t\t\t\toptions: [],\n\t\t\t\toptgroups: [],\n\t\t\t\titems: [],\n\t\t\t\tplaceholder: '',\n\t\t\t\tdelimiter: ',',\n\t\t\t\tsplitOn: null,\n\t\t\t\tpersist: !0,\n\t\t\t\tdiacritics: !0,\n\t\t\t\tcreate: !1,\n\t\t\t\tcreateOnBlur: !1,\n\t\t\t\tcreateFilter: null,\n\t\t\t\thighlight: !0,\n\t\t\t\topenOnFocus: !0,\n\t\t\t\tmaxOptions: 1e3,\n\t\t\t\tmaxItems: null,\n\t\t\t\tmaxItemShow: 3,\n\t\t\t\thideSelected: null,\n\t\t\t\taddPrecedence: !1,\n\t\t\t\tselectOnTab: !1,\n\t\t\t\tpreload: !1,\n\t\t\t\tallowEmptyOption: !1,\n\t\t\t\tcloseAfterSelect: !1,\n\t\t\t\tscrollDuration: 60,\n\t\t\t\tloadThrottle: 300,\n\t\t\t\tloadingClass: \"loading\",\n\t\t\t\tdataAttr: \"data-data\",\n\t\t\t\toptgroupField: \"optgroup\",\n\t\t\t\tvalueField: \"value\",\n\t\t\t\tlabelField: \"text\",\n\t\t\t\tdisabledField: \"disabled\",\n\t\t\t\toptgroupLabelField: \"label\",\n\t\t\t\toptgroupValueField: \"value\",\n\t\t\t\tlockOptgroupOrder: !1,\n\t\t\t\tsortField: \"$order\",\n\t\t\t\tsearchField: [\"text\"],\n\t\t\t\tsearchConjunction: \"and\",\n\t\t\t\tmode: null,\n\t\t\t\twrapperClass: \"selectize-control\",\n\t\t\t\tinputClass: \"selectize-input\",\n\t\t\t\tdropdownClass: \"selectize-dropdown\",\n\t\t\t\tdropdownContentClass: \"selectize-dropdown-content\",\n\t\t\t\tdropdownParent: null,\n\t\t\t\tcopyClassesToDropdown: !0,\n\t\t\t\trender: {}\n\t\t\t},\n\t\t\tsettings = $.extend(true, {}, defaults, options),\n\t\t\tselect = $select[0];\n\t\tselect.fancySelect = self;\n\t\tself.order = 0;\n\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(select, null);\n\t\tlet dir = computedStyle ? computedStyle.getPropertyValue('direction') : select.currentStyle && select.currentStyle.direction;\n\t\tdir = dir || $select.parents('[dir]:first').attr('dir') || '';\n\t\tself.computedStyle = computedStyle; // for now, android support in general is too spotty to support validity\n\n\t\tconst SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !! document.createElement('input').validity; // helper (private) methods\n\n\t\tconst debounce = function (fn, delay) {\n\t\t\tlet timeout;\n\t\t\treturn function() {\n\t\t\t\tlet self = this;\n\t\t\t\tlet args = arguments;\n\t\t\t\twindow.clearTimeout(timeout);\n\t\t\t\ttimeout = window.setTimeout(function() {\n\t\t\t\t\tfn.apply(self, args);\n\t\t\t\t}, delay);\n\t\t\t};\n\t\t};\n\t\t\n\t\tlet optionsMap = {},\n\t\t\toptHelper = {\n\t\t\t\treadData: function ($el) {\n\t\t\t\t\tlet data = self.dataAttr && $el.attr(self.dataAttr);\n\n\t\t\t\t\tif (typeof data === 'string' && data.length) {\n\t\t\t\t\t\treturn JSON.parse(data);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t},\n\t\t\t\taddOption: function ($option, group) {\n\t\t\t\t\t$option = $($option);\n\t\t\t\t\tlet value = self.hash_key($option.val());\n\t\t\t\t\tif (!value && !settings.allowEmptyOption) return; // if the option already exists, it's probably been\n\t\t\t\t\t// duplicated in another optgroup. in this case, push\n\t\t\t\t\t// the current group to the \"optgroup\" property on the\n\t\t\t\t\t// existing option so that it's rendered in both places.\n\n\t\t\t\t\tif (optionsMap.hasOwnProperty(value)) {\n\t\t\t\t\t\tif (group) {\n\t\t\t\t\t\t\tlet arr = optionsMap[value][field_optgroup];\n\n\t\t\t\t\t\t\tif (!arr) {\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = group;\n\t\t\t\t\t\t\t} else if (!$.isArray(arr)) {\n\t\t\t\t\t\t\t\toptionsMap[value][field_optgroup] = [arr, group];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tarr.push(group);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet option = optHelper.readData($option) || {};\n\t\t\t\t\toption[self.settings.labelField] = option[self.settings.labelField] || $option.text();\n\t\t\t\t\toption[self.settings.valueField] = option[self.settings.valueField] || value;\n\t\t\t\t\toption[self.settings.disabledField] = option[self.settings.disabledField] || $option.prop('disabled');\n\t\t\t\t\toption[self.settings.optgroupField] = option[self.settings.optgroupField] || group;\n\t\t\t\t\toption.$order = ++self.order;\n\t\t\t\t\toptionsMap[value] = option;\n\t\t\t\t\tself.settings.options.push(option);\n\n\t\t\t\t\tif ($option.is(':selected')) {\n\t\t\t\t\t\tself.settings.items.push(option);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\taddGroup: function ($optgroup) {\n\t\t\t\t\tlet i, n, id, optgroup, $options;\n\t\t\t\t\t$optgroup = $($optgroup);\n\t\t\t\t\tid = $optgroup.attr('label');\n\n\t\t\t\t\tif (id) {\n\t\t\t\t\t\toptgroup = optHelper.readData($optgroup) || {};\n\t\t\t\t\t\toptgroup[self.settings.optgroupLabelField] = id;\n\t\t\t\t\t\toptgroup[self.settings.optgroupValueField] = id;\n\t\t\t\t\t\toptgroup[self.settings.disabledField] = $optgroup.prop('disabled');\n\t\t\t\t\t\toptgroup.$order = ++self.order;\n\t\t\t\t\t\tself.settings.optgroups.push(optgroup);\n\t\t\t\t\t}\n\n\t\t\t\t\t$options = $('option', $optgroup);\n\n\t\t\t\t\tfor (i = 0, n = $options.length; i < n; i++) {\n\t\t\t\t\t\toptHelper.addOption($options[i], id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}; // setup default state\n\t\t\n\t\t$.extend(self, {\n\t\t\tsettings: settings,\n\t\t\t$select: $select,\n\t\t\ttabIndex: $select.attr('tabindex') || '',\n\t\t\ttagType: 1,\n\t\t\trtl: /rtl/i.test(dir),\n\t\t\tmultiple: $select.attr('multiple'),\n\t\t\teventNS: '.FancySelect' + ++FancySelect.count,\n\t\t\thighlightedValue: null,\n\t\t\tisBlurring: false,\n\t\t\tisOpen: false,\n\t\t\tisDisabled: false,\n\t\t\tisRequired: $select.is('[required]'),\n\t\t\tisInvalid: false,\n\t\t\tisLocked: false,\n\t\t\tisFocused: false,\n\t\t\tisInputHidden: false,\n\t\t\tisSetup: false,\n\t\t\tisRendered: false,\n\t\t\tisShiftDown: false,\n\t\t\tisCmdDown: false,\n\t\t\tisCtrlDown: false,\n\t\t\tignoreFocus: false,\n\t\t\tignoreBlur: false,\n\t\t\tignoreHover: false,\n\t\t\thasOptions: false,\n\t\t\tcurrentResults: null,\n\t\t\tlastValue: '',\n\t\t\tcaretPos: 0,\n\t\t\tloading: 0,\n\t\t\tloadedSearches: {},\n\t\t\t$activeOption: null,\n\t\t\t$activeItems: [],\n\t\t\toptgroups: {},\n\t\t\toptions: {},\n\t\t\tuserOptions: {},\n\t\t\titems: {},\n\t\t\trenderCache: {},\n\t\t\tonSearchChange: settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)\n\t\t});\n\n\t\tif ('' === self.settings.placeholder) {\n\t\t\tself.settings.placeholder = $select.attr('placeholder') || $select.attr('data-placeholder');\n\n\t\t\tif (!self.settings.placeholder && !self.settings.allowEmptyOption) {\n\t\t\t\tself.settings.placeholder = $select.children('option[value=\"\"]').text();\n\t\t\t}\n\t\t}\n\n\t\tself.settings.maxItems = self.multiple ? null : 1;\n\n\t\tfor (let i = 0, n = self.$select.children().length; i < n; i++) {\n\t\t\tlet tagName = self.$select.children()[i].tagName.toLowerCase();\n\n\t\t\tif (tagName === 'optgroup') {\n\t\t\t\toptHelper.addGroup(self.$select.children()[i]);\n\t\t\t} else if (tagName === 'option') {\n\t\t\t\toptHelper.addOption(self.$select.children()[i]);\n\t\t\t}\n\t\t}\n\n\t\tself.$wrapper = $('<div class=\"fancy-picker\">').addClass($select.attr('class'));\n\n\t\tif (self.computedStyle.hasOwnProperty('width')) {\n\t\t\tself.$wrapper.css({\n\t\t\t\twidth: self.computedStyle.width\n\t\t\t});\n\t\t}\n\t\t\n\t\tself.$outputWrapper = $('<div class=\"fancy-picker-picked\">').appendTo(self.$wrapper);\n\t\tself.originalPlaceholder = $('<span class=\"fancy-picker-placeholder\">').appendTo(self.$outputWrapper);\n\t\tself.dataPlaceholder = $('<span class=\"fancy-picker-data\">').appendTo(self.$outputWrapper);\n\t\tself.dataCountPlaceholder = $('<span class=\"fancy-picker-count\">').appendTo(self.$outputWrapper);\n\t\tself.$dropdown = $('<div class=\"fancy-picker-ui\">').appendTo(self.$wrapper);\n\t\tself.$dropdownContent = $('<div class=\"fancy-picker-content\">').appendTo(self.$dropdown);\n\t\tself.setup();\n\t};\n\n\tFancySelect.count = 0;\n\t// public methods.\n\t$.extend(FancySelect.prototype, {\n\t\t/**\n\t\t * Creates all elements and sets up event bindings.\n\t\t * @return {void}\n\t\t */\n\t\tsetup: function () {\n\t\t\tlet self = this;\n\t\t\tself.revertSettings = {\n\t\t\t\t$children: self.$select.children().detach(),\n\t\t\t\ttabindex: self.$select.attr('tabindex')\n\t\t\t};\n\t\t\tself.$select.attr('tabindex', -1).hide().after(self.$wrapper);\n\t\t\tself.$select.data('FancySelect', self);\n\t\t\tself.$select.addClass('FancySelectInit');\n\t\t\t\n\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\n\t\t\t\n\t\t\t\n\t\t\tif (self.preload) {\n\t\t\t\tself.render();\n\t\t\t}\n\t\t\t\n\t\t\tself.updatePlaceholder();\n\t\t\tself.updateOriginalInput();\n\t\t\t\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-picked', function(e) {\n\t\t\t\tself.$select.trigger('show');\n\t\t\t\t\n\t\t\t\tif (!self.isRendered) {\n\t\t\t\t\tself.render();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tself.$wrapper.toggleClass('active');\n\t\t\t\tself.$select.trigger('shown');\n\t\t\t});\n\t\t\t$(document).on('click' + self.eventNS, function(e) {\n\t\t\t\tif (!$(e.target).closest(self.$wrapper).length) {\n\t\t\t\t\tself.$select.trigger('hide');\n\t\t\t\t\tself.$wrapper.removeClass('active');\n\t\t\t\t\tself.$select.trigger('hidden');\n\t\t\t\t}\n\t\t\t});\n\t\t\tself.$wrapper.on('click' + self.eventNS, '.fancy-picker-option:not(.disabled)', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tlet current = $(this),\n\t\t\t\t\tselected = false,\n\t\t\t\t\tvalue = self.hash_key(current.data('value'));\n\t\t\t\t\n\t\t\t\tif (self.multiple) {\n\t\t\t\t\tif (!current.hasClass('selected')) {\n\t\t\t\t\t\tselected = true;\n\t\t\t\t\t\tcurrent.addClass('selected');\n\t\t\t\t\t} else current.removeClass('selected');\n\t\t\t\t\t\n\t\t\t\t\tif (selected) {\n\t\t\t\t\t\tself.settings.items.push( self.getSelectedOptionData( value ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.settings.items = self.settings.items.filter( x => x[self.settings.valueField] !== value );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tself.settings.items.sort( ( a, b ) => a[self.settings.sortField] - b[self.settings.sortField] );\n\t\t\t\t} else {\n\t\t\t\t\tself.$dropdownContent.find('.fancy-picker-option').not(current).removeClass('selected');\n\t\t\t\t\tcurrent.addClass('selected');\n\t\t\t\t\tselected = true;\n\t\t\t\t\tself.settings.items = [ self.getSelectedOptionData( value ) ];\n\t\t\t\t\tself.$wrapper.removeClass('active');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tself.updatePlaceholder();\n\t\t\t\tself.updateOriginalInput();\n\t\t\t});\n\t\t\t$(window).on('resize' + self.eventNS, function() {\n\t\t\t\tlet computedStyle = window.getComputedStyle && window.getComputedStyle(self.$select[0], null);\n\t\t\t\t\n\t\t\t\tif (computedStyle.hasOwnProperty('width')) {\n\t\t\t\t\tself.$wrapper.css({\n\t\t\t\t\t\twidth: computedStyle.width\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\tself.$select.trigger('initialize');\n\t\t},\n\t\t/**\n\t\t * Render The FancySelect UI\n\t\t * @return {void}\n\t\t */\n\t\trender: function () {\n\t\t\tlet self = this,\n\t\t\t\tdropdownItems = [];\n\t\t\tconst optgroup = self.settings.optgroups;\n\t\t\tconst options = self.settings.options;\n\t\t\tconst optClass = ( value ) => self.isSelected(value) ? 'fancy-picker-option selected' : 'fancy-picker-option';\n\t\t\tif ( optgroup.length ) {\n\t\t\t\tfor ( let i = 0; i < optgroup.length; i++ ) {\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group\">` );\n\t\t\t\t\tdropdownItems.push( `<div class=\"fancy-picker-option-group-label\">${optgroup[i][self.settings.labelField]}</div>` );\n\t\t\t\t\tconst group_options = options.filter( item => item[self.settings.optgroupField] === optgroup[i][self.settings.valueField]);\n\t\t\t\t\tfor (let ii = 0; ii < group_options.length; ii++ ) {\n\t\t\t\t\t\tlet option = group_options[i];\n\t\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\n\t\t\t\t\t}\n\t\t\t\t\tdropdownItems.push( `</div>` );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < options.length; i++) {\n\t\t\t\t\tlet option = options[i];\n\t\t\t\t\tdropdownItems.push( `<div class=\"${optClass( option[self.settings.valueField] )}\" data-value=\"${option[self.settings.valueField]}\">${option[self.settings.labelField]}</div>` );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tself.$dropdownContent.html(dropdownItems.join(''));\n\t\t\tself.$select.trigger('rendered');\n\t\t\tself.isRendered = true;\n\t\t},\n\t\t/**\n\t\t * Set Placeholder & Update Selected Data Placeholder\n\t\t * @return {FancySelect}\n\t\t */\n\t\tupdatePlaceholder: function () {\n\t\t\tlet self = this,\n\t\t\t\tplaceholderData = [];\n\t\t\tconst items = self.settings.items;\n\t\t\tconst maxItemShow = items.length > self.settings.maxItemShow ? self.settings.maxItemShow - 1 : self.settings.maxItemShow;\n\t\t\tself.originalPlaceholder.text(self.settings.placeholder);\n\t\t\t\n\t\t\tif (items.length) {\n\t\t\t\tself.originalPlaceholder.hide();\n\t\t\t} else {\n\t\t\t\tself.originalPlaceholder.show();\n\t\t\t}\n\t\t\t\n\t\t\titems.slice(0, maxItemShow).forEach( (item) => {\n\t\t\t\tplaceholderData.push( `<span>${item[self.settings.labelField]}</span>` );\n\t\t\t});\n\t\t\tself.dataPlaceholder.html( placeholderData.join( `<span class=\"fancy-picker-separator\">${self.settings.delimiter}</span>` ) );\n\t\t\t\n\t\t\tif (items.length > self.settings.maxItemShow) {\n\t\t\t\tlet title = [];\n\t\t\t\titems.forEach( (item) => {\n\t\t\t\t\ttitle.push(item[self.settings.labelField]);\n\t\t\t\t});\n\t\t\t\tself.dataCountPlaceholder.attr('title', title.join(self.settings.delimiter.trim() + ' '));\n\t\t\t\tself.dataCountPlaceholder.html('+' + (items.length - maxItemShow) + ' More &hellip;');\n\t\t\t} else {\n\t\t\t\tself.dataCountPlaceholder.removeAttr('title');\n\t\t\t\tself.dataCountPlaceholder.html('');\n\t\t\t}\n\t\t\t\n\t\t\tself.$select.trigger('placeholderChanged');\n\t\t\treturn self;\n\t\t},\n\t\t/**\n\t\t * Update The Original Select Tag\n\t\t * @param {boolean} ?silent\n\t\t * @return {FancySelect}\n\t\t */\n\t\tupdateOriginalInput: function (silent) {\n\t\t\tlet self = this,\n\t\t\t\toptions = [],\n\t\t\t\tchanged = false;\n\t\t\tsilent = true === silent ? true : false;\n\t\t\tconst items = self.settings.items;\n\t\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\t\toptions.push('<option value=\"' + items[i][self.settings.valueField] + '\" selected=\"selected\">' + items[i][self.settings.labelField] || '' + '</option>');\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t\t\n\t\t\tself.$select.html(options.join(''));\n\t\t\t\n\t\t\tif (!silent && changed) {\n\t\t\t\tself.$select.trigger('change');\n\t\t\t}\n\t\t\treturn self;\n\t\t},\n\t\t/**\n\t\t * Get Selected Option Data (value, label, etc.)\n\t\t * @param {string} hash_key\n\t\t * @return {object|boolean}\n\t\t */\n\t\tgetSelectedOptionData: function (hash_key) {\n\t\t\tlet self = this,\n\t\t\t\tselected = self.settings.options.filter( x => x[self.settings.valueField] === hash_key );\n\t\t\treturn selected.length ? selected[0] : false;\n\t\t},\n\t\t/**\n\t\t * Check if input is selected (in the items list )\n\t\t * @param {string} hash_key\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelected: function (hash_key) {\n\t\t\tlet self = this;\n\t\t\treturn self.settings.items.filter( x => x[self.settings.valueField] === hash_key ).length > 0;\n\t\t},\n\t\t/**\n\t\t * Convert input to it's best string representation.\n\t\t * @param {string|*} input\n\t\t * @return {string}\n\t\t */\n\t\thash_key: (input) => input + '',\n\t\t/**\n\t\t * Completely destroys the control and\n\t\t * unbinds all event listeners so that it can\n\t\t * be garbage collected.\n\t\t */\n\t\tdestroy: function () {\n\t\t\tlet self = this;\n\t\t\tself.$select.trigger('destroy');\n\t\t\tself.trigger('destroy');\n\t\t\tself.off();\n\t\t\tself.$select\n\t\t\t\t.html('')\n\t\t\t\t.append(self.revertSettings.$children)\n\t\t\t\t.removeAttr('tabindex')\n\t\t\t\t.removeClass('FancySelectInit')\n\t\t\t\t.attr({tabindex: self.revertSettings.tabindex})\n\t\t\t\t.show();\n\t\t\tself.$select.removeData('FancySelect');\n\t\t\tself.$wrapper.remove();\n\t\t\t\n\t\t\tif (--FancySelect.count === 0 && FancySelect.$testInput) {\n\t\t\t\tFancySelect.$testInput.remove();\n\t\t\t\tFancySelect.$testInput = undefined;\n\t\t\t} // this doesn't fire on create feed. as fields are loaded via ajax.\n\t\t\t// add custom event with the form object (with namespace)\n\t\t\t// trigger event on form.init()\n\t\t\t// remove previous listener on from.init(). first. so multiple listener not executed.\n\t\t\t// see selectize https://github.com/selectize/selectize.js/blob/master/src/selectize.js#L2097\n\t\t\t// add event listener here...\n\t\t\t\n\t\t\t\n\t\t\t$(window).off(self.eventNS);\n\t\t\t$(document).off(self.eventNS);\n\t\t\t$(document.body).off(self.eventNS);\n\t\t\tdelete self.$select[0].fancySelect;\n\t\t},\n\t\t\n\t});\n\t\n\t/**\n\t * MicroEvent - to make any js object an event emitter\n\t *\n\t * - pure javascript - server compatible, browser compatible\n\t * - dont rely on the browser doms\n\t * - super simple - you get it immediatly, no mistery, no magic involved\n\t *\n\t * @author Jerome Etienne (https://github.com/jeromeetienne)\n\t * @link https://github.com/jeromeetienne/microevent.js\n\t */\n\t$.extend(FancySelect.prototype, {\n\t\tbind\t: function(event, fct){\n\t\t\tthis._events = this._events || {};\n\t\t\tthis._events[event] = this._events[event]\t|| [];\n\t\t\tthis._events[event].push(fct);\n\t\t},\n\t\tunbind\t: function(event, fct){\n\t\t\tthis._events = this._events || {};\n\t\t\tif( event in this._events === false )\treturn;\n\t\t\tthis._events[event].splice(this._events[event].indexOf(fct), 1);\n\t\t},\n\t\ttrigger\t: function(event /* , args... */){\n\t\t\tthis._events = this._events || {};\n\t\t\tif( event in this._events === false )\treturn;\n\t\t\tfor(let i = 0; i < this._events[event].length; i++){\n\t\t\t\tthis._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));\n\t\t\t}\n\t\t}\n\t});\n\t/**\n\t * jQuery Wrapper\n\t * @param {Object} [user_options]\n\t * @returns {jquery|HTMLElement}\n\t */\n\t$.fn.fancySelect = function(user_options) {\n\t\treturn this.each(function() {\n\t\t\tif (this.fancySelect) return;\n\t\t\tif ('select' !== this.tagName.toLowerCase()) return;\n\t\t\tnew FancySelect($(this), user_options);\n\t\t});\n\t};\n})(jQuery, window, document);\n"]}
admin/js/jquery-sortable.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["jquery-sortable.js"],"names":["Symbol","iterator","nested","$","pluginName","undefined","containerDefaults","drag","groupDefaults","exclude","containerPath","containerSelector","afterMove","distance","draggedClass","handle","itemPath","itemSelector","bodyClass","onDrag","isValidTarget","css","$item","position","addClass","onDragStart","container","removeClass","onMousedown","event","preventDefault","group","options","placeholderClass","removeAttr","_super","target","nodeName","match","placeholder","pullPlaceholder","parentIsContainer","result","sortable","serialize","$parent","$children","extend","data","containerGroups","groupCounter","emptyBox","subContainers","drop","subContainerKey","x","Math","i","length","d","a","b","top","offsetMethod","left","parseInt","el","getRelativePosition","element","sortByDistanceDesc","tolerance","offset","pointer","pos","distances","dimensions","outerWidth","outerHeight","dim","dropProxy","dragProxy","sort","proxy","ContainerGroup","get","this","containers","rootGroup","closestItem","item","disabled","itemDimensions","right","which","find","originalEvent","bottom","on","eventNames","start","dragInit","searchValidTarget","push","setPointer","dragInitDone","prototype","dragging","setupDelayTimer","box","itemContainer","e","toggleListeners","onCancel","detach","delayMet","clearDimensions","clearOffsetParent","relativePointer","lastPointer","sameResultBox","t","offsetParent","lastRelativePointer","getContainer","getContainerDimensions","onDrop","movePlaceholder","lastAppendedItem","$getOffsetParent","containerDimensions","setDimensions","closest","method","getPointer","getItemOffsetParent","that","distanceMet","events","$document","pageX","pageY","currentPointer","clearTimeout","abs","_mouseDelayTimer","o","touches","scroll","_clearDimensions","delay","each","setTimeout","callback","traverse","object","isValidDrag","Container","validTarget","_destroy","inUpperHalf","xCenter","inLeftHalf","index","getItemDimensions","hasChildGroup","items","getContainerGroup","childGroup","childContainers","yCenter","height","path","_serialize","width","removeData","enable","$getChildren","parent","type","isContainer","childType","children","selector","not","map","disable","off","grep","val","destroy","args","$t","API"],"mappings":"gDAAA,mBAAAA,QAAA,iBAAAA,OAAAC,4JAoCYC,SAAAC,EANgBC,EAAAC,GAOT,IAAAC,EAAA,CAPSC,MAAxB,EAUQC,MAAAA,EAGQC,QAAA,GAIRC,QAAAA,EAEAC,UAAAA,GAIAD,EAAAA,CAKAE,UAAA,aAbYF,cAAA,GAiBJC,kBAAA,SAERE,SAAA,EAGAC,MAAAA,EAEAC,OAAA,GAIAC,SAjCA,GAmCAC,aAAA,KA9BYC,UAAA,WAmCZC,aAAA,UAKQC,cAAA,WACEC,OAAAA,GAIVC,SAAAD,aAAAF,OAAA,SAAAG,EAAAC,GAIcD,EAAAA,IAAAE,IAOdC,YA7DA,SAAAH,EAAAI,GA8DQJ,EAAAD,IAAA,CACEM,OAAAA,EAAAA,cACJC,MAAAA,EAAQD,eAEdE,EAAAA,SAAAC,EAAAC,MAAAC,QAAAlB,cACAX,EAAA,QAAAqB,SAAAE,EAAAK,MAAAC,QAAAd,YAGQW,OAAAA,SAAAA,EAA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AlBtD,MAAAuD,WAAAnF,EAAAwL,KAAAtG,KAAAtD,MAAAuD,WAAA,SAAAsG,GACH,OAFDA,GAAArD,KAIJ3F,EAAAA,KAAAA,KAAWyH,OAAA,GAAA,WACPlK,EAAA2K,WAAOzF,KAAKuF,OAIRlB,IAAAA,EAAAA,CACHqB,OAFD,WAGH1F,KAlBKoE,SAAA,SAAAC,GAmBNmC,EAAOnG,UAAE,KAGJ+F,QAFD,WAGHpG,KAAAoE,SAAA,SAAAC,GAvBLA,EAAAhE,UAAA,mIAoCImG,QAAIC,WAEJzG,KAAAoE,SAAY+B,SAAI9B,GACZA,EAAIqC,eAUP5L,EAAA4C,OAXD6G,EAAAnD,UAAAuF,+NAjoBI9L","file":"jquery-sortable.min.js","sourcesContent":["/* ===================================================\r\n * jquery-sortable.js v0.9.13\r\n * http://johnny.github.com/jquery-sortable/\r\n * ===================================================\r\n * Copyright (c) 2012 Jonas von Andrian\r\n * All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without\r\n * modification, are permitted provided that the following conditions are met:\r\n * * Redistributions of source code must retain the above copyright\r\n * notice, this list of conditions and the following disclaimer.\r\n * * Redistributions in binary form must reproduce the above copyright\r\n * notice, this list of conditions and the following disclaimer in the\r\n * documentation and/or other materials provided with the distribution.\r\n * * The name of the author may not be used to endorse or promote products\r\n * derived from this software without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\r\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n * ========================================================== */\r\n/* eslint-disable */\r\n!function ( $, window, pluginName, undefined){\r\n var containerDefaults = {\r\n // If true, items can be dragged from this container\r\n drag: true,\r\n // If true, items can be droped onto this container\r\n drop: true,\r\n // Exclude items from being draggable, if the\r\n // selector matches the item\r\n exclude: \"\",\r\n // If true, search for nested containers within an item.If you nest containers,\r\n // either the original selector with which you call the plugin must only match the top containers,\r\n // or you need to specify a group (see the bootstrap nav example)\r\n nested: true,\r\n // If true, the items are assumed to be arranged vertically\r\n vertical: true\r\n }, // end container defaults\r\n groupDefaults = {\r\n // This is executed after the placeholder has been moved.\r\n // $closestItemOrContainer contains the closest item, the placeholder\r\n // has been put at or the closest empty Container, the placeholder has\r\n // been appended to.\r\n afterMove: function ($placeholder, container, $closestItemOrContainer) {\r\n },\r\n // The exact css path between the container and its items, e.g. \"> tbody\"\r\n containerPath: \"\",\r\n // The css selector of the containers\r\n containerSelector: \"ol, ul\",\r\n // Distance the mouse has to travel to start dragging\r\n distance: 0,\r\n // Time in milliseconds after mousedown until dragging should start.\r\n // This option can be used to prevent unwanted drags when clicking on an element.\r\n delay: 0,\r\n // The css selector of the drag handle\r\n handle: \"\",\r\n // The exact css path between the item and its subcontainers.\r\n // It should only match the immediate items of a container.\r\n // No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is \"> div\"\r\n itemPath: \"\",\r\n // The css selector of the items\r\n itemSelector: \"li\",\r\n // The class given to \"body\" while an item is being dragged\r\n bodyClass: \"dragging\",\r\n // The class giving to an item while being dragged\r\n draggedClass: \"dragged\",\r\n // Check if the dragged item may be inside the container.\r\n // Use with care, since the search for a valid container entails a depth first search\r\n // and may be quite expensive.\r\n isValidTarget: function ($item, container) {\r\n return true\r\n },\r\n // Executed before onDrop if placeholder is detached.\r\n // This happens if pullPlaceholder is set to false and the drop occurs outside a container.\r\n onCancel: function ($item, container, _super, event) {\r\n },\r\n // Executed at the beginning of a mouse move event.\r\n // The Placeholder has not been moved yet.\r\n onDrag: function ($item, position, _super, event) {\r\n $item.css(position)\r\n },\r\n // Called after the drag has been started,\r\n // that is the mouse button is being held down and\r\n // the mouse is moving.\r\n // The container is the closest initialized container.\r\n // Therefore it might not be the container, that actually contains the item.\r\n onDragStart: function ($item, container, _super, event) {\r\n $item.css({\r\n height: $item.outerHeight(),\r\n width: $item.outerWidth()\r\n })\r\n $item.addClass(container.group.options.draggedClass)\r\n $(\"body\").addClass(container.group.options.bodyClass)\r\n },\r\n // Called when the mouse button is being released\r\n onDrop: function ($item, container, _super, event) {\r\n $item.removeClass(container.group.options.draggedClass).removeAttr(\"style\")\r\n $(\"body\").removeClass(container.group.options.bodyClass)\r\n },\r\n // Called on mousedown. If falsy value is returned, the dragging will not start.\r\n // Ignore if element clicked is input, select or textarea\r\n onMousedown: function ($item, _super, event) {\r\n if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) {\r\n event.preventDefault()\r\n return true\r\n }\r\n },\r\n // The class of the placeholder (must match placeholder option markup)\r\n placeholderClass: \"placeholder\",\r\n // Template for the placeholder. Can be any valid jQuery input\r\n // e.g. a string, a DOM element.\r\n // The placeholder must have the class \"placeholder\"\r\n placeholder: '<li class=\"placeholder\"></li>',\r\n // If true, the position of the placeholder is calculated on every mousemove.\r\n // If false, it is only calculated when the mouse is above a container.\r\n pullPlaceholder: true,\r\n // Specifies serialization of the container group.\r\n // The pair $parent/$children is either container/items or item/subcontainers.\r\n serialize: function ($parent, $children, parentIsContainer) {\r\n var result = $.extend({}, $parent.data())\r\n\r\n if(parentIsContainer)\r\n return [$children]\r\n else if ($children[0]){\r\n result.children = $children\r\n }\r\n\r\n delete result.subContainers\r\n delete result.sortable\r\n\r\n return result\r\n },\r\n // Set tolerance while dragging. Positive values decrease sensitivity,\r\n // negative values increase it.\r\n tolerance: 0\r\n }, // end group defaults\r\n containerGroups = {},\r\n groupCounter = 0,\r\n emptyBox = {\r\n left: 0,\r\n top: 0,\r\n bottom: 0,\r\n right:0\r\n },\r\n eventNames = {\r\n start: \"touchstart.sortable mousedown.sortable\",\r\n drop: \"touchend.sortable touchcancel.sortable mouseup.sortable\",\r\n drag: \"touchmove.sortable mousemove.sortable\",\r\n scroll: \"scroll.sortable\"\r\n },\r\n subContainerKey = \"subContainers\"\r\n\r\n /*\r\n * a is Array [left, right, top, bottom]\r\n * b is array [left, top]\r\n */\r\n function d(a,b) {\r\n var x = Math.max(0, a[0] - b[0], b[0] - a[1]),\r\n y = Math.max(0, a[2] - b[1], b[1] - a[3])\r\n return x+y;\r\n }\r\n\r\n function setDimensions(array, dimensions, tolerance, useOffset) {\r\n var i = array.length,\r\n offsetMethod = useOffset ? \"offset\" : \"position\"\r\n tolerance = tolerance || 0\r\n\r\n while(i--){\r\n var el = array[i].el ? array[i].el : $(array[i]),\r\n // use fitting method\r\n pos = el[offsetMethod]()\r\n pos.left += parseInt(el.css('margin-left'), 10)\r\n pos.top += parseInt(el.css('margin-top'),10)\r\n dimensions[i] = [\r\n pos.left - tolerance,\r\n pos.left + el.outerWidth() + tolerance,\r\n pos.top - tolerance,\r\n pos.top + el.outerHeight() + tolerance\r\n ]\r\n }\r\n }\r\n\r\n function getRelativePosition(pointer, element) {\r\n var offset = element.offset()\r\n return {\r\n left: pointer.left - offset.left,\r\n top: pointer.top - offset.top\r\n }\r\n }\r\n\r\n function sortByDistanceDesc(dimensions, pointer, lastPointer) {\r\n pointer = [pointer.left, pointer.top]\r\n lastPointer = lastPointer && [lastPointer.left, lastPointer.top]\r\n\r\n var dim,\r\n i = dimensions.length,\r\n distances = []\r\n\r\n while(i--){\r\n dim = dimensions[i]\r\n distances[i] = [i,d(dim,pointer), lastPointer && d(dim, lastPointer)]\r\n }\r\n distances = distances.sort(function (a,b) {\r\n return b[1] - a[1] || b[2] - a[2] || b[0] - a[0]\r\n })\r\n\r\n // last entry is the closest\r\n return distances\r\n }\r\n\r\n function ContainerGroup(options) {\r\n this.options = $.extend({}, groupDefaults, options)\r\n this.containers = []\r\n\r\n if(!this.options.rootGroup){\r\n this.scrollProxy = $.proxy(this.scroll, this)\r\n this.dragProxy = $.proxy(this.drag, this)\r\n this.dropProxy = $.proxy(this.drop, this)\r\n this.placeholder = $(this.options.placeholder)\r\n\r\n if(!options.isValidTarget)\r\n this.options.isValidTarget = undefined\r\n }\r\n }\r\n\r\n ContainerGroup.get = function (options) {\r\n if(!containerGroups[options.group]) {\r\n if(options.group === undefined)\r\n options.group = groupCounter ++\r\n\r\n containerGroups[options.group] = new ContainerGroup(options)\r\n }\r\n\r\n return containerGroups[options.group]\r\n }\r\n\r\n ContainerGroup.prototype = {\r\n dragInit: function (e, itemContainer) {\r\n this.$document = $(itemContainer.el[0].ownerDocument)\r\n\r\n // get item to drag\r\n var closestItem = $(e.target).closest(this.options.itemSelector);\r\n // using the length of this item, prevents the plugin from being started if there is no handle being clicked on.\r\n // this may also be helpful in instantiating multidrag.\r\n if (closestItem.length) {\r\n this.item = closestItem;\r\n this.itemContainer = itemContainer;\r\n if (this.item.is(this.options.exclude) || !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)) {\r\n return;\r\n }\r\n this.setPointer(e);\r\n this.toggleListeners('on');\r\n this.setupDelayTimer();\r\n this.dragInitDone = true;\r\n }\r\n },\r\n drag: function (e) {\r\n if(!this.dragging){\r\n if(!this.distanceMet(e) || !this.delayMet)\r\n return\r\n\r\n this.options.onDragStart(this.item, this.itemContainer, groupDefaults.onDragStart, e)\r\n this.item.before(this.placeholder)\r\n this.dragging = true\r\n }\r\n\r\n this.setPointer(e)\r\n // place item under the cursor\r\n this.options.onDrag(this.item,\r\n getRelativePosition(this.pointer, this.item.offsetParent()),\r\n groupDefaults.onDrag,\r\n e)\r\n\r\n var p = this.getPointer(e),\r\n box = this.sameResultBox,\r\n t = this.options.tolerance\r\n\r\n if(!box || box.top - t > p.top || box.bottom + t < p.top || box.left - t > p.left || box.right + t < p.left)\r\n if(!this.searchValidTarget()){\r\n this.placeholder.detach()\r\n this.lastAppendedItem = undefined\r\n }\r\n },\r\n drop: function (e) {\r\n this.toggleListeners('off')\r\n\r\n this.dragInitDone = false\r\n\r\n if(this.dragging){\r\n // processing Drop, check if placeholder is detached\r\n if(this.placeholder.closest(\"html\")[0]){\r\n this.placeholder.before(this.item).detach()\r\n } else {\r\n this.options.onCancel(this.item, this.itemContainer, groupDefaults.onCancel, e)\r\n }\r\n this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e)\r\n\r\n // cleanup\r\n this.clearDimensions()\r\n this.clearOffsetParent()\r\n this.lastAppendedItem = this.sameResultBox = undefined\r\n this.dragging = false\r\n }\r\n },\r\n searchValidTarget: function (pointer, lastPointer) {\r\n if(!pointer){\r\n pointer = this.relativePointer || this.pointer\r\n lastPointer = this.lastRelativePointer || this.lastPointer\r\n }\r\n\r\n var distances = sortByDistanceDesc(this.getContainerDimensions(),\r\n pointer,\r\n lastPointer),\r\n i = distances.length\r\n\r\n while(i--){\r\n var index = distances[i][0],\r\n distance = distances[i][1]\r\n\r\n if(!distance || this.options.pullPlaceholder){\r\n var container = this.containers[index]\r\n if(!container.disabled){\r\n if(!this.$getOffsetParent()){\r\n var offsetParent = container.getItemOffsetParent()\r\n pointer = getRelativePosition(pointer, offsetParent)\r\n lastPointer = getRelativePosition(lastPointer, offsetParent)\r\n }\r\n if(container.searchValidTarget(pointer, lastPointer))\r\n return true\r\n }\r\n }\r\n }\r\n if(this.sameResultBox)\r\n this.sameResultBox = undefined\r\n },\r\n movePlaceholder: function (container, item, method, sameResultBox) {\r\n var lastAppendedItem = this.lastAppendedItem\r\n if(!sameResultBox && lastAppendedItem && lastAppendedItem[0] === item[0])\r\n return;\r\n\r\n item[method](this.placeholder)\r\n this.lastAppendedItem = item\r\n this.sameResultBox = sameResultBox\r\n this.options.afterMove(this.placeholder, container, item)\r\n },\r\n getContainerDimensions: function () {\r\n if(!this.containerDimensions)\r\n setDimensions(this.containers, this.containerDimensions = [], this.options.tolerance, !this.$getOffsetParent())\r\n return this.containerDimensions\r\n },\r\n getContainer: function (element) {\r\n return element.closest(this.options.containerSelector).data(pluginName)\r\n },\r\n $getOffsetParent: function () {\r\n if(this.offsetParent === undefined){\r\n var i = this.containers.length - 1,\r\n offsetParent = this.containers[i].getItemOffsetParent()\r\n\r\n if(!this.options.rootGroup){\r\n while(i--){\r\n if(offsetParent[0] != this.containers[i].getItemOffsetParent()[0]){\r\n // If every container has the same offset parent,\r\n // use position() which is relative to this parent,\r\n // otherwise use offset()\r\n // compare #setDimensions\r\n offsetParent = false\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.offsetParent = offsetParent\r\n }\r\n return this.offsetParent\r\n },\r\n setPointer: function (e) {\r\n var pointer = this.getPointer(e)\r\n\r\n if(this.$getOffsetParent()){\r\n var relativePointer = getRelativePosition(pointer, this.$getOffsetParent())\r\n this.lastRelativePointer = this.relativePointer\r\n this.relativePointer = relativePointer\r\n }\r\n\r\n this.lastPointer = this.pointer\r\n this.pointer = pointer\r\n },\r\n distanceMet: function (e) {\r\n var currentPointer = this.getPointer(e)\r\n return (Math.max(\r\n Math.abs(this.pointer.left - currentPointer.left),\r\n Math.abs(this.pointer.top - currentPointer.top)\r\n ) >= this.options.distance)\r\n },\r\n getPointer: function(e) {\r\n var o = e.originalEvent || e.originalEvent.touches && e.originalEvent.touches[0]\r\n return {\r\n left: e.pageX || o.pageX,\r\n top: e.pageY || o.pageY\r\n }\r\n },\r\n setupDelayTimer: function () {\r\n var that = this\r\n this.delayMet = !this.options.delay\r\n\r\n // init delay timer if needed\r\n if (!this.delayMet) {\r\n clearTimeout(this._mouseDelayTimer);\r\n this._mouseDelayTimer = setTimeout(function() {\r\n that.delayMet = true\r\n }, this.options.delay)\r\n }\r\n },\r\n scroll: function (e) {\r\n this.clearDimensions()\r\n this.clearOffsetParent() // TODO is this needed?\r\n },\r\n toggleListeners: function (method) {\r\n var that = this,\r\n events = ['drag','drop','scroll']\r\n\r\n $.each(events,function (i,event) {\r\n that.$document[method](eventNames[event], that[event + 'Proxy'])\r\n })\r\n },\r\n clearOffsetParent: function () {\r\n this.offsetParent = undefined\r\n },\r\n // Recursively clear container and item dimensions\r\n clearDimensions: function () {\r\n this.traverse(function(object){\r\n object._clearDimensions()\r\n })\r\n },\r\n traverse: function(callback) {\r\n callback(this)\r\n var i = this.containers.length\r\n while(i--){\r\n this.containers[i].traverse(callback)\r\n }\r\n },\r\n _clearDimensions: function(){\r\n this.containerDimensions = undefined\r\n },\r\n _destroy: function () {\r\n containerGroups[this.options.group] = undefined\r\n }\r\n }\r\n\r\n function Container(element, options) {\r\n this.el = element\r\n this.options = $.extend( {}, containerDefaults, options)\r\n\r\n this.group = ContainerGroup.get(this.options)\r\n this.rootGroup = this.options.rootGroup || this.group\r\n this.handle = this.rootGroup.options.handle || this.rootGroup.options.itemSelector\r\n\r\n var itemPath = this.rootGroup.options.itemPath\r\n this.target = itemPath ? this.el.find(itemPath) : this.el\r\n\r\n this.target.on(eventNames.start, this.handle, $.proxy(this.dragInit, this))\r\n\r\n if(this.options.drop)\r\n this.group.containers.push(this)\r\n }\r\n\r\n Container.prototype = {\r\n dragInit: function (e) {\r\n var rootGroup = this.rootGroup\r\n\r\n if( !this.disabled &&\r\n !rootGroup.dragInitDone &&\r\n this.options.drag &&\r\n this.isValidDrag(e)) {\r\n rootGroup.dragInit(e, this)\r\n }\r\n },\r\n isValidDrag: function(e) {\r\n return e.which == 1 ||\r\n e.type == \"touchstart\" && e.originalEvent.touches.length == 1\r\n },\r\n searchValidTarget: function (pointer, lastPointer) {\r\n var distances = sortByDistanceDesc(this.getItemDimensions(),\r\n pointer,\r\n lastPointer),\r\n i = distances.length,\r\n rootGroup = this.rootGroup,\r\n validTarget = !rootGroup.options.isValidTarget ||\r\n rootGroup.options.isValidTarget(rootGroup.item, this)\r\n\r\n if(!i && validTarget){\r\n rootGroup.movePlaceholder(this, this.target, \"append\")\r\n return true\r\n } else\r\n while(i--){\r\n var index = distances[i][0],\r\n distance = distances[i][1]\r\n if(!distance && this.hasChildGroup(index)){\r\n var found = this.getContainerGroup(index).searchValidTarget(pointer, lastPointer)\r\n if(found)\r\n return true\r\n }\r\n else if(validTarget){\r\n this.movePlaceholder(index, pointer)\r\n return true\r\n }\r\n }\r\n },\r\n movePlaceholder: function (index, pointer) {\r\n var item = $(this.items[index]),\r\n dim = this.itemDimensions[index],\r\n method = \"after\",\r\n width = item.outerWidth(),\r\n height = item.outerHeight(),\r\n offset = item.offset(),\r\n sameResultBox = {\r\n left: offset.left,\r\n right: offset.left + width,\r\n top: offset.top,\r\n bottom: offset.top + height\r\n }\r\n if(this.options.vertical){\r\n var yCenter = (dim[2] + dim[3]) / 2,\r\n inUpperHalf = pointer.top <= yCenter\r\n if(inUpperHalf){\r\n method = \"before\"\r\n sameResultBox.bottom -= height / 2\r\n } else\r\n sameResultBox.top += height / 2\r\n } else {\r\n var xCenter = (dim[0] + dim[1]) / 2,\r\n inLeftHalf = pointer.left <= xCenter\r\n if(inLeftHalf){\r\n method = \"before\"\r\n sameResultBox.right -= width / 2\r\n } else\r\n sameResultBox.left += width / 2\r\n }\r\n if(this.hasChildGroup(index))\r\n sameResultBox = emptyBox\r\n this.rootGroup.movePlaceholder(this, item, method, sameResultBox)\r\n },\r\n getItemDimensions: function () {\r\n if(!this.itemDimensions){\r\n this.items = this.$getChildren(this.el, \"item\").filter(\r\n \":not(.\" + this.group.options.placeholderClass + \", .\" + this.group.options.draggedClass + \")\"\r\n ).get()\r\n setDimensions(this.items, this.itemDimensions = [], this.options.tolerance)\r\n }\r\n return this.itemDimensions\r\n },\r\n getItemOffsetParent: function () {\r\n var offsetParent,\r\n el = this.el\r\n // Since el might be empty we have to check el itself and\r\n // can not do something like el.children().first().offsetParent()\r\n if(el.css(\"position\") === \"relative\" || el.css(\"position\") === \"absolute\" || el.css(\"position\") === \"fixed\")\r\n offsetParent = el\r\n else\r\n offsetParent = el.offsetParent()\r\n return offsetParent\r\n },\r\n hasChildGroup: function (index) {\r\n return this.options.nested && this.getContainerGroup(index)\r\n },\r\n getContainerGroup: function (index) {\r\n var childGroup = $.data(this.items[index], subContainerKey)\r\n if( childGroup === undefined){\r\n var childContainers = this.$getChildren(this.items[index], \"container\")\r\n childGroup = false\r\n\r\n if(childContainers[0]){\r\n var options = $.extend({}, this.options, {\r\n rootGroup: this.rootGroup,\r\n group: groupCounter ++\r\n })\r\n childGroup = childContainers[pluginName](options).data(pluginName).group\r\n }\r\n $.data(this.items[index], subContainerKey, childGroup)\r\n }\r\n return childGroup\r\n },\r\n $getChildren: function (parent, type) {\r\n var options = this.rootGroup.options,\r\n path = options[type + \"Path\"],\r\n selector = options[type + \"Selector\"]\r\n\r\n parent = $(parent)\r\n if(path)\r\n parent = parent.find(path)\r\n\r\n return parent.children(selector)\r\n },\r\n _serialize: function (parent, isContainer) {\r\n var that = this,\r\n childType = isContainer ? \"item\" : \"container\",\r\n\r\n children = this.$getChildren(parent, childType).not(this.options.exclude).map(function () {\r\n return that._serialize($(this), !isContainer)\r\n }).get()\r\n\r\n return this.rootGroup.options.serialize(parent, children, isContainer)\r\n },\r\n traverse: function(callback) {\r\n $.each(this.items || [], function(item){\r\n var group = $.data(this, subContainerKey)\r\n if(group)\r\n group.traverse(callback)\r\n });\r\n\r\n callback(this)\r\n },\r\n _clearDimensions: function () {\r\n this.itemDimensions = undefined\r\n },\r\n _destroy: function() {\r\n var that = this;\r\n\r\n this.target.off(eventNames.start, this.handle);\r\n this.el.removeData(pluginName)\r\n\r\n if(this.options.drop)\r\n this.group.containers = $.grep(this.group.containers, function(val){\r\n return val != that\r\n })\r\n\r\n $.each(this.items || [], function(){\r\n $.removeData(this, subContainerKey)\r\n })\r\n }\r\n }\r\n\r\n var API = {\r\n enable: function() {\r\n this.traverse(function(object){\r\n object.disabled = false\r\n })\r\n },\r\n disable: function (){\r\n this.traverse(function(object){\r\n object.disabled = true\r\n })\r\n },\r\n serialize: function () {\r\n return this._serialize(this.el, true)\r\n },\r\n refresh: function() {\r\n this.traverse(function(object){\r\n object._clearDimensions()\r\n })\r\n },\r\n destroy: function () {\r\n this.traverse(function(object){\r\n object._destroy();\r\n })\r\n }\r\n }\r\n\r\n $.extend(Container.prototype, API)\r\n\r\n /**\r\n * jQuery API\r\n *\r\n * Parameters are\r\n * either options on init\r\n * or a method name followed by arguments to pass to the method\r\n */\r\n $.fn[pluginName] = function(methodOrOptions) {\r\n var args = Array.prototype.slice.call(arguments, 1)\r\n\r\n return this.map(function(){\r\n var $t = $(this),\r\n object = $t.data(pluginName)\r\n\r\n if(object && API[methodOrOptions])\r\n return API[methodOrOptions].apply(object, args) || this\r\n else if(!object && (methodOrOptions === undefined ||\r\n typeof methodOrOptions === \"object\"))\r\n $t.data(pluginName, new Container($t, methodOrOptions))\r\n\r\n return this\r\n });\r\n };\r\n\r\n}(jQuery, window, 'wf_sortable');\r\n"]}
1
+ {"version":3,"sources":["jquery-sortable.js"],"names":["Symbol","iterator","nested","$","pluginName","undefined","containerDefaults","drag","groupDefaults","exclude","containerPath","containerSelector","afterMove","distance","draggedClass","handle","itemPath","itemSelector","bodyClass","onDrag","isValidTarget","css","$item","position","addClass","onDragStart","container","removeClass","onMousedown","event","preventDefault","group","options","placeholderClass","removeAttr","_super","target","nodeName","match","placeholder","pullPlaceholder","parentIsContainer","result","sortable","serialize","$parent","$children","extend","data","containerGroups","groupCounter","emptyBox","subContainers","drop","subContainerKey","x","Math","i","length","d","a","b","top","offsetMethod","left","parseInt","el","getRelativePosition","element","sortByDistanceDesc","tolerance","offset","pointer","pos","distances","dimensions","outerWidth","outerHeight","dim","dropProxy","dragProxy","sort","proxy","ContainerGroup","get","this","containers","rootGroup","closestItem","item","disabled","itemDimensions","right","which","find","originalEvent","bottom","on","eventNames","start","dragInit","searchValidTarget","push","setPointer","dragInitDone","prototype","dragging","setupDelayTimer","box","itemContainer","e","toggleListeners","onCancel","detach","delayMet","clearDimensions","clearOffsetParent","relativePointer","lastPointer","sameResultBox","t","offsetParent","lastRelativePointer","getContainer","getContainerDimensions","onDrop","movePlaceholder","lastAppendedItem","$getOffsetParent","containerDimensions","setDimensions","closest","method","getPointer","getItemOffsetParent","that","distanceMet","events","$document","pageX","pageY","currentPointer","clearTimeout","abs","_mouseDelayTimer","o","touches","scroll","_clearDimensions","delay","each","setTimeout","callback","traverse","object","isValidDrag","Container","validTarget","_destroy","inUpperHalf","xCenter","inLeftHalf","index","getItemDimensions","hasChildGroup","items","getContainerGroup","childGroup","childContainers","yCenter","height","path","_serialize","width","removeData","enable","$getChildren","parent","type","isContainer","childType","children","selector","not","map","disable","off","grep","val","destroy","args","$t","API"],"mappings":"gDAAA,mBAAAA,QAAA,iBAAAA,OAAAC,4JAoCYC,SAAAC,EANgBC,EAAAC,GAOT,IAAAC,EAAA,CAPSC,MAAxB,EAUQC,MAAAA,EAGQC,QAAA,GAIRC,QAAAA,EAEAC,UAAAA,GAIAD,EAAAA,CAKAE,UAAA,aAbYF,cAAA,GAiBJC,kBAAA,SAERE,SAAA,EAGAC,MAAAA,EAEAC,OAAA,GAIAC,SAjCA,GAmCAC,aAAA,KA9BYC,UAAA,WAmCZC,aAAA,UAKQC,cAAA,WACEC,OAAAA,GAIVC,SAAAD,aAAAF,OAAA,SAAAG,EAAAC,GAIcD,EAAAA,IAAAE,IAOdC,YA7DA,SAAAH,EAAAI,GA8DQJ,EAAAD,IAAA,CACEM,OAAAA,EAAAA,cACJC,MAAAA,EAAQD,eAEdE,EAAAA,SAAAC,EAAAC,MAAAC,QAAAlB,cACAX,EAAA,QAAAqB,SAAAE,EAAAK,MAAAC,QAAAd,YAGQW,OAAAA,SAAAA,EAAAA,GACAI,E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AuD,WAAAnF,EAAAwL,KAAAtG,KAAAtD,MAAAuD,WAAA,SAAAsG,GACH,OAFDA,GAAArD,KAIJ3F,EAAAA,KAAAA,KAAWyH,OAAA,GAAA,WACPlK,EAAA2K,WAAOzF,KAAKuF,OAIRlB,IAAAA,EAAAA,CACHqB,OAFD,WAGH1F,KAlBKoE,SAAA,SAAAC,GAmBNmC,EAAOnG,UAAE,KAGJ+F,QAFD,WAGHpG,KAAAoE,SAAA,SAAAC,GAvBLA,EAAAhE,UAAA,mIAoCImG,QAAIC,WAEJzG,KAAAoE,SAAY+B,SAAI9B,GACZA,EAAIqC,eAUP5L,EAAA4C,OAXD6G,EAAAnD,UAAAuF,+NAjoBI9L","file":"jquery-sortable.min.js","sourcesContent":["/* ===================================================\n * jquery-sortable.js v0.9.13\n * http://johnny.github.com/jquery-sortable/\n * ===================================================\n * Copyright (c) 2012 Jonas von Andrian\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n * ========================================================== */\n/* eslint-disable */\n!function ( $, window, pluginName, undefined){\n var containerDefaults = {\n // If true, items can be dragged from this container\n drag: true,\n // If true, items can be droped onto this container\n drop: true,\n // Exclude items from being draggable, if the\n // selector matches the item\n exclude: \"\",\n // If true, search for nested containers within an item.If you nest containers,\n // either the original selector with which you call the plugin must only match the top containers,\n // or you need to specify a group (see the bootstrap nav example)\n nested: true,\n // If true, the items are assumed to be arranged vertically\n vertical: true\n }, // end container defaults\n groupDefaults = {\n // This is executed after the placeholder has been moved.\n // $closestItemOrContainer contains the closest item, the placeholder\n // has been put at or the closest empty Container, the placeholder has\n // been appended to.\n afterMove: function ($placeholder, container, $closestItemOrContainer) {\n },\n // The exact css path between the container and its items, e.g. \"> tbody\"\n containerPath: \"\",\n // The css selector of the containers\n containerSelector: \"ol, ul\",\n // Distance the mouse has to travel to start dragging\n distance: 0,\n // Time in milliseconds after mousedown until dragging should start.\n // This option can be used to prevent unwanted drags when clicking on an element.\n delay: 0,\n // The css selector of the drag handle\n handle: \"\",\n // The exact css path between the item and its subcontainers.\n // It should only match the immediate items of a container.\n // No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is \"> div\"\n itemPath: \"\",\n // The css selector of the items\n itemSelector: \"li\",\n // The class given to \"body\" while an item is being dragged\n bodyClass: \"dragging\",\n // The class giving to an item while being dragged\n draggedClass: \"dragged\",\n // Check if the dragged item may be inside the container.\n // Use with care, since the search for a valid container entails a depth first search\n // and may be quite expensive.\n isValidTarget: function ($item, container) {\n return true\n },\n // Executed before onDrop if placeholder is detached.\n // This happens if pullPlaceholder is set to false and the drop occurs outside a container.\n onCancel: function ($item, container, _super, event) {\n },\n // Executed at the beginning of a mouse move event.\n // The Placeholder has not been moved yet.\n onDrag: function ($item, position, _super, event) {\n $item.css(position)\n },\n // Called after the drag has been started,\n // that is the mouse button is being held down and\n // the mouse is moving.\n // The container is the closest initialized container.\n // Therefore it might not be the container, that actually contains the item.\n onDragStart: function ($item, container, _super, event) {\n $item.css({\n height: $item.outerHeight(),\n width: $item.outerWidth()\n })\n $item.addClass(container.group.options.draggedClass)\n $(\"body\").addClass(container.group.options.bodyClass)\n },\n // Called when the mouse button is being released\n onDrop: function ($item, container, _super, event) {\n $item.removeClass(container.group.options.draggedClass).removeAttr(\"style\")\n $(\"body\").removeClass(container.group.options.bodyClass)\n },\n // Called on mousedown. If falsy value is returned, the dragging will not start.\n // Ignore if element clicked is input, select or textarea\n onMousedown: function ($item, _super, event) {\n if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) {\n event.preventDefault()\n return true\n }\n },\n // The class of the placeholder (must match placeholder option markup)\n placeholderClass: \"placeholder\",\n // Template for the placeholder. Can be any valid jQuery input\n // e.g. a string, a DOM element.\n // The placeholder must have the class \"placeholder\"\n placeholder: '<li class=\"placeholder\"></li>',\n // If true, the position of the placeholder is calculated on every mousemove.\n // If false, it is only calculated when the mouse is above a container.\n pullPlaceholder: true,\n // Specifies serialization of the container group.\n // The pair $parent/$children is either container/items or item/subcontainers.\n serialize: function ($parent, $children, parentIsContainer) {\n var result = $.extend({}, $parent.data())\n\n if(parentIsContainer)\n return [$children]\n else if ($children[0]){\n result.children = $children\n }\n\n delete result.subContainers\n delete result.sortable\n\n return result\n },\n // Set tolerance while dragging. Positive values decrease sensitivity,\n // negative values increase it.\n tolerance: 0\n }, // end group defaults\n containerGroups = {},\n groupCounter = 0,\n emptyBox = {\n left: 0,\n top: 0,\n bottom: 0,\n right:0\n },\n eventNames = {\n start: \"touchstart.sortable mousedown.sortable\",\n drop: \"touchend.sortable touchcancel.sortable mouseup.sortable\",\n drag: \"touchmove.sortable mousemove.sortable\",\n scroll: \"scroll.sortable\"\n },\n subContainerKey = \"subContainers\"\n\n /*\n * a is Array [left, right, top, bottom]\n * b is array [left, top]\n */\n function d(a,b) {\n var x = Math.max(0, a[0] - b[0], b[0] - a[1]),\n y = Math.max(0, a[2] - b[1], b[1] - a[3])\n return x+y;\n }\n\n function setDimensions(array, dimensions, tolerance, useOffset) {\n var i = array.length,\n offsetMethod = useOffset ? \"offset\" : \"position\"\n tolerance = tolerance || 0\n\n while(i--){\n var el = array[i].el ? array[i].el : $(array[i]),\n // use fitting method\n pos = el[offsetMethod]()\n pos.left += parseInt(el.css('margin-left'), 10)\n pos.top += parseInt(el.css('margin-top'),10)\n dimensions[i] = [\n pos.left - tolerance,\n pos.left + el.outerWidth() + tolerance,\n pos.top - tolerance,\n pos.top + el.outerHeight() + tolerance\n ]\n }\n }\n\n function getRelativePosition(pointer, element) {\n var offset = element.offset()\n return {\n left: pointer.left - offset.left,\n top: pointer.top - offset.top\n }\n }\n\n function sortByDistanceDesc(dimensions, pointer, lastPointer) {\n pointer = [pointer.left, pointer.top]\n lastPointer = lastPointer && [lastPointer.left, lastPointer.top]\n\n var dim,\n i = dimensions.length,\n distances = []\n\n while(i--){\n dim = dimensions[i]\n distances[i] = [i,d(dim,pointer), lastPointer && d(dim, lastPointer)]\n }\n distances = distances.sort(function (a,b) {\n return b[1] - a[1] || b[2] - a[2] || b[0] - a[0]\n })\n\n // last entry is the closest\n return distances\n }\n\n function ContainerGroup(options) {\n this.options = $.extend({}, groupDefaults, options)\n this.containers = []\n\n if(!this.options.rootGroup){\n this.scrollProxy = $.proxy(this.scroll, this)\n this.dragProxy = $.proxy(this.drag, this)\n this.dropProxy = $.proxy(this.drop, this)\n this.placeholder = $(this.options.placeholder)\n\n if(!options.isValidTarget)\n this.options.isValidTarget = undefined\n }\n }\n\n ContainerGroup.get = function (options) {\n if(!containerGroups[options.group]) {\n if(options.group === undefined)\n options.group = groupCounter ++\n\n containerGroups[options.group] = new ContainerGroup(options)\n }\n\n return containerGroups[options.group]\n }\n\n ContainerGroup.prototype = {\n dragInit: function (e, itemContainer) {\n this.$document = $(itemContainer.el[0].ownerDocument)\n\n // get item to drag\n var closestItem = $(e.target).closest(this.options.itemSelector);\n // using the length of this item, prevents the plugin from being started if there is no handle being clicked on.\n // this may also be helpful in instantiating multidrag.\n if (closestItem.length) {\n this.item = closestItem;\n this.itemContainer = itemContainer;\n if (this.item.is(this.options.exclude) || !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)) {\n return;\n }\n this.setPointer(e);\n this.toggleListeners('on');\n this.setupDelayTimer();\n this.dragInitDone = true;\n }\n },\n drag: function (e) {\n if(!this.dragging){\n if(!this.distanceMet(e) || !this.delayMet)\n return\n\n this.options.onDragStart(this.item, this.itemContainer, groupDefaults.onDragStart, e)\n this.item.before(this.placeholder)\n this.dragging = true\n }\n\n this.setPointer(e)\n // place item under the cursor\n this.options.onDrag(this.item,\n getRelativePosition(this.pointer, this.item.offsetParent()),\n groupDefaults.onDrag,\n e)\n\n var p = this.getPointer(e),\n box = this.sameResultBox,\n t = this.options.tolerance\n\n if(!box || box.top - t > p.top || box.bottom + t < p.top || box.left - t > p.left || box.right + t < p.left)\n if(!this.searchValidTarget()){\n this.placeholder.detach()\n this.lastAppendedItem = undefined\n }\n },\n drop: function (e) {\n this.toggleListeners('off')\n\n this.dragInitDone = false\n\n if(this.dragging){\n // processing Drop, check if placeholder is detached\n if(this.placeholder.closest(\"html\")[0]){\n this.placeholder.before(this.item).detach()\n } else {\n this.options.onCancel(this.item, this.itemContainer, groupDefaults.onCancel, e)\n }\n this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e)\n\n // cleanup\n this.clearDimensions()\n this.clearOffsetParent()\n this.lastAppendedItem = this.sameResultBox = undefined\n this.dragging = false\n }\n },\n searchValidTarget: function (pointer, lastPointer) {\n if(!pointer){\n pointer = this.relativePointer || this.pointer\n lastPointer = this.lastRelativePointer || this.lastPointer\n }\n\n var distances = sortByDistanceDesc(this.getContainerDimensions(),\n pointer,\n lastPointer),\n i = distances.length\n\n while(i--){\n var index = distances[i][0],\n distance = distances[i][1]\n\n if(!distance || this.options.pullPlaceholder){\n var container = this.containers[index]\n if(!container.disabled){\n if(!this.$getOffsetParent()){\n var offsetParent = container.getItemOffsetParent()\n pointer = getRelativePosition(pointer, offsetParent)\n lastPointer = getRelativePosition(lastPointer, offsetParent)\n }\n if(container.searchValidTarget(pointer, lastPointer))\n return true\n }\n }\n }\n if(this.sameResultBox)\n this.sameResultBox = undefined\n },\n movePlaceholder: function (container, item, method, sameResultBox) {\n var lastAppendedItem = this.lastAppendedItem\n if(!sameResultBox && lastAppendedItem && lastAppendedItem[0] === item[0])\n return;\n\n item[method](this.placeholder)\n this.lastAppendedItem = item\n this.sameResultBox = sameResultBox\n this.options.afterMove(this.placeholder, container, item)\n },\n getContainerDimensions: function () {\n if(!this.containerDimensions)\n setDimensions(this.containers, this.containerDimensions = [], this.options.tolerance, !this.$getOffsetParent())\n return this.containerDimensions\n },\n getContainer: function (element) {\n return element.closest(this.options.containerSelector).data(pluginName)\n },\n $getOffsetParent: function () {\n if(this.offsetParent === undefined){\n var i = this.containers.length - 1,\n offsetParent = this.containers[i].getItemOffsetParent()\n\n if(!this.options.rootGroup){\n while(i--){\n if(offsetParent[0] != this.containers[i].getItemOffsetParent()[0]){\n // If every container has the same offset parent,\n // use position() which is relative to this parent,\n // otherwise use offset()\n // compare #setDimensions\n offsetParent = false\n break;\n }\n }\n }\n\n this.offsetParent = offsetParent\n }\n return this.offsetParent\n },\n setPointer: function (e) {\n var pointer = this.getPointer(e)\n\n if(this.$getOffsetParent()){\n var relativePointer = getRelativePosition(pointer, this.$getOffsetParent())\n this.lastRelativePointer = this.relativePointer\n this.relativePointer = relativePointer\n }\n\n this.lastPointer = this.pointer\n this.pointer = pointer\n },\n distanceMet: function (e) {\n var currentPointer = this.getPointer(e)\n return (Math.max(\n Math.abs(this.pointer.left - currentPointer.left),\n Math.abs(this.pointer.top - currentPointer.top)\n ) >= this.options.distance)\n },\n getPointer: function(e) {\n var o = e.originalEvent || e.originalEvent.touches && e.originalEvent.touches[0]\n return {\n left: e.pageX || o.pageX,\n top: e.pageY || o.pageY\n }\n },\n setupDelayTimer: function () {\n var that = this\n this.delayMet = !this.options.delay\n\n // init delay timer if needed\n if (!this.delayMet) {\n clearTimeout(this._mouseDelayTimer);\n this._mouseDelayTimer = setTimeout(function() {\n that.delayMet = true\n }, this.options.delay)\n }\n },\n scroll: function (e) {\n this.clearDimensions()\n this.clearOffsetParent() // TODO is this needed?\n },\n toggleListeners: function (method) {\n var that = this,\n events = ['drag','drop','scroll']\n\n $.each(events,function (i,event) {\n that.$document[method](eventNames[event], that[event + 'Proxy'])\n })\n },\n clearOffsetParent: function () {\n this.offsetParent = undefined\n },\n // Recursively clear container and item dimensions\n clearDimensions: function () {\n this.traverse(function(object){\n object._clearDimensions()\n })\n },\n traverse: function(callback) {\n callback(this)\n var i = this.containers.length\n while(i--){\n this.containers[i].traverse(callback)\n }\n },\n _clearDimensions: function(){\n this.containerDimensions = undefined\n },\n _destroy: function () {\n containerGroups[this.options.group] = undefined\n }\n }\n\n function Container(element, options) {\n this.el = element\n this.options = $.extend( {}, containerDefaults, options)\n\n this.group = ContainerGroup.get(this.options)\n this.rootGroup = this.options.rootGroup || this.group\n this.handle = this.rootGroup.options.handle || this.rootGroup.options.itemSelector\n\n var itemPath = this.rootGroup.options.itemPath\n this.target = itemPath ? this.el.find(itemPath) : this.el\n\n this.target.on(eventNames.start, this.handle, $.proxy(this.dragInit, this))\n\n if(this.options.drop)\n this.group.containers.push(this)\n }\n\n Container.prototype = {\n dragInit: function (e) {\n var rootGroup = this.rootGroup\n\n if( !this.disabled &&\n !rootGroup.dragInitDone &&\n this.options.drag &&\n this.isValidDrag(e)) {\n rootGroup.dragInit(e, this)\n }\n },\n isValidDrag: function(e) {\n return e.which == 1 ||\n e.type == \"touchstart\" && e.originalEvent.touches.length == 1\n },\n searchValidTarget: function (pointer, lastPointer) {\n var distances = sortByDistanceDesc(this.getItemDimensions(),\n pointer,\n lastPointer),\n i = distances.length,\n rootGroup = this.rootGroup,\n validTarget = !rootGroup.options.isValidTarget ||\n rootGroup.options.isValidTarget(rootGroup.item, this)\n\n if(!i && validTarget){\n rootGroup.movePlaceholder(this, this.target, \"append\")\n return true\n } else\n while(i--){\n var index = distances[i][0],\n distance = distances[i][1]\n if(!distance && this.hasChildGroup(index)){\n var found = this.getContainerGroup(index).searchValidTarget(pointer, lastPointer)\n if(found)\n return true\n }\n else if(validTarget){\n this.movePlaceholder(index, pointer)\n return true\n }\n }\n },\n movePlaceholder: function (index, pointer) {\n var item = $(this.items[index]),\n dim = this.itemDimensions[index],\n method = \"after\",\n width = item.outerWidth(),\n height = item.outerHeight(),\n offset = item.offset(),\n sameResultBox = {\n left: offset.left,\n right: offset.left + width,\n top: offset.top,\n bottom: offset.top + height\n }\n if(this.options.vertical){\n var yCenter = (dim[2] + dim[3]) / 2,\n inUpperHalf = pointer.top <= yCenter\n if(inUpperHalf){\n method = \"before\"\n sameResultBox.bottom -= height / 2\n } else\n sameResultBox.top += height / 2\n } else {\n var xCenter = (dim[0] + dim[1]) / 2,\n inLeftHalf = pointer.left <= xCenter\n if(inLeftHalf){\n method = \"before\"\n sameResultBox.right -= width / 2\n } else\n sameResultBox.left += width / 2\n }\n if(this.hasChildGroup(index))\n sameResultBox = emptyBox\n this.rootGroup.movePlaceholder(this, item, method, sameResultBox)\n },\n getItemDimensions: function () {\n if(!this.itemDimensions){\n this.items = this.$getChildren(this.el, \"item\").filter(\n \":not(.\" + this.group.options.placeholderClass + \", .\" + this.group.options.draggedClass + \")\"\n ).get()\n setDimensions(this.items, this.itemDimensions = [], this.options.tolerance)\n }\n return this.itemDimensions\n },\n getItemOffsetParent: function () {\n var offsetParent,\n el = this.el\n // Since el might be empty we have to check el itself and\n // can not do something like el.children().first().offsetParent()\n if(el.css(\"position\") === \"relative\" || el.css(\"position\") === \"absolute\" || el.css(\"position\") === \"fixed\")\n offsetParent = el\n else\n offsetParent = el.offsetParent()\n return offsetParent\n },\n hasChildGroup: function (index) {\n return this.options.nested && this.getContainerGroup(index)\n },\n getContainerGroup: function (index) {\n var childGroup = $.data(this.items[index], subContainerKey)\n if( childGroup === undefined){\n var childContainers = this.$getChildren(this.items[index], \"container\")\n childGroup = false\n\n if(childContainers[0]){\n var options = $.extend({}, this.options, {\n rootGroup: this.rootGroup,\n group: groupCounter ++\n })\n childGroup = childContainers[pluginName](options).data(pluginName).group\n }\n $.data(this.items[index], subContainerKey, childGroup)\n }\n return childGroup\n },\n $getChildren: function (parent, type) {\n var options = this.rootGroup.options,\n path = options[type + \"Path\"],\n selector = options[type + \"Selector\"]\n\n parent = $(parent)\n if(path)\n parent = parent.find(path)\n\n return parent.children(selector)\n },\n _serialize: function (parent, isContainer) {\n var that = this,\n childType = isContainer ? \"item\" : \"container\",\n\n children = this.$getChildren(parent, childType).not(this.options.exclude).map(function () {\n return that._serialize($(this), !isContainer)\n }).get()\n\n return this.rootGroup.options.serialize(parent, children, isContainer)\n },\n traverse: function(callback) {\n $.each(this.items || [], function(item){\n var group = $.data(this, subContainerKey)\n if(group)\n group.traverse(callback)\n });\n\n callback(this)\n },\n _clearDimensions: function () {\n this.itemDimensions = undefined\n },\n _destroy: function() {\n var that = this;\n\n this.target.off(eventNames.start, this.handle);\n this.el.removeData(pluginName)\n\n if(this.options.drop)\n this.group.containers = $.grep(this.group.containers, function(val){\n return val != that\n })\n\n $.each(this.items || [], function(){\n $.removeData(this, subContainerKey)\n })\n }\n }\n\n var API = {\n enable: function() {\n this.traverse(function(object){\n object.disabled = false\n })\n },\n disable: function (){\n this.traverse(function(object){\n object.disabled = true\n })\n },\n serialize: function () {\n return this._serialize(this.el, true)\n },\n refresh: function() {\n this.traverse(function(object){\n object._clearDimensions()\n })\n },\n destroy: function () {\n this.traverse(function(object){\n object._destroy();\n })\n }\n }\n\n $.extend(Container.prototype, API)\n\n /**\n * jQuery API\n *\n * Parameters are\n * either options on init\n * or a method name followed by arguments to pass to the method\n */\n $.fn[pluginName] = function(methodOrOptions) {\n var args = Array.prototype.slice.call(arguments, 1)\n\n return this.map(function(){\n var $t = $(this),\n object = $t.data(pluginName)\n\n if(object && API[methodOrOptions])\n return API[methodOrOptions].apply(object, args) || this\n else if(!object && (methodOrOptions === undefined ||\n typeof methodOrOptions === \"object\"))\n $t.data(pluginName, new Container($t, methodOrOptions))\n\n return this\n });\n };\n\n}(jQuery, window, 'wf_sortable');\n"]}
admin/js/woo-feed-admin-pro.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["woo-feed-admin-pro.js"],"names":["$","window","on","sliders","slick","autoplay","dots","centerMode","length","slidesToScroll","lazyLoad","wp","ajax","wpf_ajax_obj"],"mappings":"cAQC,SAAAA,EAAAC,GAAAD,EAAAC,GAAAC,GAAA,OAAA,WAEG,IAAAC,EAAAH,EAAAA,gBAIIG,EAAIA,QAHED,EAAAA,MAAGE,CACTC,UAAAA,EACWC,MAAAA,EAKHC,YAAAA,EAJIC,QAAAA,EACAJ,aAAAA,EACIK,eAAAA,EACFC,SAAAA,kBATrB,CAaeD,OAAAA,QAAAA,SANUE,GAAAC,KAAAC","file":"woo-feed-admin-pro.min.js","sourcesContent":["// noinspection JSUnresolvedVariable,ES6ConvertVarToLetConst,SpellCheckingInspection\r\n/**!\r\n * WooFeed Pro Scripts\r\n * @version 1.0.0\r\n * @package WooFeed\r\n * @copyright 2020 WebAppick\r\n *\r\n */\r\n(function ($, window, document, wpAjax, opts) {\r\n \"use strict\";\r\n /* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\r\n $(window).on('load', function () {\r\n // noinspection ES6ConvertVarToLetConst,SpellCheckingInspection\r\n var sliders = $('.wapk-slider');\r\n if( sliders.length ) {\r\n sliders.slick({\r\n autoplay: true,\r\n dots: true,\r\n centerMode: true,\r\n arrows: false,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n lazyLoad: 'progressive'\r\n });\r\n }\r\n } );\r\n}( jQuery, window, document, wp.ajax, wpf_ajax_obj ));"]}
1
+ {"version":3,"sources":["woo-feed-admin-pro.js"],"names":["$","window","on","sliders","slick","autoplay","dots","centerMode","length","slidesToScroll","lazyLoad","wp","ajax","wpf_ajax_obj"],"mappings":"cAQC,SAAAA,EAAAC,GAAAD,EAAAC,GAAAC,GAAA,OAAA,WAEG,IAAAC,EAAAH,EAAAA,gBAIIG,EAAIA,QAHED,EAAAA,MAAGE,CACTC,UAAAA,EACWC,MAAAA,EAKHC,YAAAA,EAJIC,QAAAA,EACAJ,aAAAA,EACIK,eAAAA,EACFC,SAAAA,kBATrB,CAaeD,OAAAA,QAAAA,SANUE,GAAAC,KAAAC","file":"woo-feed-admin-pro.min.js","sourcesContent":["// noinspection JSUnresolvedVariable,ES6ConvertVarToLetConst,SpellCheckingInspection\n/**!\n * WooFeed Pro Scripts\n * @version 1.0.0\n * @package WooFeed\n * @copyright 2020 WebAppick\n *\n */\n(function ($, window, document, wpAjax, opts) {\n \"use strict\";\n /* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\n $(window).on('load', function () {\n // noinspection ES6ConvertVarToLetConst,SpellCheckingInspection\n var sliders = $('.wapk-slider');\n if( sliders.length ) {\n sliders.slick({\n autoplay: true,\n dots: true,\n centerMode: true,\n arrows: false,\n slidesToShow: 1,\n slidesToScroll: 1,\n lazyLoad: 'progressive'\n });\n }\n } );\n}( jQuery, window, document, wp.ajax, wpf_ajax_obj ));"]}
admin/js/woo-feed-admin.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["woo-feed-admin.js"],"names":["_defineProperties","target","props","descriptor","i","_createClass","Constructor","protoProps","staticProps","prototype","window","wpAjax","self","prop","showTooltip","$","hasClass","currentTarget","clearTooltip","removeClass","actionMsg","className","match","index","action","removeAttr","actionKey","elem","addClass","attr","msg","extend","_default","_args","clip","$copyBtn","feedGenerator","left","event","trigger","test","navigator","on","console","googleCategories","in_array","needle","haystack","sortable","escape","data","text","ajax_fail","column_count","find","warn","wf_sortable","selectize_render_item","e","hasOwnProperty","opts","ajax","error","statusText","status","el","config","column","_onDrop","each","this","length","selectize","itemPath","create","concat","plugins","$item","container","containerSelector","group","options","bodyClass","itemSelector","handle","onDrop","fancySelect","maxItemShow","split","map","s","trim","helper","render","item","replace","x","form","merchantInfo","document","jQuery","k","init","renderMerchantInfo","opt","feedType","r","types","html","t","toLowerCase","na","disabled","val","_loop2","feedForm","contentSettings","renderMerchantTemplate","feedEditor","is","merchantInfoCache","tooltip","css","top","isRegenerating","_feed","_current_btn","feed","_limit","generator","limit","_progress","_product_ids","_progress_per_batch","_refresh","_all_btn","generate","condition","then","_current_btn_label","response","_color","preventDefault","parent","hide","_ajax_nonce","_log","_updateProgressStatus","message","key","regenerate","_block_button","value","_this","product","setTimeout","_stopProgressBar","_process_batch","_current_batch","_total_batch","post","_save_feed_file","fail","_resetProgressBar","_unblock_button","refreshInterval","arguments","undefined","clearInterval","_timer","_updateProgressBar","update","table","show","width","bar","wf","current_page_url_query","postboxes","location","setInterval","URLSearchParams","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","reload","nonce","status_area","select","execCommand","button","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","percentage","outputSelect","parents","includes","current_attribute_value","indexOf","del_confirm_multi","row","closest","reindex_config_table","type","_ajax_clean_nonce","server","validate","save","sftp_checking","sftp_available","provider","merchant","outOfStockVisibilityRow","feedName","checked","valueColumn","append","preload","load","google_category","query","attribute","cb","send","itemWrapper","item_wrapper_hidden","id","wpf_ajax_obj"],"mappings":"yHAAA,SAAAA,kBAAAC,EAAAC,+BACA,IAAAC,EAAAD,EAAAE,kHADA,SAAAC,aAAAC,EAAAC,EAAAC,GAWC,OAFDD,GAAAP,kBAAAM,EAAA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,EAAAA,GACAA,EAgBFiD,EAAAA,GAtCeZ,EAAdyL,KAAA,wBAAA,CA8GApB,KAAA,MAnCFvK,KAoCO,CArFL+F,YAAIhC,EAAJoF,MACCtL,OAAAA,wBACAsN,SAAAA,KAEF3F,KAAA+E,SAAA/G,GApQHkI,EAsQCP,EAAA3H,GAEC2H,EAAA/K,KAAA,YAAAwI,WACAnL,KAAAA,EAAAA,mBAUA,qBAAAmO,EAAAA,OAAA,IAAAT,EAAA/K,KAAA,oBAAAiB,SACC2J,EAEAA,KAAAA,QAAAA,wHACA,YAAAT,EAAAxG,OAPHoH,EASK/K,KATL,oBAS6B0F,UAE3BtG,GAAA,SAEC4K,sBAAWC,SAAAA,GAqFTxM,IAAAA,EAAEA,EAAA,aAAAkG,MAnFL+G,EAJAjN,EAII0M,aAAIxG,MACPqG,EAAAA,EAAAA,gBACAA,EAAAA,EAAAA,cAEAwB,KAAAA,GAAMjE,EAANhI,SAAAmL,EAAApK,EAAAqC,KAAA8I,sBACAzB,EAAAA,OAhaD,aAAA5J,EAAAzD,OAAA+O,KA3hBJ,QAi8BI5I,GAEiBvC,QAATyJ,GAn8BZ,QAm8BY2B","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\r\n/**!\r\n * WooFeed Scripts\r\n * @version 3.3.6\r\n * @package WooFeed\r\n * @copyright 2020 WebAppick\r\n *\r\n */\r\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\r\n// noinspection JSUnresolvedVariable\r\n(function($, window, document, wpAjax, opts) {\r\n\t\"use strict\";\r\n\t/**\r\n\t * All of the code for your admin-facing JavaScript source\r\n\t * should reside in this file.\r\n\t *\r\n\t * Note: It has been assumed you will write jQuery code here, so the\r\n\t * $ function reference has been prepared for usage within the scope\r\n\t * of this function.\r\n\t *\r\n\t * This enables you to define handlers, for when the DOM is ready:\r\n\t */\r\n\r\n\t/**\r\n\t * disable element utility\r\n\t *\r\n\t * @since 3.1.9\r\n\t *\r\n\t * @param {*} status\r\n\t * @returns {jQuery|HTMLElement}\r\n\t */\r\n\t$.fn.disabled = function(status) {\r\n\t\t$(this).each(function() {\r\n\t\t\tlet self = $(this),\r\n\t\t\t\tprop = 'disabled';\r\n\r\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\r\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\r\n\t\t\t} else {\r\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn self; // method chaining\r\n\t};\r\n\t\r\n\t/**\r\n\t * Check if a HTMLElement or jQuery is disabled\r\n\t */\r\n\t$.fn.isDisabled = function() {\r\n\t\tlet self = $(this),\r\n\t\t\tprop = 'disabled';\r\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Clear Tooltip for clip board js\r\n\t * @param {Object} event\r\n\t */\r\n\tconst clearTooltip = (event) => {\r\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\r\n\t};\r\n\r\n\tconst showTooltip = (elem, msg) => {\r\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\r\n\t};\r\n\r\n\tconst fallbackMessage = (action) =>{\r\n\t\tlet actionMsg,\r\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\r\n\r\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'No support :(';\r\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\r\n\t\t} else {\r\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\r\n\t\t}\r\n\r\n\t\treturn actionMsg;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Alias of jQuery.extend()\r\n\t * @param {Object} _default\r\n\t * @param {Object} _args\r\n\t */\r\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\r\n\t\r\n\tlet $copyBtn,\r\n\t\tclipboard,\r\n\t\tgoogleCategories,\r\n\t\thelper = {\r\n\t\t\tin_array: (needle, haystack) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${ escape(data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\r\n\t\t\tajax_fail: e => {\r\n\t\t\t\tconsole.warn(e);\r\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * Initialize Sortable\r\n\t\t\t * @param {jQuery|HTMLElement} el\r\n\t\t\t * @param {object} config\r\n\t\t\t * @param {int|boolean} column\r\n\t\t\t * @param {function} onDrop\r\n\t\t\t * @return {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tsortable: (el, config, column, onDrop) => {\r\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\r\n\t\t\t\t\tlet self = $(this),\r\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\r\n\t\t\t\t\tself.wf_sortable(extend({\r\n\t\t\t\t\t\tcontainerSelector: 'table',\r\n\t\t\t\t\t\titemPath: '> tbody',\r\n\t\t\t\t\t\titemSelector: 'tr',\r\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\r\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\r\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\r\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\r\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\r\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\r\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tselectize: (el, config) => {\r\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.selectize(extend({\r\n\t\t\t\t\t\tcreate: self.data('create') || false,\r\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\r\n\t\t\t\t\t\t\treturn s.trim();\r\n\t\t\t\t\t\t}) : [],\r\n\t\t\t\t\t\t//['remove_button'],\r\n\t\t\t\t\t\trender: {\r\n\t\t\t\t\t\t\titem: helper.selectize_render_item\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tfancySelect: (el, config) => {\r\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.fancySelect(extend({\r\n\t\t\t\t\t\tmaxItemShow: 3\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\treindex_config_table: () => {\r\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\r\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\r\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\r\n\t\t\t\t\t} );\r\n\t\t\t\t} );\r\n\t\t\t},\r\n\t\t\tcommon: () => {\r\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\r\n\t\t\t\thelper.selectize();\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t}\r\n\t\t},\r\n\t\t// helper functions\r\n\t\tfeedEditor = {\r\n\t\t\t/**\r\n\t\t\t * The Editor Form Elem.\r\n\t\t\t * @type {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tform: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Initialize The Feed Editor {Tabs...}\r\n\t\t\t * @returns {void}\r\n\t\t\t */\r\n\t\t\tinit: function () {\r\n\t\t\t\tlet self = this;\r\n\t\t\t\tself.form = $('.generateFeed');\r\n\t\t\t\tif (!self.form.length) return;\r\n\t\t\t\thelper.common();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\r\n\t\t\t\t\ttarget: this.form\r\n\t\t\t\t}));\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\r\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\r\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\r\n\t\t\t * @param {Object} r ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\r\n\t\t\t\t\t\tif ('feed_file_type' === k) {\r\n\t\t\t\t\t\t\t(function() {\r\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\r\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\r\n\t\t\t\t\t\t\t\t}).filter(function(t) {\r\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tif (types.length) {\r\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\r\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\r\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\r\n\t\t\t\t\t\t\t})();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\r\n\t\t\t\tfeedType.disabled(!1);\r\n\t\t\t\tfeedType.trigger('change');\r\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\r\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\r\n\t\t\t * @param {object} r merchant template ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\r\n\t\t\t\tlet _loop = function _loop(k) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tif ('tabs' === k) {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\r\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\r\n\r\n\t\t\t\t\t\t\tif (contentSettings.length) {\r\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\r\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\r\n\r\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\r\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\r\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\r\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\t_loop(k);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfeedEditor.init();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Feed Editor Table\r\n\t\tmerchantInfoCache = [],\r\n\t\tmerchantTemplateCache = [],\r\n\t\ttooltip = () => {\r\n\t\t\t// Tooltip only Text\r\n\t\t\t$('.wfmasterTooltip')\r\n\t\t\t\t.hover(function () {\r\n\t\t\t\t\t// Hover over code\r\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\r\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\r\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\r\n\t\t\t\t}, function () {\r\n\t\t\t\t\t// Hover out code\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\r\n\t\t\t\t\t$('.wftooltip').remove();\r\n\t\t\t\t})\r\n\t\t\t\t.mousemove(function (e) {\r\n\t\t\t\t\t$('.wftooltip').css({\r\n\t\t\t\t\t\ttop: e.pageY + 10,\r\n\t\t\t\t\t\tleft: e.pageX + 20\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t},\r\n\t\tclip = () => {\r\n\t\t\t$copyBtn = $('.toClipboard');\r\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\t\t$copyBtn.find('img').hide(0);\r\n\t\t\t} else {\r\n\t\t\t\t$copyBtn.each(function() {\r\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\r\n\t\t\t\t});\r\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\r\n\t\t\t\tclipboard.on('error', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\r\n\t\t\t\t}).on('success', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied!');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t/**\r\n\t * Feed Generator Module\r\n\t */\r\n\tclass feedGenerator {\r\n\t\t\r\n\t\t/**\r\n\t\t * Constructor\r\n\t\t * @constructor\r\n\t\t */\r\n\t\tconstructor() {\r\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\r\n\t\t\tthis._limit = opts.generator.limit;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._color = false;\r\n\t\t\t// batch info\r\n\t\t\tthis._total_batch = 0;\r\n\t\t\tthis._current_batch = 0;\r\n\t\t\tthis._product_ids = [];\r\n\t\t\tthis._progress_per_batch = 0;\r\n\t\t\tthis._refresh = true;\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tthis._regenerate = opts.generator.regenerate;\r\n\t\t\twindow.isRegenerating = false;\r\n\t\t\tthis._all_btn = $('.wpf_regenerate');\r\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\r\n\t\t\tthis._current_btn_label = '';\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Init Hooks (Event)\r\n\t\t * @return {feedGenerator}\r\n\t\t */\r\n\t\tinit() {\r\n\t\t\tlet self = this;\r\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\r\n\t\t\t\tthis.generate();\r\n\t\t\t}\r\n\r\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\r\n\t\t\tlet current_page_query = window.location.search;\r\n\t\t\tlet params = new URLSearchParams(current_page_query);\r\n\t\t\tlet page_name = params.get(\"page\");\r\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\r\n\t\t\t\t$('body').addClass('woo-import-popup-body');\r\n\t\t\t}\r\n\r\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\r\n\t\t\t\tlet condition = $(this).data('condition');\r\n\t\t\t\tif(1 === condition) {\r\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tcondition: condition,\r\n\t\t\t\t\t} ).then( response => {\r\n\t\t\t\t\t\tself._log( response );\r\n\t\t\t\t\t} ).fail( error => {\r\n\t\t\t\t\t\tself._log( error );\r\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\t\t\tself._color = 'red';\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tself._current_btn = $( this );\r\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\r\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\r\n\t\t\t\tif( '' !== self._feed ) {\r\n\t\t\t\t\tself.generate();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t_block_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.addClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\r\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t_unblock_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.removeClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\r\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Generate Feed\r\n\t\t * @return void\r\n\t\t */\r\n\t\tgenerate() {\r\n\t\t\tlet self = this;\r\n\t\t\twindow.isRegenerating = true;\r\n\t\t\tthis._block_button();\r\n\t\t\tthis._resetProgressBar();\r\n\t\t\tthis._progressBarActive();\r\n\t\t\tthis._log( 'Counting Total Products' );\r\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\r\n\t\t\tthis._get_product_ids().then( response => {\r\n\t\t\t\tthis._progress = 10;\r\n\t\t\t\tself._log( {response} );\r\n\t\t\t\tif(response.success) {\r\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\r\n\t\t\t\t\tself._product_ids = response.product;\r\n\t\t\t\t\tself._total_batch = this._product_ids.length;\r\n\t\t\t\t\tself._current_batch = 0;\r\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\r\n\t\t\t\t}\r\n\t\t\t}).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Get Product Ids\r\n\t\t * @returns {$.promise}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_get_product_ids() {\r\n\t\t\tthis._progress = 5;\r\n\t\t\treturn wpAjax.post( 'get_product_information', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tlimit: this._limit,\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the Batch\r\n\t\t * @private\r\n\t\t */\r\n\t\t_process_batch() {\r\n\t\t\tlet self = this;\r\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\r\n\t\t\tthis._updateProgressStatus( status );\r\n\t\t\tthis._log( status );\r\n\t\t\twpAjax.post( 'make_batch_feed', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tproducts: this._product_ids[this._current_batch],\r\n\t\t\t\tloop: this._current_batch,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._current_batch++;\r\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._progress += self._progress_per_batch;\r\n\t\t\t\t}\r\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\r\n\t\t\t\t\tself._save_feed_file();\r\n\t\t\t\t}\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Save Feed Data from temp to feed file\r\n\t\t * @private\r\n\t\t */\r\n\t\t_save_feed_file() {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._log( 'Saving feed file' );\r\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\r\n\t\t\twpAjax.post( 'save_feed_file', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tself._progress = 100;\r\n\t\t\t\tif ( self._refresh ) {\r\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\t\tself._resetProgressBar( true );\r\n\t\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t\t}, 3000 );\r\n\t\t\t\t}, 2500 );\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Console log wrapper with debug settings.\r\n\t\t * @param data\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_log( data ) {\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tif ( opts.wpf_debug ) {\r\n\t\t\t\tconsole.log( data );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the progressbar refresh interval\r\n\t\t * @param {int} refreshInterval\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_progressBarActive( refreshInterval = 0 ) {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._toggleProgressBar( true );\r\n\t\t\tthis._timer = setInterval( function(){\r\n\t\t\t\tself._updateProgressBar();\r\n\t\t\t}, refreshInterval || 1000 );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Stop Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_stopProgressBar() {\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Reset Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_resetProgressBar( update ) {\r\n\t\t\tthis._toggleProgressBar( false );\r\n\t\t\tthis._updateProgressStatus( '' );\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\tthis._color = false;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tif ( update ) {\r\n\t\t\t\tthis._updateProgressBar();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Show hide the progress bar el\r\n\t\t * @param status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_toggleProgressBar( status ) {\r\n\t\t\tlet table = $('#feed_progress_table');\r\n\t\t\tif ( status ) {\r\n\t\t\t\ttable.show();\r\n\t\t\t} else {\r\n\t\t\t\ttable.hide();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress bar text status\r\n\t\t * @param {string} status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressStatus( status ) {\r\n\t\t\t$( '.feed-progress-status' ).text( status );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress Data\r\n\t\t * hooked with setInterval\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressBar() {\r\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\r\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\r\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\r\n\t\t\tbar.css( {\r\n\t\t\t\twidth: _progress,\r\n\t\t\t} );\r\n\t\t\tpercentage.text( _progress );\r\n\t\t}\r\n\t}\r\n\t// expose to the global scope\r\n\twindow.wf = {\r\n\t\thelper: helper,\r\n\t\tfeedEditor: feedEditor,\r\n\t\tgenerator: feedGenerator,\r\n\t};\r\n\t$(window).on('load', function() {\r\n\t\t// Template loading ui conflict\r\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\r\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\r\n\t\t}\r\n\r\n\t\t// on edit page show item wrapper dropdown\r\n\t\tlet current_page_url_query = window.location.search;\r\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\r\n\t\tlet page_action = urlParams.get('action');\r\n\r\n\t\t// ClipBoardJS\r\n\t\tclip();\r\n\t\t// postbox toggle\r\n\t\tpostboxes.add_postbox_toggles(pagenow);\r\n\t\t// initialize generator\r\n\t\tlet generator = new feedGenerator();\r\n\t\tgenerator.init();\r\n\t\t// noinspection JSUnresolvedVariable\r\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\r\n\t\t\r\n\t\t}\r\n\t\t// initialize editor\r\n\t\tfeedEditor.init();\r\n\t\thelper.common(); // Generate Feed Add Table Row\r\n\t\ttooltip();\r\n\t\t// validate feed editor\r\n\t\t$(\".generateFeed\").validate();\r\n\t\t// document events\r\n\t\t$(document)\r\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\r\n\t\t\t})\r\n\t\t\t// XML Feed Wrapper\r\n\t\t\t.on('click', '#wf_newRow', function () {\r\n\t\t\t\tlet tbody = $('#table-1 tbody'),\r\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\r\n\t\t\t\ttbody.append(template);\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t})\r\n\t\t\t// feed delete alert.\r\n\t\t\t.on('click', '.single-feed-delete', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\r\n\t\t\t\t\twindow.location.href = $(this).attr('val');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// clear cache data.\r\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\r\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\r\n\r\n\t\t\t\t//show loader\r\n\t\t\t\tloader.show();\r\n\r\n\t\t\t\t// passed cache nonce\r\n\t\t\t\twpAjax.post('clear_cache_data', {\r\n\t\t\t\t\t_ajax_clean_nonce: nonce\r\n\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\tif( response.success ) {\r\n\t\t\t\t\t\tloader.hide(); //hide loader\r\n\t\t\t\t\t\tlocation.reload();\r\n\t\t\t\t\t}\r\n\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\tconsole.log('something wrong');\r\n\t\t\t\t});\r\n\r\n\t\t\t})// Copy Status\r\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\r\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\r\n\t\t\t\tbutton.val('Copied');\r\n\t\t\t\tstatus_area.css('visibility','visible');\r\n\t\t\t\tstatus_area.select();\r\n\r\n\t\t\t\tdocument.execCommand('copy');\r\n\t\t\t})\r\n\t\t\t// feed value dropdown change.\r\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\r\n\r\n\t\t\t\t// price attributes\r\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax'];\r\n\t\t\t\t// current value\r\n\t\t\t\tvar current_attribute_value = $(this).val();\r\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\r\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\r\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\r\n\t\t\t\tvar selectIf, selectKey;\r\n\r\n\t\t\t\t// when any attribute is selected, pick the key\r\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\r\n\t\t\t\t\t// when select any price attribute\r\n\t\t\t\t\tselectIf = 'for_price';\r\n\t\t\t\t\tselectKey = \"Price\";\r\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\r\n\r\n\t\t\t\t\t// when select any custom taxonomy\r\n\t\t\t\t\tselectIf = 'for_custom_taxo';\r\n\t\t\t\t\tselectKey = \"parent_if_empty\";\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tselectIf = 'for_all';\r\n\t\t\t\t\tselectKey = 'Default';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// remove selected class from old selected option\r\n\t\t\t\tfancyOption.removeClass('selected');\r\n\r\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\r\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\t// fancyOption.each(function(item) {\r\n\t\t\t\t\t// \tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\r\n\t\t\t\t\t// \t\t$(this).addClass('selected');\r\n\t\t\t\t\t// \t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t// \t}\r\n\t\t\t\t\t// });\r\n\t\t\t\t}\r\n\r\n\t\t\t})\r\n\t\t\t// bulk delete alert.\r\n\t\t\t.on('click', '#doaction, #doaction2', function () {\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\r\n\t\t\t})\r\n\t\t\t// Generate Feed Table Row Delete\r\n\t\t\t.on('change', '.dType', function () {\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').show();\r\n\t\t\t\t} else if (type === 'attribute') {\r\n\t\t\t\t\trow.find('.value_attribute').show();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t} else if (type === 'remove') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Feed Form Submit\r\n\t\t\t.on('click', '.delRow', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$(this).closest('tr').remove();\r\n\t\t\t\thelper.reindex_config_table();\r\n\t\t\t})\r\n\t\t\t.on('submit', '#generateFeed', function () {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Update Feed Form Submit\r\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${data && data.save ? opts.form.save : opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.ftporsftp', function () {\r\n\t\t\t\tlet server = $(this).val(),\r\n\t\t\t\t\tstatus = $('.ssh2_status');\r\n\t\t\t\t\r\n\t\t\t\tif (server === 'sftp') {\r\n\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\r\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tserver: server\r\n\t\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\t\tif (response === 'exists') {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\t\t}, 1500);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\thelper.ajax_fail(e);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatus.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$('#updatefeed').trigger('submit', {\r\n\t\t\t\t\tsave: true\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.on('change', '#provider', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\r\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\r\n\r\n\t\t\t\tlet merchant = $(this).val(),\r\n\t\t\t\t\tfeedType = $(\"#feedType\"),\r\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\r\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tfeedForm.html('<h3><span style=\"float:none;margin: -3px 0 0;\" class=\"spinner is-active\"></span> ' + opts.form.loading_tmpl + '</h3>'); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t\r\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\r\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\r\n\t\t\t\t\r\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\r\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\r\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\r\n\r\n\r\n\t\t\t\t\r\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\r\n\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tnonce: opts.nonce,\r\n\t\t\t\t\t\t\tprovider: merchant\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tmerchant: merchant\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\r\n\r\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\r\n\t\t\t\t\t\tif( 'bing' === merchant ) {\r\n\t\t\t\t\t\t\t//delimiter value\r\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\r\n\r\n\t\t\t\t\t\t\t//enclosure value\r\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//reviewer options hide\r\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\r\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Feed Active and Inactive status change via ajax\r\n\t\t\t.on('change', '.woo_feed_status_input', function () {\r\n\t\t\t\tlet self = $(this);\r\n\t\t\t\twpAjax.post('update_feed_status', {\r\n\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\tfeedName: self.val(),\r\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t// event with trigger\r\n\t\t$(document)\r\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\r\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\r\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\r\n\t\t\t\t\toutOfStockVisibilityRow.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutOfStockVisibilityRow.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.attr_type', function () {\r\n\t\t\t\t// Attribute type selection\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.wf_attr').hide();\r\n\t\t\t\t\trow.find('.wf_attr').val('');\r\n\t\t\t\t\trow.find('.wf_default').show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\trow.find('.wf_attr').show();\r\n\t\t\t\t\trow.find('.wf_default').hide();\r\n\t\t\t\t\trow.find('.wf_default').val('');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\r\n\t\t\t\tlet row = $(this).closest('tr'),\r\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\r\n\t\t\t\t\ttype = row.find('.attr_type'),\r\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\r\n\t\t\t\t\tprovider = $('#provider').val();\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {\r\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\tvalueColumn.append(`<span style=\"font-size:x-small;\"><a style=\"color: red\" href=\"http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category\" target=\"_blank\">${opts.learn_more}</a></span>`);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\thelper.selectize(select, {\r\n\t\t\t\t\t\t\tpreload: true,\r\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\r\n\t\t\t\t\t\t\tload: function load(query, cb) {\r\n\t\t\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\r\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\r\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\r\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\r\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('span').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\r\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '#feedType,#provider', function (e) {\r\n\t\t\t\tlet type = $('#feedType').val(),\r\n\t\t\t\t\tprovider = $('#provider').val(),\r\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\r\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//when feed type is changed\r\n\t\t\t\tif( 'feedType' === e.target.id ) {\r\n\t\t\t\t\tif (type === 'csv' || type === 'txt' || type === 'tsv') {\r\n\t\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\t\twf_csv_txt.show();\r\n\r\n\t\t\t\t\t\tif( 'tsv' === type ) {\r\n\t\t\t\t\t\t\t$('#delimiter option:last').prop(\"selected\", \"selected\");\r\n\t\t\t\t\t\t} else if( 'csv' === type ) {\r\n\t\t\t\t\t\t\t$('#delimiter option:first').prop(\"selected\", \"selected\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if( type === 'xml' ) {\r\n\t\t\t\t\t\titemWrapper.show();\r\n\t\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t})\r\n\t\t\t.trigger('change');\r\n\t});\r\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\r\n"]}
1
+ {"version":3,"sources":["woo-feed-admin.js"],"names":["_defineProperties","target","props","descriptor","i","_createClass","Constructor","protoProps","staticProps","prototype","window","wpAjax","self","prop","showTooltip","$","hasClass","currentTarget","clearTooltip","removeClass","actionMsg","className","match","index","action","removeAttr","actionKey","elem","addClass","attr","msg","extend","_default","_args","clip","$copyBtn","feedGenerator","left","event","trigger","test","navigator","on","console","googleCategories","in_array","needle","haystack","sortable","escape","data","text","ajax_fail","column_count","find","warn","wf_sortable","selectize_render_item","e","hasOwnProperty","opts","ajax","error","statusText","status","el","config","column","_onDrop","each","this","length","selectize","itemPath","create","concat","plugins","$item","container","containerSelector","group","options","bodyClass","itemSelector","handle","onDrop","fancySelect","maxItemShow","split","map","s","trim","helper","render","item","replace","x","form","merchantInfo","document","jQuery","k","init","renderMerchantInfo","opt","feedType","r","types","html","t","toLowerCase","na","disabled","val","_loop2","feedForm","contentSettings","renderMerchantTemplate","feedEditor","is","merchantInfoCache","tooltip","css","top","isRegenerating","_feed","_current_btn","feed","_limit","generator","limit","_progress","_product_ids","_progress_per_batch","_refresh","_all_btn","generate","condition","then","_current_btn_label","response","_color","preventDefault","parent","hide","_ajax_nonce","_log","_updateProgressStatus","message","key","regenerate","_block_button","value","_this","product","setTimeout","_stopProgressBar","_process_batch","_current_batch","_total_batch","post","_save_feed_file","fail","_resetProgressBar","_unblock_button","refreshInterval","arguments","undefined","clearInterval","_timer","_updateProgressBar","update","table","show","width","bar","wf","current_page_url_query","postboxes","location","setInterval","URLSearchParams","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","reload","nonce","status_area","select","execCommand","button","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","percentage","outputSelect","parents","includes","current_attribute_value","indexOf","del_confirm_multi","row","closest","reindex_config_table","type","_ajax_clean_nonce","server","validate","save","sftp_checking","sftp_available","provider","merchant","outOfStockVisibilityRow","feedName","checked","valueColumn","append","preload","load","google_category","query","attribute","cb","send","itemWrapper","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tB,GAHIsB,EAAAA,OAAAA,8DAQN4E,IAAAA,EAAAA,EAAAhM,KAAAA,yBAEC7B,EAAAA,UAAAA,EAAE,CACFA,SAdH,EAsGK6N,YAAGhM,EAAAA,KAAAA,gBArFL7B,KAAAA,SAAAA,EAAAA,GACAA,EAgBFiD,EAAAA,GAtCeZ,EAAdyL,KAAA,wBAAA,CA8GApB,KAAA,MAnCFvK,KAoCO,CArFL+F,YAAIhC,EAAJoF,MACCtL,OAAAA,wBACAsN,SAAAA,KAEF3F,KAAA+E,SAAA/G,GApQHkI,EAsQCP,EAAA3H,GAEC2H,EAAA/K,KAAA,YAAAwI,WACAnL,KAAAA,EAAAA,mBAUA,qBAAAmO,EAAAA,OAAA,IAAAT,EAAA/K,KAAA,oBAAAiB,SACC2J,EAEAA,KAAAA,QAAAA,wHACA,YAAAT,EAAAxG,OAPHoH,EASK/K,KATL,oBAS6B0F,UAE3BtG,GAAA,SAEC4K,sBAAWC,SAAAA,GAqFTxM,IAAAA,EAAEA,EAAA,aAAAkG,MAnFL+G,EAJAjN,EAII0M,aAAIxG,MACPqG,EAAAA,EAAAA,gBACAA,EAAAA,EAAAA,cAEAwB,KAAAA,GAAMjE,EAANhI,SAAAmL,EAAApK,EAAAqC,KAAA8I,sBACAzB,EAAAA,OAhaD,aAAA5J,EAAAzD,OAAA+O,KA3hBJ,QAi8BI5I,GAEiBvC,QAATyJ,GAn8BZ,QAm8BY2B","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\n/**!\n * WooFeed Scripts\n * @version 3.3.6\n * @package WooFeed\n * @copyright 2020 WebAppick\n *\n */\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\n// noinspection JSUnresolvedVariable\n(function($, window, document, wpAjax, opts) {\n\t\"use strict\";\n\t/**\n\t * All of the code for your admin-facing JavaScript source\n\t * should reside in this file.\n\t *\n\t * Note: It has been assumed you will write jQuery code here, so the\n\t * $ function reference has been prepared for usage within the scope\n\t * of this function.\n\t *\n\t * This enables you to define handlers, for when the DOM is ready:\n\t */\n\n\t/**\n\t * disable element utility\n\t *\n\t * @since 3.1.9\n\t *\n\t * @param {*} status\n\t * @returns {jQuery|HTMLElement}\n\t */\n\t$.fn.disabled = function(status) {\n\t\t$(this).each(function() {\n\t\t\tlet self = $(this),\n\t\t\t\tprop = 'disabled';\n\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\n\t\t\t} else {\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\n\t\t\t}\n\t\t});\n\t\treturn self; // method chaining\n\t};\n\t\n\t/**\n\t * Check if a HTMLElement or jQuery is disabled\n\t */\n\t$.fn.isDisabled = function() {\n\t\tlet self = $(this),\n\t\t\tprop = 'disabled';\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\n\t};\n\t\n\t/**\n\t * Clear Tooltip for clip board js\n\t * @param {Object} event\n\t */\n\tconst clearTooltip = (event) => {\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\n\t};\n\n\tconst showTooltip = (elem, msg) => {\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\n\t};\n\n\tconst fallbackMessage = (action) =>{\n\t\tlet actionMsg,\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\n\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\tactionMsg = 'No support :(';\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\n\t\t} else {\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\n\t\t}\n\n\t\treturn actionMsg;\n\t};\n\t\n\t/**\n\t * Alias of jQuery.extend()\n\t * @param {Object} _default\n\t * @param {Object} _args\n\t */\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\n\t\n\tlet $copyBtn,\n\t\tclipboard,\n\t\tgoogleCategories,\n\t\thelper = {\n\t\t\tin_array: (needle, haystack) => {\n\t\t\t\ttry {\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${ escape(data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\n\t\t\tajax_fail: e => {\n\t\t\t\tconsole.warn(e);\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Initialize Sortable\n\t\t\t * @param {jQuery|HTMLElement} el\n\t\t\t * @param {object} config\n\t\t\t * @param {int|boolean} column\n\t\t\t * @param {function} onDrop\n\t\t\t * @return {jQuery|HTMLElement}\n\t\t\t */\n\t\t\tsortable: (el, config, column, onDrop) => {\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\n\t\t\t\t\tlet self = $(this),\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\n\t\t\t\t\tself.wf_sortable(extend({\n\t\t\t\t\t\tcontainerSelector: 'table',\n\t\t\t\t\t\titemPath: '> tbody',\n\t\t\t\t\t\titemSelector: 'tr',\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\tselectize: (el, config) => {\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.selectize(extend({\n\t\t\t\t\t\tcreate: self.data('create') || false,\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\n\t\t\t\t\t\t\treturn s.trim();\n\t\t\t\t\t\t}) : [],\n\t\t\t\t\t\t//['remove_button'],\n\t\t\t\t\t\trender: {\n\t\t\t\t\t\t\titem: helper.selectize_render_item\n\t\t\t\t\t\t}\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\tfancySelect: (el, config) => {\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.fancySelect(extend({\n\t\t\t\t\t\tmaxItemShow: 3\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\treindex_config_table: () => {\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t},\n\t\t\tcommon: () => {\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\n\t\t\t\thelper.selectize();\n\t\t\t\thelper.fancySelect($('.outputType'));\n\t\t\t}\n\t\t},\n\t\t// helper functions\n\t\tfeedEditor = {\n\t\t\t/**\n\t\t\t * The Editor Form Elem.\n\t\t\t * @type {jQuery|HTMLElement}\n\t\t\t */\n\t\t\tform: null,\n\n\t\t\t/**\n\t\t\t * Initialize The Feed Editor {Tabs...}\n\t\t\t * @returns {void}\n\t\t\t */\n\t\t\tinit: function () {\n\t\t\t\tlet self = this;\n\t\t\t\tself.form = $('.generateFeed');\n\t\t\t\tif (!self.form.length) return;\n\t\t\t\thelper.common();\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\n\t\t\t\t\ttarget: this.form\n\t\t\t\t}));\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\n\t\t\t * @param {Object} r ajax response object\n\t\t\t */\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\n\t\t\t\tfor (let k in r) {\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n\n\t\t\t\t\t\tif ('feed_file_type' === k) {\n\t\t\t\t\t\t\t(function() {\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\n\t\t\t\t\t\t\t\t}).filter(function(t) {\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (types.length) {\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\n\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\n\t\t\t\tfeedType.disabled(!1);\n\t\t\t\tfeedType.trigger('change');\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\n\t\t\t * @param {object} r merchant template ajax response object\n\t\t\t */\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\n\t\t\t\tlet _loop = function _loop(k) {\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\n\t\t\t\t\t\tif ('tabs' === k) {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\n\n\t\t\t\t\t\t\tif (contentSettings.length) {\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\n\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}).trigger('change');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tfor (let k in r) {\n\t\t\t\t\t_loop(k);\n\t\t\t\t}\n\n\t\t\t\tfeedEditor.init();\n\t\t\t}\n\t\t},\n\t\t// Feed Editor Table\n\t\tmerchantInfoCache = [],\n\t\tmerchantTemplateCache = [],\n\t\ttooltip = () => {\n\t\t\t// Tooltip only Text\n\t\t\t$('.wfmasterTooltip')\n\t\t\t\t.hover(function () {\n\t\t\t\t\t// Hover over code\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\n\t\t\t\t}, function () {\n\t\t\t\t\t// Hover out code\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\n\t\t\t\t\t$('.wftooltip').remove();\n\t\t\t\t})\n\t\t\t\t.mousemove(function (e) {\n\t\t\t\t\t$('.wftooltip').css({\n\t\t\t\t\t\ttop: e.pageY + 10,\n\t\t\t\t\t\tleft: e.pageX + 20\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t},\n\t\tclip = () => {\n\t\t\t$copyBtn = $('.toClipboard');\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\t\t$copyBtn.find('img').hide(0);\n\t\t\t} else {\n\t\t\t\t$copyBtn.each(function() {\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\n\t\t\t\t});\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\n\t\t\t\tclipboard.on('error', function(event) {\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\n\t\t\t\t}).on('success', function(event) {\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied!');\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\n\t/**\n\t * Feed Generator Module\n\t */\n\tclass feedGenerator {\n\t\t\n\t\t/**\n\t\t * Constructor\n\t\t * @constructor\n\t\t */\n\t\tconstructor() {\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\n\t\t\tthis._limit = opts.generator.limit;\n\t\t\tthis._progress = 0;\n\t\t\tthis._timer = null;\n\t\t\tthis._color = false;\n\t\t\t// batch info\n\t\t\tthis._total_batch = 0;\n\t\t\tthis._current_batch = 0;\n\t\t\tthis._product_ids = [];\n\t\t\tthis._progress_per_batch = 0;\n\t\t\tthis._refresh = true;\n\t\t\t// noinspection JSUnresolvedVariable\n\t\t\tthis._regenerate = opts.generator.regenerate;\n\t\t\twindow.isRegenerating = false;\n\t\t\tthis._all_btn = $('.wpf_regenerate');\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\n\t\t\tthis._current_btn_label = '';\n\t\t}\n\t\t\n\t\t/**\n\t\t * Init Hooks (Event)\n\t\t * @return {feedGenerator}\n\t\t */\n\t\tinit() {\n\t\t\tlet self = this;\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\n\t\t\t\tthis.generate();\n\t\t\t}\n\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\n\t\t\tlet current_page_query = window.location.search;\n\t\t\tlet params = new URLSearchParams(current_page_query);\n\t\t\tlet page_name = params.get(\"page\");\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\n\t\t\t\t$('body').addClass('woo-import-popup-body');\n\t\t\t}\n\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\n\t\t\t\tlet condition = $(this).data('condition');\n\t\t\t\tif(1 === condition) {\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tcondition: condition,\n\t\t\t\t\t} ).then( response => {\n\t\t\t\t\t\tself._log( response );\n\t\t\t\t\t} ).fail( error => {\n\t\t\t\t\t\tself._log( error );\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\t\t\tself._color = 'red';\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tself._current_btn = $( this );\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\n\t\t\t\tif( '' !== self._feed ) {\n\t\t\t\t\tself.generate();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t_block_button() {\n\t\t\tif ( this._all_btn.length ) {\n\t\t\t\tthis._all_btn.addClass('disabled');\n\t\t\t}\n\t\t\tif ( this._current_btn.length ) {\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\n\t\t\t}\n\t\t}\n\t\t\n\t\t_unblock_button() {\n\t\t\tif ( this._all_btn.length ) {\n\t\t\t\tthis._all_btn.removeClass('disabled');\n\t\t\t}\n\t\t\tif ( this._current_btn.length ) {\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Generate Feed\n\t\t * @return void\n\t\t */\n\t\tgenerate() {\n\t\t\tlet self = this;\n\t\t\twindow.isRegenerating = true;\n\t\t\tthis._block_button();\n\t\t\tthis._resetProgressBar();\n\t\t\tthis._progressBarActive();\n\t\t\tthis._log( 'Counting Total Products' );\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\n\t\t\tthis._get_product_ids().then( response => {\n\t\t\t\tthis._progress = 10;\n\t\t\t\tself._log( {response} );\n\t\t\t\tif(response.success) {\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\n\t\t\t\t\tself._product_ids = response.product;\n\t\t\t\t\tself._total_batch = this._product_ids.length;\n\t\t\t\t\tself._current_batch = 0;\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\n\t\t\t\t\tself._process_batch();\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\n\t\t\t\t} else {\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\n\t\t\t\t}\n\t\t\t}).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Get Product Ids\n\t\t * @returns {$.promise}\n\t\t * @private\n\t\t */\n\t\t_get_product_ids() {\n\t\t\tthis._progress = 5;\n\t\t\treturn wpAjax.post( 'get_product_information', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t\tlimit: this._limit,\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Run the Batch\n\t\t * @private\n\t\t */\n\t\t_process_batch() {\n\t\t\tlet self = this;\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\n\t\t\tthis._updateProgressStatus( status );\n\t\t\tthis._log( status );\n\t\t\twpAjax.post( 'make_batch_feed', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t\tproducts: this._product_ids[this._current_batch],\n\t\t\t\tloop: this._current_batch,\n\t\t\t} ).then( response => {\n\t\t\t\tself._current_batch++;\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\n\t\t\t\tself._log( response );\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\n\t\t\t\t\tself._process_batch();\n\t\t\t\t\tself._progress += self._progress_per_batch;\n\t\t\t\t}\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\n\t\t\t\t\tself._save_feed_file();\n\t\t\t\t}\n\t\t\t} ).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Save Feed Data from temp to feed file\n\t\t * @private\n\t\t */\n\t\t_save_feed_file() {\n\t\t\tlet self = this;\n\t\t\tthis._log( 'Saving feed file' );\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\n\t\t\twpAjax.post( 'save_feed_file', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t} ).then( response => {\n\t\t\t\tself._log( response );\n\t\t\t\tself._progress = 100;\n\t\t\t\tif ( self._refresh ) {\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\n\t\t\t\t}\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tsetTimeout( function(){\n\t\t\t\t\t\tself._resetProgressBar( true );\n\t\t\t\t\t\tself._unblock_button();\n\t\t\t\t\t}, 3000 );\n\t\t\t\t}, 2500 );\n\t\t\t} ).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Console log wrapper with debug settings.\n\t\t * @param data\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_log( data ) {\n\t\t\t// noinspection JSUnresolvedVariable\n\t\t\tif ( opts.wpf_debug ) {\n\t\t\t\tconsole.log( data );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Run the progressbar refresh interval\n\t\t * @param {int} refreshInterval\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_progressBarActive( refreshInterval = 0 ) {\n\t\t\tlet self = this;\n\t\t\tthis._toggleProgressBar( true );\n\t\t\tthis._timer = setInterval( function(){\n\t\t\t\tself._updateProgressBar();\n\t\t\t}, refreshInterval || 1000 );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Stop Progressbar\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_stopProgressBar() {\n\t\t\tclearInterval( this._timer );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Reset Progressbar\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_resetProgressBar( update ) {\n\t\t\tthis._toggleProgressBar( false );\n\t\t\tthis._updateProgressStatus( '' );\n\t\t\tclearInterval( this._timer );\n\t\t\tthis._color = false;\n\t\t\tthis._timer = null;\n\t\t\tthis._progress = 0;\n\t\t\tif ( update ) {\n\t\t\t\tthis._updateProgressBar();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Show hide the progress bar el\n\t\t * @param status\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_toggleProgressBar( status ) {\n\t\t\tlet table = $('#feed_progress_table');\n\t\t\tif ( status ) {\n\t\t\t\ttable.show();\n\t\t\t} else {\n\t\t\t\ttable.hide();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Update Progress bar text status\n\t\t * @param {string} status\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_updateProgressStatus( status ) {\n\t\t\t$( '.feed-progress-status' ).text( status );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Update Progress Data\n\t\t * hooked with setInterval\n\t\t * @private\n\t\t */\n\t\t_updateProgressBar() {\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\n\t\t\tbar.css( {\n\t\t\t\twidth: _progress,\n\t\t\t} );\n\t\t\tpercentage.text( _progress );\n\t\t}\n\t}\n\t// expose to the global scope\n\twindow.wf = {\n\t\thelper: helper,\n\t\tfeedEditor: feedEditor,\n\t\tgenerator: feedGenerator,\n\t};\n\t$(window).on('load', function() {\n\t\t// Template loading ui conflict\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\n\t\t}\n\n\t\t// on edit page show item wrapper dropdown\n\t\tlet current_page_url_query = window.location.search;\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\n\t\tlet page_action = urlParams.get('action');\n\n\t\t// ClipBoardJS\n\t\tclip();\n\t\t// postbox toggle\n\t\tpostboxes.add_postbox_toggles(pagenow);\n\t\t// initialize generator\n\t\tlet generator = new feedGenerator();\n\t\tgenerator.init();\n\t\t// noinspection JSUnresolvedVariable\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\n\t\t\n\t\t}\n\t\t// initialize editor\n\t\tfeedEditor.init();\n\t\thelper.common(); // Generate Feed Add Table Row\n\t\ttooltip();\n\t\t// validate feed editor\n\t\t$(\".generateFeed\").validate();\n\t\t// document events\n\t\t$(document)\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\n\t\t\t})\n\t\t\t// XML Feed Wrapper\n\t\t\t.on('click', '#wf_newRow', function () {\n\t\t\t\tlet tbody = $('#table-1 tbody'),\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\n\t\t\t\ttbody.append(template);\n\t\t\t\thelper.fancySelect($('.outputType'));\n\t\t\t})\n\t\t\t// feed delete alert.\n\t\t\t.on('click', '.single-feed-delete', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\n\t\t\t\t\twindow.location.href = $(this).attr('val');\n\t\t\t\t}\n\t\t\t})\n\t\t\t// clear cache data.\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\n\n\t\t\t\t//show loader\n\t\t\t\tloader.show();\n\n\t\t\t\t// passed cache nonce\n\t\t\t\twpAjax.post('clear_cache_data', {\n\t\t\t\t\t_ajax_clean_nonce: nonce\n\t\t\t\t}).then(function (response) {\n\t\t\t\t\tif( response.success ) {\n\t\t\t\t\t\tloader.hide(); //hide loader\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t}\n\t\t\t\t}).fail(function (e) {\n\t\t\t\t\tconsole.log('something wrong');\n\t\t\t\t});\n\n\t\t\t})// Copy Status\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\n\t\t\t\tbutton.val('Copied');\n\t\t\t\tstatus_area.css('visibility','visible');\n\t\t\t\tstatus_area.select();\n\n\t\t\t\tdocument.execCommand('copy');\n\t\t\t})\n\t\t\t// feed value dropdown change.\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\n\n\t\t\t\t// price attributes\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax'];\n\t\t\t\t// current value\n\t\t\t\tvar current_attribute_value = $(this).val();\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\n\t\t\t\tvar selectIf, selectKey;\n\n\t\t\t\t// when any attribute is selected, pick the key\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\n\t\t\t\t\t// when select any price attribute\n\t\t\t\t\tselectIf = 'for_price';\n\t\t\t\t\tselectKey = \"Price\";\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\n\n\t\t\t\t\t// when select any custom taxonomy\n\t\t\t\t\tselectIf = 'for_custom_taxo';\n\t\t\t\t\tselectKey = \"parent_if_empty\";\n\t\t\t\t} else {\n\n\t\t\t\t\tselectIf = 'for_all';\n\t\t\t\t\tselectKey = 'Default';\n\t\t\t\t}\n\n\t\t\t\t// remove selected class from old selected option\n\t\t\t\tfancyOption.removeClass('selected');\n\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\n\n\t\t\t\t\t// update \"Option Type\" when select key matches\n\t\t\t\t\tfancyOption.each(function(item) {\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\n\t\t\t\t\t\t\t$(this).addClass('selected');\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\n\t\t\t\t\t// update \"Option Type\" when select key matches\n\t\t\t\t\t// fancyOption.each(function(item) {\n\t\t\t\t\t// \tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\n\t\t\t\t\t// \t\t$(this).addClass('selected');\n\t\t\t\t\t// \t\tfancyDataPicker.text(selectKey);\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").text(selectKey);\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").val( $(this).data('value') );\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\n\t\t\t})\n\t\t\t// bulk delete alert.\n\t\t\t.on('click', '#doaction, #doaction2', function () {\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\n\t\t\t})\n\t\t\t// Generate Feed Table Row Delete\n\t\t\t.on('change', '.dType', function () {\n\t\t\t\tlet self = $(this),\n\t\t\t\t\ttype = self.val(),\n\t\t\t\t\trow = self.closest('tr');\n\t\t\t\t\n\t\t\t\tif (type === 'pattern') {\n\t\t\t\t\trow.find('.value_attribute').hide();\n\t\t\t\t\trow.find('.value_pattern').show();\n\t\t\t\t} else if (type === 'attribute') {\n\t\t\t\t\trow.find('.value_attribute').show();\n\t\t\t\t\trow.find('.value_pattern').hide();\n\t\t\t\t} else if (type === 'remove') {\n\t\t\t\t\trow.find('.value_attribute').hide();\n\t\t\t\t\trow.find('.value_pattern').hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Generate Feed Form Submit\n\t\t\t.on('click', '.delRow', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$(this).closest('tr').remove();\n\t\t\t\thelper.reindex_config_table();\n\t\t\t})\n\t\t\t.on('submit', '#generateFeed', function () {\n\t\t\t\t// Feed Generating form validation\n\t\t\t\t$(this).validate();\n\t\t\t\t\n\t\t\t\tif ($(this).valid()) {\n\t\t\t\t\t$(\".makeFeedResponse\")\n\t\t\t\t\t\t.show()\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Generate Update Feed Form Submit\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\n\t\t\t\t// Feed Generating form validation\n\t\t\t\t$(this).validate();\n\t\t\t\t\n\t\t\t\tif ($(this).valid()) {\n\t\t\t\t\t$(\".makeFeedResponse\")\n\t\t\t\t\t\t.show()\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${data && data.save ? opts.form.save : opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.ftporsftp', function () {\n\t\t\t\tlet server = $(this).val(),\n\t\t\t\t\tstatus = $('.ssh2_status');\n\t\t\t\t\n\t\t\t\tif (server === 'sftp') {\n\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tserver: server\n\t\t\t\t\t}).then(function (response) {\n\t\t\t\t\t\tif (response === 'exists') {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tstatus.hide();\n\t\t\t\t\t\t\t}, 1500);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (e) {\n\t\t\t\t\t\tstatus.hide();\n\t\t\t\t\t\thelper.ajax_fail(e);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tstatus.hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('#updatefeed').trigger('submit', {\n\t\t\t\t\tsave: true\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('change', '#provider', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\n\n\t\t\t\tlet merchant = $(this).val(),\n\t\t\t\t\tfeedType = $(\"#feedType\"),\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tfeedForm.html('<h3><span style=\"float:none;margin: -3px 0 0;\" class=\"spinner is-active\"></span> ' + opts.form.loading_tmpl + '</h3>'); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\n\t\t\t\t\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\n\t\t\t\t\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\n\n\n\t\t\t\t\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\n\t\t\t\t} else {\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\n\t\t\t\t\t\ttype: 'GET',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tnonce: opts.nonce,\n\t\t\t\t\t\t\tprovider: merchant\n\t\t\t\t\t\t}\n\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\n\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\n\t\t\t\t} else {\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tmerchant: merchant\n\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\n\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\n\t\t\t\t\t\tif( 'bing' === merchant ) {\n\t\t\t\t\t\t\t//delimiter value\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\n\n\t\t\t\t\t\t\t//enclosure value\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//reviewer options hide\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Feed Active and Inactive status change via ajax\n\t\t\t.on('change', '.woo_feed_status_input', function () {\n\t\t\t\tlet self = $(this);\n\t\t\t\twpAjax.post('update_feed_status', {\n\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\tfeedName: self.val(),\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\n\t\t\t\t});\n\t\t\t});\n\t\t// event with trigger\n\t\t$(document)\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\n\t\t\t\t\toutOfStockVisibilityRow.show();\n\t\t\t\t} else {\n\t\t\t\t\toutOfStockVisibilityRow.hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.attr_type', function () {\n\t\t\t\t// Attribute type selection\n\t\t\t\tlet self = $(this),\n\t\t\t\t\ttype = self.val(),\n\t\t\t\t\trow = self.closest('tr');\n\t\t\t\t\n\t\t\t\tif (type === 'pattern') {\n\t\t\t\t\trow.find('.wf_attr').hide();\n\t\t\t\t\trow.find('.wf_attr').val('');\n\t\t\t\t\trow.find('.wf_default').show();\n\t\t\t\t} else {\n\t\t\t\t\trow.find('.wf_attr').show();\n\t\t\t\t\trow.find('.wf_default').hide();\n\t\t\t\t\trow.find('.wf_default').val('');\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\n\t\t\t\tlet row = $(this).closest('tr'),\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\n\t\t\t\t\ttype = row.find('.attr_type'),\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\n\t\t\t\t\tprovider = $('#provider').val();\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tif (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\tvalueColumn.append(`<span style=\"font-size:x-small;\"><a style=\"color: red\" href=\"http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category\" target=\"_blank\">${opts.learn_more}</a></span>`);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!googleCategories) {\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\thelper.selectize(select, {\n\t\t\t\t\t\t\tpreload: true,\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\n\t\t\t\t\t\t\tload: function load(query, cb) {\n\t\t\t\t\t\t\t\tif (!googleCategories) {\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\n\t\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\n\t\t\t\t\t\tvalueColumn.find('span').remove();\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '#feedType,#provider', function (e) {\n\t\t\t\tlet type = $('#feedType').val(),\n\t\t\t\t\tprovider = $('#provider').val(),\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\n\t\t\t\t\titemWrapper.hide();\n\t\t\t\t}\n\n\t\t\t\t//when feed type is changed\n\t\t\t\tif( 'feedType' === e.target.id ) {\n\t\t\t\t\tif (type === 'csv' || type === 'txt' || type === 'tsv') {\n\t\t\t\t\t\titemWrapper.hide();\n\t\t\t\t\t\twf_csv_txt.show();\n\n\t\t\t\t\t\tif( 'tsv' === type ) {\n\t\t\t\t\t\t\t$('#delimiter option:last').prop(\"selected\", \"selected\");\n\t\t\t\t\t\t} else if( 'csv' === type ) {\n\t\t\t\t\t\t\t$('#delimiter option:first').prop(\"selected\", \"selected\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if( type === 'xml' ) {\n\t\t\t\t\t\titemWrapper.show();\n\t\t\t\t\t\twf_csv_txt.hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t})\n\t\t\t.trigger('change');\n\t});\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\n"]}
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -414,6 +414,7 @@ class Woo_Feed_Dropdown {
414
  'title' => esc_html__( 'Product Title', 'woo-feed' ),
415
  'parent_title' => esc_html__( 'Parent Title', 'woo-feed' ),
416
  'description' => esc_html__( 'Product Description', 'woo-feed' ),
 
417
  'short_description' => esc_html__( 'Product Short Description', 'woo-feed' ),
418
  'primary_category' => esc_html__( 'Parent Category', 'woo-feed' ),
419
  'primary_category_id' => esc_html__( 'Parent Category ID', 'woo-feed' ),
414
  'title' => esc_html__( 'Product Title', 'woo-feed' ),
415
  'parent_title' => esc_html__( 'Parent Title', 'woo-feed' ),
416
  'description' => esc_html__( 'Product Description', 'woo-feed' ),
417
+ 'description_with_html' => esc_html__( 'Product Description (with HTML)', 'woo-feed' ),
418
  'short_description' => esc_html__( 'Product Short Description', 'woo-feed' ),
419
  'primary_category' => esc_html__( 'Parent Category', 'woo-feed' ),
420
  'primary_category_id' => esc_html__( 'Parent Category ID', 'woo-feed' ),
includes/classes/class-woo-feed-products-v3.php CHANGED
@@ -1800,6 +1800,41 @@ class Woo_Feed_Products_v3
1800
  return apply_filters('woo_feed_filter_product_description', $description, $product, $this->config);
1801
  }
1802
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1803
  /**
1804
  * Get Yoast Product Description
1805
  *
1800
  return apply_filters('woo_feed_filter_product_description', $description, $product, $this->config);
1801
  }
1802
 
1803
+ /**
1804
+ * Get Product Description (with HTML)
1805
+ *
1806
+ * @param WC_Product|WC_Product_Variable|WC_Product_Variation|WC_Product_Grouped|WC_Product_External|WC_Product_Composite $product Product Object.
1807
+ *
1808
+ * @return mixed|string
1809
+ * @since 5.2.41
1810
+ */
1811
+ protected function description_with_html( $product ) {
1812
+ $description = $product->get_description();
1813
+
1814
+ // Get Variation Description
1815
+ if ( $product->is_type( 'variation' ) && empty( $description ) ) {
1816
+ $parent = wc_get_product( $product->get_parent_id() );
1817
+ $description = $parent->get_description();
1818
+ }
1819
+ $description = $this->remove_short_codes( $description );
1820
+
1821
+ // Add variations attributes after description to prevent Facebook error
1822
+ if ( 'facebook' === $this->config['provider'] ) {
1823
+ $variationInfo = explode( '-', $product->get_name() );
1824
+ if ( isset( $variationInfo[1] ) ) {
1825
+ $extension = $variationInfo[1];
1826
+ } else {
1827
+ $extension = $product->get_id();
1828
+ }
1829
+ $description .= ' ' . $extension;
1830
+ }
1831
+
1832
+ //remove spacial characters
1833
+ $strip_description = wp_check_invalid_utf8(wp_specialchars_decode($description),true);
1834
+
1835
+ return apply_filters('woo_feed_filter_product_description_with_html', $description, $product, $this->config);
1836
+ }
1837
+
1838
  /**
1839
  * Get Yoast Product Description
1840
  *
woo-feed.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: CTX Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
- * Version: 4.3.80
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
@@ -39,7 +39,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
39
  * @var string
40
  * @since 3.1.6
41
  */
42
- define( 'WOO_FEED_FREE_VERSION', '4.3.80' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
10
  * Plugin Name: CTX Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
+ * Version: 4.3.81
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
39
  * @var string
40
  * @since 3.1.6
41
  */
42
+ define( 'WOO_FEED_FREE_VERSION', '4.3.81' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {