function fca_ept_button_modal(t){var e=!0===t.attributes.showURLModal,o=window.wp,a=o.element.createElement,i=JSON.parse(t.attributes.columnSettings),r=t.attributes.selectedCol,n=!!(t.attributes.togglePeriod&&i[r].wooProductID2||!t.attributes.togglePeriod&&i[r].wooProductID1);i[r].buttonMode;return e?a(o.components.Modal,{title:"Call to Action - Column "+(r+1),isDismissible:!1,shouldCloseOnClickOutside:!0,onRequestClose:function(e){t.setAttributes({showURLModal:!1})}},a(o.components.TextControl,{value:i[r].buttonText,label:"Button Text",onChange:function(e){var o=JSON.parse(t.attributes.columnSettings);o[t.attributes.selectedCol].buttonText=e,t.setAttributes({columnSettings:JSON.stringify(o)})}}),a(o.components.TextControl,{disabled:n,value:fca_ept_get_buttonurl(t,r),label:"URL or Shortcode",onChange:function(e){var o=JSON.parse(t.attributes.columnSettings);t.attributes.togglePeriod?o[r].buttonURL2=e:o[r].buttonURL1=e,t.setAttributes({columnSettings:JSON.stringify(o)})}})):null}function fca_ept_reusable_block_init(){if(1!=fca_ept_init_completed){var t=wp.data.select("core/editor").getCurrentPost();if("wp_block"===t.type&&t.content.split("\x3c!--")[1].includes("wp:fatcatapps/easy-pricing-table")){document.body.addEventListener("click",function(t){(t.target.href||0)==fcaEptEditorData.edit_url+"?post_type=wp_block"&&(t.target.href=fcaEptEditorData.edit_url+"?post_type=easy-pricing-table&page=ept3-list")},!0);var e=wp.data.select("core/block-editor").getBlocks().filter(function(t){return"fatcatapps/easy-pricing-tables"===t.name});wp.data.subscribe(function(){wp.data.select("core/block-editor").getBlocks().filter(function(t){return"fatcatapps/easy-pricing-tables"===t.name}).length0&&(a=o.getRangeAt(0)),t.setAttributes({selectedSection:e}),t.setAttributes({selectedRange:a}),fca_ept_is_tooltip_selected(a)&&(t.setAttributes({showTooltipModal:!0}),t.setAttributes({tooltipModalText:a.startContainer.parentElement.dataset.tooltip}))}function fca_ept_is_tooltip_selected(t){if(t){var e=t.endOffset-t.startOffset==1;if("fca-ept-tooltip"===t.startContainer.parentElement.className&&e)return!0}return!1}function fca_ept_maybe_set_defaults(t){t.setAttributes({showLayoutPickerScreen:!1}),t.setAttributes({showIconDropdown:!1}),""==t.attributes.tableID&&t.setAttributes({tableID:fca_ept_generate_id()});var e=document.getElementById(t.attributes.tableID);e&&e.remove(),""==t.attributes.columnSettings&&t.setAttributes({columnSettings:JSON.stringify(fca_ept_default_columnSettings())}),void 0===t.attributes.showButtonsToggle&&t.setAttributes({showButtonsToggle:!0}),void 0===t.attributes.showPriceSubtextToggle&&t.setAttributes({showPriceSubtextToggle:!0}),void 0===t.attributes.showPlanSubtextToggle&&t.setAttributes({showPlanSubtextToggle:!0}),void 0===t.attributes.align&&fcaEptEditorData.theme_support.wide&&t.setAttributes({align:"wide"})}function fca_ept_button_content(t,e,o){if(!1===t.attributes.showButtonsToggle)return null;e[o].buttonMode,e[o].buttonCode;t.attributes.togglePeriod?e[o].buttonURL2:e[o].buttonURL1;var a={fontSize:t.attributes.buttonFontSize,backgroundColor:e[o].columnPopular?t.attributes.accentColor:t.attributes.buttonColor,color:t.attributes.buttonFontColor};return"layout2"===t.attributes.selectedLayout&&(a.backgroundColor=t.attributes.buttonColor),"layout3"===t.attributes.selectedLayout&&(a.backgroundColor=t.attributes.buttonColor),"layout5"===t.attributes.selectedLayout&&(a.borderRadius=t.attributes.borderRadius+"px",a.borderBottom=e[o].columnPopular?t.attributes.buttonBorderColorPop+" 4px solid":t.attributes.buttonBorderColor+" 4px solid"),"layout6"===t.attributes.selectedLayout&&(a.backgroundColor=e[o].columnPopular?"#FFFFFF":t.attributes.buttonColor),"layout7"===t.attributes.selectedLayout&&(a.backgroundColor=t.attributes.buttonColor),"layout8"===t.attributes.selectedLayout&&e[o].columnPopular&&(a.backgroundColor="#FFFFFF",a.color=t.attributes.accentColor),el("a",{style:a,className:"fca-ept-button"},e[o].buttonText)}function fca_ept_generate_id(){return"xxxx".replace(/[x]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}function fca_ept_hexToRGB(t,e,o){if(!t)return"rgb(255,255,255)";if(7===t.length)var a=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16);if(4===t.length)var a=parseInt(t.slice(1,2)+t.slice(1,2),16),i=parseInt(t.slice(2,3)+t.slice(2,3),16),r=parseInt(t.slice(3,4)+t.slice(3,4),16);return e?"rgba("+a+","+i+","+r+","+e+")":o?(a-o>0?a-=o:a=0,i-o>0?i-=o:i=0,r-o>0?r-=o:r=0,"rgb("+a+","+i+","+r+")"):void 0}function fca_ept_additional_styles(t){var e=t.attributes.tableID;$("#"+e).remove(),$("body").append("")}function fca_ept_css_settings(t){var e=window.wp,o=e.element.createElement;t.attributes.selectedLayout;return o(e.components.PanelBody,{title:"Custom CSS",className:"fca-ept-css-settings",initialOpen:!1},o(e.components.TextareaControl,{value:t.attributes.customCSS,label:"Custom CSS",help:"Add CSS to fine-tune the look of your table. For example: .fca-ept-main { background-color: blue }",onChange:function(e){t.setAttributes({customCSS:e})}}))}var fca_ept_init_completed=0,fca_ept_allowed_formats=["core/bold","core/italic","core/link","core/image","core/strikethrough","core/text-color"];; function fca_ept_sidebar_settings(t){var e=window.wp,o=e.element.createElement,a=o("span",{className:"dashicons dashicons-yes"}),l=o(e.components.Button,{variant:"primary",onClick:function(){window.open("https://fatcatapps.com/easypricingtables/","_blank")}},"Upgrade Now");return o(e.blockEditor.InspectorControls,{key:"ept-inspector-controls"},o("div",{className:"fca-ept-sidebar-items"},fca_ept_colorpanel_settings(t),fca_ept_font_settings(t),fca_ept_misc_settings(t),"Free"===fcaEptEditorData.edition?null:fca_ept_css_settings(t),o(e.components.PanelHeader,{},o(e.components.Button,{variant:"tertiary",onClick:function(){t.setAttributes({showLayoutPickerScreen:!0})}},"Change template")),"Free"===fcaEptEditorData.edition?o(e.components.PanelBody,{className:"fca-ept-get-premium",title:"",initialOpen:!0},o("h2",{className:"get-premium-features"},"Upgrade to Premium and Build Better Pricing Tables. You'll Get:"),o("p",{},a,"Nine Gorgeous Designs"),o("p",{},a,"Fully Customizable (Colors, Fonts, CSS etc.)"),o("p",{},a,"700+ Icons to Add to Your Tables"),o("p",{},a,"Priority Email Support"),o("p",{},a,"Tooltips"),o("p",{},a,"Font Picker with 12+ fonts"),o("p",{},a,"Pricing Toggles - switch between currencies or monthly/yearly pricing"),l):null))}function fca_ept_misc_settings(t){var e=window.wp,o=e.element.createElement;t.attributes.selectedLayout;return o(e.components.PanelBody,{title:"Options",className:"fca-ept-misc-settings",initialOpen:!1},fcaEptEditorData.toggle_integration?o(e.components.ToggleControl,{label:"Monthly / yearly toggle",checked:t.attributes.togglePeriodToggle,help:"Add a toggle to the top of your pricing table, giving users the option to switch between yearly / monthly pricing. "+(t.attributes.togglePeriodToggle?"(Enabled)":"(Disabled)"),onChange:function(){t.setAttributes({togglePeriodToggle:!t.attributes.togglePeriodToggle})}}):null,o(e.components.ToggleControl,{label:"Show Images",checked:t.attributes.showImagesToggle,onChange:function(e){var o=!t.attributes.showImagesToggle,a=JSON.parse(t.attributes.columnSettings);if(o)for(l=0;lo.length?0:l+1),o.splice(n,0,a),t.setAttributes({selectedCol:n}),t.setAttributes({columnSettings:JSON.stringify(o)})}function fca_ept_add_column(t,e){var o=JSON.parse(t.attributes.columnSettings),l=Array.from(o),i=["Starter","Pro","Elite","Custom"],a=["For getting started","Best for most users","For enterprises","For custom requirements"],n={columnPopular:!1,popularText:"Most popular",planText1:i[o.length]?i[o.length]:i[3],planText2:i[o.length]?i[o.length]:i[3],planSvg:"",planImage:t.attributes.showImagesToggle?fcaEptEditorData.directory+"/assets/images/placeholder-300.png":"",planSubText:a[o.length]?a[o.length]:a[3],priceText1:"$"+(10*o.length+29),priceText2:"$"+(100*o.length+290),pricePeriod1:"per month",pricePeriod2:"per year",priceBilling1:"billed monthly",priceBilling2:"billed annually",featuresText:"
  • Feature 1
  • Feature 2
  • Feature 3
  • Feature 4
  • ",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com",buttonURL2:"https://www.fatcatapps.com",wooProductID1:"",wooProductID2:"",useCustomWooTitle1:!1,useCustomWooTitle2:!1};"after"===e&&l.push(n),"before"===e&&l.unshift(n),t.setAttributes({selectedCol:l.length-1}),t.setAttributes({columnSettings:JSON.stringify(l)})}function fca_ept_add_row(t,e){for(var o=JSON.parse(t.attributes.columnSettings),l=-1!==["layout5","layout9"].indexOf(t.attributes.selectedLayout),i="",a=0;aFeature",l&&(i=t.attributes.comparisonText+"
  • Comparison
  • ")),"before"===e&&(o[a].featuresText="
  • Feature
  • "+o[a].featuresText,l&&(i="
  • Comparison
  • "+t.attributes.comparisonText));t.setAttributes({columnSettings:JSON.stringify(o)}),l&&t.setAttributes({comparisonText:i})}function fca_ept_del_column(t){var e=JSON.parse(t.attributes.columnSettings),o=parseInt(t.attributes.selectedCol);e.length>1&&(e.splice(o,1),t.setAttributes({selectedCol:e.length-1}),t.setAttributes({columnSettings:JSON.stringify(e)}))}function fca_ept_icon_dropdown(t){var e=t.isSelected,o=t.attributes.showIconDropdown;return e&&o?el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"Add icon",className:"fca-ept-fa-icons-modal",onRequestClose:function(){t.setAttributes({showIconDropdown:!1})}},el(wp.components.ComboboxControl,{hideLabelFromVision:!0,label:"Choose an icon",className:"fca-ept-fa-icons",value:"",allowReset:!1,options:fcaEptEditorData.fa_classes,onChange:function(e){fca_ept_add_icon(t,e)}})):null}function fca_ept_woo_modal(t){var e=t.isSelected,o=t.attributes.showWooModal,l=JSON.parse(t.attributes.columnSettings),i=t.attributes.selectedCol,a=t.attributes.togglePeriod?l[i].wooProductID2:l[i].wooProductID1;return e&&o?el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"WooCommerce Product - Column "+Number(t.attributes.selectedCol+1),onRequestClose:function(){t.setAttributes({showWooModal:!1})}},el(wp.components.ComboboxControl,{label:"Choose your product",help:"Select a WooCommerce product and we'll import the featured image and price.",className:"fca-ept-woo-products",value:a,allowReset:!0,options:woo_products,onChange:function(e){var o=JSON.parse(t.attributes.columnSettings),l=t.attributes.selectedCol;t.attributes.togglePeriod?(o[l].useCustomWooTitle2=!1,o[l].wooProductID2=Number(e)):(o[l].useCustomWooTitle1=!1,o[l].wooProductID1=Number(e)),t.setAttributes({showWooModal:!1}),t.setAttributes({columnSettings:JSON.stringify(o)})},onFilterValueChange:function(){}})):null}function fca_ept_add_icon(t,e){var o=t.attributes.selectedRange;if(o&&e){var l=document.createElement("span");l.innerHTML=e,l.style.fontFamily="FontAwesome",o.insertNode(l),t.setAttributes({showIconDropdown:!1}),fca_ept_update_section_nu(t)}}function fca_ept_tooltip_modal(t){var e=t.isSelected,o=t.attributes.showTooltipModal,l=fca_ept_is_tooltip_selected(t.attributes.selectedRange);return 0==e||0==o?null:l?el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"Edit tooltip",onRequestClose:function(){t.setAttributes({showTooltipModal:!1})}},el(wp.components.TextareaControl,{value:t.attributes.tooltipText,label:"Tooltip Text",onChange:function(e){t.setAttributes({tooltipText:e})}}),el(wp.components.Button,{variant:"primary",onClick:function(){t.attributes.selectedRange.startContainer.parentElement.dataset.tooltip=t.attributes.tooltipText,fca_ept_update_section_nu(t),t.setAttributes({showTooltipModal:!1})}},"Save")):el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"Add a tooltip",onRequestClose:function(){t.setAttributes({showTooltipModal:!1})}},el(wp.components.TextareaControl,{value:t.attributes.tooltipText,label:"Tooltip Text",onChange:function(e){t.setAttributes({tooltipText:e})}}),el(wp.components.Button,{variant:"primary",disabled:!t.attributes.tooltipText,onClick:function(){fca_ept_add_tooltip(t)}},"Add"))}function fca_ept_add_tooltip(t){var e=t.attributes.selectedRange,o=t.attributes.tooltipText;if(e){var l=document.createElement("span");l.className="fca-ept-tooltip",l.innerHTML="",l.style.fontFamily="FontAwesome",l.dataset.tooltip=o,e.insertNode(l),fca_ept_update_section_nu(t),t.setAttributes({showTooltipModal:!1})}else alert('Please click on where you would like the tooltip to be inserted in the table and then click "Insert"')}function fca_ept_update_section_nu(t){var e=JSON.parse(t.attributes.columnSettings),o=t.attributes.tableID,l=t.attributes.selectedCol,i=t.attributes.togglePeriodToggle,a=t.attributes.togglePeriod;t.attributes.tooltipMode;switch(t.attributes.selectedSection){case"toggle":$("#fca-ept-table-"+o+" .fca-ept-toggle-period-container").is(":visible")&&(t.setAttributes({togglePeriodText2:$(".fca-ept-toggle-1").first().html()}),t.setAttributes({togglePeriodText2:$(".fca-ept-toggle-2").first().html()}));break;case"popular":t.setAttributes({popularText:$("#fca-ept-table-"+o+" .fca-ept-popular-text").eq(l).html()});break;case"plan":i&&a?e[l].planText2=$("#fca-ept-table-"+o+" .fca-ept-plan").eq(l).html():e[l].planText1=$("#fca-ept-table-"+o+" .fca-ept-plan").eq(l).html();break;case"planSvg":e[l].planSvg=$("#fca-ept-table-"+o+" .fca-ept-plan-svg").eq(l).html();break;case"planSubtext":e[l].planSubText=$("#fca-ept-table-"+o+" .fca-ept-plan-subtext").eq(l).html();break;case"price":i&&a?e[l].priceText2=$("#fca-ept-table-"+o+" .fca-ept-price").eq(l).html():e[l].priceText1=$("#fca-ept-table-"+o+" .fca-ept-price").eq(l).html();break;case"pricePeriod":i&&a?e[l].pricePeriod2=$("#fca-ept-table-"+o+" .fca-ept-price-period").eq(l).html():e[l].pricePeriod1=$("#fca-ept-table-"+o+" .fca-ept-price-period").eq(l).html();break;case"priceBilling":i&&a?e[l].priceBilling2=$("#fca-ept-table-"+o+" .fca-ept-price-billing").eq(l).html():e[l].priceBilling1=$("#fca-ept-table-"+o+" .fca-ept-price-billing").eq(l).html();break;case"features":e[l].featuresText=$("#fca-ept-table-"+o+" .fca-ept-features").eq(l).html(),$(".fca-ept-comparison").is(":visible")&&t.setAttributes({comparisonText:$("#fca-ept-table-"+o+" .fca-ept-comparison").first().html()});break;case"button":e[l].buttonText=$("#fca-ept-table-"+o+" .fca-ept-button").eq(l).html();break;default:return}t.setAttributes({columnSettings:JSON.stringify(e)})}; function fca_ept_main_edit(props){return fcaEptEditorData.debug&&console.log(props),fca_ept_reusable_block_init(),window.setTimeout(function(){fca_ept_handle_image_heights_toggle(props)},50),!0===props.attributes.showLayoutPickerScreen?fca_ept_layout_picker_screen(props):el(wp.element.Fragment,{},fca_ept_toolbar_controls(props),fca_ept_icon_dropdown(props),fca_ept_sidebar_settings(props),fca_ept_tooltip_modal(props),fca_ept_button_modal(props),fca_ept_woo_modal(props),fca_ept_confirm_modal(props),eval("fca_ept_"+props.attributes.selectedLayout+"_block_edit")(props))}function fca_ept_layout_picker_screen(t){var e=wp.data.select("core/block-editor").getSelectedBlock();if(e&&"fatcatapps/easy-pricing-tables"!==e.name)return null;var a=el(wp.components.Button,{variant:"primary",onClick:function(){window.open("https://fatcatapps.com/easypricingtables/","_blank")}},"Learn more");return el(wp.element.Fragment,{},el(wp.components.Modal,{title:"Choose a template",isDismissible:!1,shouldCloseOnClickOutside:""!==t.attributes.selectedLayout,className:"fca-ept-modal",onRequestClose:function(){t.setAttributes({showLayoutPickerScreen:!1})}},el("div",{className:"fca-ept-layout-selection"},el("div",{className:"layout-container"},el("div",{className:"layout",onClick:function(){fca_ept_maybe_set_defaults(t),fca_ept_set_layout1_attributes(t)}},el("img",{width:600,height:401,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout1.png"}),a),el("div",{className:"layout",onClick:function(){fca_ept_maybe_set_defaults(t),fca_ept_set_layout2_attributes(t)}},el("img",{width:600,height:410,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout2.png"}),a),el("div",{className:"Free"===fcaEptEditorData.edition?"layout pro-only":"layout",onClick:function(){"Free"===fcaEptEditorData.edition?window.open("https://fatcatapps.com/easypricingtables/","_blank"):(fca_ept_maybe_set_defaults(t),fca_ept_set_layout3_attributes(t))}},el("img",{width:600,height:357,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout3.png"}),a),el("div",{className:"Free"===fcaEptEditorData.edition?"layout pro-only":"layout",onClick:function(){"Free"===fcaEptEditorData.edition?window.open("https://fatcatapps.com/easypricingtables/","_blank"):(fca_ept_maybe_set_defaults(t),fca_ept_set_layout4_attributes(t))}},el("img",{width:600,height:257,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout4.png"}),a),el("div",{className:"Free"===fcaEptEditorData.edition?"layout pro-only":"layout",onClick:function(){"Free"===fcaEptEditorData.edition?window.open("https://fatcatapps.com/easypricingtables/","_blank"):(fca_ept_maybe_set_defaults(t),fca_ept_set_layout5_attributes(t))}},el("img",{width:600,height:252,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout5.png"}),a),el("div",{className:"Free"===fcaEptEditorData.edition?"layout pro-only":"layout",onClick:function(){"Free"===fcaEptEditorData.edition?window.open("https://fatcatapps.com/easypricingtables/","_blank"):(fca_ept_maybe_set_defaults(t),fca_ept_set_layout6_attributes(t))}},el("img",{width:600,height:311,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout6.png"}),a),el("div",{className:"Free"===fcaEptEditorData.edition?"layout pro-only":"layout",onClick:function(){"Free"===fcaEptEditorData.edition?window.open("https://fatcatapps.com/easypricingtables/","_blank"):(fca_ept_maybe_set_defaults(t),fca_ept_set_layout7_attributes(t))}},el("img",{width:600,height:350,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout7.png"}),a),el("div",{className:"Free"===fcaEptEditorData.edition?"layout pro-only":"layout",onClick:function(){"Free"===fcaEptEditorData.edition?window.open("https://fatcatapps.com/easypricingtables/","_blank"):(fca_ept_maybe_set_defaults(t),fca_ept_set_layout8_attributes(t))}},el("img",{width:600,height:304,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout8.png"}),a),el("div",{className:"Free"===fcaEptEditorData.edition?"layout pro-only":"layout",onClick:function(){"Free"===fcaEptEditorData.edition?window.open("https://fatcatapps.com/easypricingtables/","_blank"):(fca_ept_maybe_set_defaults(t),fca_ept_set_layout9_attributes(t))}},el("img",{width:600,height:253,src:fcaEptEditorData.directory+"/assets/blocks/screenshots/layout9.png"}),a)))))}function fca_ept_main_attributes(){return{align:{type:"string"},selectedLayout:{type:"string",default:""},selectedCol:{type:"int",default:0},selectedSection:{type:"string",default:"features"},tableID:{type:"string",default:""},customCSS:{type:"string",default:""},columnSettings:{type:"string",default:""},comparisonText:{type:"string",default:"
  • Comparison 1
  • Comparison 2
  • Comparison 3
  • Comparison 4
  • "},selectedRange:{type:"string",default:""},showLayoutPickerScreen:{type:"boolean",default:!0},showIconDropdown:{type:"boolean",default:!1},showWooModal:{type:"boolean",default:!1},showURLModal:{type:"boolean",default:!1},showTooltipModal:{type:"boolean",default:!1},tooltipModalText:{type:"string",default:""},showImagesToggle:{type:"boolean",default:!1},matchHeightsToggle:{type:"boolean",default:!0},showPlanSubtextToggle:{type:"boolean"},showPriceSubtextToggle:{type:"boolean"},showButtonsToggle:{type:"boolean"},urlTargetToggle:{type:"boolean",default:!1},togglePeriodToggle:{type:"boolean",default:!1},togglePeriod:{type:"boolean",default:!1},togglePeriodText1:{type:"string",default:"Monthly"},togglePeriodText2:{type:"string",default:"Yearly"},layoutBGColor:{type:"string",default:"#f2f2f2"},layoutBGTint1:{type:"string",default:"rgb(245, 245, 245)"},layoutBGTint2:{type:"string",default:"#eeeeee"},layoutBGTint3:{type:"string",default:"#dddddd"},layoutBGTint4:{type:"string",default:"#7f8c8d"},layoutFontColor:{type:"string",default:"#333333"},layoutFontColor1:{type:"string",default:"#dddddd"},popularBorderColor:{type:"string",default:"rgb(220, 175, 15)"},planSvgColor:{type:"string",default:"rgba(15, 97, 216, 0.3)"},priceSubtextColor:{type:"string",default:"#0c1f28"},buttonColor:{type:"string",default:"#6236ff"},buttonFontColor:{type:"string",default:"#ffffff"},buttonBorderColor:{type:"string",default:"rgb(0,103,103)"},buttonBorderColorPop:{type:"string",default:"rgb(200,104,12)"},accentColor:{type:"string",default:"#6236ff"},fontFamily:{type:"string",default:"sans-serif"},popularFontSize:{type:"string",default:"75%"},planFontSize:{type:"string",default:"300%"},planSubtextFontSize:{type:"string",default:"100%"},priceFontSize:{type:"string",default:"400%"},pricePeriodFontSize:{type:"string",default:"100%"},priceBillingFontSize:{type:"string",default:"81.25%"},featuresFontSize:{type:"string",default:"125%"},buttonFontSize:{type:"string",default:"150%"},toggleFontSize:{type:"string",default:"112.5%"}}}function fca_ept_default_columnSettings(){return[{columnPopular:!1,popularText:"Most popular",planText1:"Starter",planText2:"Starter",planSvg:"",planImage:"",planSubText:"For getting started",priceText1:"$29",priceText2:"$290",pricePeriod1:"per month",pricePeriod2:"per year",priceBilling1:"billed monthly",priceBilling2:"billed annually",featuresText:"
  • Feature 1
  • Feature 2
  • Feature 3
  • Feature 4
  • ",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com",buttonURL2:"https://www.fatcatapps.com",wooProductID1:"",wooProductID2:"",useCustomWooTitle1:!1,useCustomWooTitle2:!1},{columnPopular:!0,popularText:"Most popular",planText1:"Pro",planText2:"Pro",planSvg:"",planImage:"",planSubText:"Best for most users",priceText1:"$39",priceText2:"$390",pricePeriod1:"per month",pricePeriod2:"per year",priceBilling1:"billed monthly",priceBilling2:"billed annually",featuresText:"
  • Feature 1
  • Feature 2
  • Feature 3
  • Feature 4
  • ",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com",buttonURL2:"https://www.fatcatapps.com",wooProductID1:"",wooProductID2:"",useCustomWooTitle1:!1,useCustomWooTitle2:!1},{columnPopular:!1,popularText:"Most popular",planText1:"Elite",planText2:"Elite",planSvg:"",planImage:"",planSubText:"For enterprises",priceText1:"$49",priceText2:"$490",pricePeriod1:"per month",pricePeriod2:"per year",priceBilling1:"billed monthly",priceBilling2:"billed annually",featuresText:"
  • Feature 1
  • Feature 2
  • Feature 3
  • Feature 4
  • ",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com",buttonURL2:"https://www.fatcatapps.com",wooProductID1:"",wooProductID2:"",useCustomWooTitle1:!1,useCustomWooTitle2:!1}]}var wp=window.wp,el=wp.element.createElement,$=window.jQuery;wp.blocks.registerBlockType("fatcatapps/easy-pricing-tables",{title:"Easy Pricing Table",icon:"money-alt",category:"common",description:"",attributes:fca_ept_main_attributes(),supports:{align:fcaEptEditorData.theme_support.block_styles||fcaEptEditorData.theme_support.wide,html:!1,reusable:!1,removable:!1,customClassName:!1,inserter:!1},edit:fca_ept_main_edit,save:function(){return null}});; function fca_ept_set_layout1_attributes(t){t.setAttributes({selectedLayout:"layout1"}),t.setAttributes({layoutBGColor:"#ffffff"}),t.setAttributes({layoutBGTint2:"#eeeeee"}),t.setAttributes({layoutBGTint3:"#dddddd"}),t.setAttributes({layoutBGTint4:"#7f8c8d"}),t.setAttributes({layoutFontColor:"#333333"}),t.setAttributes({buttonColor:"#3498db"}),t.setAttributes({buttonFontColor:"#ffffff"}),t.setAttributes({buttonBorderColor:"#2980b9"}),t.setAttributes({buttonBorderColorPop:"#c0392b"}),t.setAttributes({accentColor:"#dd4632"}),t.setAttributes({fontFamily:"Free"===fcaEptEditorData.edition?"sans-serif":"Montserrat"}),t.setAttributes({popularFontSize:"125%"}),t.setAttributes({planFontSize:"137.5%"}),t.setAttributes({priceFontSize:"175%"}),t.setAttributes({featuresFontSize:"125%"}),t.setAttributes({buttonFontSize:"112.5%"}),t.setAttributes({toggleFontSize:"112.5%"})}function fca_ept_layout1_block_edit(t){var e=JSON.parse(t.attributes.columnSettings);return fca_ept_layout1_additional_styles(t),el("div",{style:{fontFamily:t.attributes.fontFamily+", sans-serif"},id:"fca-ept-table-"+t.attributes.tableID,className:"fca-ept-main"},fcaEptEditorData.toggle_integration?fca_ept_render_toggle(t):null,el("div",{className:"fca-ept-layout1"},Array.from(e,function(a,o){return el("div",{key:o,className:fca_ept_column_class_name(t,o),style:{backgroundColor:t.attributes.layoutBGTint2},onClick:function(){t.setAttributes({selectedCol:o})}},el("div",{style:{backgroundColor:t.attributes.layoutBGTint4,color:t.attributes.buttonFontColor},className:e[o].columnPopular?"fca-ept-popular fca-ept-most-popular":"fca-ept-popular"},el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.popularFontSize},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-popular-text",placeholder:"Most Popular",type:"text",tagName:"span",value:e[o].popularText,onClick:function(){fca_ept_update_ui_state(t,"popular")},onChange:function(e){fca_ept_update_populartext(t,e)}})),el("div",{style:{backgroundColor:t.attributes.layoutBGTint3},className:"fca-ept-plan-div"},el("div",{style:{display:t.attributes.showImagesToggle?"block":"none"},className:fca_ept_has_woo_image(t,o)?"fca-ept-plan-image fca-ept-woo-image":"fca-ept-plan-image",onClick:function(){document.querySelectorAll(".fca-ept-mediaOpen")[0].click()}},el("img",{src:fca_ept_get_planImage(t,o)})),el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.planFontSize,color:t.attributes.layoutFontColor},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-plan",placeholder:"Plan name",type:"text",tagName:"span",value:fca_ept_get_plantext(t,o),onClick:function(){fca_ept_update_ui_state(t,"plan")},onChange:function(e){fca_ept_update_plantext(t,e)}})),el("div",{style:{backgroundColor:t.attributes.layoutBGTint2},className:"fca-ept-price-div"},el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.priceFontSize,color:t.attributes.layoutFontColor},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-price",placeholder:"$29",type:"text",tagName:"span",value:fca_ept_get_pricetext(t,o),onClick:function(){fca_ept_update_ui_state(t,"price")},onChange:function(e){fca_ept_update_pricetext(t,e)}})),el("div",{style:{backgroundColor:t.attributes.layoutBGColor},className:"fca-ept-features-div"},el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.featuresFontSize,color:t.attributes.layoutFontColor},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-features",tagName:"ul",multiline:"li",placeholder:"features offered",type:"text",value:e[o].featuresText,onClick:function(){fca_ept_update_ui_state(t,"features")},onChange:function(e){fca_ept_update_featurestext(t,e)}})),el("div",{className:"fca-ept-button-div",onClick:function(){fca_ept_handle_cta_button_click(t)}},fca_ept_button_content(t,e,o)))})))}function fca_ept_layout1_additional_styles(t){var e=t.attributes.tableID;$("#"+e).remove(),$("body").append("")}var wp=window.wp,el=wp.element.createElement;; function fca_ept_set_layout2_attributes(t){t.setAttributes({selectedLayout:"layout2"}),t.setAttributes({layoutBGColor:"#f2f2f2"}),t.setAttributes({layoutFontColor:"#333333"}),t.setAttributes({layoutFontColor1:"#6236ff"}),t.setAttributes({buttonColor:"#6236ff"}),t.setAttributes({buttonFontColor:"#ffffff"}),t.setAttributes({accentColor:"#6236ff"}),t.setAttributes({fontFamily:"sans-serif"}),t.setAttributes({popularFontSize:"70%"}),t.setAttributes({planFontSize:"225%"}),t.setAttributes({planSubtextFontSize:"90%"}),t.setAttributes({priceFontSize:"300%"}),t.setAttributes({pricePeriodFontSize:"90%"}),t.setAttributes({featuresFontSize:"90%"}),t.setAttributes({buttonFontSize:"100%"}),t.setAttributes({toggleFontSize:"112.5%"})}function fca_ept_layout2_block_edit(t){var e=JSON.parse(t.attributes.columnSettings);return fca_ept_additional_styles(t),el("div",{style:{fontFamily:t.attributes.fontFamily+", sans-serif"},id:"fca-ept-table-"+t.attributes.tableID,className:"fca-ept-main"},fcaEptEditorData.toggle_integration?fca_ept_render_toggle(t):null,el("div",{style:{textDecoration:"none"},className:"fca-ept-layout2"},Array.from(e,function(a,o){return el("div",{key:o,style:{backgroundColor:t.attributes.layoutBGColor,border:e[o].columnPopular?"2px solid "+t.attributes.accentColor:"0px solid"},className:fca_ept_column_class_name(t,o),onClick:function(){t.setAttributes({selectedCol:o})}},el("div",{style:{display:e[o].columnPopular?"block":"none",borderColor:t.attributes.accentColor},className:"fca-ept-popular-div"},el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.popularFontSize,color:t.attributes.buttonFontColor,backgroundColor:t.attributes.accentColor},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-popular-text",placeholder:"Most Popular",type:"text",tagName:"span",value:e[o].popularText,onClick:function(){fca_ept_update_ui_state(t,"popular")},onChange:function(e){fca_ept_update_populartext(t,e)}})),el("div",{style:{display:t.attributes.showImagesToggle?"block":"none"},className:fca_ept_has_woo_image(t,o)?"fca-ept-plan-image fca-ept-woo-image":"fca-ept-plan-image",onClick:function(){document.querySelectorAll(".fca-ept-mediaOpen")[0].click()}},el("img",{src:fca_ept_get_planImage(t,o)})),el("div",{className:"fca-ept-plan-div"},el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.planFontSize,color:t.attributes.layoutFontColor1},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-plan",placeholder:"Plan name",type:"text",tagName:"span",value:fca_ept_get_plantext(t,o),onClick:function(){fca_ept_update_ui_state(t,"plan")},onChange:function(e){fca_ept_update_plantext(t,e)}}),el(wp.blockEditor.RichText,{style:{display:t.attributes.showPlanSubtextToggle?"block":"none",color:t.attributes.layoutFontColor,fontSize:t.attributes.planSubtextFontSize},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-plan-subtext",placeholder:"To get started",type:"text",tagName:"span",value:e[o].planSubText,onClick:function(){fca_ept_update_ui_state(t,"planSubtext")},onChange:function(e){var a=JSON.parse(t.attributes.columnSettings);a[t.attributes.selectedCol].planSubText=e,t.setAttributes({columnSettings:JSON.stringify(a)})}})),el("div",{className:"fca-ept-price-div"},el("div",{className:"fca-ept-price-container"},el(wp.blockEditor.RichText,{className:"fca-ept-price",style:{fontSize:t.attributes.priceFontSize,color:t.attributes.layoutFontColor},allowedFormats:fca_ept_allowed_formats,placeholder:"$29",type:"text",tagName:"span",value:fca_ept_get_pricetext(t,o),onClick:function(){fca_ept_update_ui_state(t,"price")},onChange:function(e){fca_ept_update_pricetext(t,e)}}),el("div",{style:{display:t.attributes.showPriceSubtextToggle?"block":"none"},className:"fca-ept-price-subtext"},el("svg",{className:"fca-ept-price-svg",style:{backgroundColor:t.attributes.buttonColor}}),el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.pricePeriodFontSize,color:t.attributes.layoutFontColor},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-price-period",placeholder:"per month",type:"text",tagName:"span",value:t.attributes.togglePeriod?e[o].pricePeriod2:e[o].pricePeriod1,onClick:function(){fca_ept_update_ui_state(t,"pricePeriod")},onChange:function(e){fca_ept_update_priceperiod(t,e)}})))),el("div",{className:"fca-ept-features-div"},el(wp.blockEditor.RichText,{style:{fontSize:t.attributes.featuresFontSize,color:t.attributes.layoutFontColor},allowedFormats:fca_ept_allowed_formats,className:"fca-ept-features",tagName:"ul",multiline:"li",placeholder:"features offered",type:"text",value:e[o].featuresText,onClick:function(){fca_ept_update_ui_state(t,"features")},onChange:function(e){fca_ept_update_featurestext(t,e)}})),el("div",{className:"fca-ept-button-div",onClick:function(){fca_ept_handle_cta_button_click(t)}},fca_ept_button_content(t,e,o)))})))}var wp=window.wp,el=wp.element.createElement;;  jQuery(document).ready(function($){var animationDelay=2500,barAnimationDelay=3800,barWaiting=barAnimationDelay-3000,lettersDelay=50,typeLettersDelay=150,selectionDuration=500,typeAnimationDelay=selectionDuration+800,revealDuration=600,revealAnimationDelay=1500;initHeadline();function getDelay($el){var d=parseInt($el.closest('.cd-headline').data('delay'),10);return(d>0)?d:animationDelay} function initHeadline(){singleLetters($('.cd-headline.letters').find('b'));animateHeadline($('.cd-headline'))} function singleLetters($words){$words.each(function(){var word=$(this),letters=word.text().split(''),selected=word.hasClass('is-visible');for(i in letters){if(word.parents('.rotate-2').length>0)letters[i]=''+letters[i]+'';letters[i]=(selected)?''+letters[i]+'':''+letters[i]+''} word.html(letters.join('')).css('opacity',1)})} function animateHeadline($headlines){$headlines.each(function(){var headline=$(this),duration=getDelay(headline);if(headline.hasClass('loading-bar')){duration=barAnimationDelay;setTimeout(function(){headline.find('.cd-words-wrapper').addClass('is-loading')},barWaiting)}else if(headline.hasClass('clip')){var spanWrapper=headline.find('.cd-words-wrapper'),newWidth=spanWrapper.width()+10;spanWrapper.css('width',newWidth)}else if(!headline.hasClass('type')){var words=headline.find('.cd-words-wrapper b'),width=0;words.each(function(){var wordWidth=$(this).width();if(wordWidth>width)width=wordWidth});headline.find('.cd-words-wrapper').css('width',width)} setTimeout(function(){hideWord(headline.find('.is-visible').eq(0))},duration)})} function hideWord($word){var nextWord=takeNext($word),delay=getDelay($word);if($word.parents('.cd-headline').hasClass('type')){var parentSpan=$word.parent('.cd-words-wrapper');parentSpan.addClass('selected').removeClass('waiting');setTimeout(function(){parentSpan.removeClass('selected');$word.removeClass('is-visible').addClass('is-hidden').children('i').removeClass('in').addClass('out')},selectionDuration);setTimeout(function(){showWord(nextWord,typeLettersDelay)},typeAnimationDelay)}else if($word.parents('.cd-headline').hasClass('letters')){var bool=($word.children('i').length>=nextWord.children('i').length)?!0:!1;hideLetter($word.find('i').eq(0),$word,bool,lettersDelay);showLetter(nextWord.find('i').eq(0),nextWord,bool,lettersDelay)}else if($word.parents('.cd-headline').hasClass('clip')){$word.parents('.cd-words-wrapper').animate({width:'2px'},revealDuration,function(){switchWord($word,nextWord);showWord(nextWord)})}else if($word.parents('.cd-headline').hasClass('loading-bar')){$word.parents('.cd-words-wrapper').removeClass('is-loading');switchWord($word,nextWord);setTimeout(function(){hideWord(nextWord)},barAnimationDelay);setTimeout(function(){$word.parents('.cd-words-wrapper').addClass('is-loading')},barWaiting)}else{switchWord($word,nextWord);setTimeout(function(){hideWord(nextWord)},delay)}} function showWord($word,$duration){if($word.parents('.cd-headline').hasClass('type')){showLetter($word.find('i').eq(0),$word,!1,$duration);$word.addClass('is-visible').removeClass('is-hidden')}else if($word.parents('.cd-headline').hasClass('clip')){$word.parents('.cd-words-wrapper').animate({width:$word.width()+10},revealDuration,function(){setTimeout(function(){hideWord($word)},revealAnimationDelay)})}} function hideLetter($letter,$word,$bool,$duration){$letter.removeClass('in').addClass('out');if(!$letter.is(':last-child')){setTimeout(function(){hideLetter($letter.next(),$word,$bool,$duration)},$duration)}else if($bool){setTimeout(function(){hideWord(takeNext($word))},getDelay($word))} if($letter.is(':last-child')&&$('html').hasClass('no-csstransitions')){var nextWord=takeNext($word);switchWord($word,nextWord)}} function showLetter($letter,$word,$bool,$duration){$letter.addClass('in').removeClass('out');if(!$letter.is(':last-child')){setTimeout(function(){showLetter($letter.next(),$word,$bool,$duration)},$duration)}else{if($word.parents('.cd-headline').hasClass('type')){setTimeout(function(){$word.parents('.cd-words-wrapper').addClass('waiting')},200)} if(!$bool){setTimeout(function(){hideWord($word)},getDelay($word))}}} function takeNext($word){return(!$word.is(':last-child'))?$word.next():$word.parent().children().eq(0)} function takePrev($word){return(!$word.is(':first-child'))?$word.prev():$word.parent().children().last()} function switchWord($oldWord,$newWord){$oldWord.removeClass('is-visible').addClass('is-hidden');$newWord.removeClass('is-hidden').addClass('is-visible')} window.AnimatedHeadlineInit=function($scope){if(!$scope||!$scope.length)return;var $headlines=$scope.hasClass('cd-headline')?$scope:$scope.find('.cd-headline');singleLetters($headlines.filter('.letters').find('b'));animateHeadline($headlines)}}); (()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?[a-z][-a-z0-9_:]*)(?(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>m,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>d,maxdate:()=>z,maxfilesize:()=>j,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>y,mindate:()=>A,minfilesize:()=>$,minitems:()=>w,minlength:()=>g,minnumber:()=>b,number:()=>c,required:()=>n,requiredfile:()=>a,stepnumber:()=>I,tel:()=>l,time:()=>f,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(!e.every((t=>{try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}})))throw new o(this)},l=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&5t.trim())).filter((t=>""!==t)).every((t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t))))throw new o(this)},m=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},f=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?[a-z]+)\/(?[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>this.accept?.some((e=>t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).lengtht.trim())).filter((t=>""!==t));if(parseInt(this.threshold)t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),0!==i&&it.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(t)t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(this.threshold)t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&tt.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold{t instanceof File&&(i+=t.size)})),i{t instanceof File&&(i+=t.size)})),parseInt(this.threshold)t.trim())).filter((t=>""!==t)),i=parseFloat(this.base),s=parseFloat(this.interval);if(!(0{const e=(parseFloat(t)-i)%s;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-s).toFixed(6)})))throw new o(this)},O=({ruleObj:t,options:i})=>{const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},E=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},k=[],F=t=>[...k].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var L;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>O({ruleObj:t,options:i})));if(!n.length)return new Map;const a=F(E),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{k.push(t)},...null!==(L=window.swv)&&void 0!==L?L:{}}})();