Changeset 3410740
- Timestamp:
- 12/04/2025 10:55:02 AM (4 months ago)
- Location:
- tax-switch-for-woocommerce
- Files:
-
- 104 added
- 45 edited
-
tags/1.6.3 (added)
-
tags/1.6.3/CHANGELOG.md (added)
-
tags/1.6.3/LICENSE.txt (added)
-
tags/1.6.3/README.md (added)
-
tags/1.6.3/README.txt (added)
-
tags/1.6.3/admin (added)
-
tags/1.6.3/admin/class-wdevs-tax-switch-admin.php (added)
-
tags/1.6.3/admin/index.php (added)
-
tags/1.6.3/admin/js (added)
-
tags/1.6.3/admin/js/wdevs-tax-switch-woocommerce.js (added)
-
tags/1.6.3/admin/partials (added)
-
tags/1.6.3/admin/partials/section-wdevs-tax-switch-shortcode.php (added)
-
tags/1.6.3/build (added)
-
tags/1.6.3/build/label (added)
-
tags/1.6.3/build/label/block.json (added)
-
tags/1.6.3/build/label/index-rtl.css (added)
-
tags/1.6.3/build/label/index.asset.php (added)
-
tags/1.6.3/build/label/index.css (added)
-
tags/1.6.3/build/label/index.js (added)
-
tags/1.6.3/build/label/style-index-rtl.css (added)
-
tags/1.6.3/build/label/style-index.css (added)
-
tags/1.6.3/build/label/view.asset.php (added)
-
tags/1.6.3/build/label/view.js (added)
-
tags/1.6.3/build/shared (added)
-
tags/1.6.3/build/shared/shared.asset.php (added)
-
tags/1.6.3/build/shared/shared.js (added)
-
tags/1.6.3/build/switch (added)
-
tags/1.6.3/build/switch/advanced-product-fields-for-woocommerce.asset.php (added)
-
tags/1.6.3/build/switch/advanced-product-fields-for-woocommerce.js (added)
-
tags/1.6.3/build/switch/block.json (added)
-
tags/1.6.3/build/switch/facetwp.asset.php (added)
-
tags/1.6.3/build/switch/facetwp.js (added)
-
tags/1.6.3/build/switch/fibofilters.asset.php (added)
-
tags/1.6.3/build/switch/fibofilters.js (added)
-
tags/1.6.3/build/switch/index-rtl.css (added)
-
tags/1.6.3/build/switch/index.asset.php (added)
-
tags/1.6.3/build/switch/index.css (added)
-
tags/1.6.3/build/switch/index.js (added)
-
tags/1.6.3/build/switch/kapee-theme.asset.php (added)
-
tags/1.6.3/build/switch/kapee-theme.js (added)
-
tags/1.6.3/build/switch/product-extras-for-woocommerce.asset.php (added)
-
tags/1.6.3/build/switch/product-extras-for-woocommerce.js (added)
-
tags/1.6.3/build/switch/style-index-rtl.css (added)
-
tags/1.6.3/build/switch/style-index.css (added)
-
tags/1.6.3/build/switch/view.asset.php (added)
-
tags/1.6.3/build/switch/view.js (added)
-
tags/1.6.3/build/switch/woocommerce-measurement-price-calculator.asset.php (added)
-
tags/1.6.3/build/switch/woocommerce-measurement-price-calculator.js (added)
-
tags/1.6.3/build/switch/woocommerce-product-addons.asset.php (added)
-
tags/1.6.3/build/switch/woocommerce-product-addons.js (added)
-
tags/1.6.3/build/switch/woocommerce-quantity-manager.asset.php (added)
-
tags/1.6.3/build/switch/woocommerce-quantity-manager.js (added)
-
tags/1.6.3/build/switch/woocommerce-tiered-price-table.asset.php (added)
-
tags/1.6.3/build/switch/woocommerce-tiered-price-table.js (added)
-
tags/1.6.3/build/switch/woocommerce-tm-extra-product-options.asset.php (added)
-
tags/1.6.3/build/switch/woocommerce-tm-extra-product-options.js (added)
-
tags/1.6.3/build/switch/woodmart-theme.asset.php (added)
-
tags/1.6.3/build/switch/woodmart-theme.js (added)
-
tags/1.6.3/build/switch/yith-woocommerce-product-add-ons.asset.php (added)
-
tags/1.6.3/build/switch/yith-woocommerce-product-add-ons.js (added)
-
tags/1.6.3/includes (added)
-
tags/1.6.3/includes/assets (added)
-
tags/1.6.3/includes/assets/css (added)
-
tags/1.6.3/includes/assets/css/wdevs-tax-switch-shared.css (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-activator.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-block-label.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-block-shared.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-block-switch.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-block.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-compatibility.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-deactivator.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-loader.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-mini-cart-context.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch-woocommerce.php (added)
-
tags/1.6.3/includes/class-wdevs-tax-switch.php (added)
-
tags/1.6.3/includes/index.php (added)
-
tags/1.6.3/includes/trait-wdevs-tax-switch-display.php (added)
-
tags/1.6.3/includes/trait-wdevs-tax-switch-helper.php (added)
-
tags/1.6.3/includes/trait-wdevs-tax-switch-plugins.php (added)
-
tags/1.6.3/languages (added)
-
tags/1.6.3/languages/build.json (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-en_US-43dcd1c557291b1a502cbd2ea4d36beb.json (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-en_US-a7d03486c29d1d1d1553c783663175ae.json (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-en_US.l10n.php (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-en_US.mo (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-en_US.po (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-nl_NL-43dcd1c557291b1a502cbd2ea4d36beb.json (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-nl_NL-a7d03486c29d1d1d1553c783663175ae.json (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-nl_NL.l10n.php (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-nl_NL.mo (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-nl_NL.po (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-sv_SE-43dcd1c557291b1a502cbd2ea4d36beb.json (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-sv_SE-a7d03486c29d1d1d1553c783663175ae.json (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-sv_SE.l10n.php (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-sv_SE.mo (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce-sv_SE.po (added)
-
tags/1.6.3/languages/tax-switch-for-woocommerce.pot (added)
-
tags/1.6.3/public (added)
-
tags/1.6.3/public/class-wdevs-tax-switch-public.php (added)
-
tags/1.6.3/public/css (added)
-
tags/1.6.3/public/css/wdevs-tax-switch-public.css (added)
-
tags/1.6.3/public/index.php (added)
-
tags/1.6.3/uninstall.php (added)
-
tags/1.6.3/wdevs-tax-switch.php (added)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/README.md (modified) (3 diffs)
-
trunk/README.txt (modified) (5 diffs)
-
trunk/admin/js/wdevs-tax-switch-woocommerce.js (modified) (1 diff)
-
trunk/admin/partials/section-wdevs-tax-switch-shortcode.php (modified) (2 diffs)
-
trunk/build/label/block.json (modified) (1 diff)
-
trunk/build/label/index.asset.php (modified) (1 diff)
-
trunk/build/label/index.js (modified) (1 diff)
-
trunk/build/label/view.asset.php (modified) (1 diff)
-
trunk/build/label/view.js (modified) (1 diff)
-
trunk/build/shared/shared.asset.php (modified) (1 diff)
-
trunk/build/shared/shared.js (modified) (1 diff)
-
trunk/build/switch/advanced-product-fields-for-woocommerce.asset.php (modified) (1 diff)
-
trunk/build/switch/advanced-product-fields-for-woocommerce.js (modified) (1 diff)
-
trunk/build/switch/block.json (modified) (1 diff)
-
trunk/build/switch/facetwp.asset.php (modified) (1 diff)
-
trunk/build/switch/facetwp.js (modified) (1 diff)
-
trunk/build/switch/fibofilters.asset.php (modified) (1 diff)
-
trunk/build/switch/fibofilters.js (modified) (1 diff)
-
trunk/build/switch/index.asset.php (modified) (1 diff)
-
trunk/build/switch/index.js (modified) (1 diff)
-
trunk/build/switch/kapee-theme.asset.php (modified) (1 diff)
-
trunk/build/switch/kapee-theme.js (modified) (1 diff)
-
trunk/build/switch/product-extras-for-woocommerce.asset.php (modified) (1 diff)
-
trunk/build/switch/product-extras-for-woocommerce.js (modified) (1 diff)
-
trunk/build/switch/style-index-rtl.css (modified) (1 diff)
-
trunk/build/switch/style-index.css (modified) (1 diff)
-
trunk/build/switch/view.asset.php (modified) (1 diff)
-
trunk/build/switch/view.js (modified) (1 diff)
-
trunk/build/switch/woocommerce-measurement-price-calculator.asset.php (modified) (1 diff)
-
trunk/build/switch/woocommerce-measurement-price-calculator.js (modified) (1 diff)
-
trunk/build/switch/woocommerce-product-addons.asset.php (modified) (1 diff)
-
trunk/build/switch/woocommerce-product-addons.js (modified) (1 diff)
-
trunk/build/switch/woocommerce-quantity-manager.asset.php (modified) (1 diff)
-
trunk/build/switch/woocommerce-quantity-manager.js (modified) (1 diff)
-
trunk/build/switch/woocommerce-tiered-price-table.asset.php (modified) (1 diff)
-
trunk/build/switch/woocommerce-tiered-price-table.js (modified) (1 diff)
-
trunk/build/switch/woocommerce-tm-extra-product-options.asset.php (modified) (1 diff)
-
trunk/build/switch/woocommerce-tm-extra-product-options.js (modified) (1 diff)
-
trunk/build/switch/woodmart-theme.asset.php (modified) (1 diff)
-
trunk/build/switch/woodmart-theme.js (modified) (1 diff)
-
trunk/build/switch/yith-woocommerce-product-add-ons.asset.php (modified) (1 diff)
-
trunk/build/switch/yith-woocommerce-product-add-ons.js (modified) (1 diff)
-
trunk/includes/class-wdevs-tax-switch-block-switch.php (modified) (1 diff)
-
trunk/wdevs-tax-switch.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tax-switch-for-woocommerce/trunk/CHANGELOG.md
r3405724 r3410740 2 2 All notable changes to the Tax Switch for WooCommerce plugin will be documented in this file. 3 3 4 ## [1.6.2] - 2025-11-28 4 ## [1.6.3] - 2025-12-04 5 ### Added 6 - New style: `flat pill` 7 ### Updated 8 - Tested WooCommerce 10.3.6 9 - Tested WordPress 6.9 10 11 ## [1.6.2] - 2025-11-29 5 12 ### Added 6 13 - New filter: `wdevs_tax_switch_current_product` to allow third-parties to set the correct product context -
tax-switch-for-woocommerce/trunk/README.md
r3405724 r3410740 107 107 - `class-name`: Adds custom CSS classes to the switch. 108 108 - Default: `is-style-default` 109 - Options: `is-style-default`, `is-style-inline`, custom classes109 - Options: `is-style-default`, `is-style-inline`, `is-style-flat-pill`, custom classes 110 110 - `switch-type`: Determines the style of the toggle. 111 111 - Default: `switch` … … 192 192 - Entr 193 193 - Woodmart 194 - Hello Elementor 194 195 195 196 ### Plugins … … 218 219 - WooCommerce Product Bundles 219 220 - LiteSpeed Cache 221 - Elementor Pro 220 222 221 223 If you encounter any conflicts with other themes or plugins, please report them by opening an issue or through our website. -
tax-switch-for-woocommerce/trunk/README.txt
r3405724 r3410740 3 3 Tags: woocommerce, tax, vat 4 4 Requires at least: 5.0 5 Tested up to: 6. 86 Stable tag: 1.6. 25 Tested up to: 6.9 6 Stable tag: 1.6.3 7 7 Requires PHP: 7.2 8 8 License: GPL-2.0+ … … 87 87 * `class-name`: Adds custom CSS classes to the switch. 88 88 - Default: is-style-default 89 - Options: is-style-default, is-style-inline, or custom classes89 - Options: is-style-default, is-style-inline, is-style-flat-pill, or custom classes 90 90 * `switch-type`: Determines the style of the toggle. 91 91 - Default: `switch` … … 177 177 * Entr 178 178 * Woodmart 179 * Hello Elementor 179 180 180 181 The following plugins have been tested and confirmed compatible: … … 203 204 * WooCommerce Product Bundles 204 205 * LiteSpeed Cache 206 * Elementor Pro 205 207 206 208 If you encounter any compatibility issues with other plugins or themes, please let us know. Your feedback helps us improve the plugin and extend compatibility to more third-party solutions. … … 239 241 240 242 == Changelog == 243 = 1.6.3 = 244 * Added new style: `flat pill` 245 * Tested WooCommerce 10.3.6 246 * Tested WordPress 6.9 247 241 248 = 1.6.2 = 242 249 * Added new filter: `wdevs_tax_switch_current_product` to allow third-parties to set the correct product context -
tax-switch-for-woocommerce/trunk/admin/js/wdevs-tax-switch-woocommerce.js
r3298067 r3410740 103 103 } ); 104 104 105 let lastPreviewData = null; 106 105 107 $( document ).on( 106 108 'wc_backbone_modal_validation', 107 109 function ( e, target, data ) { 110 if ( _.isEqual( data, lastPreviewData ) ) { 111 return; 112 } 113 114 lastPreviewData = { ...data }; 108 115 renderPreview( data ); 109 116 } -
tax-switch-for-woocommerce/trunk/admin/partials/section-wdevs-tax-switch-shortcode.php
r3298067 r3410740 73 73 <option value="is-style-default"><?php esc_html_e( 'Default style', 'tax-switch-for-woocommerce' ); ?></option> 74 74 <option value="is-style-inline"><?php esc_html_e( 'Inline style', 'tax-switch-for-woocommerce' ); ?></option> 75 <option value="is-style-flat-pill"><?php esc_html_e( 'Flat pill', 'tax-switch-for-woocommerce' ); ?></option> 75 76 </select> 76 77 </div> … … 159 160 <input type="text" name="class-name" data-attribute="class-name" 160 161 value="is-style-default"> 161 <div class="wc-shipping-class-modal-help-text"><?php esc_html_e( 'Options: is-style-default, is-style-inline or/and custom classes', 'tax-switch-for-woocommerce' ); ?></div>162 <div class="wc-shipping-class-modal-help-text"><?php esc_html_e( 'Options: is-style-default, is-style-inline, is-style-flat-pill or/and custom classes', 'tax-switch-for-woocommerce' ); ?></div> 162 163 </div> 163 164 </div> -
tax-switch-for-woocommerce/trunk/build/label/block.json
r3405724 r3410740 3 3 "apiVersion": 3, 4 4 "name": "wdevs/tax-switch-label", 5 "version": "1.6. 2",5 "version": "1.6.3", 6 6 "title": "Tax Switch text label", 7 7 "category": "woocommerce", -
tax-switch-for-woocommerce/trunk/build/label/index.asset.php
r3300428 r3410740 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' 8e6cdebdce2850a493d8');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '323be06952723dc3fc25'); -
tax-switch-for-woocommerce/trunk/build/label/index.js
r3300428 r3410740 1 (()=>{"use strict";var e,o={87:e=>{e.exports=window.wp.element},143:e=>{e.exports=window.wp.data},487:(e,o,l)=>{const t=window.wp.blocks,r=window.wp.i18n,a=window.wp.blockEditor,n=window.wp.components;var i=l(67),s=l(790);const c=JSON.parse('{"UU":"wdevs/tax-switch-label"}');(0,t.registerBlockType)(c.UU,{edit:function({attributes:e,setAttributes:o}){const{labelTextColor:l,labelTextColorChecked:t,labelTextIncl:c,labelTextExcl:w}=e,{originalTaxDisplay:x}=window.wtsEditorObject||{originalTaxDisplay:"incl"};return(0,s.jsxs)("div",{...(0,a.useBlockProps)(),children:[(0,s.jsxs)(a.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,r.__)("Labels","tax-switch-for-woocommerce"),initialOpen:!0,children:[(0,s.jsx)(n.TextControl,{label:(0,r.__)("Including VAT label","tax-switch-for-woocommerce"),value:c,onChange:e=>o({labelTextIncl:e})}),(0,s.jsx)(n.TextControl,{label:(0,r.__)("Excluding VAT label","tax-switch-for-woocommerce"),value:w,onChange:e=>o({labelTextExcl:e})})]}),(0,s.jsx)(a.PanelColorSettings,{title:(0,r.__)("Label colors","tax-switch-for-woocommerce"),initialOpen:!0,colorSettings:[{value:l,onChange:e=>o({labelTextColor:e}),label:(0,r.__)("Label excluding VAT color","tax-switch-for-woocommerce")},{value:t,onChange:e=>o({labelTextColorChecked:e}),label:(0,r.__)("Label including VAT color","tax-switch-for-woocommerce")}]})]}),(0,s.jsx)(i.A,{...e,originalTaxDisplay:x})]})},save:function(){return(0,s.jsx)("div",{...a.useBlockProps.save()})}})},790:e=>{e.exports=window.ReactJSXRuntime}},l={};function t(e){var r=l[e];if(void 0!==r)return r.exports;var a=l[e]={exports:{}};return o[e](a,a.exports,t),a.exports}t.m=o,e=[],t.O=(o,l,r,a)=>{if(!l){var n=1/0;for(w=0;w<e.length;w++){for(var[l,r,a]=e[w],i=!0,s=0;s<l.length;s++)(!1&a||n>=a)&&Object.keys(t.O).every( (e=>t.O[e](l[s])))?l.splice(s--,1):(i=!1,a<n&&(n=a));if(i){e.splice(w--,1);var c=r();void 0!==c&&(o=c)}}return o}a=a||0;for(var w=e.length;w>0&&e[w-1][2]>a;w--)e[w]=e[w-1];e[w]=[l,r,a]},t.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},t.d=(e,o)=>{for(var l in o)t.o(o,l)&&!t.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),t.j=38,(()=>{var e={38:0,722:0};t.O.j=o=>0===e[o];var o=(o,l)=>{var r,a,[n,i,s]=l,c=0;if(n.some((o=>0!==e[o]))){for(r in i)t.o(i,r)&&(t.m[r]=i[r]);if(s)var w=s(t)}for(o&&o(l);c<n.length;c++)a=n[c],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(w)},l=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))})();var r=t.O(void 0,[320,722],(()=>t(487)));r=t.O(r)})();1 (()=>{"use strict";var e,o={87:e=>{e.exports=window.wp.element},143:e=>{e.exports=window.wp.data},487:(e,o,l)=>{const t=window.wp.blocks,r=window.wp.i18n,a=window.wp.blockEditor,n=window.wp.components;var i=l(67),s=l(790);const c=JSON.parse('{"UU":"wdevs/tax-switch-label"}');(0,t.registerBlockType)(c.UU,{edit:function({attributes:e,setAttributes:o}){const{labelTextColor:l,labelTextColorChecked:t,labelTextIncl:c,labelTextExcl:w}=e,{originalTaxDisplay:x}=window.wtsEditorObject||{originalTaxDisplay:"incl"};return(0,s.jsxs)("div",{...(0,a.useBlockProps)(),children:[(0,s.jsxs)(a.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,r.__)("Labels","tax-switch-for-woocommerce"),initialOpen:!0,children:[(0,s.jsx)(n.TextControl,{label:(0,r.__)("Including VAT label","tax-switch-for-woocommerce"),value:c,onChange:e=>o({labelTextIncl:e})}),(0,s.jsx)(n.TextControl,{label:(0,r.__)("Excluding VAT label","tax-switch-for-woocommerce"),value:w,onChange:e=>o({labelTextExcl:e})})]}),(0,s.jsx)(a.PanelColorSettings,{title:(0,r.__)("Label colors","tax-switch-for-woocommerce"),initialOpen:!0,colorSettings:[{value:l,onChange:e=>o({labelTextColor:e}),label:(0,r.__)("Label excluding VAT color","tax-switch-for-woocommerce")},{value:t,onChange:e=>o({labelTextColorChecked:e}),label:(0,r.__)("Label including VAT color","tax-switch-for-woocommerce")}]})]}),(0,s.jsx)(i.A,{...e,originalTaxDisplay:x})]})},save:function(){return(0,s.jsx)("div",{...a.useBlockProps.save()})}})},790:e=>{e.exports=window.ReactJSXRuntime}},l={};function t(e){var r=l[e];if(void 0!==r)return r.exports;var a=l[e]={exports:{}};return o[e](a,a.exports,t),a.exports}t.m=o,e=[],t.O=(o,l,r,a)=>{if(!l){var n=1/0;for(w=0;w<e.length;w++){for(var[l,r,a]=e[w],i=!0,s=0;s<l.length;s++)(!1&a||n>=a)&&Object.keys(t.O).every(e=>t.O[e](l[s]))?l.splice(s--,1):(i=!1,a<n&&(n=a));if(i){e.splice(w--,1);var c=r();void 0!==c&&(o=c)}}return o}a=a||0;for(var w=e.length;w>0&&e[w-1][2]>a;w--)e[w]=e[w-1];e[w]=[l,r,a]},t.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},t.d=(e,o)=>{for(var l in o)t.o(o,l)&&!t.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),t.j=38,(()=>{var e={38:0,722:0};t.O.j=o=>0===e[o];var o=(o,l)=>{var r,a,[n,i,s]=l,c=0;if(n.some(o=>0!==e[o])){for(r in i)t.o(i,r)&&(t.m[r]=i[r]);if(s)var w=s(t)}for(o&&o(l);c<n.length;c++)a=n[c],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(w)},l=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];l.forEach(o.bind(null,0)),l.push=o.bind(null,l.push.bind(l))})();var r=t.O(void 0,[320,722],()=>t(487));r=t.O(r)})(); -
tax-switch-for-woocommerce/trunk/build/label/view.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element'), 'version' => ' f4164dcb4645f3a844f2');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element'), 'version' => '585cc50c65e900e12e3f'); -
tax-switch-for-woocommerce/trunk/build/label/view.js
r3405724 r3410740 1 (()=>{"use strict";var e,r={87:e=>{e.exports=window.wp.element},130:(e,r,t)=>{var o=t(87),a=t(67),n=t(538),s=t(790);(0,n.P)(( ()=>{if(!(0,n.I)())return;const e=document.querySelectorAll(".wp-block-wdevs-tax-switch-label");if(e.length>0){const r=window.wtsViewObject||{originalTaxDisplay:"incl"};e.forEach((e=>{e&&((e,r)=>{const t={...e.dataset,...r};(0,o.createRoot)(e).render((0,s.jsx)(o.Suspense,{fallback:(0,s.jsx)("div",{className:"wp-block-placeholder"}),children:(0,s.jsx)(a.A,{...t})}))})(e,r)}))}}))},143:e=>{e.exports=window.wp.data},790:e=>{e.exports=window.ReactJSXRuntime}},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.m=r,e=[],o.O=(r,t,a,n)=>{if(!t){var s=1/0;for(d=0;d<e.length;d++){for(var[t,a,n]=e[d],i=!0,l=0;l<t.length;l++)(!1&n||s>=n)&&Object.keys(o.O).every((e=>o.O[e](t[l])))?t.splice(l--,1):(i=!1,n<s&&(s=n));if(i){e.splice(d--,1);var c=a();void 0!==c&&(r=c)}}return r}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[t,a,n]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.j=733,(()=>{var e={733:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var a,n,[s,i,l]=t,c=0;if(s.some((r=>0!==e[r]))){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(l)var d=l(o)}for(r&&r(t);c<s.length;c++)n=s[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var a=o.O(void 0,[320],(()=>o(130)));a=o.O(a)})();1 (()=>{"use strict";var e,r={87:e=>{e.exports=window.wp.element},130:(e,r,t)=>{var o=t(87),a=t(67),n=t(538),s=t(790);(0,n.P)(()=>{if(!(0,n.I)())return;const e=document.querySelectorAll(".wp-block-wdevs-tax-switch-label");if(e.length>0){const r=window.wtsViewObject||{originalTaxDisplay:"incl"};e.forEach(e=>{e&&((e,r)=>{const t={...e.dataset,...r};(0,o.createRoot)(e).render((0,s.jsx)(o.Suspense,{fallback:(0,s.jsx)("div",{className:"wp-block-placeholder"}),children:(0,s.jsx)(a.A,{...t})}))})(e,r)})}})},143:e=>{e.exports=window.wp.data},790:e=>{e.exports=window.ReactJSXRuntime}},t={};function o(e){var a=t[e];if(void 0!==a)return a.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.m=r,e=[],o.O=(r,t,a,n)=>{if(!t){var s=1/0;for(d=0;d<e.length;d++){for(var[t,a,n]=e[d],i=!0,l=0;l<t.length;l++)(!1&n||s>=n)&&Object.keys(o.O).every(e=>o.O[e](t[l]))?t.splice(l--,1):(i=!1,n<s&&(s=n));if(i){e.splice(d--,1);var c=a();void 0!==c&&(r=c)}}return r}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[t,a,n]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.j=733,(()=>{var e={733:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var a,n,[s,i,l]=t,c=0;if(s.some(r=>0!==e[r])){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(l)var d=l(o)}for(r&&r(t);c<s.length;c++)n=s[c],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return o.O(d)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var a=o.O(void 0,[320],()=>o(130));a=o.O(a)})(); -
tax-switch-for-woocommerce/trunk/build/shared/shared.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array(), 'version' => ' 7177cf906210e356a8ca');1 <?php return array('dependencies' => array(), 'version' => '31918c5fa4680c26b54f'); -
tax-switch-for-woocommerce/trunk/build/shared/shared.js
r3405724 r3410740 1 "use strict";(globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[]).push([[320],{67:(t,e,s)=>{s.d(e,{A:()=>o});var i=s(87),c=s(143),n=s(159),a=s(75),l=s(790);class r extends i.Component{constructor(t){super(t);const{readOnly:e,isSwitched:s}=this.getInitialState(t);this.state={readOnly:e,isSwitched:s},this.unsubscribe=(0,c.subscribe)(( ()=>{const t=(0,a.ir)();this.state.isSwitched!==t&&this.setState({isSwitched:t})}))}getInitialState(t){const e=n.A.parseBooleanValue(t.readOnly),s=t.originalTaxDisplay||"incl";let i;return i=e?!("incl"===s):(0,a.ir)(),{readOnly:e,isSwitched:i}}componentWillUnmount(){this.unsubscribe&&this.unsubscribe()}displayIncludingVat(){const{originalTaxDisplay:t="incl"}=this.props,{isSwitched:e}=this.state;return n.A.displayIncludingVat(t,e)}getCurrentLabel(){const{labelTextIncl:t,labelTextExcl:e}=this.props;return this.displayIncludingVat()?t||"":e||""}render(){const{labelTextColor:t,labelTextColorChecked:e,labelTextIncl:s,labelTextExcl:i}=this.props;if(!s&&!i)return"";const c=this.displayIncludingVat();return(0,l.jsx)("span",{className:"wdevs-tax-switch-labels "+(c?"wts-price-incl":"wts-price-excl"),style:{"--wts-text-color":t,"--wts-text-color-checked":e},children:(0,l.jsx)("span",{className:"wdevs-tax-switch-label-text",children:this.getCurrentLabel()})})}}const o=/^(38|733)$/.test(s.j)?r:null},75:(t,e,s)=>{s.d(e,{D_:()=>w,WJ:()=>u,ir:()=>d,rj:()=>h,z6:()=>p});var i=s(143);const c="wdevs_tax_switch_is_switched",n="wdevs-tax-switch/store",a="SET_IS_SWITCHED",l="SET_IS_DISABLED",r={setIsSwitched:t=>({type:a,value:t}),saveIsSwitched:t=>(localStorage.setItem(c,JSON.stringify(t)),{type:a,value:t}),setIsDisabled:t=>({type:l,value:t})};let o=(0,i.select)(n);function d(){return(0,i.select)(n).getIsSwitched()}function h(t){return(0,i.dispatch)(n).saveIsSwitched(t)}function u(t){return(0,i.dispatch)(n).setIsSwitched(t)}function w(){return(0,i.select)(n).getIsDisabled()}function p(t){return(0,i.dispatch)(n).setIsDisabled(t)}void 0===o&&(o=(0,i.createReduxStore)(n,{reducer:(t=(()=>{const t=localStorage.getItem(c);return{isSwitched:!!t&&JSON.parse(t),isDisabled:!1}})(),e)=>{switch(e.type){case a:return{...t,isSwitched:e.value};case l:return{...t,isDisabled:e.value};default:return t}},actions:r,selectors:{getIsSwitched:t=>t.isSwitched,getIsDisabled:t=>t.isDisabled}}),(0,i.register)(o))},159:(t,e,s)=>{s.d(e,{A:()=>c});var i=s(75);const c=285!=s.j?class{static togglePriceClasses(t,e){const s=this.displayIncludingVat(t,e);document.querySelectorAll(".wts-price-wrapper").forEach((t=>{const e=t.querySelector(":scope > .wts-price-incl"),i=t.querySelector(":scope > .wts-price-excl");s?(e.classList.remove("wts-inactive"),e.classList.add("wts-active"),i.classList.remove("wts-active"),i.classList.add("wts-inactive")):(e.classList.remove("wts-active"),e.classList.add("wts-inactive"),i.classList.remove("wts-inactive"),i.classList.add("wts-active"))}))}static displayIncludingVat(t,e){return null==e&&(e=(0,i.ir)()),"incl"===t&&!e||"excl"===t&&e}static parseBooleanValue(t){return!!t&&JSON.parse(t)}static setPriceClasses(t){return this.togglePriceClasses(t,(0,i.ir)())}static calculateAlternatePrice(t,e,s){if(!t||t<=0||!s)return t;const i=1+s/100;let c;return c="incl"===e?t/i:t*i,Number(c.toFixed(2))}static calculateOriginalPrice(t,e,s){let i="excl";return"excl"===e&&(i="incl"),this.calculateAlternatePrice(t,i,s)}}:null},538:(t,e,s)=>{function i(){return!(window.wtsViewObject||{checkPriceElements:!1}).checkPriceElements||document.querySelectorAll(".wts-price-wrapper").length>0}function c(t){"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t,{once:!0})}s.d(e,{I:()=>i,P:()=>c})},651:(t,e,s)=>{s.d(e,{A:()=>i});const i=/^(202|285|38|657|733|793|894)$/.test(s.j)?null:class{constructor(t){this.originalTaxDisplay=t}build(t,e,s,i=null){const c=this.getPricesBasedOnTaxDisplay(e,s),n=c.including,a=c.excluding;function l(t){return t?"wts-active":"wts-inactive"}function r(e,s){return`\n <span class="wts-price-${s?"incl":"excl"} ${l(s===t)}">\n ${e}\n </span>\n `}let o=`\n <span class="wts-price-container">\n <span class="wts-price-wrapper">\n ${r(n,!0)}\n ${r(a,!1)}\n </span>\n `;if(i){function d(e,s){return`\n <span class="wts-price-${s?"incl":"excl"} ${l(s===t)}">\n ${e}\n </span>\n `}o+=`\n <span class="wts-price-wrapper">\n ${d(i.including,!0)}\n ${d(i.excluding,!1)}\n </span>\n `}return o+="</span>",o.trim()}getPricesBasedOnTaxDisplay(t,e){return"incl"===this.originalTaxDisplay?{including:t,excluding:e}:{including:e,excluding:t}}static getVatTexts(t=null){const e=document.createTextNode(" ").nodeValue;let s,i;if(t){const c=jQuery(t);if(s=c.find(".wts-price-incl .wts-vat-text").first(),i=c.find(".wts-price-excl .wts-vat-text").first(),s.length||i.length)return{including:s.length?e+s.clone().prop("outerHTML"):"",excluding:i.length?e+i.clone().prop("outerHTML"):""}}return s=jQuery(".wts-price-wrapper .wts-price-incl .wts-vat-text").first(),i=jQuery(".wts-price-wrapper .wts-price-excl .wts-vat-text").first(),{including:s.length?e+s.clone().prop("outerHTML"):"",excluding:i.length?e+i.clone().prop("outerHTML"):""}}static getVatTextElement(t,e,s){return`<span class="wts-price-wrapper">\n <span class="wts-price-incl ${t?"wts-active":"wts-inactive"}">\n ${e}\n </span>\n <span class="wts-price-excl ${t?"wts-inactive":"wts-active"}">\n ${s}\n </span>\n </span>\n `}}},983:(t,e,s)=>{s.d(e,{A:()=>o});var i=s(87),c=s(143),n=s(159),a=s(75),l=s(790);class r extends i.Component{constructor(t){super(t);const{readOnly:e,isSwitched:s}=this.getInitialState(t);this.state={readOnly:e,isSwitched:s,isDisabled:(0,a.D_)()},this.handleChange=this.handleChange.bind(this),this.unsubscribe=(0,c.subscribe)((()=>{const t=(0,a.ir)(),e=(0,a.D_)();this.state.isSwitched===t&&this.state.isDisabled===e||this.setState({isSwitched:t,isDisabled:e})}))}getInitialState(t){const e=n.A.parseBooleanValue(t.readOnly),s=t.originalTaxDisplay||"incl";let i;return i=e?!("incl"===s):(0,a.ir)(),{readOnly:e,isSwitched:i}}componentWillUnmount(){this.unsubscribe&&this.unsubscribe()}handleChange(){const t=!this.state.isSwitched;this.setState({isSwitched:t},(()=>{this.state.readOnly?(0,a.WJ)(t):((0,a.rj)(t),this.fireSwitchChangeEvent(t)),this.togglePriceClasses()}))}displayIncludingVat(){const{originalTaxDisplay:t="incl"}=this.props,{isSwitched:e}=this.state;return n.A.displayIncludingVat(t,e)}togglePriceClasses(){const{originalTaxDisplay:t="incl"}=this.props,{isSwitched:e}=this.state;return n.A.togglePriceClasses(t,e)}getCurrentLabel(){const{switchLabelIncl:t,switchLabelExcl:e}=this.props;return this.displayIncludingVat()?t||"":e||""}fireSwitchChangeEvent(t){const e=new CustomEvent("wdevs-tax-switch-changed",{detail:{isSwitched:t,displayIncludingVat:this.displayIncludingVat()}});document.dispatchEvent(e)}renderButtons(){const{switchColor:t,switchColorChecked:e,switchBackgroundColor:s,switchBackgroundColorChecked:i,switchTextColor:c,switchLabelIncl:n,switchLabelExcl:a}=this.props,r=this.displayIncludingVat(),{isDisabled:o}=this.state;return(0,l.jsxs)("div",{className:"wdevs-tax-switch wdevs-tax-buttons",style:{"--wts-color":t,"--wts-color-checked":e,"--wts-bg-color":s,"--wts-bg-color-checked":i,"--wts-text-color":c},children:[(0,l.jsx)("button",{type:"button",className:"wdevs-tax-button "+(r?"wdevs-tax-button-active":""),disabled:o,onClick:()=>{r||this.handleChange()},children:n||"Incl. VAT"}),(0,l.jsx)("button",{type:"button",className:"wdevs-tax-button "+(r?"":"wdevs-tax-button-active"),disabled:o,onClick:()=>{r&&this.handleChange()},children:a||"Excl. VAT"})]})}renderToggleSwitch(){const{switchColor:t,switchColorChecked:e,switchBackgroundColor:s,switchBackgroundColorChecked:i,switchTextColor:c,switchLabelIncl:n,switchLabelExcl:a}=this.props,r=this.displayIncludingVat(),o=n||a,{isDisabled:d}=this.state;return(0,l.jsxs)("div",{className:"wdevs-tax-switch",style:{"--wts-color":t,"--wts-color-checked":e,"--wts-bg-color":s,"--wts-bg-color-checked":i,"--wts-text-color":c},children:[(0,l.jsxs)("label",{className:"wdevs-tax-switch-label",children:[(0,l.jsx)("input",{type:"checkbox",name:"wdevs-tax-switch-checkbox",onChange:this.handleChange,checked:r,disabled:d,className:"wdevs-tax-switch-checkbox"}),(0,l.jsx)("span",{className:"wdevs-tax-switch-slider"})]}),o&&(0,l.jsx)("span",{className:"wdevs-tax-switch-label-text",onClick:this.handleChange,children:this.getCurrentLabel()})]})}render(){const{switchType:t="switch"}=this.props;return"buttons"===t?this.renderButtons():this.renderToggleSwitch()}}const o=/^(202|793)$/.test(s.j)?r:null}}]);1 "use strict";(globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[]).push([[320],{67:(t,e,s)=>{s.d(e,{A:()=>o});var i=s(87),c=s(143),n=s(159),a=s(75),l=s(790);class r extends i.Component{constructor(t){super(t);const{readOnly:e,isSwitched:s}=this.getInitialState(t);this.state={readOnly:e,isSwitched:s},this.unsubscribe=(0,c.subscribe)(()=>{const t=(0,a.ir)();this.state.isSwitched!==t&&this.setState({isSwitched:t})})}getInitialState(t){const e=n.A.parseBooleanValue(t.readOnly),s=t.originalTaxDisplay||"incl";let i;return i=e?!("incl"===s):(0,a.ir)(),{readOnly:e,isSwitched:i}}componentWillUnmount(){this.unsubscribe&&this.unsubscribe()}displayIncludingVat(){const{originalTaxDisplay:t="incl"}=this.props,{isSwitched:e}=this.state;return n.A.displayIncludingVat(t,e)}getCurrentLabel(){const{labelTextIncl:t,labelTextExcl:e}=this.props;return this.displayIncludingVat()?t||"":e||""}render(){const{labelTextColor:t,labelTextColorChecked:e,labelTextIncl:s,labelTextExcl:i}=this.props;if(!s&&!i)return"";const c=this.displayIncludingVat();return(0,l.jsx)("span",{className:"wdevs-tax-switch-labels "+(c?"wts-price-incl":"wts-price-excl"),style:{"--wts-text-color":t,"--wts-text-color-checked":e},children:(0,l.jsx)("span",{className:"wdevs-tax-switch-label-text",children:this.getCurrentLabel()})})}}const o=/^(38|733)$/.test(s.j)?r:null},75:(t,e,s)=>{s.d(e,{D_:()=>w,WJ:()=>u,ir:()=>d,rj:()=>h,z6:()=>p});var i=s(143);const c="wdevs_tax_switch_is_switched",n="wdevs-tax-switch/store",a="SET_IS_SWITCHED",l="SET_IS_DISABLED",r={setIsSwitched:t=>({type:a,value:t}),saveIsSwitched:t=>(localStorage.setItem(c,JSON.stringify(t)),{type:a,value:t}),setIsDisabled:t=>({type:l,value:t})};let o=(0,i.select)(n);function d(){return(0,i.select)(n).getIsSwitched()}function h(t){return(0,i.dispatch)(n).saveIsSwitched(t)}function u(t){return(0,i.dispatch)(n).setIsSwitched(t)}function w(){return(0,i.select)(n).getIsDisabled()}function p(t){return(0,i.dispatch)(n).setIsDisabled(t)}void 0===o&&(o=(0,i.createReduxStore)(n,{reducer:(t=(()=>{const t=localStorage.getItem(c);return{isSwitched:!!t&&JSON.parse(t),isDisabled:!1}})(),e)=>{switch(e.type){case a:return{...t,isSwitched:e.value};case l:return{...t,isDisabled:e.value};default:return t}},actions:r,selectors:{getIsSwitched:t=>t.isSwitched,getIsDisabled:t=>t.isDisabled}}),(0,i.register)(o))},159:(t,e,s)=>{s.d(e,{A:()=>c});var i=s(75);const c=285!=s.j?class{static togglePriceClasses(t,e){const s=this.displayIncludingVat(t,e);document.querySelectorAll(".wts-price-wrapper").forEach(t=>{const e=t.querySelector(":scope > .wts-price-incl"),i=t.querySelector(":scope > .wts-price-excl");s?(e.classList.remove("wts-inactive"),e.classList.add("wts-active"),i.classList.remove("wts-active"),i.classList.add("wts-inactive")):(e.classList.remove("wts-active"),e.classList.add("wts-inactive"),i.classList.remove("wts-inactive"),i.classList.add("wts-active"))})}static displayIncludingVat(t,e){return null==e&&(e=(0,i.ir)()),"incl"===t&&!e||"excl"===t&&e}static parseBooleanValue(t){return!!t&&JSON.parse(t)}static setPriceClasses(t){return this.togglePriceClasses(t,(0,i.ir)())}static calculateAlternatePrice(t,e,s){if(!t||t<=0||!s)return t;const i=1+s/100;let c;return c="incl"===e?t/i:t*i,Number(c.toFixed(2))}static calculateOriginalPrice(t,e,s){let i="excl";return"excl"===e&&(i="incl"),this.calculateAlternatePrice(t,i,s)}}:null},538:(t,e,s)=>{function i(){return!(window.wtsViewObject||{checkPriceElements:!1}).checkPriceElements||document.querySelectorAll(".wts-price-wrapper").length>0}function c(t){"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t,{once:!0})}s.d(e,{I:()=>i,P:()=>c})},651:(t,e,s)=>{s.d(e,{A:()=>i});const i=/^(202|285|38|657|733|793|894)$/.test(s.j)?null:class{constructor(t){this.originalTaxDisplay=t}build(t,e,s,i=null){const c=this.getPricesBasedOnTaxDisplay(e,s),n=c.including,a=c.excluding;function l(t){return t?"wts-active":"wts-inactive"}function r(e,s){return`\n <span class="wts-price-${s?"incl":"excl"} ${l(s===t)}">\n ${e}\n </span>\n `}let o=`\n <span class="wts-price-container">\n <span class="wts-price-wrapper">\n ${r(n,!0)}\n ${r(a,!1)}\n </span>\n `;if(i){function d(e,s){return`\n <span class="wts-price-${s?"incl":"excl"} ${l(s===t)}">\n ${e}\n </span>\n `}o+=`\n <span class="wts-price-wrapper">\n ${d(i.including,!0)}\n ${d(i.excluding,!1)}\n </span>\n `}return o+="</span>",o.trim()}getPricesBasedOnTaxDisplay(t,e){return"incl"===this.originalTaxDisplay?{including:t,excluding:e}:{including:e,excluding:t}}static getVatTexts(t=null){const e=document.createTextNode(" ").nodeValue;let s,i;if(t){const c=jQuery(t);if(s=c.find(".wts-price-incl .wts-vat-text").first(),i=c.find(".wts-price-excl .wts-vat-text").first(),s.length||i.length)return{including:s.length?e+s.clone().prop("outerHTML"):"",excluding:i.length?e+i.clone().prop("outerHTML"):""}}return s=jQuery(".wts-price-wrapper .wts-price-incl .wts-vat-text").first(),i=jQuery(".wts-price-wrapper .wts-price-excl .wts-vat-text").first(),{including:s.length?e+s.clone().prop("outerHTML"):"",excluding:i.length?e+i.clone().prop("outerHTML"):""}}static getVatTextElement(t,e,s){return`<span class="wts-price-wrapper">\n <span class="wts-price-incl ${t?"wts-active":"wts-inactive"}">\n ${e}\n </span>\n <span class="wts-price-excl ${t?"wts-inactive":"wts-active"}">\n ${s}\n </span>\n </span>\n `}}},983:(t,e,s)=>{s.d(e,{A:()=>o});var i=s(87),c=s(143),n=s(159),a=s(75),l=s(790);class r extends i.Component{constructor(t){super(t);const{readOnly:e,isSwitched:s}=this.getInitialState(t);this.state={readOnly:e,isSwitched:s,isDisabled:(0,a.D_)()},this.handleChange=this.handleChange.bind(this),this.unsubscribe=(0,c.subscribe)(()=>{const t=(0,a.ir)(),e=(0,a.D_)();this.state.isSwitched===t&&this.state.isDisabled===e||this.setState({isSwitched:t,isDisabled:e})})}getInitialState(t){const e=n.A.parseBooleanValue(t.readOnly),s=t.originalTaxDisplay||"incl";let i;return i=e?!("incl"===s):(0,a.ir)(),{readOnly:e,isSwitched:i}}componentWillUnmount(){this.unsubscribe&&this.unsubscribe()}handleChange(){const t=!this.state.isSwitched;this.setState({isSwitched:t},()=>{this.state.readOnly?(0,a.WJ)(t):((0,a.rj)(t),this.fireSwitchChangeEvent(t)),this.togglePriceClasses()})}displayIncludingVat(){const{originalTaxDisplay:t="incl"}=this.props,{isSwitched:e}=this.state;return n.A.displayIncludingVat(t,e)}togglePriceClasses(){const{originalTaxDisplay:t="incl"}=this.props,{isSwitched:e}=this.state;return n.A.togglePriceClasses(t,e)}getCurrentLabel(){const{switchLabelIncl:t,switchLabelExcl:e}=this.props;return this.displayIncludingVat()?t||"":e||""}fireSwitchChangeEvent(t){const e=new CustomEvent("wdevs-tax-switch-changed",{detail:{isSwitched:t,displayIncludingVat:this.displayIncludingVat()}});document.dispatchEvent(e)}renderButtons(){const{switchColor:t,switchColorChecked:e,switchBackgroundColor:s,switchBackgroundColorChecked:i,switchTextColor:c,switchLabelIncl:n,switchLabelExcl:a}=this.props,r=this.displayIncludingVat(),{isDisabled:o}=this.state;return(0,l.jsxs)("div",{className:"wdevs-tax-switch wdevs-tax-buttons",style:{"--wts-color":t,"--wts-color-checked":e,"--wts-bg-color":s,"--wts-bg-color-checked":i,"--wts-text-color":c},children:[(0,l.jsx)("button",{type:"button",className:"wdevs-tax-button "+(r?"wdevs-tax-button-active":""),disabled:o,onClick:()=>{r||this.handleChange()},children:n||"Incl. VAT"}),(0,l.jsx)("button",{type:"button",className:"wdevs-tax-button "+(r?"":"wdevs-tax-button-active"),disabled:o,onClick:()=>{r&&this.handleChange()},children:a||"Excl. VAT"})]})}renderToggleSwitch(){const{switchColor:t,switchColorChecked:e,switchBackgroundColor:s,switchBackgroundColorChecked:i,switchTextColor:c,switchLabelIncl:n,switchLabelExcl:a}=this.props,r=this.displayIncludingVat(),o=n||a,{isDisabled:d}=this.state;return(0,l.jsxs)("div",{className:"wdevs-tax-switch",style:{"--wts-color":t,"--wts-color-checked":e,"--wts-bg-color":s,"--wts-bg-color-checked":i,"--wts-text-color":c},children:[(0,l.jsxs)("label",{className:"wdevs-tax-switch-label",children:[(0,l.jsx)("input",{type:"checkbox",name:"wdevs-tax-switch-checkbox",onChange:this.handleChange,checked:r,disabled:d,className:"wdevs-tax-switch-checkbox"}),(0,l.jsx)("span",{className:"wdevs-tax-switch-slider"})]}),o&&(0,l.jsx)("span",{className:"wdevs-tax-switch-label-text",onClick:this.handleChange,children:this.getCurrentLabel()})]})}render(){const{switchType:t="switch"}=this.props;return"buttons"===t?this.renderButtons():this.renderToggleSwitch()}}const o=/^(202|793)$/.test(s.j)?r:null}}]); -
tax-switch-for-woocommerce/trunk/build/switch/advanced-product-fields-for-woocommerce.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' e37dc60b9e853c0a6b1e');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => '0312c2a59c71ee41b4ab'); -
tax-switch-for-woocommerce/trunk/build/switch/advanced-product-fields-for-woocommerce.js
r3405724 r3410740 1 (()=>{"use strict";var t,i={143:t=>{t.exports=window.wp.data},266:(t,i,r)=>{const a=window.jQuery;var e=r.n(a),n=r(159),o=r(651);const l=class{constructor(t){this.originalTaxDisplay=t,this.taxSwitchElementBuilder=new o.A(this.originalTaxDisplay)}init(){this.registerWooCommerceEvents(),this.registerFilters()}registerWooCommerceEvents(){const t=this;e()(document).on("wapf/pricing",( (i,r,a,o,l)=>{if(!l)return;const c=l.data("taxFactor");if(!c||c<=1)return;const s=100*(c-1),w=n.A.displayIncludingVat(t.originalTaxDisplay);e()(".wapf-product-total").html(t.taxSwitchElementBuilder.build(w,t.formatPrice(r),t.formatPrice(n.A.calculateAlternatePrice(r,t.originalTaxDisplay,s)),null)),e()(".wapf-options-total").html(t.taxSwitchElementBuilder.build(w,t.formatPrice(a),t.formatPrice(n.A.calculateAlternatePrice(a,t.originalTaxDisplay,s)),null)),e()(".wapf-grand-total").html(t.taxSwitchElementBuilder.build(w,t.formatPrice(o),t.formatPrice(n.A.calculateAlternatePrice(o,t.originalTaxDisplay,s)),null))}))}registerFilters(){const t=this;void 0!==window.WAPF&&void 0!==window.WAPF.Filter&&window.WAPF.Filter.add("wapf/html/fxhint",(function(i){if(!window.accounting)return i;const r=document.querySelector("[data-tax-factor]"),a=r?r.dataset.taxFactor:1;if(!a||a<=1)return;const e=i.replace(/[()]/g,""),o=window.accounting.unformat(e,window.wapf_config?.display_options.decimal),l=100*(a-1),c=n.A.displayIncludingVat(t.originalTaxDisplay),s=t.formatPrice(n.A.calculateAlternatePrice(o,t.originalTaxDisplay,l));let w=window.WAPF.Filter.apply("wapf/fx/hint",s);return w=window.wapf_config.hint.replace("{x}",w),t.taxSwitchElementBuilder.build(c,i,w,null)}))}formatPrice(t){return window.WAPF&&window.WAPF.Util&&window.WAPF.Util.formatMoney?window.WAPF.Util.formatMoney(t,window.wapf_config?.display_options):t}};(0,r(538).P)((()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"};new l(t.originalTaxDisplay).init()}))}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={exports:{}};return i[t](n,n.exports,a),n.exports}a.m=i,t=[],a.O=(i,r,e,n)=>{if(!r){var o=1/0;for(w=0;w<t.length;w++){for(var[r,e,n]=t[w],l=!0,c=0;c<r.length;c++)(!1&n||o>=n)&&Object.keys(a.O).every((t=>a.O[t](r[c])))?r.splice(c--,1):(l=!1,n<o&&(o=n));if(l){t.splice(w--,1);var s=e();void 0!==s&&(i=s)}}return i}n=n||0;for(var w=t.length;w>0&&t[w-1][2]>n;w--)t[w]=t[w-1];t[w]=[r,e,n]},a.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return a.d(i,{a:i}),i},a.d=(t,i)=>{for(var r in i)a.o(i,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},a.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),a.j=253,(()=>{var t={253:0};a.O.j=i=>0===t[i];var i=(i,r)=>{var e,n,[o,l,c]=r,s=0;if(o.some((i=>0!==t[i]))){for(e in l)a.o(l,e)&&(a.m[e]=l[e]);if(c)var w=c(a)}for(i&&i(r);s<o.length;s++)n=o[s],a.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return a.O(w)},r=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];r.forEach(i.bind(null,0)),r.push=i.bind(null,r.push.bind(r))})();var e=a.O(void 0,[320],(()=>a(266)));e=a.O(e)})();1 (()=>{"use strict";var t,i={143:t=>{t.exports=window.wp.data},266:(t,i,r)=>{const a=window.jQuery;var e=r.n(a),n=r(159),o=r(651);const l=class{constructor(t){this.originalTaxDisplay=t,this.taxSwitchElementBuilder=new o.A(this.originalTaxDisplay)}init(){this.registerWooCommerceEvents(),this.registerFilters()}registerWooCommerceEvents(){const t=this;e()(document).on("wapf/pricing",(i,r,a,o,l)=>{if(!l)return;const c=l.data("taxFactor");if(!c||c<=1)return;const s=100*(c-1),w=n.A.displayIncludingVat(t.originalTaxDisplay);e()(".wapf-product-total").html(t.taxSwitchElementBuilder.build(w,t.formatPrice(r),t.formatPrice(n.A.calculateAlternatePrice(r,t.originalTaxDisplay,s)),null)),e()(".wapf-options-total").html(t.taxSwitchElementBuilder.build(w,t.formatPrice(a),t.formatPrice(n.A.calculateAlternatePrice(a,t.originalTaxDisplay,s)),null)),e()(".wapf-grand-total").html(t.taxSwitchElementBuilder.build(w,t.formatPrice(o),t.formatPrice(n.A.calculateAlternatePrice(o,t.originalTaxDisplay,s)),null))})}registerFilters(){const t=this;void 0!==window.WAPF&&void 0!==window.WAPF.Filter&&window.WAPF.Filter.add("wapf/html/fxhint",function(i){if(!window.accounting)return i;const r=document.querySelector("[data-tax-factor]"),a=r?r.dataset.taxFactor:1;if(!a||a<=1)return;const e=i.replace(/[()]/g,""),o=window.accounting.unformat(e,window.wapf_config?.display_options.decimal),l=100*(a-1),c=n.A.displayIncludingVat(t.originalTaxDisplay),s=t.formatPrice(n.A.calculateAlternatePrice(o,t.originalTaxDisplay,l));let w=window.WAPF.Filter.apply("wapf/fx/hint",s);return w=window.wapf_config.hint.replace("{x}",w),t.taxSwitchElementBuilder.build(c,i,w,null)})}formatPrice(t){return window.WAPF&&window.WAPF.Util&&window.WAPF.Util.formatMoney?window.WAPF.Util.formatMoney(t,window.wapf_config?.display_options):t}};(0,r(538).P)(()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"};new l(t.originalTaxDisplay).init()})}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var n=r[t]={exports:{}};return i[t](n,n.exports,a),n.exports}a.m=i,t=[],a.O=(i,r,e,n)=>{if(!r){var o=1/0;for(w=0;w<t.length;w++){for(var[r,e,n]=t[w],l=!0,c=0;c<r.length;c++)(!1&n||o>=n)&&Object.keys(a.O).every(t=>a.O[t](r[c]))?r.splice(c--,1):(l=!1,n<o&&(o=n));if(l){t.splice(w--,1);var s=e();void 0!==s&&(i=s)}}return i}n=n||0;for(var w=t.length;w>0&&t[w-1][2]>n;w--)t[w]=t[w-1];t[w]=[r,e,n]},a.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return a.d(i,{a:i}),i},a.d=(t,i)=>{for(var r in i)a.o(i,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},a.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),a.j=253,(()=>{var t={253:0};a.O.j=i=>0===t[i];var i=(i,r)=>{var e,n,[o,l,c]=r,s=0;if(o.some(i=>0!==t[i])){for(e in l)a.o(l,e)&&(a.m[e]=l[e]);if(c)var w=c(a)}for(i&&i(r);s<o.length;s++)n=o[s],a.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return a.O(w)},r=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];r.forEach(i.bind(null,0)),r.push=i.bind(null,r.push.bind(r))})();var e=a.O(void 0,[320],()=>a(266));e=a.O(e)})(); -
tax-switch-for-woocommerce/trunk/build/switch/block.json
r3405724 r3410740 3 3 "apiVersion": 3, 4 4 "name": "wdevs/tax-switch", 5 "version": "1.6. 2",5 "version": "1.6.3", 6 6 "title": "Tax Switch for WooCommerce", 7 7 "category": "woocommerce", -
tax-switch-for-woocommerce/trunk/build/switch/facetwp.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('wp-data'), 'version' => ' 21f11430829d2071ebde');1 <?php return array('dependencies' => array('wp-data'), 'version' => '57c6bc3fdf37b4a58ea2'); -
tax-switch-for-woocommerce/trunk/build/switch/facetwp.js
r3405724 r3410740 1 (()=>{"use strict";var e,t={12:(e,t,i)=>{var r=i(159),n=i(75),a=i(143);const o=class{constructor(e,t){this.originalTaxDisplay=e,this.taxRate=t,this.facetHistory={},this.taxSwitchUnsubscribe=null}getStepPrecision(e){const t=void 0!==e.step?parseFloat(e.step):NaN;if(Number.isNaN(t)||t<=0)return 1;const i=t.toString();return i.includes(".")?i.split(".")[1].length:1}roundToSliderStep(e,t){if(null==e)return e;const i=Number(e);if(!Number.isFinite(i))return i;const r=this.getStepPrecision(t),n=Math.pow(10,r),a=Math.round(i*n)/n;return Number(a.toFixed(r))}countDecimals(e){if(null==e||""===e)return 0;let t=e.toString().trim().replace(",",".");const i=t.match(/e-(\d+)$/i);if(i)return parseInt(i[1],10);const r=t.split(".");return r[1]?r[1].length:0}init(){this.registerFacetWPEvents(),this.setupFacetWPLoadedListener()}hasRelevantFacet(){if(void 0===window.FWP||!window.FWP.settings)return!1;const e=window.FWP.settings||{};return Object.keys(e).some( (e=>this.getSliderSettings(e)))}hasPriceContainer(e={}){const t=e?.suffix||"",i=e?.prefix||"";return t.includes("wts-price-container")||i.includes("wts-price-container")}getSliderSettings(e){if(void 0===window.FWP||!window.FWP.settings)return null;const t=window.FWP.settings[e];return t?"slider"!==(window.FWP.facet_type||{})[e]?null:this.hasPriceContainer(t)?t:null:null}getSliderElement(e){return document.querySelector(`.facetwp-facet[data-name="${e}"] .facetwp-slider`)}calculateAndStoreRangeBounds(){if(void 0===window.FWP||!window.FWP.settings)return;const e=this;Object.keys(window.FWP.settings).forEach((t=>{var i,n;const a=e.getSliderSettings(t);if(!a)return;const o=e.roundToSliderStep(parseFloat(a.start?a.start[0]:a.lower),a),l=e.roundToSliderStep(parseFloat(a.start?a.start[1]:a.upper),a),s=e.roundToSliderStep(parseFloat(null!==(i=a.range?.min)&&void 0!==i?i:o),a),c=e.roundToSliderStep(parseFloat(null!==(n=a.range?.max)&&void 0!==n?n:l),a),d={original:{lower:o,upper:l,rangeMin:s,rangeMax:c},alternate:{lower:e.roundToSliderStep(r.A.calculateAlternatePrice(o,e.originalTaxDisplay,e.taxRate),a),upper:e.roundToSliderStep(r.A.calculateAlternatePrice(l,e.originalTaxDisplay,e.taxRate),a),rangeMin:Math.max(0,e.roundToSliderStep(r.A.calculateAlternatePrice(s,e.originalTaxDisplay,e.taxRate),a)),rangeMax:Math.max(0,e.roundToSliderStep(r.A.calculateAlternatePrice(c,e.originalTaxDisplay,e.taxRate),a))}};e.facetHistory[t]=d}))}setupFacetWPLoadedListener(){window.addEventListener("facetwp-loaded",(()=>{this.calculateAndStoreRangeBounds(),this.initializePriceSliders(),(0,n.z6)(!1)}))}initializePriceSliders(){if(void 0===window.FWP||!window.FWP.settings)return;const e=(0,n.ir)(),t=this;Object.keys(window.FWP.settings).forEach((i=>{if(!t.getSliderSettings(i))return;if(!t.facetHistory[i])return;const a=t.getSliderElement(i);if(!a||!a.noUiSlider)return;const o=t.facetHistory[i];let l,s,c,d;e?(l=o.alternate.rangeMin,s=o.alternate.rangeMax,c=o.alternate.lower,d=o.alternate.upper):(l=o.original.rangeMin,s=o.original.rangeMax,c=o.original.lower,d=o.original.upper),a.noUiSlider.updateOptions({range:{min:l,max:s}},!1),a.noUiSlider.set([c,d]),a.noUiSlider.on("slide",(function(){r.A.togglePriceClasses(t.originalTaxDisplay,(0,n.ir)())})),a.noUiSlider.on("set",(function(){r.A.togglePriceClasses(t.originalTaxDisplay,(0,n.ir)())}))}))}registerTaxSwitchListener(e=!0){const t=this;if(e){if(this.taxSwitchUnsubscribe)return;let e=(0,n.ir)();t.taxSwitchUnsubscribe=(0,a.subscribe)((()=>{const i=(0,a.select)("wdevs-tax-switch/store").getIsSwitched();i!==e&&(e=i,void 0!==window.FWP&&((0,n.z6)(!0),t.updateAllPriceSliders(i),window.FWP.refresh()))}))}else t.taxSwitchUnsubscribe&&(t.taxSwitchUnsubscribe(),t.taxSwitchUnsubscribe=null)}updateAllPriceSliders(e){if(void 0===window.FWP||!window.FWP.settings)return;const t=this;Object.keys(window.FWP.settings).forEach((i=>{if(!t.getSliderSettings(i))return;if(!t.facetHistory[i])return;const r=t.getSliderElement(i);if(!r||!r.noUiSlider)return;const n=t.facetHistory[i];let a,o,l,s;e?(a=n.alternate.rangeMin,o=n.alternate.rangeMax,l=n.alternate.lower,s=n.alternate.upper):(a=n.original.rangeMin,o=n.original.rangeMax,l=n.original.lower,s=n.original.upper),r.noUiSlider.updateOptions({range:{min:a,max:o}},!1),r.noUiSlider.set([l,s])}))}registerFacetWPEvents(){const e=this;void 0!==window.FWP&&window.FWP.hooks&&(window.FWP.hooks.addAction("facetwp/loaded",(function(){const t=e.hasRelevantFacet();e.registerTaxSwitchListener(t)})),window.FWP.hooks.addAction("facetwp/refresh/slider",(function(t,i){const a=(0,n.ir)();if(!e.taxRate)return;const o=e.getSliderSettings(i);if(o)if(a){var l,s;const t=e.roundToSliderStep(parseFloat(o.lower),o),n=e.roundToSliderStep(parseFloat(o.upper),o),a=e.roundToSliderStep(parseFloat(null!==(l=o.range?.min)&&void 0!==l?l:t),o),c=e.roundToSliderStep(parseFloat(null!==(s=o.range?.max)&&void 0!==s?s:n),o),d=e.roundToSliderStep(r.A.calculateOriginalPrice(t,e.originalTaxDisplay,e.taxRate),o),u=e.roundToSliderStep(r.A.calculateOriginalPrice(n,e.originalTaxDisplay,e.taxRate),o),p={original:{lower:t,upper:n,rangeMin:a,rangeMax:c},alternate:{lower:d,upper:u,rangeMin:Math.max(0,e.roundToSliderStep(r.A.calculateOriginalPrice(a,e.originalTaxDisplay,e.taxRate),o)),rangeMax:Math.max(0,e.roundToSliderStep(r.A.calculateOriginalPrice(c,e.originalTaxDisplay,e.taxRate),o))}};e.facetHistory[i]=p;const g=e.getSliderElement(i);let w=2;if(g&&g.noUiSlider){const t=g.noUiSlider.get();t&&t.length&&(w=e.countDecimals(t[0]))}window.FWP.facets[i]=[Number(d).toFixed(w),Number(u).toFixed(w)]}else e.facetHistory[i]&&delete e.facetHistory[i]})))}};(0,i(538).P)((()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new o(e.originalTaxDisplay,t.baseTaxRate).init()}))},143:e=>{e.exports=window.wp.data}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var a=i[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.m=t,e=[],r.O=(t,i,n,a)=>{if(!i){var o=1/0;for(d=0;d<e.length;d++){for(var[i,n,a]=e[d],l=!0,s=0;s<i.length;s++)(!1&a||o>=a)&&Object.keys(r.O).every((e=>r.O[e](i[s])))?i.splice(s--,1):(l=!1,a<o&&(o=a));if(l){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[i,n,a]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.j=894,(()=>{var e={894:0};r.O.j=t=>0===e[t];var t=(t,i)=>{var n,a,[o,l,s]=i,c=0;if(o.some((t=>0!==e[t]))){for(n in l)r.o(l,n)&&(r.m[n]=l[n]);if(s)var d=s(r)}for(t&&t(i);c<o.length;c++)a=o[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(d)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var n=r.O(void 0,[320],(()=>r(12)));n=r.O(n)})();1 (()=>{"use strict";var e,t={12:(e,t,i)=>{var r=i(159),n=i(75),a=i(143);const o=class{constructor(e,t){this.originalTaxDisplay=e,this.taxRate=t,this.facetHistory={},this.taxSwitchUnsubscribe=null}getStepPrecision(e){const t=void 0!==e.step?parseFloat(e.step):NaN;if(Number.isNaN(t)||t<=0)return 1;const i=t.toString();return i.includes(".")?i.split(".")[1].length:1}roundToSliderStep(e,t){if(null==e)return e;const i=Number(e);if(!Number.isFinite(i))return i;const r=this.getStepPrecision(t),n=Math.pow(10,r),a=Math.round(i*n)/n;return Number(a.toFixed(r))}countDecimals(e){if(null==e||""===e)return 0;let t=e.toString().trim().replace(",",".");const i=t.match(/e-(\d+)$/i);if(i)return parseInt(i[1],10);const r=t.split(".");return r[1]?r[1].length:0}init(){this.registerFacetWPEvents(),this.setupFacetWPLoadedListener()}hasRelevantFacet(){if(void 0===window.FWP||!window.FWP.settings)return!1;const e=window.FWP.settings||{};return Object.keys(e).some(e=>this.getSliderSettings(e))}hasPriceContainer(e={}){const t=e?.suffix||"",i=e?.prefix||"";return t.includes("wts-price-container")||i.includes("wts-price-container")}getSliderSettings(e){if(void 0===window.FWP||!window.FWP.settings)return null;const t=window.FWP.settings[e];return t?"slider"!==(window.FWP.facet_type||{})[e]?null:this.hasPriceContainer(t)?t:null:null}getSliderElement(e){return document.querySelector(`.facetwp-facet[data-name="${e}"] .facetwp-slider`)}calculateAndStoreRangeBounds(){if(void 0===window.FWP||!window.FWP.settings)return;const e=this;Object.keys(window.FWP.settings).forEach(t=>{var i,n;const a=e.getSliderSettings(t);if(!a)return;const o=e.roundToSliderStep(parseFloat(a.start?a.start[0]:a.lower),a),l=e.roundToSliderStep(parseFloat(a.start?a.start[1]:a.upper),a),s=e.roundToSliderStep(parseFloat(null!==(i=a.range?.min)&&void 0!==i?i:o),a),c=e.roundToSliderStep(parseFloat(null!==(n=a.range?.max)&&void 0!==n?n:l),a),d={original:{lower:o,upper:l,rangeMin:s,rangeMax:c},alternate:{lower:e.roundToSliderStep(r.A.calculateAlternatePrice(o,e.originalTaxDisplay,e.taxRate),a),upper:e.roundToSliderStep(r.A.calculateAlternatePrice(l,e.originalTaxDisplay,e.taxRate),a),rangeMin:Math.max(0,e.roundToSliderStep(r.A.calculateAlternatePrice(s,e.originalTaxDisplay,e.taxRate),a)),rangeMax:Math.max(0,e.roundToSliderStep(r.A.calculateAlternatePrice(c,e.originalTaxDisplay,e.taxRate),a))}};e.facetHistory[t]=d})}setupFacetWPLoadedListener(){window.addEventListener("facetwp-loaded",()=>{this.calculateAndStoreRangeBounds(),this.initializePriceSliders(),(0,n.z6)(!1)})}initializePriceSliders(){if(void 0===window.FWP||!window.FWP.settings)return;const e=(0,n.ir)(),t=this;Object.keys(window.FWP.settings).forEach(i=>{if(!t.getSliderSettings(i))return;if(!t.facetHistory[i])return;const a=t.getSliderElement(i);if(!a||!a.noUiSlider)return;const o=t.facetHistory[i];let l,s,c,d;e?(l=o.alternate.rangeMin,s=o.alternate.rangeMax,c=o.alternate.lower,d=o.alternate.upper):(l=o.original.rangeMin,s=o.original.rangeMax,c=o.original.lower,d=o.original.upper),a.noUiSlider.updateOptions({range:{min:l,max:s}},!1),a.noUiSlider.set([c,d]),a.noUiSlider.on("slide",function(){r.A.togglePriceClasses(t.originalTaxDisplay,(0,n.ir)())}),a.noUiSlider.on("set",function(){r.A.togglePriceClasses(t.originalTaxDisplay,(0,n.ir)())})})}registerTaxSwitchListener(e=!0){const t=this;if(e){if(this.taxSwitchUnsubscribe)return;let e=(0,n.ir)();t.taxSwitchUnsubscribe=(0,a.subscribe)(()=>{const i=(0,a.select)("wdevs-tax-switch/store").getIsSwitched();i!==e&&(e=i,void 0!==window.FWP&&((0,n.z6)(!0),t.updateAllPriceSliders(i),window.FWP.refresh()))})}else t.taxSwitchUnsubscribe&&(t.taxSwitchUnsubscribe(),t.taxSwitchUnsubscribe=null)}updateAllPriceSliders(e){if(void 0===window.FWP||!window.FWP.settings)return;const t=this;Object.keys(window.FWP.settings).forEach(i=>{if(!t.getSliderSettings(i))return;if(!t.facetHistory[i])return;const r=t.getSliderElement(i);if(!r||!r.noUiSlider)return;const n=t.facetHistory[i];let a,o,l,s;e?(a=n.alternate.rangeMin,o=n.alternate.rangeMax,l=n.alternate.lower,s=n.alternate.upper):(a=n.original.rangeMin,o=n.original.rangeMax,l=n.original.lower,s=n.original.upper),r.noUiSlider.updateOptions({range:{min:a,max:o}},!1),r.noUiSlider.set([l,s])})}registerFacetWPEvents(){const e=this;void 0!==window.FWP&&window.FWP.hooks&&(window.FWP.hooks.addAction("facetwp/loaded",function(){const t=e.hasRelevantFacet();e.registerTaxSwitchListener(t)}),window.FWP.hooks.addAction("facetwp/refresh/slider",function(t,i){const a=(0,n.ir)();if(!e.taxRate)return;const o=e.getSliderSettings(i);if(o)if(a){var l,s;const t=e.roundToSliderStep(parseFloat(o.lower),o),n=e.roundToSliderStep(parseFloat(o.upper),o),a=e.roundToSliderStep(parseFloat(null!==(l=o.range?.min)&&void 0!==l?l:t),o),c=e.roundToSliderStep(parseFloat(null!==(s=o.range?.max)&&void 0!==s?s:n),o),d=e.roundToSliderStep(r.A.calculateOriginalPrice(t,e.originalTaxDisplay,e.taxRate),o),u=e.roundToSliderStep(r.A.calculateOriginalPrice(n,e.originalTaxDisplay,e.taxRate),o),p={original:{lower:t,upper:n,rangeMin:a,rangeMax:c},alternate:{lower:d,upper:u,rangeMin:Math.max(0,e.roundToSliderStep(r.A.calculateOriginalPrice(a,e.originalTaxDisplay,e.taxRate),o)),rangeMax:Math.max(0,e.roundToSliderStep(r.A.calculateOriginalPrice(c,e.originalTaxDisplay,e.taxRate),o))}};e.facetHistory[i]=p;const g=e.getSliderElement(i);let w=2;if(g&&g.noUiSlider){const t=g.noUiSlider.get();t&&t.length&&(w=e.countDecimals(t[0]))}window.FWP.facets[i]=[Number(d).toFixed(w),Number(u).toFixed(w)]}else e.facetHistory[i]&&delete e.facetHistory[i]}))}};(0,i(538).P)(()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new o(e.originalTaxDisplay,t.baseTaxRate).init()})},143:e=>{e.exports=window.wp.data}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var a=i[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.m=t,e=[],r.O=(t,i,n,a)=>{if(!i){var o=1/0;for(d=0;d<e.length;d++){for(var[i,n,a]=e[d],l=!0,s=0;s<i.length;s++)(!1&a||o>=a)&&Object.keys(r.O).every(e=>r.O[e](i[s]))?i.splice(s--,1):(l=!1,a<o&&(o=a));if(l){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[i,n,a]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.j=894,(()=>{var e={894:0};r.O.j=t=>0===e[t];var t=(t,i)=>{var n,a,[o,l,s]=i,c=0;if(o.some(t=>0!==e[t])){for(n in l)r.o(l,n)&&(r.m[n]=l[n]);if(s)var d=s(r)}for(t&&t(i);c<o.length;c++)a=o[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(d)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var n=r.O(void 0,[320],()=>r(12));n=r.O(n)})(); -
tax-switch-for-woocommerce/trunk/build/switch/fibofilters.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('wp-data'), 'version' => ' e206f102a3d0a9873496');1 <?php return array('dependencies' => array('wp-data'), 'version' => '909ce4ccfa5092832bf4'); -
tax-switch-for-woocommerce/trunk/build/switch/fibofilters.js
r3405724 r3410740 1 (()=>{"use strict";var r,i={143:r=>{r.exports=window.wp.data},966:(r,i,e)=>{var o=e(159);const t=class{constructor(r){this.originalTaxDisplay=r}init(){this.registerFiboFiltersEvents()}registerFiboFiltersEvents(){const r=this;if(void 0!==window.fiboFilters){function i(){o.A.setPriceClasses(r.originalTaxDisplay)}window.fiboFilters.hooks.addAction("fiboFilters.renderer.products_loaded","fibofilters",i),window.fiboFilters.hooks.addAction("fiboFilters.renderer.product_placeholders_overwritten","fibofilters",i)}}};(0,e(538).P)(( ()=>{const r=window.wtsViewObject||{originalTaxDisplay:"incl"};new t(r.originalTaxDisplay).init()}))}},e={};function o(r){var t=e[r];if(void 0!==t)return t.exports;var s=e[r]={exports:{}};return i[r](s,s.exports,o),s.exports}o.m=i,r=[],o.O=(i,e,t,s)=>{if(!e){var n=1/0;for(c=0;c<r.length;c++){for(var[e,t,s]=r[c],a=!0,l=0;l<e.length;l++)(!1&s||n>=s)&&Object.keys(o.O).every((r=>o.O[r](e[l])))?e.splice(l--,1):(a=!1,s<n&&(n=s));if(a){r.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}s=s||0;for(var c=r.length;c>0&&r[c-1][2]>s;c--)r[c]=r[c-1];r[c]=[e,t,s]},o.n=r=>{var i=r&&r.__esModule?()=>r.default:()=>r;return o.d(i,{a:i}),i},o.d=(r,i)=>{for(var e in i)o.o(i,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:i[e]})},o.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),o.j=657,(()=>{var r={657:0};o.O.j=i=>0===r[i];var i=(i,e)=>{var t,s,[n,a,l]=e,d=0;if(n.some((i=>0!==r[i]))){for(t in a)o.o(a,t)&&(o.m[t]=a[t]);if(l)var c=l(o)}for(i&&i(e);d<n.length;d++)s=n[d],o.o(r,s)&&r[s]&&r[s][0](),r[s]=0;return o.O(c)},e=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];e.forEach(i.bind(null,0)),e.push=i.bind(null,e.push.bind(e))})();var t=o.O(void 0,[320],(()=>o(966)));t=o.O(t)})();1 (()=>{"use strict";var r,i={143:r=>{r.exports=window.wp.data},966:(r,i,e)=>{var o=e(159);const t=class{constructor(r){this.originalTaxDisplay=r}init(){this.registerFiboFiltersEvents()}registerFiboFiltersEvents(){const r=this;if(void 0!==window.fiboFilters){function i(){o.A.setPriceClasses(r.originalTaxDisplay)}window.fiboFilters.hooks.addAction("fiboFilters.renderer.products_loaded","fibofilters",i),window.fiboFilters.hooks.addAction("fiboFilters.renderer.product_placeholders_overwritten","fibofilters",i)}}};(0,e(538).P)(()=>{const r=window.wtsViewObject||{originalTaxDisplay:"incl"};new t(r.originalTaxDisplay).init()})}},e={};function o(r){var t=e[r];if(void 0!==t)return t.exports;var s=e[r]={exports:{}};return i[r](s,s.exports,o),s.exports}o.m=i,r=[],o.O=(i,e,t,s)=>{if(!e){var n=1/0;for(c=0;c<r.length;c++){for(var[e,t,s]=r[c],a=!0,l=0;l<e.length;l++)(!1&s||n>=s)&&Object.keys(o.O).every(r=>o.O[r](e[l]))?e.splice(l--,1):(a=!1,s<n&&(n=s));if(a){r.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}s=s||0;for(var c=r.length;c>0&&r[c-1][2]>s;c--)r[c]=r[c-1];r[c]=[e,t,s]},o.n=r=>{var i=r&&r.__esModule?()=>r.default:()=>r;return o.d(i,{a:i}),i},o.d=(r,i)=>{for(var e in i)o.o(i,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:i[e]})},o.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),o.j=657,(()=>{var r={657:0};o.O.j=i=>0===r[i];var i=(i,e)=>{var t,s,[n,a,l]=e,d=0;if(n.some(i=>0!==r[i])){for(t in a)o.o(a,t)&&(o.m[t]=a[t]);if(l)var c=l(o)}for(i&&i(e);d<n.length;d++)s=n[d],o.o(r,s)&&r[s]&&r[s][0](),r[s]=0;return o.O(c)},e=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];e.forEach(i.bind(null,0)),e.push=i.bind(null,e.push.bind(e))})();var t=o.O(void 0,[320],()=>o(966));t=o.O(t)})(); -
tax-switch-for-woocommerce/trunk/build/switch/index.asset.php
r3300428 r3410740 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' 245911ab769ee6ff5816');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '0908ab0c3c66b5a44e54'); -
tax-switch-for-woocommerce/trunk/build/switch/index.js
r3300428 r3410740 1 (()=>{"use strict";var o,e={87:o=>{o.exports=window.wp.element},143:o=>{o.exports=window.wp.data},295:(o,e,t)=>{const r=window.wp.blocks,c=window.wp.i18n,l=window.wp.blockEditor,i=window.wp.components;var a=t(983),n=t(790);const s=JSON.parse('{"UU":"wdevs/tax-switch"}');(0,r.registerBlockType)(s.UU,{edit:function({attributes:o,setAttributes:e}){const{switchType:t,switchColor:r,switchColorChecked:s,switchBackgroundColor:w,switchBackgroundColorChecked:h,switchTextColor:d,switchLabelIncl:u,switchLabelExcl:x}=o,{originalTaxDisplay:p}=window.wtsEditorObject||{originalTaxDisplay:"incl"};return(0,n.jsxs)("div",{...(0,l.useBlockProps)(),children:[(0,n.jsxs)(l.InspectorControls,{children:[(0,n.jsx)(i.PanelBody,{title:(0,c.__)("Display options","tax-switch-for-woocommerce"),initialOpen:!0,children:(0,n.jsx)(i.SelectControl,{label:(0,c.__)("Switch type","tax-switch-for-woocommerce"),value:t,options:[{label:(0,c.__)("Toggle switch","tax-switch-for-woocommerce"),value:"switch"},{label:(0,c.__)("Buttons","tax-switch-for-woocommerce"),value:"buttons"}],onChange:o=>e({switchType:o})})}),(0,n.jsx)(l.PanelColorSettings,{title:(0,c.__)("Switch colors","tax-switch-for-woocommerce"),initialOpen:!0,colorSettings:[{value:r,onChange:o=>e({switchColor:o}),label:(0,c.__)("Switch color","tax-switch-for-woocommerce")},{value:s,onChange:o=>e({switchColorChecked:o}),label:(0,c.__)("Switch color checked","tax-switch-for-woocommerce")},{value:w,onChange:o=>e({switchBackgroundColor:o}),label:(0,c.__)("Background color","tax-switch-for-woocommerce")},{value:h,onChange:o=>e({switchBackgroundColorChecked:o}),label:(0,c.__)("Background color checked","tax-switch-for-woocommerce")},{value:d,onChange:o=>e({switchTextColor:o}),label:(0,c.__)("Text color","tax-switch-for-woocommerce")}]}),(0,n.jsxs)(i.PanelBody,{title:(0,c.__)("Switch labels","tax-switch-for-woocommerce"),initialOpen:!0,children:[(0,n.jsx)(i.TextControl,{label:(0,c.__)("Including VAT label","tax-switch-for-woocommerce"),value:u,onChange:o=>e({switchLabelIncl:o})}),(0,n.jsx)(i.TextControl,{label:(0,c.__)("Excluding VAT label","tax-switch-for-woocommerce"),value:x,onChange:o=>e({switchLabelExcl:o})})]})]}),(0,n.jsx)(a.A,{...o,readOnly:!0,originalTaxDisplay:p})]})},save:function({attributes:o}){return(0,n.jsx)("div",{...l.useBlockProps.save()})}})},790:o=>{o.exports=window.ReactJSXRuntime}},t={};function r(o){var c=t[o];if(void 0!==c)return c.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,r),l.exports}r.m=e,o=[],r.O=(e,t,c,l)=>{if(!t){var i=1/0;for(w=0;w<o.length;w++){for(var[t,c,l]=o[w],a=!0,n=0;n<t.length;n++)(!1&l||i>=l)&&Object.keys(r.O).every( (o=>r.O[o](t[n])))?t.splice(n--,1):(a=!1,l<i&&(i=l));if(a){o.splice(w--,1);var s=c();void 0!==s&&(e=s)}}return e}l=l||0;for(var w=o.length;w>0&&o[w-1][2]>l;w--)o[w]=o[w-1];o[w]=[t,c,l]},r.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return r.d(e,{a:e}),e},r.d=(o,e)=>{for(var t in e)r.o(e,t)&&!r.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},r.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r.j=202,(()=>{var o={202:0,422:0};r.O.j=e=>0===o[e];var e=(e,t)=>{var c,l,[i,a,n]=t,s=0;if(i.some((e=>0!==o[e]))){for(c in a)r.o(a,c)&&(r.m[c]=a[c]);if(n)var w=n(r)}for(e&&e(t);s<i.length;s++)l=i[s],r.o(o,l)&&o[l]&&o[l][0](),o[l]=0;return r.O(w)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))})();var c=r.O(void 0,[320,422],(()=>r(295)));c=r.O(c)})();1 (()=>{"use strict";var o,e={87:o=>{o.exports=window.wp.element},143:o=>{o.exports=window.wp.data},295:(o,e,t)=>{const r=window.wp.blocks,c=window.wp.i18n,l=window.wp.blockEditor,i=window.wp.components;var a=t(983),n=t(790);const s=JSON.parse('{"UU":"wdevs/tax-switch"}');(0,r.registerBlockType)(s.UU,{edit:function({attributes:o,setAttributes:e}){const{switchType:t,switchColor:r,switchColorChecked:s,switchBackgroundColor:w,switchBackgroundColorChecked:h,switchTextColor:d,switchLabelIncl:u,switchLabelExcl:x}=o,{originalTaxDisplay:p}=window.wtsEditorObject||{originalTaxDisplay:"incl"};return(0,n.jsxs)("div",{...(0,l.useBlockProps)(),children:[(0,n.jsxs)(l.InspectorControls,{children:[(0,n.jsx)(i.PanelBody,{title:(0,c.__)("Display options","tax-switch-for-woocommerce"),initialOpen:!0,children:(0,n.jsx)(i.SelectControl,{label:(0,c.__)("Switch type","tax-switch-for-woocommerce"),value:t,options:[{label:(0,c.__)("Toggle switch","tax-switch-for-woocommerce"),value:"switch"},{label:(0,c.__)("Buttons","tax-switch-for-woocommerce"),value:"buttons"}],onChange:o=>e({switchType:o})})}),(0,n.jsx)(l.PanelColorSettings,{title:(0,c.__)("Switch colors","tax-switch-for-woocommerce"),initialOpen:!0,colorSettings:[{value:r,onChange:o=>e({switchColor:o}),label:(0,c.__)("Switch color","tax-switch-for-woocommerce")},{value:s,onChange:o=>e({switchColorChecked:o}),label:(0,c.__)("Switch color checked","tax-switch-for-woocommerce")},{value:w,onChange:o=>e({switchBackgroundColor:o}),label:(0,c.__)("Background color","tax-switch-for-woocommerce")},{value:h,onChange:o=>e({switchBackgroundColorChecked:o}),label:(0,c.__)("Background color checked","tax-switch-for-woocommerce")},{value:d,onChange:o=>e({switchTextColor:o}),label:(0,c.__)("Text color","tax-switch-for-woocommerce")}]}),(0,n.jsxs)(i.PanelBody,{title:(0,c.__)("Switch labels","tax-switch-for-woocommerce"),initialOpen:!0,children:[(0,n.jsx)(i.TextControl,{label:(0,c.__)("Including VAT label","tax-switch-for-woocommerce"),value:u,onChange:o=>e({switchLabelIncl:o})}),(0,n.jsx)(i.TextControl,{label:(0,c.__)("Excluding VAT label","tax-switch-for-woocommerce"),value:x,onChange:o=>e({switchLabelExcl:o})})]})]}),(0,n.jsx)(a.A,{...o,readOnly:!0,originalTaxDisplay:p})]})},save:function({attributes:o}){return(0,n.jsx)("div",{...l.useBlockProps.save()})}})},790:o=>{o.exports=window.ReactJSXRuntime}},t={};function r(o){var c=t[o];if(void 0!==c)return c.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,r),l.exports}r.m=e,o=[],r.O=(e,t,c,l)=>{if(!t){var i=1/0;for(w=0;w<o.length;w++){for(var[t,c,l]=o[w],a=!0,n=0;n<t.length;n++)(!1&l||i>=l)&&Object.keys(r.O).every(o=>r.O[o](t[n]))?t.splice(n--,1):(a=!1,l<i&&(i=l));if(a){o.splice(w--,1);var s=c();void 0!==s&&(e=s)}}return e}l=l||0;for(var w=o.length;w>0&&o[w-1][2]>l;w--)o[w]=o[w-1];o[w]=[t,c,l]},r.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return r.d(e,{a:e}),e},r.d=(o,e)=>{for(var t in e)r.o(e,t)&&!r.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},r.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r.j=202,(()=>{var o={202:0,422:0};r.O.j=e=>0===o[e];var e=(e,t)=>{var c,l,[i,a,n]=t,s=0;if(i.some(e=>0!==o[e])){for(c in a)r.o(a,c)&&(r.m[c]=a[c]);if(n)var w=n(r)}for(e&&e(t);s<i.length;s++)l=i[s],r.o(o,l)&&o[l]&&o[l][0](),o[l]=0;return r.O(w)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))})();var c=r.O(void 0,[320,422],()=>r(295));c=r.O(c)})(); -
tax-switch-for-woocommerce/trunk/build/switch/kapee-theme.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' d529231e8f502af0d8bd');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'c13fc9f782360f473b40'); -
tax-switch-for-woocommerce/trunk/build/switch/kapee-theme.js
r3405724 r3410740 1 (()=>{"use strict";var e,i={143:e=>{e.exports=window.wp.data},338:(e,i,t)=>{window.jQuery;var a=t(159),r=t(651);const n=class{constructor(e,i){this.originalTaxDisplay=e,this.taxRate=i,this.taxSwitchElementBuilder=new r.A(this.originalTaxDisplay)}init(){this.vatTexts=r.A.getVatTexts(),this.extendOriginalFunctions()}extendOriginalFunctions(){if("function"!=typeof window.kapeePublic.kapee_formated_price)return;const e=this,i=window.kapeePublic.kapee_formated_price;window.kapeePublic.kapee_formated_price=function(t,r,n,o,s,l){const c=a.A.displayIncludingVat(e.originalTaxDisplay),p=a.A.calculateAlternatePrice(t,e.originalTaxDisplay,e.taxRate),d=i.apply(e,[t,r,n,o,s,l]),u=i.apply(e,[p,r,n,o,s,l]);return e.taxSwitchElementBuilder.build(c,d,u,e.vatTexts)}.bind(this)}};(0,t(538).P)(( ()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},i=window.wtsCompatibilityObject||{baseTaxRate:0};new n(e.originalTaxDisplay,i.baseTaxRate).init()}))}},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={exports:{}};return i[e](n,n.exports,a),n.exports}a.m=i,e=[],a.O=(i,t,r,n)=>{if(!t){var o=1/0;for(p=0;p<e.length;p++){for(var[t,r,n]=e[p],s=!0,l=0;l<t.length;l++)(!1&n||o>=n)&&Object.keys(a.O).every((e=>a.O[e](t[l])))?t.splice(l--,1):(s=!1,n<o&&(o=n));if(s){e.splice(p--,1);var c=r();void 0!==c&&(i=c)}}return i}n=n||0;for(var p=e.length;p>0&&e[p-1][2]>n;p--)e[p]=e[p-1];e[p]=[t,r,n]},a.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return a.d(i,{a:i}),i},a.d=(e,i)=>{for(var t in i)a.o(i,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:i[t]})},a.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),a.j=952,(()=>{var e={952:0};a.O.j=i=>0===e[i];var i=(i,t)=>{var r,n,[o,s,l]=t,c=0;if(o.some((i=>0!==e[i]))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)var p=l(a)}for(i&&i(t);c<o.length;c++)n=o[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(p)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(i.bind(null,0)),t.push=i.bind(null,t.push.bind(t))})();var r=a.O(void 0,[320],(()=>a(338)));r=a.O(r)})();1 (()=>{"use strict";var e,i={143:e=>{e.exports=window.wp.data},338:(e,i,t)=>{window.jQuery;var a=t(159),r=t(651);const n=class{constructor(e,i){this.originalTaxDisplay=e,this.taxRate=i,this.taxSwitchElementBuilder=new r.A(this.originalTaxDisplay)}init(){this.vatTexts=r.A.getVatTexts(),this.extendOriginalFunctions()}extendOriginalFunctions(){if("function"!=typeof window.kapeePublic.kapee_formated_price)return;const e=this,i=window.kapeePublic.kapee_formated_price;window.kapeePublic.kapee_formated_price=function(t,r,n,o,s,l){const c=a.A.displayIncludingVat(e.originalTaxDisplay),p=a.A.calculateAlternatePrice(t,e.originalTaxDisplay,e.taxRate),d=i.apply(e,[t,r,n,o,s,l]),u=i.apply(e,[p,r,n,o,s,l]);return e.taxSwitchElementBuilder.build(c,d,u,e.vatTexts)}.bind(this)}};(0,t(538).P)(()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},i=window.wtsCompatibilityObject||{baseTaxRate:0};new n(e.originalTaxDisplay,i.baseTaxRate).init()})}},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={exports:{}};return i[e](n,n.exports,a),n.exports}a.m=i,e=[],a.O=(i,t,r,n)=>{if(!t){var o=1/0;for(p=0;p<e.length;p++){for(var[t,r,n]=e[p],s=!0,l=0;l<t.length;l++)(!1&n||o>=n)&&Object.keys(a.O).every(e=>a.O[e](t[l]))?t.splice(l--,1):(s=!1,n<o&&(o=n));if(s){e.splice(p--,1);var c=r();void 0!==c&&(i=c)}}return i}n=n||0;for(var p=e.length;p>0&&e[p-1][2]>n;p--)e[p]=e[p-1];e[p]=[t,r,n]},a.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return a.d(i,{a:i}),i},a.d=(e,i)=>{for(var t in i)a.o(i,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:i[t]})},a.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),a.j=952,(()=>{var e={952:0};a.O.j=i=>0===e[i];var i=(i,t)=>{var r,n,[o,s,l]=t,c=0;if(o.some(i=>0!==e[i])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)var p=l(a)}for(i&&i(t);c<o.length;c++)n=o[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(p)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(i.bind(null,0)),t.push=i.bind(null,t.push.bind(t))})();var r=a.O(void 0,[320],()=>a(338));r=a.O(r)})(); -
tax-switch-for-woocommerce/trunk/build/switch/product-extras-for-woocommerce.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' 7fbf3883b993130494ab');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'bcfc89886739c9570e90'); -
tax-switch-for-woocommerce/trunk/build/switch/product-extras-for-woocommerce.js
r3405724 r3410740 1 (()=>{"use strict";var e,t={143:e=>{e.exports=window.wp.data},697:(e,t,i)=>{const n=window.jQuery;var a=i.n(n),r=i(159),c=i(651);const o=class{constructor(e,t){this.originalTaxDisplay=e,this.taxRate=t,this.taxSwitchElementBuilder=new c.A(this.originalTaxDisplay),this.vatTexts=null}init(){const e=this;e.vatTexts=c.A.getVatTexts(),e.extendOriginalFunctions(),e.wrapPrices(),e.registerWoocommerceEvents()}extendOriginalFunctions(){if("function"!=typeof window.pewc_wc_price)return;const e=this,t=window.pewc_wc_price;window.pewc_wc_price=function(i,n=!1,a=!0){const c=r.A.displayIncludingVat(e.originalTaxDisplay),o=r.A.calculateAlternatePrice(i,e.originalTaxDisplay,e.taxRate),s=t.apply(e,[i,n,a]),l=t.apply(e,[o,n,a]);return e.taxSwitchElementBuilder.build(c,s,l,null)}.bind(this);const i=window.pewc_wc_price;window.pewc_wc_price_without_currency=function(t){const n=r.A.displayIncludingVat(e.originalTaxDisplay),a=r.A.calculateAlternatePrice(t,e.originalTaxDisplay,e.taxRate),c=i.apply(e,[t]),o=i.apply(e,[a]);return e.taxSwitchElementBuilder.build(n,c,o,null)}.bind(this)}wrapPrices(){if(void 0===window.accounting||void 0===window.accounting.unformat||void 0===window.pewc_vars)return;const e=this;a()(".pewc-option-cost-label, .pewc-checkbox-price").each( (function(t,i){const n=a()(i),r=n.html(),c=e.getPriceHtml(r);n.html(c)})),e.processPriceSeparatorElements(".pewc-radio-option-text"),e.processPriceSeparatorElements(".pewc-radio-image-desc span")}registerWoocommerceEvents(){const e=this;a()("body").on("pewc_after_update_total_js",(function(){if(a()(".pewc-main-price").length){const t=a()(".pewc-main-price").find(".wts-price-container");if(t.length&&1===t.find(".wts-price-wrapper").length){const i=e.getVatTextElement();i&&t.append(i)}}window.pewc_vars&&"yes"==window.pewc_vars.show_suffix&&["#pewc-per-product-total","#pewc-options-total","#pewc-grand-total","#pewc-calculation-value"].forEach((function(t){const i=a()(t);e.replaceWoocommerceSuffix(i)}))}))}processPriceSeparatorElements(e){const t=this;a()(e).each((function(){const e=a()(this);e.contents().filter((function(){return this.nodeType===Node.TEXT_NODE&&a()(this).prev(".pewc-separator").length})).each((function(){const e=t.getPriceHtml(this.nodeValue.trim()),i=a()(e);a()(this).replaceWith(i)})),window.pewc_vars&&"yes"==window.pewc_vars.show_suffix&&t.replaceWoocommerceSuffix(e)}))}getPriceHtml(e){const t=window.accounting.unformat(e,window.pewc_vars.decimal_separator),i=r.A.displayIncludingVat(this.originalTaxDisplay),n=r.A.calculateAlternatePrice(t,this.originalTaxDisplay,this.taxRate),a=window.accounting.formatMoney(n,{symbol:window.pewc_vars.currency_symbol,decimal:window.pewc_vars.decimal_separator,thousand:window.pewc_vars.thousand_separator,precision:window.pewc_vars.decimals,format:window.pewc_vars.price_format});return this.taxSwitchElementBuilder.build(i,e,a,null)}getVatTextElement(){const e=this;if(e.vatTexts||(e.vatTexts=c.A.getVatTexts()),e.vatTexts&&e.vatTexts.including&&e.vatTexts.excluding){const t=r.A.displayIncludingVat(e.originalTaxDisplay);return c.A.getVatTextElement(t,e.vatTexts.including,e.vatTexts.excluding)}return null}replaceWoocommerceSuffix(e){if(!e.length)return;const t=e.find(".woocommerce-price-suffix");if(!t.length)return;const i=this.getVatTextElement();if(!i)return;const n=e.children(".wts-price-container");n.length>0?(t.remove(),n.append(i)):t.replaceWith(i)}};(0,i(538).P)((()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new o(e.originalTaxDisplay,t.baseTaxRate).init()}))}},i={};function n(e){var a=i[e];if(void 0!==a)return a.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,i,a,r)=>{if(!i){var c=1/0;for(p=0;p<e.length;p++){for(var[i,a,r]=e[p],o=!0,s=0;s<i.length;s++)(!1&r||c>=r)&&Object.keys(n.O).every((e=>n.O[e](i[s])))?i.splice(s--,1):(o=!1,r<c&&(c=r));if(o){e.splice(p--,1);var l=a();void 0!==l&&(t=l)}}return t}r=r||0;for(var p=e.length;p>0&&e[p-1][2]>r;p--)e[p]=e[p-1];e[p]=[i,a,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.j=276,(()=>{var e={276:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var a,r,[c,o,s]=i,l=0;if(c.some((t=>0!==e[t]))){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(s)var p=s(n)}for(t&&t(i);l<c.length;l++)r=c[l],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(p)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var a=n.O(void 0,[320],(()=>n(697)));a=n.O(a)})();1 (()=>{"use strict";var e,t={143:e=>{e.exports=window.wp.data},697:(e,t,i)=>{const n=window.jQuery;var a=i.n(n),r=i(159),c=i(651);const o=class{constructor(e,t){this.originalTaxDisplay=e,this.taxRate=t,this.taxSwitchElementBuilder=new c.A(this.originalTaxDisplay),this.vatTexts=null}init(){const e=this;e.vatTexts=c.A.getVatTexts(),e.extendOriginalFunctions(),e.wrapPrices(),e.registerWoocommerceEvents()}extendOriginalFunctions(){if("function"!=typeof window.pewc_wc_price)return;const e=this,t=window.pewc_wc_price;window.pewc_wc_price=function(i,n=!1,a=!0){const c=r.A.displayIncludingVat(e.originalTaxDisplay),o=r.A.calculateAlternatePrice(i,e.originalTaxDisplay,e.taxRate),s=t.apply(e,[i,n,a]),l=t.apply(e,[o,n,a]);return e.taxSwitchElementBuilder.build(c,s,l,null)}.bind(this);const i=window.pewc_wc_price;window.pewc_wc_price_without_currency=function(t){const n=r.A.displayIncludingVat(e.originalTaxDisplay),a=r.A.calculateAlternatePrice(t,e.originalTaxDisplay,e.taxRate),c=i.apply(e,[t]),o=i.apply(e,[a]);return e.taxSwitchElementBuilder.build(n,c,o,null)}.bind(this)}wrapPrices(){if(void 0===window.accounting||void 0===window.accounting.unformat||void 0===window.pewc_vars)return;const e=this;a()(".pewc-option-cost-label, .pewc-checkbox-price").each(function(t,i){const n=a()(i),r=n.html(),c=e.getPriceHtml(r);n.html(c)}),e.processPriceSeparatorElements(".pewc-radio-option-text"),e.processPriceSeparatorElements(".pewc-radio-image-desc span")}registerWoocommerceEvents(){const e=this;a()("body").on("pewc_after_update_total_js",function(){if(a()(".pewc-main-price").length){const t=a()(".pewc-main-price").find(".wts-price-container");if(t.length&&1===t.find(".wts-price-wrapper").length){const i=e.getVatTextElement();i&&t.append(i)}}window.pewc_vars&&"yes"==window.pewc_vars.show_suffix&&["#pewc-per-product-total","#pewc-options-total","#pewc-grand-total","#pewc-calculation-value"].forEach(function(t){const i=a()(t);e.replaceWoocommerceSuffix(i)})})}processPriceSeparatorElements(e){const t=this;a()(e).each(function(){const e=a()(this);e.contents().filter(function(){return this.nodeType===Node.TEXT_NODE&&a()(this).prev(".pewc-separator").length}).each(function(){const e=t.getPriceHtml(this.nodeValue.trim()),i=a()(e);a()(this).replaceWith(i)}),window.pewc_vars&&"yes"==window.pewc_vars.show_suffix&&t.replaceWoocommerceSuffix(e)})}getPriceHtml(e){const t=window.accounting.unformat(e,window.pewc_vars.decimal_separator),i=r.A.displayIncludingVat(this.originalTaxDisplay),n=r.A.calculateAlternatePrice(t,this.originalTaxDisplay,this.taxRate),a=window.accounting.formatMoney(n,{symbol:window.pewc_vars.currency_symbol,decimal:window.pewc_vars.decimal_separator,thousand:window.pewc_vars.thousand_separator,precision:window.pewc_vars.decimals,format:window.pewc_vars.price_format});return this.taxSwitchElementBuilder.build(i,e,a,null)}getVatTextElement(){const e=this;if(e.vatTexts||(e.vatTexts=c.A.getVatTexts()),e.vatTexts&&e.vatTexts.including&&e.vatTexts.excluding){const t=r.A.displayIncludingVat(e.originalTaxDisplay);return c.A.getVatTextElement(t,e.vatTexts.including,e.vatTexts.excluding)}return null}replaceWoocommerceSuffix(e){if(!e.length)return;const t=e.find(".woocommerce-price-suffix");if(!t.length)return;const i=this.getVatTextElement();if(!i)return;const n=e.children(".wts-price-container");n.length>0?(t.remove(),n.append(i)):t.replaceWith(i)}};(0,i(538).P)(()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new o(e.originalTaxDisplay,t.baseTaxRate).init()})}},i={};function n(e){var a=i[e];if(void 0!==a)return a.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,i,a,r)=>{if(!i){var c=1/0;for(p=0;p<e.length;p++){for(var[i,a,r]=e[p],o=!0,s=0;s<i.length;s++)(!1&r||c>=r)&&Object.keys(n.O).every(e=>n.O[e](i[s]))?i.splice(s--,1):(o=!1,r<c&&(c=r));if(o){e.splice(p--,1);var l=a();void 0!==l&&(t=l)}}return t}r=r||0;for(var p=e.length;p>0&&e[p-1][2]>r;p--)e[p]=e[p-1];e[p]=[i,a,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.j=276,(()=>{var e={276:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var a,r,[c,o,s]=i,l=0;if(c.some(t=>0!==e[t])){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(s)var p=s(n)}for(t&&t(i);l<c.length;l++)r=c[l],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(p)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var a=n.O(void 0,[320],()=>n(697));a=n.O(a)})(); -
tax-switch-for-woocommerce/trunk/build/switch/style-index-rtl.css
r3284914 r3410740 1 .wp-block-wdevs-tax-switch{gap:10px}.wp-block-wdevs-tax-switch,.wp-block-wdevs-tax-switch .wdevs-tax-switch{align-items:center;display:flex}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label{display:inline-block;height:34px;position:relative;width:60px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox{height:0;opacity:0;width:0}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#ccc);border-radius:34px;bottom:0;cursor:pointer;right:0;position:absolute;left:0;top:0;transition:background-color .4s}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider:before{background-color:var(--wts-color,#fff);border-radius:50%;bottom:4px;content:"";height:26px;right:4px;position:absolute;transition:transform .4s;width:26px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider{background-color:var(--wts-bg-color-checked,#34c759)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{background-color:var(--wts-color-checked,var(--wts-color,#fff));transform:translateX(-26px)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label-text{color:var(--wts-text-color,#333);cursor:pointer;font-size:14px;font-weight:500;margin-right:10px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-block-wdevs-tax-switch .wdevs-tax-buttons{display:flex;gap:4px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button{all:unset;background:none;background-color:var(--wts-bg-color,#e9e9ea);border:1px solid var(--wts-color,#333);border-radius:4px;color:var(--wts-text-color,var(--wts-color,#333));cursor:pointer;font:inherit;margin:0;padding:4px 8px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:var(--wts-bg-color-checked,#333);border-color:var(--wts-color-checked,#fff);color:var(--wts-text-color,var(--wts-color-checked,#fff))}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label{height:30px;width:50px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#e9e9ea);border-radius:30px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider:before{bottom:1px;box-shadow:0 2px 5px rgba(0,0,0,.2);height:28px;right:1px;width:28px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{transform:translateX(-20px)}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label-text{font-size:13px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons{gap:15px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button{background-color:transparent;border:none;color:var(--wts-text-color,var(--wts-color,#333));padding:0;position:relative}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:first-child:after{background-color:var(--wts-bg-color,#333);content:"";display:block;height:55%;position:absolute;left:-7.5px;top:30%;width:1px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:hover:not(.wdevs-tax-button-active){color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:transparent;color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline} 1 .wp-block-wdevs-tax-switch{gap:10px}.wp-block-wdevs-tax-switch,.wp-block-wdevs-tax-switch .wdevs-tax-switch{align-items:center;display:flex}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label{display:inline-block;height:34px;position:relative;width:60px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox{height:0;opacity:0;width:0}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#ccc);border-radius:34px;bottom:0;cursor:pointer;right:0;position:absolute;left:0;top:0;transition:background-color .4s}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider:before{background-color:var(--wts-color,#fff);border-radius:50%;bottom:4px;content:"";height:26px;right:4px;position:absolute;transition:transform .4s;width:26px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider{background-color:var(--wts-bg-color-checked,#34c759)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{background-color:var(--wts-color-checked,var(--wts-color,#fff));transform:translateX(-26px)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label-text{color:var(--wts-text-color,#333);cursor:pointer;font-size:14px;font-weight:500;margin-right:10px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-block-wdevs-tax-switch .wdevs-tax-buttons{display:flex;gap:4px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button{all:unset;background:none;background-color:var(--wts-bg-color,#e9e9ea);border:1px solid var(--wts-color,#333);border-radius:4px;color:var(--wts-text-color,var(--wts-color,#333));cursor:pointer;font:inherit;margin:0;padding:4px 8px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:var(--wts-bg-color-checked,#333);border-color:var(--wts-color-checked,#fff);color:var(--wts-text-color,var(--wts-color-checked,#fff))}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label{height:30px;width:50px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#e9e9ea);border-radius:30px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider:before{bottom:1px;box-shadow:0 2px 5px rgba(0,0,0,.2);height:28px;right:1px;width:28px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{transform:translateX(-20px)}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label-text{font-size:13px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons{gap:15px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button{background-color:transparent;border:none;color:var(--wts-text-color,var(--wts-color,#333));padding:0;position:relative}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:first-child:after{background-color:var(--wts-bg-color,#333);content:"";display:block;height:55%;position:absolute;left:-7.5px;top:30%;width:1px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:hover:not(.wdevs-tax-button-active){color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:transparent;color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-label{height:28px;width:64px}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#929197);border-radius:14px;transition:background-color .3s ease}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-slider:before{border-radius:12px;bottom:2px;box-shadow:none;height:24px;right:2px;transition:transform .3s ease,right .3s ease;width:39px}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider{background-color:var(--wts-bg-color-checked,#34c759)}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{right:23px;transform:translateX(0)}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-label-text{font-size:14px}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-buttons .wdevs-tax-button{background-color:var(--wts-bg-color,#e5e5ea);border:none;border-radius:14px;color:var(--wts-text-color,#333);padding:6px 16px;transition:background-color .3s ease}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:var(--wts-bg-color-checked,#34c759);border:none;color:var(--wts-text-color,#fff)} -
tax-switch-for-woocommerce/trunk/build/switch/style-index.css
r3284914 r3410740 1 .wp-block-wdevs-tax-switch{gap:10px}.wp-block-wdevs-tax-switch,.wp-block-wdevs-tax-switch .wdevs-tax-switch{align-items:center;display:flex}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label{display:inline-block;height:34px;position:relative;width:60px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox{height:0;opacity:0;width:0}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#ccc);border-radius:34px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .4s}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider:before{background-color:var(--wts-color,#fff);border-radius:50%;bottom:4px;content:"";height:26px;left:4px;position:absolute;transition:transform .4s;width:26px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider{background-color:var(--wts-bg-color-checked,#34c759)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{background-color:var(--wts-color-checked,var(--wts-color,#fff));transform:translateX(26px)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label-text{color:var(--wts-text-color,#333);cursor:pointer;font-size:14px;font-weight:500;margin-left:10px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-block-wdevs-tax-switch .wdevs-tax-buttons{display:flex;gap:4px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button{all:unset;background:none;background-color:var(--wts-bg-color,#e9e9ea);border:1px solid var(--wts-color,#333);border-radius:4px;color:var(--wts-text-color,var(--wts-color,#333));cursor:pointer;font:inherit;margin:0;padding:4px 8px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:var(--wts-bg-color-checked,#333);border-color:var(--wts-color-checked,#fff);color:var(--wts-text-color,var(--wts-color-checked,#fff))}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label{height:30px;width:50px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#e9e9ea);border-radius:30px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider:before{bottom:1px;box-shadow:0 2px 5px rgba(0,0,0,.2);height:28px;left:1px;width:28px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{transform:translateX(20px)}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label-text{font-size:13px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons{gap:15px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button{background-color:transparent;border:none;color:var(--wts-text-color,var(--wts-color,#333));padding:0;position:relative}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:first-child:after{background-color:var(--wts-bg-color,#333);content:"";display:block;height:55%;position:absolute;right:-7.5px;top:30%;width:1px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:hover:not(.wdevs-tax-button-active){color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:transparent;color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline} 1 .wp-block-wdevs-tax-switch{gap:10px}.wp-block-wdevs-tax-switch,.wp-block-wdevs-tax-switch .wdevs-tax-switch{align-items:center;display:flex}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label{display:inline-block;height:34px;position:relative;width:60px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox{height:0;opacity:0;width:0}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#ccc);border-radius:34px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .4s}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-slider:before{background-color:var(--wts-color,#fff);border-radius:50%;bottom:4px;content:"";height:26px;left:4px;position:absolute;transition:transform .4s;width:26px}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider{background-color:var(--wts-bg-color-checked,#34c759)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{background-color:var(--wts-color-checked,var(--wts-color,#fff));transform:translateX(26px)}.wp-block-wdevs-tax-switch .wdevs-tax-switch .wdevs-tax-switch-label-text{color:var(--wts-text-color,#333);cursor:pointer;font-size:14px;font-weight:500;margin-left:10px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wp-block-wdevs-tax-switch .wdevs-tax-buttons{display:flex;gap:4px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button{all:unset;background:none;background-color:var(--wts-bg-color,#e9e9ea);border:1px solid var(--wts-color,#333);border-radius:4px;color:var(--wts-text-color,var(--wts-color,#333));cursor:pointer;font:inherit;margin:0;padding:4px 8px}.wp-block-wdevs-tax-switch .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:var(--wts-bg-color-checked,#333);border-color:var(--wts-color-checked,#fff);color:var(--wts-text-color,var(--wts-color-checked,#fff))}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label{height:30px;width:50px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#e9e9ea);border-radius:30px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-slider:before{bottom:1px;box-shadow:0 2px 5px rgba(0,0,0,.2);height:28px;left:1px;width:28px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{transform:translateX(20px)}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-switch .wdevs-tax-switch-label-text{font-size:13px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons{gap:15px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button{background-color:transparent;border:none;color:var(--wts-text-color,var(--wts-color,#333));padding:0;position:relative}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:first-child:after{background-color:var(--wts-bg-color,#333);content:"";display:block;height:55%;position:absolute;right:-7.5px;top:30%;width:1px}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button:hover:not(.wdevs-tax-button-active){color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline}.wp-block-wdevs-tax-switch.is-style-inline .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:transparent;color:var(--wts-text-color,var(--wts-color-checked,#333));text-decoration:underline}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-label{height:28px;width:64px}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-slider{background-color:var(--wts-bg-color,#929197);border-radius:14px;transition:background-color .3s ease}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-slider:before{border-radius:12px;bottom:2px;box-shadow:none;height:24px;left:2px;transition:transform .3s ease,left .3s ease;width:39px}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider{background-color:var(--wts-bg-color-checked,#34c759)}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-checkbox:checked+.wdevs-tax-switch-slider:before{left:23px;transform:translateX(0)}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-switch .wdevs-tax-switch-label-text{font-size:14px}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-buttons .wdevs-tax-button{background-color:var(--wts-bg-color,#e5e5ea);border:none;border-radius:14px;color:var(--wts-text-color,#333);padding:6px 16px;transition:background-color .3s ease}.wp-block-wdevs-tax-switch.is-style-flat-pill .wdevs-tax-buttons .wdevs-tax-button.wdevs-tax-button-active{background-color:var(--wts-bg-color-checked,#34c759);border:none;color:var(--wts-text-color,#fff)} -
tax-switch-for-woocommerce/trunk/build/switch/view.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'react-jsx-runtime', 'wp-data', 'wp-element'), 'version' => ' ab74b9dbd2535a3c0c7e');1 <?php return array('dependencies' => array('jquery', 'react-jsx-runtime', 'wp-data', 'wp-element'), 'version' => '26de6029e479f45d38e9'); -
tax-switch-for-woocommerce/trunk/build/switch/view.js
r3405724 r3410740 1 (()=>{"use strict";var e,t={87:e=>{e.exports=window.wp.element},143:e=>{e.exports=window.wp.data},617:(e,t,s)=>{var a=s(87),o=s(983),r=s(159);const i=window.jQuery;var n=s.n(i);const c=class{static initialize(e){this.registerWooCommerceEvents(e)}static registerWooCommerceEvents(e){n()(".variations_form").on("show_variation", (function(){setTimeout((function(){r.A.setPriceClasses(e)}),10)})),n()(".variations_form").on("reset_data",(function(){setTimeout((function(){r.A.setPriceClasses(e)}),10)})),n()(document).ajaxSuccess((function(t,s,a){a&&a.data&&["get_variable_product_bulk_table"].some((e=>a.data.includes(e)))&&setTimeout((function(){r.A.setPriceClasses(e)}),10)})),["jet-engine/listing-grid/after-load-more","facetwp-loaded","experimental-flatsome-pjax-request-done","flatsome-relay-request-done","flatsome-infiniteScroll-append","vpd_after_price_fadein","awsShowingResults","wc_fragments_loaded","pjax:success","fibosearch/show-suggestions"].forEach((function(t){n()(document).on(t,(function(t,s){r.A.setPriceClasses(e)}))}))}};var l=s(538),d=s(790);let u=!1;const f=()=>{if(!(0,l.I)())return;const e=document.querySelectorAll(".wp-block-wdevs-tax-switch");if(e.length>0){const t=window.wtsViewObject||{originalTaxDisplay:"incl"};(e=>{r.A.setPriceClasses(e.originalTaxDisplay),u||(c.initialize(e.originalTaxDisplay),u=!0)})(t),e.forEach((e=>{e&&((e,t)=>{const s={...e.dataset,...t};(0,a.createRoot)(e).render((0,d.jsx)(a.Suspense,{fallback:(0,d.jsx)("div",{className:"wp-block-placeholder"}),children:(0,d.jsx)(o.A,{...s})}))})(e,t)}))}};(0,l.P)((()=>{f()})),document.addEventListener("wdevs-tax-switch-appeared",(()=>{f()}))},790:e=>{e.exports=window.ReactJSXRuntime}},s={};function a(e){var o=s[e];if(void 0!==o)return o.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.m=t,e=[],a.O=(t,s,o,r)=>{if(!s){var i=1/0;for(d=0;d<e.length;d++){for(var[s,o,r]=e[d],n=!0,c=0;c<s.length;c++)(!1&r||i>=r)&&Object.keys(a.O).every((e=>a.O[e](s[c])))?s.splice(c--,1):(n=!1,r<i&&(i=r));if(n){e.splice(d--,1);var l=o();void 0!==l&&(t=l)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[s,o,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.j=793,(()=>{var e={793:0};a.O.j=t=>0===e[t];var t=(t,s)=>{var o,r,[i,n,c]=s,l=0;if(i.some((t=>0!==e[t]))){for(o in n)a.o(n,o)&&(a.m[o]=n[o]);if(c)var d=c(a)}for(t&&t(s);l<i.length;l++)r=i[l],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(d)},s=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var o=a.O(void 0,[320],(()=>a(617)));o=a.O(o)})();1 (()=>{"use strict";var e,t={87:e=>{e.exports=window.wp.element},143:e=>{e.exports=window.wp.data},617:(e,t,s)=>{var a=s(87),o=s(983),r=s(159);const i=window.jQuery;var n=s.n(i);const c=class{static initialize(e){this.registerWooCommerceEvents(e)}static registerWooCommerceEvents(e){n()(".variations_form").on("show_variation",function(){setTimeout(function(){r.A.setPriceClasses(e)},10)}),n()(".variations_form").on("reset_data",function(){setTimeout(function(){r.A.setPriceClasses(e)},10)}),n()(document).ajaxSuccess(function(t,s,a){a&&a.data&&["get_variable_product_bulk_table"].some(e=>a.data.includes(e))&&setTimeout(function(){r.A.setPriceClasses(e)},10)}),["jet-engine/listing-grid/after-load-more","facetwp-loaded","experimental-flatsome-pjax-request-done","flatsome-relay-request-done","flatsome-infiniteScroll-append","vpd_after_price_fadein","awsShowingResults","wc_fragments_loaded","pjax:success","fibosearch/show-suggestions"].forEach(function(t){n()(document).on(t,function(t,s){r.A.setPriceClasses(e)})})}};var l=s(538),d=s(790);let u=!1;const f=()=>{if(!(0,l.I)())return;const e=document.querySelectorAll(".wp-block-wdevs-tax-switch");if(e.length>0){const t=window.wtsViewObject||{originalTaxDisplay:"incl"};(e=>{r.A.setPriceClasses(e.originalTaxDisplay),u||(c.initialize(e.originalTaxDisplay),u=!0)})(t),e.forEach(e=>{e&&((e,t)=>{const s={...e.dataset,...t};(0,a.createRoot)(e).render((0,d.jsx)(a.Suspense,{fallback:(0,d.jsx)("div",{className:"wp-block-placeholder"}),children:(0,d.jsx)(o.A,{...s})}))})(e,t)})}};(0,l.P)(()=>{f()}),document.addEventListener("wdevs-tax-switch-appeared",()=>{f()})},790:e=>{e.exports=window.ReactJSXRuntime}},s={};function a(e){var o=s[e];if(void 0!==o)return o.exports;var r=s[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.m=t,e=[],a.O=(t,s,o,r)=>{if(!s){var i=1/0;for(d=0;d<e.length;d++){for(var[s,o,r]=e[d],n=!0,c=0;c<s.length;c++)(!1&r||i>=r)&&Object.keys(a.O).every(e=>a.O[e](s[c]))?s.splice(c--,1):(n=!1,r<i&&(i=r));if(n){e.splice(d--,1);var l=o();void 0!==l&&(t=l)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[s,o,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var s in t)a.o(t,s)&&!a.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.j=793,(()=>{var e={793:0};a.O.j=t=>0===e[t];var t=(t,s)=>{var o,r,[i,n,c]=s,l=0;if(i.some(t=>0!==e[t])){for(o in n)a.o(n,o)&&(a.m[o]=n[o]);if(c)var d=c(a)}for(t&&t(s);l<i.length;l++)r=i[l],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(d)},s=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var o=a.O(void 0,[320],()=>a(617));o=a.O(o)})(); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-measurement-price-calculator.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' 8c52a3b5484a07535729');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'aca2c7ae4ab162d3edd2'); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-measurement-price-calculator.js
r3405724 r3410740 1 (()=>{"use strict";var e,t={143:e=>{e.exports=window.wp.data},741:(e,t,r)=>{var i=r(159),a=r(651);const c=window.jQuery;var n=r.n(c),o=r(143);const s=class{constructor(e,t){this.isSwitched=!1,this.unsubscribe=null,this.originalTaxDisplay=e,this.taxRate=t,this.currentVariation=null,this.taxSwitchElementBuilder=new a.A(this.originalTaxDisplay)}init(){const e=this;e.unsubscribe=(0,o.subscribe)(( ()=>{const t=(0,o.select)("wdevs-tax-switch/store").getIsSwitched();e.isSwitched!==t&&(e.isSwitched=t,e.handleSwitchChange())})),e.registerWooCommerceEvents(),e.registerWCMeasurementEvents()}registerWooCommerceEvents(){const e=this;n()(".single_variation, .single_variation_wrap").bind("show_variation",(function(t,r){setTimeout((function(){if(e.currentVariation=r,r&&r.tax_rate&&(e.taxRate=r.tax_rate),window.wc_price_calculator_params){const t=e.getCurrentPrice();window.wc_price_calculator_params.product_price=t,r.price=t,n()(".qty").trigger("change")}}),500)}))}handleSwitchChange(){if(window.wc_price_calculator_params){const e=this.getCurrentPrice();e&&(window.wc_price_calculator_params.product_price=e,n()(".qty").trigger("change"))}}registerWCMeasurementEvents(){const e=this;n()(document).on("wc-measurement-price-calculator-total-price-change",(function(t,r,i){if(r&&i){const t=r*i;e.handleTotalPriceUpdate(t)}})),n()(document).on("wc-measurement-price-calculator-quantity-total-price-change",(function(t,r,i){if(r&&i){const t=r*i;e.handleTotalPriceUpdate(t)}}))}handleTotalPriceUpdate(e){if(!e||!this.taxRate)return;const t=i.A.calculateAlternatePrice(e,this.originalTaxDisplay,this.taxRate),r=this.woocommerce_price(e),a=this.woocommerce_price(t);this.replaceTotalPriceDisplay(r,a)}replaceTotalPriceDisplay(e,t){const r=n()(".total_price");if(r.length){const a=i.A.displayIncludingVat(this.originalTaxDisplay),c=this.taxSwitchElementBuilder.build(a,e,t);r.html(c)}}getCurrentPrice(){return this.currentVariation&&this.currentVariation.price_incl_vat&&this.currentVariation.price_excl_vat?"incl"===this.originalTaxDisplay?parseFloat(this.currentVariation.price_incl_vat):parseFloat(this.currentVariation.price_excl_vat):null}cleanup(){this.unsubscribe&&this.unsubscribe()}woocommerce_price(e){let t="";const r=window.wc_price_calculator_params.woocommerce_price_num_decimals,i=window.wc_price_calculator_params.woocommerce_currency_pos,a=window.wc_price_calculator_params.woocommerce_currency_symbol;switch(e=this.number_format(e,r,window.wc_price_calculator_params.woocommerce_price_decimal_sep,window.wc_price_calculator_params.woocommerce_price_thousand_sep),"yes"===window.wc_price_calculator_params.woocommerce_price_trim_zeros&&r>0&&(e=this.woocommerce_trim_zeros(e)),i){case"left":t='<span class="amount">'+a+e+"</span>";break;case"right":t='<span class="amount">'+e+a+"</span>";break;case"left_space":t='<span class="amount">'+a+" "+e+"</span>";break;case"right_space":t='<span class="amount">'+e+" "+a+"</span>"}return t}woocommerce_trim_zeros(e){return e.replace(new RegExp(this.preg_quote(window.wc_price_calculator_params.woocommerce_price_decimal_sep,"/")+"0+$"),"")}number_format(e,t,r,i){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");const a=isFinite(+e)?+e:0,c=isFinite(+t)?Math.abs(t):0,n=void 0===i?",":i,o=void 0===r?".":r;let s="";return s=new BigNumber(a).toFixed(c).split("."),s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,n)),(s[1]||"").length<c&&(s[1]=s[1]||"",s[1]+=new Array(c-s[1].length+1).join("0")),s.join(o)}preg_quote(e,t){return(e+"").replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\\\"+(t||"")+"-]","g"),"\\$&")}};(0,r(538).P)((()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new s(e.originalTaxDisplay,t.baseTaxRate).init()}))}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var c=r[e]={exports:{}};return t[e](c,c.exports,i),c.exports}i.m=t,e=[],i.O=(t,r,a,c)=>{if(!r){var n=1/0;for(p=0;p<e.length;p++){for(var[r,a,c]=e[p],o=!0,s=0;s<r.length;s++)(!1&c||n>=c)&&Object.keys(i.O).every((e=>i.O[e](r[s])))?r.splice(s--,1):(o=!1,c<n&&(n=c));if(o){e.splice(p--,1);var l=a();void 0!==l&&(t=l)}}return t}c=c||0;for(var p=e.length;p>0&&e[p-1][2]>c;p--)e[p]=e[p-1];e[p]=[r,a,c]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.j=902,(()=>{var e={902:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,c,[n,o,s]=r,l=0;if(n.some((t=>0!==e[t]))){for(a in o)i.o(o,a)&&(i.m[a]=o[a]);if(s)var p=s(i)}for(t&&t(r);l<n.length;l++)c=n[l],i.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return i.O(p)},r=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[320],(()=>i(741)));a=i.O(a)})();1 (()=>{"use strict";var e,t={143:e=>{e.exports=window.wp.data},741:(e,t,r)=>{var i=r(159),a=r(651);const c=window.jQuery;var n=r.n(c),o=r(143);const s=class{constructor(e,t){this.isSwitched=!1,this.unsubscribe=null,this.originalTaxDisplay=e,this.taxRate=t,this.currentVariation=null,this.taxSwitchElementBuilder=new a.A(this.originalTaxDisplay)}init(){const e=this;e.unsubscribe=(0,o.subscribe)(()=>{const t=(0,o.select)("wdevs-tax-switch/store").getIsSwitched();e.isSwitched!==t&&(e.isSwitched=t,e.handleSwitchChange())}),e.registerWooCommerceEvents(),e.registerWCMeasurementEvents()}registerWooCommerceEvents(){const e=this;n()(".single_variation, .single_variation_wrap").bind("show_variation",function(t,r){setTimeout(function(){if(e.currentVariation=r,r&&r.tax_rate&&(e.taxRate=r.tax_rate),window.wc_price_calculator_params){const t=e.getCurrentPrice();window.wc_price_calculator_params.product_price=t,r.price=t,n()(".qty").trigger("change")}},500)})}handleSwitchChange(){if(window.wc_price_calculator_params){const e=this.getCurrentPrice();e&&(window.wc_price_calculator_params.product_price=e,n()(".qty").trigger("change"))}}registerWCMeasurementEvents(){const e=this;n()(document).on("wc-measurement-price-calculator-total-price-change",function(t,r,i){if(r&&i){const t=r*i;e.handleTotalPriceUpdate(t)}}),n()(document).on("wc-measurement-price-calculator-quantity-total-price-change",function(t,r,i){if(r&&i){const t=r*i;e.handleTotalPriceUpdate(t)}})}handleTotalPriceUpdate(e){if(!e||!this.taxRate)return;const t=i.A.calculateAlternatePrice(e,this.originalTaxDisplay,this.taxRate),r=this.woocommerce_price(e),a=this.woocommerce_price(t);this.replaceTotalPriceDisplay(r,a)}replaceTotalPriceDisplay(e,t){const r=n()(".total_price");if(r.length){const a=i.A.displayIncludingVat(this.originalTaxDisplay),c=this.taxSwitchElementBuilder.build(a,e,t);r.html(c)}}getCurrentPrice(){return this.currentVariation&&this.currentVariation.price_incl_vat&&this.currentVariation.price_excl_vat?"incl"===this.originalTaxDisplay?parseFloat(this.currentVariation.price_incl_vat):parseFloat(this.currentVariation.price_excl_vat):null}cleanup(){this.unsubscribe&&this.unsubscribe()}woocommerce_price(e){let t="";const r=window.wc_price_calculator_params.woocommerce_price_num_decimals,i=window.wc_price_calculator_params.woocommerce_currency_pos,a=window.wc_price_calculator_params.woocommerce_currency_symbol;switch(e=this.number_format(e,r,window.wc_price_calculator_params.woocommerce_price_decimal_sep,window.wc_price_calculator_params.woocommerce_price_thousand_sep),"yes"===window.wc_price_calculator_params.woocommerce_price_trim_zeros&&r>0&&(e=this.woocommerce_trim_zeros(e)),i){case"left":t='<span class="amount">'+a+e+"</span>";break;case"right":t='<span class="amount">'+e+a+"</span>";break;case"left_space":t='<span class="amount">'+a+" "+e+"</span>";break;case"right_space":t='<span class="amount">'+e+" "+a+"</span>"}return t}woocommerce_trim_zeros(e){return e.replace(new RegExp(this.preg_quote(window.wc_price_calculator_params.woocommerce_price_decimal_sep,"/")+"0+$"),"")}number_format(e,t,r,i){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");const a=isFinite(+e)?+e:0,c=isFinite(+t)?Math.abs(t):0,n=void 0===i?",":i,o=void 0===r?".":r;let s="";return s=new BigNumber(a).toFixed(c).split("."),s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,n)),(s[1]||"").length<c&&(s[1]=s[1]||"",s[1]+=new Array(c-s[1].length+1).join("0")),s.join(o)}preg_quote(e,t){return(e+"").replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\\\"+(t||"")+"-]","g"),"\\$&")}};(0,r(538).P)(()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new s(e.originalTaxDisplay,t.baseTaxRate).init()})}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var c=r[e]={exports:{}};return t[e](c,c.exports,i),c.exports}i.m=t,e=[],i.O=(t,r,a,c)=>{if(!r){var n=1/0;for(p=0;p<e.length;p++){for(var[r,a,c]=e[p],o=!0,s=0;s<r.length;s++)(!1&c||n>=c)&&Object.keys(i.O).every(e=>i.O[e](r[s]))?r.splice(s--,1):(o=!1,c<n&&(n=c));if(o){e.splice(p--,1);var l=a();void 0!==l&&(t=l)}}return t}c=c||0;for(var p=e.length;p>0&&e[p-1][2]>c;p--)e[p]=e[p-1];e[p]=[r,a,c]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.j=902,(()=>{var e={902:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,c,[n,o,s]=r,l=0;if(n.some(t=>0!==e[t])){for(a in o)i.o(o,a)&&(i.m[a]=o[a]);if(s)var p=s(i)}for(t&&t(r);l<n.length;l++)c=n[l],i.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return i.O(p)},r=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[320],()=>i(741));a=i.O(a)})(); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-product-addons.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' e39bba00a1529bda9900');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'fb2c36a7d1ca7cf29e9c'); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-product-addons.js
r3405724 r3410740 1 (()=>{"use strict";var o,a={14:(o,a,e)=>{const r=window.jQuery;var t=e.n(r),i=e(159),n=e(651);const s=class{constructor(o,a){this.originalTaxDisplay=o,this.taxRate=a,this.taxSwitchElementBuilder=new n.A(this.originalTaxDisplay)}init(){this.registerWooCommerceEvents()}registerWooCommerceEvents(){if(void 0===window.accounting||void 0===window.accounting.unformat||void 0===window.woocommerce_addons_params)return;const o=this;t()("form.cart").on("updated_addons", (function(){const a=t()(this).find(".product-addon-totals .amount"),e=i.A.displayIncludingVat(this.originalTaxDisplay);let r,n,s,c,d,l;a.each((function(){n=t()(this).text(),r=window.accounting.unformat(n,window.woocommerce_addons_params.currency_format_decimal_sep),r>0&&(s=i.A.calculateAlternatePrice(r,o.originalTaxDisplay,o.taxRate),c=window.accounting.formatMoney(s,{symbol:window.woocommerce_addons_params.currency_format_symbol,decimal:window.woocommerce_addons_params.currency_format_decimal_sep,thousand:window.woocommerce_addons_params.currency_format_thousand_sep,precision:window.woocommerce_addons_params.currency_format_num_decimals,format:window.woocommerce_addons_params.currency_format}),d=o.taxSwitchElementBuilder.build(e,n,c,null),l=t()(this).parent(),l.html(d))})),i.A.setPriceClasses(o.originalTaxDisplay)}))}};(0,e(538).P)((()=>{const o=window.wtsViewObject||{originalTaxDisplay:"incl"},a=window.wtsCompatibilityObject||{baseTaxRate:0};new s(o.originalTaxDisplay,a.baseTaxRate).init()}))},143:o=>{o.exports=window.wp.data}},e={};function r(o){var t=e[o];if(void 0!==t)return t.exports;var i=e[o]={exports:{}};return a[o](i,i.exports,r),i.exports}r.m=a,o=[],r.O=(a,e,t,i)=>{if(!e){var n=1/0;for(l=0;l<o.length;l++){for(var[e,t,i]=o[l],s=!0,c=0;c<e.length;c++)(!1&i||n>=i)&&Object.keys(r.O).every((o=>r.O[o](e[c])))?e.splice(c--,1):(s=!1,i<n&&(n=i));if(s){o.splice(l--,1);var d=t();void 0!==d&&(a=d)}}return a}i=i||0;for(var l=o.length;l>0&&o[l-1][2]>i;l--)o[l]=o[l-1];o[l]=[e,t,i]},r.n=o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return r.d(a,{a}),a},r.d=(o,a)=>{for(var e in a)r.o(a,e)&&!r.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:a[e]})},r.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a),r.j=588,(()=>{var o={588:0};r.O.j=a=>0===o[a];var a=(a,e)=>{var t,i,[n,s,c]=e,d=0;if(n.some((a=>0!==o[a]))){for(t in s)r.o(s,t)&&(r.m[t]=s[t]);if(c)var l=c(r)}for(a&&a(e);d<n.length;d++)i=n[d],r.o(o,i)&&o[i]&&o[i][0](),o[i]=0;return r.O(l)},e=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];e.forEach(a.bind(null,0)),e.push=a.bind(null,e.push.bind(e))})();var t=r.O(void 0,[320],(()=>r(14)));t=r.O(t)})();1 (()=>{"use strict";var o,a={14:(o,a,e)=>{const r=window.jQuery;var t=e.n(r),i=e(159),n=e(651);const s=class{constructor(o,a){this.originalTaxDisplay=o,this.taxRate=a,this.taxSwitchElementBuilder=new n.A(this.originalTaxDisplay)}init(){this.registerWooCommerceEvents()}registerWooCommerceEvents(){if(void 0===window.accounting||void 0===window.accounting.unformat||void 0===window.woocommerce_addons_params)return;const o=this;t()("form.cart").on("updated_addons",function(){const a=t()(this).find(".product-addon-totals .amount"),e=i.A.displayIncludingVat(this.originalTaxDisplay);let r,n,s,c,d,l;a.each(function(){n=t()(this).text(),r=window.accounting.unformat(n,window.woocommerce_addons_params.currency_format_decimal_sep),r>0&&(s=i.A.calculateAlternatePrice(r,o.originalTaxDisplay,o.taxRate),c=window.accounting.formatMoney(s,{symbol:window.woocommerce_addons_params.currency_format_symbol,decimal:window.woocommerce_addons_params.currency_format_decimal_sep,thousand:window.woocommerce_addons_params.currency_format_thousand_sep,precision:window.woocommerce_addons_params.currency_format_num_decimals,format:window.woocommerce_addons_params.currency_format}),d=o.taxSwitchElementBuilder.build(e,n,c,null),l=t()(this).parent(),l.html(d))}),i.A.setPriceClasses(o.originalTaxDisplay)})}};(0,e(538).P)(()=>{const o=window.wtsViewObject||{originalTaxDisplay:"incl"},a=window.wtsCompatibilityObject||{baseTaxRate:0};new s(o.originalTaxDisplay,a.baseTaxRate).init()})},143:o=>{o.exports=window.wp.data}},e={};function r(o){var t=e[o];if(void 0!==t)return t.exports;var i=e[o]={exports:{}};return a[o](i,i.exports,r),i.exports}r.m=a,o=[],r.O=(a,e,t,i)=>{if(!e){var n=1/0;for(l=0;l<o.length;l++){for(var[e,t,i]=o[l],s=!0,c=0;c<e.length;c++)(!1&i||n>=i)&&Object.keys(r.O).every(o=>r.O[o](e[c]))?e.splice(c--,1):(s=!1,i<n&&(n=i));if(s){o.splice(l--,1);var d=t();void 0!==d&&(a=d)}}return a}i=i||0;for(var l=o.length;l>0&&o[l-1][2]>i;l--)o[l]=o[l-1];o[l]=[e,t,i]},r.n=o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return r.d(a,{a}),a},r.d=(o,a)=>{for(var e in a)r.o(a,e)&&!r.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:a[e]})},r.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a),r.j=588,(()=>{var o={588:0};r.O.j=a=>0===o[a];var a=(a,e)=>{var t,i,[n,s,c]=e,d=0;if(n.some(a=>0!==o[a])){for(t in s)r.o(s,t)&&(r.m[t]=s[t]);if(c)var l=c(r)}for(a&&a(e);d<n.length;d++)i=n[d],r.o(o,i)&&o[i]&&o[i][0](),o[i]=0;return r.O(l)},e=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];e.forEach(a.bind(null,0)),e.push=a.bind(null,e.push.bind(e))})();var t=r.O(void 0,[320],()=>r(14));t=r.O(t)})(); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-quantity-manager.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' f90a006f2e083dd4692b');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'dc141fef4052225050ee'); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-quantity-manager.js
r3405724 r3410740 1 (()=>{"use strict";var t,e={143:t=>{t.exports=window.wp.data},372:(t,e,i)=>{const r=window.jQuery;var a=i.n(r),n=i(651),o=i(159);const s=class{constructor(t,e){this.originalTaxDisplay=t,this.taxRate=e,this.taxSwitchElementBuilder=new n.A(this.originalTaxDisplay),this.observer=null}init(){this.registerWooCommerceEvents(),this.registerObservers()}registerWooCommerceEvents(){const t=this;a()(document).on("found_variation", (function(e,i){if(i)if(i.taxFactor){const e=100*(i.taxFactor-1);t.taxRate=e}else i.tax_rate&&(t.taxRate=i.tax_rate)}))}registerObservers(){const t=this,e=['[data-item="price"]','[data-item="sale_price"]','[data-item="total_price"]','[data-item="total_sale_price"]',...t.shouldUseDiscountSelectors()?['[data-item="discount"]','[data-item="total_discount"]']:[]],i={childList:!0,subtree:!0,characterData:!1};t.observer=new MutationObserver(((i,r)=>{i.forEach((i=>{if("childList"===i.type||"characterData"===i.type){const r=i.target;if(i.target.querySelector(".wts-price-container"))return;if(r.matches(e))t.updatePriceElement(r);else{const i=r.closest(e.join(","));i&&t.updatePriceElement(i)}}}))})),document.querySelectorAll(".wqm-pricing-table-wrapper").forEach((e=>{t.observer.observe(e,i)}))}updatePriceElement(t){const e=this,i=a()(t),r=o.A.displayIncludingVat(e.originalTaxDisplay),n=t=>{const i=window.accounting.unformat(t,window.wqm_config?.display_options.decimal);return e.formatPrice(o.A.calculateAlternatePrice(i,e.originalTaxDisplay,e.taxRate))};if(i.find("del").length){const t=i.find("del").text().trim(),a=i.find("ins").text().trim();i.find("del").html(e.taxSwitchElementBuilder.build(r,t,n(t),null)),i.find("ins").html(e.taxSwitchElementBuilder.build(r,a,n(a),null))}else{const t=i.text().trim();i.html(e.taxSwitchElementBuilder.build(r,t,n(t),null))}}formatPrice(t){return window.WAPF?.Util?.formatMoney?window.WAPF.Util.formatMoney(t,window.wapf_config?.display_options):t}shouldUseDiscountSelectors(){const t=document.querySelector(".wqm-config");return"1"===t?.dataset.percentOnTotal}destroy(){this.observer?.disconnect()}};(0,i(538).P)((()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"},e=window.wtsCompatibilityObject||{baseTaxRate:0};new s(t.originalTaxDisplay,e.baseTaxRate).init()}))}},i={};function r(t){var a=i[t];if(void 0!==a)return a.exports;var n=i[t]={exports:{}};return e[t](n,n.exports,r),n.exports}r.m=e,t=[],r.O=(e,i,a,n)=>{if(!i){var o=1/0;for(d=0;d<t.length;d++){for(var[i,a,n]=t[d],s=!0,l=0;l<i.length;l++)(!1&n||o>=n)&&Object.keys(r.O).every((t=>r.O[t](i[l])))?i.splice(l--,1):(s=!1,n<o&&(o=n));if(s){t.splice(d--,1);var c=a();void 0!==c&&(e=c)}}return e}n=n||0;for(var d=t.length;d>0&&t[d-1][2]>n;d--)t[d]=t[d-1];t[d]=[i,a,n]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.j=970,(()=>{var t={970:0};r.O.j=e=>0===t[e];var e=(e,i)=>{var a,n,[o,s,l]=i,c=0;if(o.some((e=>0!==t[e]))){for(a in s)r.o(s,a)&&(r.m[a]=s[a]);if(l)var d=l(r)}for(e&&e(i);c<o.length;c++)n=o[c],r.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return r.O(d)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var a=r.O(void 0,[320],(()=>r(372)));a=r.O(a)})();1 (()=>{"use strict";var t,e={143:t=>{t.exports=window.wp.data},372:(t,e,i)=>{const r=window.jQuery;var a=i.n(r),n=i(651),o=i(159);const s=class{constructor(t,e){this.originalTaxDisplay=t,this.taxRate=e,this.taxSwitchElementBuilder=new n.A(this.originalTaxDisplay),this.observer=null}init(){this.registerWooCommerceEvents(),this.registerObservers()}registerWooCommerceEvents(){const t=this;a()(document).on("found_variation",function(e,i){if(i)if(i.taxFactor){const e=100*(i.taxFactor-1);t.taxRate=e}else i.tax_rate&&(t.taxRate=i.tax_rate)})}registerObservers(){const t=this,e=['[data-item="price"]','[data-item="sale_price"]','[data-item="total_price"]','[data-item="total_sale_price"]',...t.shouldUseDiscountSelectors()?['[data-item="discount"]','[data-item="total_discount"]']:[]],i={childList:!0,subtree:!0,characterData:!1};t.observer=new MutationObserver((i,r)=>{i.forEach(i=>{if("childList"===i.type||"characterData"===i.type){const r=i.target;if(i.target.querySelector(".wts-price-container"))return;if(r.matches(e))t.updatePriceElement(r);else{const i=r.closest(e.join(","));i&&t.updatePriceElement(i)}}})}),document.querySelectorAll(".wqm-pricing-table-wrapper").forEach(e=>{t.observer.observe(e,i)})}updatePriceElement(t){const e=this,i=a()(t),r=o.A.displayIncludingVat(e.originalTaxDisplay),n=t=>{const i=window.accounting.unformat(t,window.wqm_config?.display_options.decimal);return e.formatPrice(o.A.calculateAlternatePrice(i,e.originalTaxDisplay,e.taxRate))};if(i.find("del").length){const t=i.find("del").text().trim(),a=i.find("ins").text().trim();i.find("del").html(e.taxSwitchElementBuilder.build(r,t,n(t),null)),i.find("ins").html(e.taxSwitchElementBuilder.build(r,a,n(a),null))}else{const t=i.text().trim();i.html(e.taxSwitchElementBuilder.build(r,t,n(t),null))}}formatPrice(t){return window.WAPF?.Util?.formatMoney?window.WAPF.Util.formatMoney(t,window.wapf_config?.display_options):t}shouldUseDiscountSelectors(){const t=document.querySelector(".wqm-config");return"1"===t?.dataset.percentOnTotal}destroy(){this.observer?.disconnect()}};(0,i(538).P)(()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"},e=window.wtsCompatibilityObject||{baseTaxRate:0};new s(t.originalTaxDisplay,e.baseTaxRate).init()})}},i={};function r(t){var a=i[t];if(void 0!==a)return a.exports;var n=i[t]={exports:{}};return e[t](n,n.exports,r),n.exports}r.m=e,t=[],r.O=(e,i,a,n)=>{if(!i){var o=1/0;for(d=0;d<t.length;d++){for(var[i,a,n]=t[d],s=!0,l=0;l<i.length;l++)(!1&n||o>=n)&&Object.keys(r.O).every(t=>r.O[t](i[l]))?i.splice(l--,1):(s=!1,n<o&&(o=n));if(s){t.splice(d--,1);var c=a();void 0!==c&&(e=c)}}return e}n=n||0;for(var d=t.length;d>0&&t[d-1][2]>n;d--)t[d]=t[d-1];t[d]=[i,a,n]},r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.j=970,(()=>{var t={970:0};r.O.j=e=>0===t[e];var e=(e,i)=>{var a,n,[o,s,l]=i,c=0;if(o.some(e=>0!==t[e])){for(a in s)r.o(s,a)&&(r.m[a]=s[a]);if(l)var d=l(r)}for(e&&e(i);c<o.length;c++)n=o[c],r.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return r.O(d)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var a=r.O(void 0,[320],()=>r(372));a=r.O(a)})(); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-tiered-price-table.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' 80cbcf2e027e0c5635ce');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'ebcce90b87bda2f82035'); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-tiered-price-table.js
r3405724 r3410740 1 (()=>{"use strict";var t,i={102:(t,i,e)=>{const r=window.jQuery;var a=e.n(r),n=e(159),s=e(651);const c=class{constructor(t){this.originalTaxDisplay=t,this.isInclTaxDisplay="incl"===t,this.priceBackups=new Map,this.vatTexts=null}init(){this.registerWooCommerceEvents(),this.initializePriceBackups()}initializePriceBackups(){const t=this;a()(".tiered-pricing-dynamic-price-wrapper").each(( (i,e)=>{const r=a()(e),n=r.data("product-id");t.priceBackups.has(n)||t.priceBackups.set(n,r.html())}))}registerWooCommerceEvents(){const t=this;a()(".tpt__tiered-pricing").on("tiered_price_update",((i,e)=>{t.updateAllPrices(e)})),a()(".tpt__tiered-pricing").first().children().length&&(a()(document).on("reset_data",(i=>{const e=a()(i.target).closest(".variations_form");if(e.length){const i=e.data("product_id");t.resetPrices(i)}})),a()(document).on("show_variation",((i,e)=>{const r=e.variation_id;t.resetPrices(r)})))}updateAllPrices(t){if(!t.__instance)return;const i=this,e=n.A.displayIncludingVat(i.originalTaxDisplay),r=i.shouldShowOriginalPrice(t),s=t.__instance.formatting.formatPrice(t.price),c=t.__instance.formatting.formatPrice(i.getAlternatePrice(t)),l=r?t.__instance.formatting.formatPrice(i.getOriginalPrice(t,!0)):null,o=r?t.__instance.formatting.formatPrice(i.getOriginalPrice(t,!1)):null;a()(".tiered-pricing-dynamic-price-wrapper").filter(((i,e)=>{const r=a()(e),n=parseInt(r.data("product-id")),s=parseInt(r.data("parent-id"));return n===s?s===t.parentId:n===t.productId})).each(((t,r)=>{const n=a()(r);"dynamic"===n.data("price-type")&&n.html(i.getWtsHtml(e,s,c,!0,l,o))})),i.updateSummaryTable(t,e),n.A.setPriceClasses(i.originalTaxDisplay)}shouldShowOriginalPrice(t){return!!t.__instance.dataProvider.isProductOnSale()||t.__instance.dataProvider.showTieredPriceAsDiscount()&&t.pricing.tieredQuantity>t.__instance.dataProvider.getMinimum()}getOriginalPrice(t,i=!0){const e=this.getAlternatePrice(t);return t.__instance.dataProvider.isProductOnSale()?this.getOriginalRegularPrice(t,i):i?t.__instance.dataProvider.getOriginalPrice():t.__instance.dataProvider.getOriginalPrice()*(e/t.price)}getOriginalRegularPrice(t,i=!0){const e=this.getAlternatePrice(t);return i?t.__instance.dataProvider.getRegularPrice():t.__instance.dataProvider.getRegularPrice()*(e/t.price)}updateSummaryTable(t,i){const e=this,r=e.getSummaryTable(t.parentId);if(!r||!r.length)return;const a=e.getAlternatePrice(t),s=e.getWtsHtml(i,t.__instance.formatting.formatPrice(t.price),t.__instance.formatting.formatPrice(a),!0),c=e.getWtsHtml(i,t.__instance.formatting.formatPrice(t.price*t.quantity),t.__instance.formatting.formatPrice(a*t.quantity),!0),l=e.getWtsHtml(i,t.__instance.formatting.formatPrice(t.price*t.quantity),t.__instance.formatting.formatPrice(a*t.quantity),!0),o=t.__instance.dataProvider.getRegularPrice();let p="";if(t.price!==o){const r=e.getOriginalRegularPrice(t,!1);p=e.getWtsHtml(i,t.__instance.formatting.formatPrice(o),t.__instance.formatting.formatPrice(r),!1)}setTimeout((function(){r.find("[data-tier-pricing-table-summary-product-price]").html(s),r.find("[data-tier-pricing-table-summary-total]").html(c),r.find("[data-tier-pricing-table-summary-total-with-tax]").html(l),r.find("[data-tier-pricing-table-summary-product-old-price]").html(p),n.A.setPriceClasses(e.originalTaxDisplay)}),10)}getSummaryTable(t){return t?a()(".tier-pricing-summary-table").filter(`[data-product-id=${t}]`):a()(".tier-pricing-summary-table")}resetPrices(t){const i=this.priceBackups.get(t);i&&a()(".tiered-pricing-dynamic-price-wrapper").filter(`[data-product-id=${t}]`).html(i),n.A.setPriceClasses(this.originalTaxDisplay)}getWtsHtml(t,i,e,r=!1,a=null,n=null){const c=this,l=(t,i)=>i?`<del>${i}</del> <ins>${t}</ins>`:t,[o,p]=c.isInclTaxDisplay?[i,e]:[e,i],[d,g]=c.isInclTaxDisplay?[a,n]:[n,a],u=`\n <span class="wts-price-wrapper">\n <span class="wts-price-incl ${t?"wts-active":"wts-inactive"}">\n ${l(o,d)}\n </span>\n <span class="wts-price-excl ${t?"wts-inactive":"wts-active"}">\n ${l(p,g)}\n </span>\n </span>\n `;return r&&(c.vatTexts||(c.vatTexts=s.A.getVatTexts()),c.vatTexts)?`\n <span class="wts-price-container">\n ${u}\n ${s.A.getVatTextElement(t,c.vatTexts.including,c.vatTexts.excluding)}\n </span>\n `:`\n <span class="wts-price-container">\n ${u}\n </span>\n `}getAlternatePrice(t){return this.isInclTaxDisplay?t.pricing.price_excl_tax:t.pricing.price_incl_tax}};(0,e(538).P)((()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"};new c(t.originalTaxDisplay).init()}))},143:t=>{t.exports=window.wp.data}},e={};function r(t){var a=e[t];if(void 0!==a)return a.exports;var n=e[t]={exports:{}};return i[t](n,n.exports,r),n.exports}r.m=i,t=[],r.O=(i,e,a,n)=>{if(!e){var s=1/0;for(p=0;p<t.length;p++){for(var[e,a,n]=t[p],c=!0,l=0;l<e.length;l++)(!1&n||s>=n)&&Object.keys(r.O).every((t=>r.O[t](e[l])))?e.splice(l--,1):(c=!1,n<s&&(s=n));if(c){t.splice(p--,1);var o=a();void 0!==o&&(i=o)}}return i}n=n||0;for(var p=t.length;p>0&&t[p-1][2]>n;p--)t[p]=t[p-1];t[p]=[e,a,n]},r.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return r.d(i,{a:i}),i},r.d=(t,i)=>{for(var e in i)r.o(i,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},r.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r.j=387,(()=>{var t={387:0};r.O.j=i=>0===t[i];var i=(i,e)=>{var a,n,[s,c,l]=e,o=0;if(s.some((i=>0!==t[i]))){for(a in c)r.o(c,a)&&(r.m[a]=c[a]);if(l)var p=l(r)}for(i&&i(e);o<s.length;o++)n=s[o],r.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return r.O(p)},e=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];e.forEach(i.bind(null,0)),e.push=i.bind(null,e.push.bind(e))})();var a=r.O(void 0,[320],(()=>r(102)));a=r.O(a)})();1 (()=>{"use strict";var t,i={102:(t,i,e)=>{const r=window.jQuery;var a=e.n(r),n=e(159),s=e(651);const c=class{constructor(t){this.originalTaxDisplay=t,this.isInclTaxDisplay="incl"===t,this.priceBackups=new Map,this.vatTexts=null}init(){this.registerWooCommerceEvents(),this.initializePriceBackups()}initializePriceBackups(){const t=this;a()(".tiered-pricing-dynamic-price-wrapper").each((i,e)=>{const r=a()(e),n=r.data("product-id");t.priceBackups.has(n)||t.priceBackups.set(n,r.html())})}registerWooCommerceEvents(){const t=this;a()(".tpt__tiered-pricing").on("tiered_price_update",(i,e)=>{t.updateAllPrices(e)}),a()(".tpt__tiered-pricing").first().children().length&&(a()(document).on("reset_data",i=>{const e=a()(i.target).closest(".variations_form");if(e.length){const i=e.data("product_id");t.resetPrices(i)}}),a()(document).on("show_variation",(i,e)=>{const r=e.variation_id;t.resetPrices(r)}))}updateAllPrices(t){if(!t.__instance)return;const i=this,e=n.A.displayIncludingVat(i.originalTaxDisplay),r=i.shouldShowOriginalPrice(t),s=t.__instance.formatting.formatPrice(t.price),c=t.__instance.formatting.formatPrice(i.getAlternatePrice(t)),l=r?t.__instance.formatting.formatPrice(i.getOriginalPrice(t,!0)):null,o=r?t.__instance.formatting.formatPrice(i.getOriginalPrice(t,!1)):null;a()(".tiered-pricing-dynamic-price-wrapper").filter((i,e)=>{const r=a()(e),n=parseInt(r.data("product-id")),s=parseInt(r.data("parent-id"));return n===s?s===t.parentId:n===t.productId}).each((t,r)=>{const n=a()(r);"dynamic"===n.data("price-type")&&n.html(i.getWtsHtml(e,s,c,!0,l,o))}),i.updateSummaryTable(t,e),n.A.setPriceClasses(i.originalTaxDisplay)}shouldShowOriginalPrice(t){return!!t.__instance.dataProvider.isProductOnSale()||t.__instance.dataProvider.showTieredPriceAsDiscount()&&t.pricing.tieredQuantity>t.__instance.dataProvider.getMinimum()}getOriginalPrice(t,i=!0){const e=this.getAlternatePrice(t);return t.__instance.dataProvider.isProductOnSale()?this.getOriginalRegularPrice(t,i):i?t.__instance.dataProvider.getOriginalPrice():t.__instance.dataProvider.getOriginalPrice()*(e/t.price)}getOriginalRegularPrice(t,i=!0){const e=this.getAlternatePrice(t);return i?t.__instance.dataProvider.getRegularPrice():t.__instance.dataProvider.getRegularPrice()*(e/t.price)}updateSummaryTable(t,i){const e=this,r=e.getSummaryTable(t.parentId);if(!r||!r.length)return;const a=e.getAlternatePrice(t),s=e.getWtsHtml(i,t.__instance.formatting.formatPrice(t.price),t.__instance.formatting.formatPrice(a),!0),c=e.getWtsHtml(i,t.__instance.formatting.formatPrice(t.price*t.quantity),t.__instance.formatting.formatPrice(a*t.quantity),!0),l=e.getWtsHtml(i,t.__instance.formatting.formatPrice(t.price*t.quantity),t.__instance.formatting.formatPrice(a*t.quantity),!0),o=t.__instance.dataProvider.getRegularPrice();let p="";if(t.price!==o){const r=e.getOriginalRegularPrice(t,!1);p=e.getWtsHtml(i,t.__instance.formatting.formatPrice(o),t.__instance.formatting.formatPrice(r),!1)}setTimeout(function(){r.find("[data-tier-pricing-table-summary-product-price]").html(s),r.find("[data-tier-pricing-table-summary-total]").html(c),r.find("[data-tier-pricing-table-summary-total-with-tax]").html(l),r.find("[data-tier-pricing-table-summary-product-old-price]").html(p),n.A.setPriceClasses(e.originalTaxDisplay)},10)}getSummaryTable(t){return t?a()(".tier-pricing-summary-table").filter(`[data-product-id=${t}]`):a()(".tier-pricing-summary-table")}resetPrices(t){const i=this.priceBackups.get(t);i&&a()(".tiered-pricing-dynamic-price-wrapper").filter(`[data-product-id=${t}]`).html(i),n.A.setPriceClasses(this.originalTaxDisplay)}getWtsHtml(t,i,e,r=!1,a=null,n=null){const c=this,l=(t,i)=>i?`<del>${i}</del> <ins>${t}</ins>`:t,[o,p]=c.isInclTaxDisplay?[i,e]:[e,i],[d,g]=c.isInclTaxDisplay?[a,n]:[n,a],u=`\n <span class="wts-price-wrapper">\n <span class="wts-price-incl ${t?"wts-active":"wts-inactive"}">\n ${l(o,d)}\n </span>\n <span class="wts-price-excl ${t?"wts-inactive":"wts-active"}">\n ${l(p,g)}\n </span>\n </span>\n `;return r&&(c.vatTexts||(c.vatTexts=s.A.getVatTexts()),c.vatTexts)?`\n <span class="wts-price-container">\n ${u}\n ${s.A.getVatTextElement(t,c.vatTexts.including,c.vatTexts.excluding)}\n </span>\n `:`\n <span class="wts-price-container">\n ${u}\n </span>\n `}getAlternatePrice(t){return this.isInclTaxDisplay?t.pricing.price_excl_tax:t.pricing.price_incl_tax}};(0,e(538).P)(()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"};new c(t.originalTaxDisplay).init()})},143:t=>{t.exports=window.wp.data}},e={};function r(t){var a=e[t];if(void 0!==a)return a.exports;var n=e[t]={exports:{}};return i[t](n,n.exports,r),n.exports}r.m=i,t=[],r.O=(i,e,a,n)=>{if(!e){var s=1/0;for(p=0;p<t.length;p++){for(var[e,a,n]=t[p],c=!0,l=0;l<e.length;l++)(!1&n||s>=n)&&Object.keys(r.O).every(t=>r.O[t](e[l]))?e.splice(l--,1):(c=!1,n<s&&(s=n));if(c){t.splice(p--,1);var o=a();void 0!==o&&(i=o)}}return i}n=n||0;for(var p=t.length;p>0&&t[p-1][2]>n;p--)t[p]=t[p-1];t[p]=[e,a,n]},r.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return r.d(i,{a:i}),i},r.d=(t,i)=>{for(var e in i)r.o(i,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},r.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r.j=387,(()=>{var t={387:0};r.O.j=i=>0===t[i];var i=(i,e)=>{var a,n,[s,c,l]=e,o=0;if(s.some(i=>0!==t[i])){for(a in c)r.o(c,a)&&(r.m[a]=c[a]);if(l)var p=l(r)}for(i&&i(e);o<s.length;o++)n=s[o],r.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return r.O(p)},e=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];e.forEach(i.bind(null,0)),e.push=i.bind(null,e.push.bind(e))})();var a=r.O(void 0,[320],()=>r(102));a=r.O(a)})(); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-tm-extra-product-options.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => ' 95d6e86d5f1d1eaf8bfa');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => '13feb92fd80d48c5f85b'); -
tax-switch-for-woocommerce/trunk/build/switch/woocommerce-tm-extra-product-options.js
r3405724 r3410740 1 (()=>{"use strict";var t,e={143:t=>{t.exports=window.wp.data},859:(t,e,i)=>{const a=window.jQuery;var o=i.n(a),r=i(159),n=i(651);const s=class{constructor(t,e){this.originalTaxDisplay=t,this.taxRate=e,this.taxSwitchElementBuilder=new n.A(this.originalTaxDisplay)}init(){this.registerTmEpoEvents(),this.registerWooCommerceEvents()}registerWooCommerceEvents(){const t=this;o()(document).on("found_variation", (function(e,i){i&&i.tax_rate&&(t.taxRate=i.tax_rate)}))}registerTmEpoEvents(){if(void 0===o()||void 0===o().epoAPI||void 0===o().epoAPI.addFilter)return;const t=this;o().epoAPI.addFilter("tc_formatPrice",(function(e,i,a){return t.handlePriceFormat(e,i,a)}))}handlePriceFormat(t,e,i){if(!i||i<=0||!this.taxRate)return t;let a=i;if("string"==typeof i&&(a="function"==typeof window.wcPriceToFloat?window.wcPriceToFloat(i):parseFloat(i.replace(/[^0-9.-]+/g,"")),isNaN(a)||a<=0))return t;const n=r.A.calculateAlternatePrice(a,this.originalTaxDisplay,this.taxRate);let s;s=o().epoAPI&&o().epoAPI.math&&"function"==typeof o().epoAPI.math.format?o().epoAPI.math.format(n,e):"function"==typeof window.floatToWcPrice?window.floatToWcPrice(n):n.toFixed(2);const l=r.A.displayIncludingVat(this.originalTaxDisplay),c=this.taxSwitchElementBuilder.build(l,t,s,null);return r.A.setPriceClasses(this.originalTaxDisplay),c}};(0,i(538).P)((()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"},e=window.wtsCompatibilityObject||{baseTaxRate:0};new s(t.originalTaxDisplay,e.baseTaxRate).init()}))}},i={};function a(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return e[t](r,r.exports,a),r.exports}a.m=e,t=[],a.O=(e,i,o,r)=>{if(!i){var n=1/0;for(p=0;p<t.length;p++){for(var[i,o,r]=t[p],s=!0,l=0;l<i.length;l++)(!1&r||n>=r)&&Object.keys(a.O).every((t=>a.O[t](i[l])))?i.splice(l--,1):(s=!1,r<n&&(n=r));if(s){t.splice(p--,1);var c=o();void 0!==c&&(e=c)}}return e}r=r||0;for(var p=t.length;p>0&&t[p-1][2]>r;p--)t[p]=t[p-1];t[p]=[i,o,r]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.j=716,(()=>{var t={716:0};a.O.j=e=>0===t[e];var e=(e,i)=>{var o,r,[n,s,l]=i,c=0;if(n.some((e=>0!==t[e]))){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);if(l)var p=l(a)}for(e&&e(i);c<n.length;c++)r=n[c],a.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return a.O(p)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var o=a.O(void 0,[320],(()=>a(859)));o=a.O(o)})();1 (()=>{"use strict";var t,e={143:t=>{t.exports=window.wp.data},859:(t,e,i)=>{const a=window.jQuery;var o=i.n(a),r=i(159),n=i(651);const s=class{constructor(t,e){this.originalTaxDisplay=t,this.taxRate=e,this.taxSwitchElementBuilder=new n.A(this.originalTaxDisplay)}init(){this.registerTmEpoEvents(),this.registerWooCommerceEvents()}registerWooCommerceEvents(){const t=this;o()(document).on("found_variation",function(e,i){i&&i.tax_rate&&(t.taxRate=i.tax_rate)})}registerTmEpoEvents(){if(void 0===o()||void 0===o().epoAPI||void 0===o().epoAPI.addFilter)return;const t=this;o().epoAPI.addFilter("tc_formatPrice",function(e,i,a){return t.handlePriceFormat(e,i,a)})}handlePriceFormat(t,e,i){if(!i||i<=0||!this.taxRate)return t;let a=i;if("string"==typeof i&&(a="function"==typeof window.wcPriceToFloat?window.wcPriceToFloat(i):parseFloat(i.replace(/[^0-9.-]+/g,"")),isNaN(a)||a<=0))return t;const n=r.A.calculateAlternatePrice(a,this.originalTaxDisplay,this.taxRate);let s;s=o().epoAPI&&o().epoAPI.math&&"function"==typeof o().epoAPI.math.format?o().epoAPI.math.format(n,e):"function"==typeof window.floatToWcPrice?window.floatToWcPrice(n):n.toFixed(2);const l=r.A.displayIncludingVat(this.originalTaxDisplay),c=this.taxSwitchElementBuilder.build(l,t,s,null);return r.A.setPriceClasses(this.originalTaxDisplay),c}};(0,i(538).P)(()=>{const t=window.wtsViewObject||{originalTaxDisplay:"incl"},e=window.wtsCompatibilityObject||{baseTaxRate:0};new s(t.originalTaxDisplay,e.baseTaxRate).init()})}},i={};function a(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return e[t](r,r.exports,a),r.exports}a.m=e,t=[],a.O=(e,i,o,r)=>{if(!i){var n=1/0;for(p=0;p<t.length;p++){for(var[i,o,r]=t[p],s=!0,l=0;l<i.length;l++)(!1&r||n>=r)&&Object.keys(a.O).every(t=>a.O[t](i[l]))?i.splice(l--,1):(s=!1,r<n&&(n=r));if(s){t.splice(p--,1);var c=o();void 0!==c&&(e=c)}}return e}r=r||0;for(var p=t.length;p>0&&t[p-1][2]>r;p--)t[p]=t[p-1];t[p]=[i,o,r]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.j=716,(()=>{var t={716:0};a.O.j=e=>0===t[e];var e=(e,i)=>{var o,r,[n,s,l]=i,c=0;if(n.some(e=>0!==t[e])){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);if(l)var p=l(a)}for(e&&e(i);c<n.length;c++)r=n[c],a.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return a.O(p)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var o=a.O(void 0,[320],()=>a(859));o=a.O(o)})(); -
tax-switch-for-woocommerce/trunk/build/switch/woodmart-theme.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array(), 'version' => ' 9fe125d9481952a74255');1 <?php return array('dependencies' => array(), 'version' => '86c7961f1636a5f220e2'); -
tax-switch-for-woocommerce/trunk/build/switch/woodmart-theme.js
r3405724 r3410740 1 (()=>{"use strict";var e,r={998:(e,r,t)=>{const i=class{constructor(e){this.originalTaxDisplay=e}init(){this.registerWoodmartEvents()}registerWoodmartEvents(){window.addEventListener("wdHeaderBuilderCloneCreated", (function(){document.dispatchEvent(new CustomEvent("wdevs-tax-switch-appeared"))}))}};(0,t(538).P)((()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"};new i(e.originalTaxDisplay).init()}))}},t={};function i(e){var n=t[e];if(void 0!==n)return n.exports;var a=t[e]={exports:{}};return r[e](a,a.exports,i),a.exports}i.m=r,e=[],i.O=(r,t,n,a)=>{if(!t){var o=1/0;for(v=0;v<e.length;v++){for(var[t,n,a]=e[v],s=!0,l=0;l<t.length;l++)(!1&a||o>=a)&&Object.keys(i.O).every((e=>i.O[e](t[l])))?t.splice(l--,1):(s=!1,a<o&&(o=a));if(s){e.splice(v--,1);var d=n();void 0!==d&&(r=d)}}return r}a=a||0;for(var v=e.length;v>0&&e[v-1][2]>a;v--)e[v]=e[v-1];e[v]=[t,n,a]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.j=285,(()=>{var e={285:0};i.O.j=r=>0===e[r];var r=(r,t)=>{var n,a,[o,s,l]=t,d=0;if(o.some((r=>0!==e[r]))){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);if(l)var v=l(i)}for(r&&r(t);d<o.length;d++)a=o[d],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return i.O(v)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var n=i.O(void 0,[320],(()=>i(998)));n=i.O(n)})();1 (()=>{"use strict";var e,r={998:(e,r,t)=>{const i=class{constructor(e){this.originalTaxDisplay=e}init(){this.registerWoodmartEvents()}registerWoodmartEvents(){window.addEventListener("wdHeaderBuilderCloneCreated",function(){document.dispatchEvent(new CustomEvent("wdevs-tax-switch-appeared"))})}};(0,t(538).P)(()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"};new i(e.originalTaxDisplay).init()})}},t={};function i(e){var n=t[e];if(void 0!==n)return n.exports;var a=t[e]={exports:{}};return r[e](a,a.exports,i),a.exports}i.m=r,e=[],i.O=(r,t,n,a)=>{if(!t){var o=1/0;for(v=0;v<e.length;v++){for(var[t,n,a]=e[v],s=!0,l=0;l<t.length;l++)(!1&a||o>=a)&&Object.keys(i.O).every(e=>i.O[e](t[l]))?t.splice(l--,1):(s=!1,a<o&&(o=a));if(s){e.splice(v--,1);var d=n();void 0!==d&&(r=d)}}return r}a=a||0;for(var v=e.length;v>0&&e[v-1][2]>a;v--)e[v]=e[v-1];e[v]=[t,n,a]},i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.j=285,(()=>{var e={285:0};i.O.j=r=>0===e[r];var r=(r,t)=>{var n,a,[o,s,l]=t,d=0;if(o.some(r=>0!==e[r])){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);if(l)var v=l(i)}for(r&&r(t);d<o.length;d++)a=o[d],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return i.O(v)},t=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var n=i.O(void 0,[320],()=>i(998));n=i.O(n)})(); -
tax-switch-for-woocommerce/trunk/build/switch/yith-woocommerce-product-add-ons.asset.php
r3405724 r3410740 1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'a a8fa0ab30f00f6cfe52');1 <?php return array('dependencies' => array('jquery', 'wp-data'), 'version' => 'ac13c08223f84569cbbf'); -
tax-switch-for-woocommerce/trunk/build/switch/yith-woocommerce-product-add-ons.js
r3405724 r3410740 1 (()=>{"use strict";var e,t={65:(e,t,i)=>{const a=window.jQuery;var o=i.n(a),r=i(159),c=i(651);const n=class{constructor(e,t){this.originalTaxDisplay=e,this.taxRate=t,this.initialPriceElement=null,window.yith_wapo&&window.yith_wapo.replace_product_price_class&&(this.initialPriceElement=o()(window.yith_wapo.replace_product_price_class).clone()),this.vatTexts=null,this.taxSwitchElementBuilder=new c.A(this.originalTaxDisplay)}init(){this.registerWooCommerceEvents()}registerWooCommerceEvents(){const e=this;setTimeout( (function(){const t=o()("#yith-wapo-container");if(t.length&&t.children("div").length>0){if(o()(document).on("wapo-after-calculate-product-price",((t,i)=>{e.handlePriceUpdate(),i&&i.order_price_suffix&&e.handleProductPriceReplacement(i.order_price_suffix)})),o()(document).on("found_variation",(function(t,i){i&&i.tax_rate&&(e.taxRate=i.tax_rate)})),!o()("form.variations_form").length){const t=o()(window.yith_wapo.replace_product_price_class);if(t&&t.length){const i=t.find(".woocommerce-Price-amount bdi").html()||t.find(".woocommerce-Price-amount").html()||t.html();if(i){const t=window.wcPriceToFloat(i);if(!isNaN(t)){const i=window.floatToWcPrice(t);e.handleProductPriceReplacement(i)}}}}e.handlePriceUpdate()}}),10)}handleProductPriceReplacement(e){if(window.yith_wapo&&"yes"===window.yith_wapo.replace_product_price&&window.yith_wapo.replace_product_price_class){const t=o()(window.yith_wapo.replace_product_price_class);if(t.length>0){const i=window.wcPriceToFloat(e);if(!isNaN(parseFloat(i))){const e=r.A.calculateAlternatePrice(i,this.originalTaxDisplay,this.taxRate),a=window.floatToWcPrice(i),o=window.floatToWcPrice(e);this.replacePriceDisplay(t,a,o,!0)}}}}handlePriceUpdate(){const e={productPrice:o()("#wapo-total-product-price"),options:o()("#wapo-total-options-price"),order:o()("#wapo-total-order-price")};Object.entries(e).forEach((([e,t])=>{t.length&&this.updatePriceElement(t)})),r.A.setPriceClasses(this.originalTaxDisplay)}updatePriceElement(e){const t=e.html();if(!t)return;const i=window.wcPriceToFloat(t);if(!i)return;const a=r.A.calculateAlternatePrice(i,this.originalTaxDisplay,this.taxRate),o=window.floatToWcPrice(i),c=window.floatToWcPrice(a);this.replacePriceDisplay(e,o,c)}replacePriceDisplay(e,t,i,a=!1){const o=this;let n=null;a&&(o.vatTexts||(o.vatTexts=c.A.getVatTexts(o.initialPriceElement)),n=o.vatTexts);const l=r.A.displayIncludingVat(this.originalTaxDisplay),s=o.taxSwitchElementBuilder.build(l,t,i,n);e.html(s)}};(0,i(538).P)((()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new n(e.originalTaxDisplay,t.baseTaxRate).init()}))},143:e=>{e.exports=window.wp.data}},i={};function a(e){var o=i[e];if(void 0!==o)return o.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.m=t,e=[],a.O=(t,i,o,r)=>{if(!i){var c=1/0;for(p=0;p<e.length;p++){for(var[i,o,r]=e[p],n=!0,l=0;l<i.length;l++)(!1&r||c>=r)&&Object.keys(a.O).every((e=>a.O[e](i[l])))?i.splice(l--,1):(n=!1,r<c&&(c=r));if(n){e.splice(p--,1);var s=o();void 0!==s&&(t=s)}}return t}r=r||0;for(var p=e.length;p>0&&e[p-1][2]>r;p--)e[p]=e[p-1];e[p]=[i,o,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.j=450,(()=>{var e={450:0};a.O.j=t=>0===e[t];var t=(t,i)=>{var o,r,[c,n,l]=i,s=0;if(c.some((t=>0!==e[t]))){for(o in n)a.o(n,o)&&(a.m[o]=n[o]);if(l)var p=l(a)}for(t&&t(i);s<c.length;s++)r=c[s],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(p)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var o=a.O(void 0,[320],(()=>a(65)));o=a.O(o)})();1 (()=>{"use strict";var e,t={65:(e,t,i)=>{const a=window.jQuery;var o=i.n(a),r=i(159),c=i(651);const n=class{constructor(e,t){this.originalTaxDisplay=e,this.taxRate=t,this.initialPriceElement=null,window.yith_wapo&&window.yith_wapo.replace_product_price_class&&(this.initialPriceElement=o()(window.yith_wapo.replace_product_price_class).clone()),this.vatTexts=null,this.taxSwitchElementBuilder=new c.A(this.originalTaxDisplay)}init(){this.registerWooCommerceEvents()}registerWooCommerceEvents(){const e=this;setTimeout(function(){const t=o()("#yith-wapo-container");if(t.length&&t.children("div").length>0){if(o()(document).on("wapo-after-calculate-product-price",(t,i)=>{e.handlePriceUpdate(),i&&i.order_price_suffix&&e.handleProductPriceReplacement(i.order_price_suffix)}),o()(document).on("found_variation",function(t,i){i&&i.tax_rate&&(e.taxRate=i.tax_rate)}),!o()("form.variations_form").length){const t=o()(window.yith_wapo.replace_product_price_class);if(t&&t.length){const i=t.find(".woocommerce-Price-amount bdi").html()||t.find(".woocommerce-Price-amount").html()||t.html();if(i){const t=window.wcPriceToFloat(i);if(!isNaN(t)){const i=window.floatToWcPrice(t);e.handleProductPriceReplacement(i)}}}}e.handlePriceUpdate()}},10)}handleProductPriceReplacement(e){if(window.yith_wapo&&"yes"===window.yith_wapo.replace_product_price&&window.yith_wapo.replace_product_price_class){const t=o()(window.yith_wapo.replace_product_price_class);if(t.length>0){const i=window.wcPriceToFloat(e);if(!isNaN(parseFloat(i))){const e=r.A.calculateAlternatePrice(i,this.originalTaxDisplay,this.taxRate),a=window.floatToWcPrice(i),o=window.floatToWcPrice(e);this.replacePriceDisplay(t,a,o,!0)}}}}handlePriceUpdate(){const e={productPrice:o()("#wapo-total-product-price"),options:o()("#wapo-total-options-price"),order:o()("#wapo-total-order-price")};Object.entries(e).forEach(([e,t])=>{t.length&&this.updatePriceElement(t)}),r.A.setPriceClasses(this.originalTaxDisplay)}updatePriceElement(e){const t=e.html();if(!t)return;const i=window.wcPriceToFloat(t);if(!i)return;const a=r.A.calculateAlternatePrice(i,this.originalTaxDisplay,this.taxRate),o=window.floatToWcPrice(i),c=window.floatToWcPrice(a);this.replacePriceDisplay(e,o,c)}replacePriceDisplay(e,t,i,a=!1){const o=this;let n=null;a&&(o.vatTexts||(o.vatTexts=c.A.getVatTexts(o.initialPriceElement)),n=o.vatTexts);const l=r.A.displayIncludingVat(this.originalTaxDisplay),s=o.taxSwitchElementBuilder.build(l,t,i,n);e.html(s)}};(0,i(538).P)(()=>{const e=window.wtsViewObject||{originalTaxDisplay:"incl"},t=window.wtsCompatibilityObject||{baseTaxRate:0};new n(e.originalTaxDisplay,t.baseTaxRate).init()})},143:e=>{e.exports=window.wp.data}},i={};function a(e){var o=i[e];if(void 0!==o)return o.exports;var r=i[e]={exports:{}};return t[e](r,r.exports,a),r.exports}a.m=t,e=[],a.O=(t,i,o,r)=>{if(!i){var c=1/0;for(p=0;p<e.length;p++){for(var[i,o,r]=e[p],n=!0,l=0;l<i.length;l++)(!1&r||c>=r)&&Object.keys(a.O).every(e=>a.O[e](i[l]))?i.splice(l--,1):(n=!1,r<c&&(c=r));if(n){e.splice(p--,1);var s=o();void 0!==s&&(t=s)}}return t}r=r||0;for(var p=e.length;p>0&&e[p-1][2]>r;p--)e[p]=e[p-1];e[p]=[i,o,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.j=450,(()=>{var e={450:0};a.O.j=t=>0===e[t];var t=(t,i)=>{var o,r,[c,n,l]=i,s=0;if(c.some(t=>0!==e[t])){for(o in n)a.o(n,o)&&(a.m[o]=n[o]);if(l)var p=l(a)}for(t&&t(i);s<c.length;s++)r=c[s],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(p)},i=globalThis.webpackChunkwdevs_tax_switch=globalThis.webpackChunkwdevs_tax_switch||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var o=a.O(void 0,[320],()=>a(65));o=a.O(o)})(); -
tax-switch-for-woocommerce/trunk/includes/class-wdevs-tax-switch-block-switch.php
r3300428 r3410740 50 50 'name' => 'inline', 51 51 'label' => __( 'Inline style', 'tax-switch-for-woocommerce' ), 52 ] ); 53 54 register_block_style( 'wdevs/tax-switch', [ 55 'name' => 'flat-pill', 56 'label' => __( 'Flat pill', 'tax-switch-for-woocommerce' ), 52 57 ] ); 53 58 -
tax-switch-for-woocommerce/trunk/wdevs-tax-switch.php
r3405724 r3410740 17 17 * Plugin URI: https://wijnberg.dev 18 18 * Description: Let customers toggle between inclusive and exclusive VAT pricing in your WooCommerce store. 19 * Version: 1.6. 219 * Version: 1.6.3 20 20 * Author: Wijnberg Developments 21 21 * Author URI: https://wijnberg.dev/ … … 23 23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 24 24 * Text Domain: tax-switch-for-woocommerce 25 * Tested up to: 6. 825 * Tested up to: 6.9 26 26 * Requires PHP: 7.2 27 27 * Requires at least: 5.0 28 28 * WC requires at least: 7.0.0 29 * WC tested up to: 10.3. 529 * WC tested up to: 10.3.6 30 30 * Requires Plugins: woocommerce 31 31 */ … … 41 41 * Rename this for your plugin and update it as you release new versions. 42 42 */ 43 define( 'WDEVS_TAX_SWITCH_VERSION', '1.6. 2' );43 define( 'WDEVS_TAX_SWITCH_VERSION', '1.6.3' ); 44 44 45 45 /**
Note: See TracChangeset
for help on using the changeset viewer.