Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer - Version 3.0.2

Version Description

Release date: June 30, 2022

Changelog: - Few PHP 7.0 compatibility fixed - Fixed some warnings in specific situations - Added debug button for error notifications - Better request error handling - Updated support link in menu

If you experience bugs, problems or you just have some feedback, let us know on our Buttonizer community!

Download this release

Release Info

Developer buttonizer
Plugin Icon wp plugin Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0.1 to 3.0.2

app/Admin/Admin.php CHANGED
@@ -67,14 +67,14 @@ class Admin
67
  // Add submenu
68
  add_submenu_page('Buttonizer', 'Manage buttons', __('Manage buttons', 'buttonizer-multifunctional-button'), 'read', 'admin.php?page=Buttonizer#/editor');
69
 
 
 
 
70
  // Add community link
71
  add_submenu_page('Buttonizer', __('Community', 'buttonizer-multifunctional-button'), __('Community', 'buttonizer-multifunctional-button'), 'read', 'https://community.buttonizer.pro/?referral=buttonizer-plugin-menu');
72
 
73
  // Add knowledge base link
74
  add_submenu_page('Buttonizer', __('Knowledge base', 'buttonizer-multifunctional-button'), __('Knowledge base', 'buttonizer-multifunctional-button'), 'read', 'https://community.buttonizer.pro/knowledgebase?referral=buttonizer-plugin-menu');
75
-
76
- // Add support link
77
- add_submenu_page('Buttonizer', __('I need support', 'buttonizer-multifunctional-button'), __('I need support', 'buttonizer-multifunctional-button'), 'read', 'https://community.buttonizer.pro/t/support?referral=buttonizer-plugin-menu');
78
  }
79
 
80
  public function adminAssets()
@@ -86,13 +86,13 @@ class Admin
86
  $manifest = new ManifestParser(BUTTONIZER_DIR . "/assets/app/manifest.json", plugins_url('assets/app', BUTTONIZER_PLUGIN_DIR));
87
 
88
  // Get dashboard scripts
89
- $script = $manifest->getEntrypoint("index.html", true);
90
 
91
  // Get dashboard style
92
- $styles = $manifest->getStyles("index.html", true);
93
 
94
  // Get imports
95
- $imports = $manifest->getImports("index.html", true);
96
 
97
  // Add script
98
  wp_register_script('buttonizer_admin_js', $script['url'], [], md5(BUTTONIZER_VERSION), true);
@@ -199,7 +199,7 @@ class Admin
199
  *
200
  * @return string lock
201
  */
202
- public function getBeforeMigrate(): ?string
203
  {
204
  // Needs migration
205
  if (!defined("BUTTONIZER_LEGACY_REQUESTED_MIGRATION")) {
@@ -247,6 +247,15 @@ class Admin
247
  'meta' => array(),
248
  ));
249
 
 
 
 
 
 
 
 
 
 
250
  // Settings
251
  $admin_bar->add_menu(array(
252
  'id' => 'buttonizer_knowledgebase',
67
  // Add submenu
68
  add_submenu_page('Buttonizer', 'Manage buttons', __('Manage buttons', 'buttonizer-multifunctional-button'), 'read', 'admin.php?page=Buttonizer#/editor');
69
 
70
+ // Add support link
71
+ add_submenu_page('Buttonizer', __('I need support', 'buttonizer-multifunctional-button'), __('I need support', 'buttonizer-multifunctional-button'), 'read', 'admin.php?page=Buttonizer#/support');
72
+
73
  // Add community link
74
  add_submenu_page('Buttonizer', __('Community', 'buttonizer-multifunctional-button'), __('Community', 'buttonizer-multifunctional-button'), 'read', 'https://community.buttonizer.pro/?referral=buttonizer-plugin-menu');
75
 
76
  // Add knowledge base link
77
  add_submenu_page('Buttonizer', __('Knowledge base', 'buttonizer-multifunctional-button'), __('Knowledge base', 'buttonizer-multifunctional-button'), 'read', 'https://community.buttonizer.pro/knowledgebase?referral=buttonizer-plugin-menu');
 
 
 
78
  }
79
 
80
  public function adminAssets()
86
  $manifest = new ManifestParser(BUTTONIZER_DIR . "/assets/app/manifest.json", plugins_url('assets/app', BUTTONIZER_PLUGIN_DIR));
87
 
88
  // Get dashboard scripts
89
+ $script = $manifest->getEntrypoint("index.html", false);
90
 
91
  // Get dashboard style
92
+ $styles = $manifest->getStyles("index.html", false);
93
 
94
  // Get imports
95
+ $imports = $manifest->getImports("index.html", false);
96
 
97
  // Add script
98
  wp_register_script('buttonizer_admin_js', $script['url'], [], md5(BUTTONIZER_VERSION), true);
199
  *
200
  * @return string lock
201
  */
202
+ public function getBeforeMigrate()
203
  {
204
  // Needs migration
205
  if (!defined("BUTTONIZER_LEGACY_REQUESTED_MIGRATION")) {
247
  'meta' => array(),
248
  ));
249
 
250
+ // Add support link
251
+ $admin_bar->add_menu(array(
252
+ 'id' => 'buttonizer_support',
253
+ 'parent' => 'buttonizer',
254
+ 'title' => __('I need support', 'buttonizer-multifunctional-button'),
255
+ 'href' => admin_url() . 'admin.php?page=Buttonizer#/support',
256
+ 'meta' => array(),
257
+ ));
258
+
259
  // Settings
260
  $admin_bar->add_menu(array(
261
  'id' => 'buttonizer_knowledgebase',
app/Utils/ApiRequest.php CHANGED
@@ -29,7 +29,7 @@ class ApiRequest
29
  *
30
  * @return void
31
  */
32
- public static function saveApiToken(string $token): void
33
  {
34
  // Temporary save token if we need it later on
35
  self::$token = $token;
@@ -44,7 +44,7 @@ class ApiRequest
44
  *
45
  * @return string|null External Access Token or null
46
  */
47
- public static function getApiToken(): ?string
48
  {
49
  if (self::$token) return self::$token;
50
 
@@ -129,6 +129,13 @@ class ApiRequest
129
  $errorMessage = "Sorry, there was an internal server issue on our Buttonizer API. This is an bug on our side, please try again later or contact us if the error persists.";
130
  }
131
 
 
 
 
 
 
 
 
132
  return new \WP_Error($errorStatus, $errorMessage, [
133
  'status' => $status,
134
  'message' => $body
29
  *
30
  * @return void
31
  */
32
+ public static function saveApiToken(string $token)
33
  {
34
  // Temporary save token if we need it later on
35
  self::$token = $token;
44
  *
45
  * @return string|null External Access Token or null
46
  */
47
+ public static function getApiToken()
48
  {
49
  if (self::$token) return self::$token;
50
 
129
  $errorMessage = "Sorry, there was an internal server issue on our Buttonizer API. This is an bug on our side, please try again later or contact us if the error persists.";
130
  }
131
 
132
+ // Request failed or API is down :(
133
+ if ($status === "" && $body === "") {
134
+ $errorStatus = "buttonizer_api_not_reachable";
135
+ $errorMessage = "The request has failed because the Buttonizer API wasn't reachable. Maybe your provider has blocked outgoing requests to our API or the Buttonizer API is down for maintenance. Please try again later or contact us if the error persists.";
136
+ $status = 400;
137
+ }
138
+
139
  return new \WP_Error($errorStatus, $errorMessage, [
140
  'status' => $status,
141
  'message' => $body
app/Utils/ButtonizerAccount.php CHANGED
@@ -22,7 +22,7 @@ class ButtonizerAccount
22
  *
23
  * @return void
24
  */
25
- private static function initialize(): void
26
  {
27
  // Register options
28
  register_setting("buttonizer", "buttonizer_account");
@@ -109,7 +109,7 @@ class ButtonizerAccount
109
  /**
110
  * Empty account settings
111
  */
112
- public static function emptyAccountSettings(): void
113
  {
114
  self::$data = [];
115
 
22
  *
23
  * @return void
24
  */
25
+ private static function initialize()
26
  {
27
  // Register options
28
  register_setting("buttonizer", "buttonizer_account");
109
  /**
110
  * Empty account settings
111
  */
112
+ public static function emptyAccountSettings()
113
  {
114
  self::$data = [];
115
 
app/Utils/Settings.php CHANGED
@@ -23,7 +23,7 @@ class Settings
23
  *
24
  * @return void
25
  */
26
- private static function initialize(): void
27
  {
28
  // Register options
29
  register_setting("buttonizer", "buttonizer_settings");
@@ -52,7 +52,7 @@ class Settings
52
  *
53
  * @return void
54
  */
55
- public static function empty(): void
56
  {
57
  self::$settings = [];
58
  }
@@ -126,7 +126,7 @@ class Settings
126
  *
127
  * @return void
128
  */
129
- public static function deleteSetting(string $key): void
130
  {
131
  // Initialize
132
  if (is_null(self::$settings)) {
23
  *
24
  * @return void
25
  */
26
+ private static function initialize()
27
  {
28
  // Register options
29
  register_setting("buttonizer", "buttonizer_settings");
52
  *
53
  * @return void
54
  */
55
+ public static function empty()
56
  {
57
  self::$settings = [];
58
  }
126
  *
127
  * @return void
128
  */
129
+ public static function deleteSetting(string $key)
130
  {
131
  // Initialize
132
  if (is_null(self::$settings)) {
assets/app/{index.f7d191e3.js → index.be77aa6d.js} RENAMED
@@ -1 +1,3 @@
1
- var We=Object.defineProperty,He=Object.defineProperties;var Ue=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var be=(t,n,r)=>n in t?We(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,_=(t,n)=>{for(var r in n||(n={}))ve.call(n,r)&&be(t,r,n[r]);if(K)for(var r of K(n))we.call(n,r)&&be(t,r,n[r]);return t},R=(t,n)=>He(t,Ue(n));var _e=(t,n)=>{var r={};for(var i in t)ve.call(t,i)&&n.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&K)for(var i of K(t))n.indexOf(i)<0&&we.call(t,i)&&(r[i]=t[i]);return r};import{c as Pe,a as ke,b as pe,R as he,u as V,r as s,j as e,E as qe,d as o,T as $e,S as je,H as Ge,A as Le,I as Ie,e as De,f as Ee,g as Ye,P as me,G as k,h as c,B as p,i as Ve,k as Ke,C as X,l as Je,L as Q,m as se,n as F,o as Xe,p as E,q as Z,s as Qe,t as O,v as Ze,O as et,F as U,w as tt,x as ee,D as te,y as ne,z as re,J as W,K as oe,M as ge,N as nt,Q as G,U as Ae,V as Me,W as ye,X as rt,Y as ze,Z as Y,_ as ot,$ as it,a0 as at,a1 as st,a2 as lt,a3 as ct,a4 as dt,a5 as Ce,a6 as ut,a7 as pt,a8 as ht,a9 as mt,aa as gt,ab as yt,ac as ft,ad as M,ae as bt,af as vt,ag as wt,ah as _t,ai as kt}from"./vendor.257c8694.js";const zt=function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerpolicy&&(l.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?l.credentials="include":a.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}};zt();let v=Pe({palette:{primary:{main:"#2D7789",contrastText:"#FFFFFF"},secondary:{main:"#f08419",contrastText:"#FFFFFF"},white:{main:"#FFFFFF",contrastText:"#2D7789"},black:{main:"#111111",contrastText:"#2D7789"}},typography:{fontFamily:["BlinkMacSystemFont","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","sans-serif"].join(",")},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536,navigation:1090}}});v=Pe(v,{components:{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:v.palette.secondary.main,backgroundColor:ke(v.palette.secondary.main,.08),"&:hover":{backgroundColor:ke(v.palette.secondary.main,.12)},"& .MuiListItemIcon-root":{color:v.palette.secondary.main}}}}},MuiLink:{styleOverrides:{root:{textDecoration:"none","&:hover":{textDecoration:"underline"}}}},MuiButton:{styleOverrides:{root:{borderRadius:50,padding:"8px 18px"}},variants:[{props:{type:"link"},style:({ownerState:t})=>_({},t.variant==="contained"?{color:v.palette[t.color].contrastText,"&:focus":{outline:"unset",boxShadow:"unset",color:v.palette[t.color].contrastText},"&:hover":{color:v.palette[t.color].contrastText}}:{color:v.palette[t.color].main,"&:focus":{outline:"unset",boxShadow:"unset",color:v.palette[t.color].main},"&:hover":{color:v.palette[t.color].main}})},{props:{type:"link-small"},style:{padding:"5px 5px",textTransform:"none",minWidth:35,color:v.palette.primary.main,"&:focus":{outline:"unset",boxShadow:"unset",color:v.palette.primary.main},"&:hover":{color:v.palette.primary.main}}}]},MuiPaper:{styleOverrides:{root:{borderRadius:10,position:"relative"}},variants:[{props:{type:"wrapper"},style:{padding:"15px 30px"}}]},MuiTypography:{variants:[{props:{type:"header"},style:{fontSize:"1rem",fontWeight:600}},{props:{type:"content"},style:{fontSize:"1em"}}]},MuiTab:{variants:[{props:{size:"small"},style:{textTransform:"unset",minHeight:42}}]},MuiList:{variants:[{props:{size:"large"},style:{"& .MuiListItem-root":{padding:"5px 16px"},"& .MuiAvatar-root":{width:30,height:30},"& .MuiTypography-root":{fontSize:"1.2rem"}}}]}}});var Ne=v;function B(t,n={},r="POST"){return pe({url:`${buttonizer_admin.api}buttonizer${t}?nonce=${buttonizer_admin.nonce}`,method:r,data:n,headers:{"X-WP-Nonce":buttonizer_admin.nonce}})}const Re=he.createContext(),Ct=t=>{const n=V(),[r,i]=s.exports.useState("no-lock"),[a,l]=s.exports.useState(!1),[d,g]=s.exports.useState(!1),[y,m]=s.exports.useState(!1),[h,f]=s.exports.useState({}),[b,P]=s.exports.useState({}),[z,x]=s.exports.useState({}),[w,S]=s.exports.useState(!1);s.exports.useState(null);const[q,$]=s.exports.useState(null),N=u=>{f({name:u==null?void 0:u.name,id:u==null?void 0:u.uid}),P({id:u==null?void 0:u.site_id,timezone:u==null?void 0:u.site_timezone,isPremium:u==null?void 0:u.site_licensed}),x({name:u==null?void 0:u.plan_name,id:u==null?void 0:u.plan_id,hasPlan:(u==null?void 0:u.plan_id)!==null,cancelled:u==null?void 0:u.plan_cancelled})},ae=()=>{w||(q!==null&&n("/editor"),S(!0),B("/editor_start_session").then(({data:u})=>{$(u),n("/editor")}).catch(()=>{}).then(()=>S(!1)))};s.exports.useEffect(()=>{i(window.buttonizer_admin.actionLock),l(!!window.buttonizer_admin.hasMigrated),N(window.buttonizer_admin.account)},[]);const L={actionLock:r,hasMigrated:a,legacyBackupDeleted:d,connectionSuccesfull:y,isPremium:b.isPremium,accountData:h,siteInfo:b,planInfo:z,sessionStarting:w,cachedEditorSession:q},T={setActionLock:i,setHasMigrated:l,setLegacyBackupDeleted:g,parseAccountData:N,setConnectionSuccessfull:m,setCachedEditorSession:$,startSession:ae};return e(Re.Provider,_({value:_(_({},L),T)},t))},C=()=>{const t=he.useContext(Re);if(t===void 0)throw new Error("useApp must be used within a AppProvider");return t};function xt({children:t}){return e(he.StrictMode,{children:e(qe,{fallback:o("p",{children:["We're sorry! Our dashboard has crashed, we have been notified about the error. Please refresh the page"," ",e("a",{href:"./admin.php?page=Buttonizer",children:"or start from the beginning"}),"."]}),showDialog:!0,children:e($e,{theme:Ne,children:e(je,{maxSnack:3,children:e(Ge,{children:e(Ct,{children:t})})})})})})}const St="_title_ld712_1",Tt="_logo_ld712_9",Bt="_navLinks_ld712_15";var le={title:St,logo:Tt,navLinks:Bt};function Pt(){const{connectionSuccesfull:t,setConnectionSuccessfull:n}=C(),r=()=>{n(!1)};return t?o(Le,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:r,children:e(De,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[e(Ee,{children:"Your Buttonizer account has been connected. Happy conversion!"}),"Buttonizer should now be visible on your WordPress website."]}):null}function $t(){const{startSession:t,sessionStarting:n}=C();let r=V(),i=Ye();const[a,l]=s.exports.useState(!1),d=s.exports.useRef();return o("div",{style:{marginBottom:40},children:[e(me,{type:"wrapper",children:o(k,{container:!0,children:[o(k,{item:!0,container:!0,style:{alignItems:"center"},navigation:!0,children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",className:le.logo,draggable:!1}),e(c,{className:le.title,color:"primary",children:"Buttonizer for WordPress"})]}),o(k,{item:!0,container:!0,justifyContent:"space-between",navigation:"auto",className:le.navLinks,children:[e(p,{onClick:()=>{r("/overview")},color:i.pathname==="/overview"?"secondary":"primary",children:"Home"}),e(p,{onClick:()=>{r("/settings")},color:i.pathname==="/settings"?"secondary":"primary",children:"Settings"}),e(p,{onClick:()=>{l(!0)},ref:d,endIcon:a?e(Ve,{}):e(Ke,{}),color:i.pathname==="/support"?"secondary":"primary",children:"More actions"}),e(p,{variant:"contained",onClick:t,endIcon:n&&e(X,{size:20,style:{marginLeft:8}}),disabled:n,children:"Edit buttons"})]})]})}),e(Pt,{}),e(Je,{open:a&&d.current,anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:()=>{l(!1)},onClick:()=>l(!1),children:o(Q,{children:[o(se,{onClick:()=>{r("/support")},selected:i.pathname==="/support",children:[e(F,{children:e(Xe,{})}),e(E,{primary:"Support"})]}),o(se,{onClick:()=>{window.open("https://app.buttonizer.io/")},children:[e(F,{children:e(Z,{})}),e(E,{primary:"Open Buttonizer dashboard"})]}),o(se,{onClick:()=>{window.open("https://app.buttonizer.io/account")},children:[e(F,{children:e(Qe,{})}),e(E,{primary:"Account Settings"})]})]})})]})}const Lt="_footer_svg59_1";var It={footer:Lt};function Dt(){return o("div",{className:It.footer,children:["Need some assistance? Get free support via our"," ",e(O,{href:"https://community.buttonizer.pro",color:"secondary",children:"Buttonizer Community"}),"."]})}function Et(){return o(Ze,{style:{maxWidth:1100},children:[o("div",{style:{padding:"50px 0 0",height:"100%"},children:[e($t,{}),e(et,{})]}),e(Dt,{})]})}const At="https://app.buttonizer.io",Mt="https://editor.buttonizer.io/site/";function H(t="/"){return At+t}function Nt(t){return`${Mt}${t.redirect_id}#auth-token=${t.token}`}function ie({text:t="Loading..."}){return o("div",{className:"buzzy-animation",children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/icon-animated.svg`})," ",e("span",{children:t})]})}const Rt="_avatar_1ciu2_5",Ft="_listItem_1ciu2_9",Ot="_secondaryInfo_1ciu2_13",Wt="_knowledgebase_1ciu2_17",Ht="_knowledgebaseText_1ciu2_24";var j={"migratePage-container":"_migratePage-container_1ciu2_1",avatar:Rt,listItem:Ft,secondaryInfo:Ot,knowledgebase:Wt,knowledgebaseText:Ht};const Ut="_buttonizerPaper_131bh_1";var qt={buttonizerPaper:Ut};function Fe({children:t,containerProps:n}){return e(U,{children:o(tt,R(_({className:"migratePage-container",style:{marginTop:50,maxWidth:1130}},n),{children:[e("div",{style:{alignItems:"center",justifyContent:"center",display:"flex",marginBottom:30},children:e("img",{src:`${buttonizer_admin.assetsPath}/images/logo.png`,alt:"buttonizerlogo",style:{height:70}})}),e(me,{className:qt.buttonizerPaper,sx:{"&::before":{background:`url(${buttonizer_admin.assetsPath}/images/waves.svg)`}},children:t})]}))})}const jt="_code_1iwn6_1";var Gt={code:jt};const Yt=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function Vt({open:t,onClose:n=()=>{},onConfirm:r=()=>{}}){const i=s.exports.useRef(),a=()=>{i.current.focus(),i.current.select(),navigator.clipboard&&navigator.clipboard.writeText(i.current.value)};return o(te,{open:t,onClose:close,TransitionComponent:Yt,"aria-labelledby":"migrate-title","aria-describedby":"migrate-description",children:[e(ne,{id:"migrate-title",children:"Before you migrate"}),o(re,{children:[o(W,{id:"migrate-description",children:["It seems that you're currently using a deprecated custom JavaScript feature of Buttonizer which is not supported on Buttonizer 3.0 in favour of the advanced"," ",e(O,{href:"https://community.buttonizer.pro/knowledgebase/435",target:"_blank",color:"secondary",children:"Buttonizer JavaScript API"}),"."]}),o(W,{style:{margin:"15px 0"},children:["Please copy all the code from the block below and add it to a"," ",e(O,{href:"https://community.buttonizer.pro/knowledgebase/1011",target:"_blank",color:"secondary",children:"Headers Footers"})," ","plugin of your choice. Your click actions will stay working as they are now."]}),e("textarea",{className:Gt.code,onClick:a,ref:i,readOnly:!0,children:buttonizer_admin.beforeMigrate})]}),o(oe,{children:[e(p,{onClick:n,children:"Cancel"}),e(p,{color:"secondary",onClick:()=>r(!0),autoFocus:!0,children:"I am ready"})]})]})}let ce=null,I=null;function Kt(){const t=V(),{enqueueSnackbar:n,closeSnackbar:r}=ge(),{setActionLock:i,parseAccountData:a,setConnectionSuccessfull:l,setHasMigrated:d}=C(),[g,y]=s.exports.useState(!1),[m,h]=s.exports.useState(!1),[f,b]=s.exports.useState(!1),[P,z]=s.exports.useState(!1),[x,w]=s.exports.useState(null),[S,q]=s.exports.useState(!0),$=buttonizer_admin.site,N=(T=!1)=>{if((buttonizer_admin==null?void 0:buttonizer_admin.beforeMigrate)!==null&&T!==!0){h(!0);return}if(g&&I){I.focus();return}y(!0),z(!1);const u=H(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent($.name)}&domain=${encodeURIComponent($.domain)}&email=${encodeURIComponent($.user.email)}&first_name=${encodeURIComponent($.user.firstName)}&last_name=${encodeURIComponent($.user.lastName)}`);I=window.open(u,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`),ce=setInterval(()=>{if(!I){clearInterval(ce);return}I.closed&&(clearInterval(ce),I=null,y(!1))});try{I.focus()}catch{n("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:Oe=>[e(p,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(p,{onClick:()=>r(Oe),children:"Close"})]})}},ae=()=>{f||(b(!0),w("skipping"),B("/migrate",{skip:!0}).then(({data:T})=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>{z(!0),b(!1)}))};if(s.exports.useEffect(()=>{const T=u=>{!u.isTrusted||u.origin!==H("")||u.data.messageType==="connect-info"&&(I.close(),w("connecting"),B("/migrate",{siteId:u.data.id,authorization:u.data.authorization,shouldMigrate:S}).then(({data:fe})=>{i("no-lock"),a(fe.data),l(!0),d(!0),t("/")}).catch(()=>{w(null),z(!0)}))};return window.addEventListener("message",T),function(){window.removeEventListener("message",T)}},[S]),x!==null)return e(ie,{text:Jt(x)});const L=(T,u)=>o(G,{className:j.listItem,children:[e(Ae,{children:e(Me,{className:j.avatar,children:e(ye,{})})}),e(E,{secondary:u,secondaryTypographyProps:{className:j.secondaryInfo},primary:T})]});return o(Fe,{children:[o(p,{href:"https://community.buttonizer.pro/knowledgebase/1122-standalone-vs-wordpress",target:"_blank",type:"link-small",className:j.knowledgebase,children:[e(nt,{}),e("span",{className:j.knowledgebaseText,children:"Learn more about Buttonizer Standalone"})]}),o(k,{container:!0,style:{height:"100%"},direction:"row",children:[e(k,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:o("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(c,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer just got an upgrade!"}),e(c,{style:{fontSize:"1.2rem",maxWidth:"fit-content",marginTop:10},component:"div",children:"Easier to manage, faster and more features."}),e("div",{style:{marginTop:30,maxWidth:300},children:o(p,{variant:"contained",onClick:()=>{q(!0),N()},color:"secondary",size:"small",sx:{padding:"15px 30px"},children:["Start migrating",e(Z,{style:{marginLeft:15}})]})}),e(c,{style:{marginTop:20,fontSize:"0.875rem",maxWidth:"fit-content"},component:"div",children:"Already using Buttonizer Standalone? Connect without migrating your buttons."}),o("div",{style:{marginTop:20,marginBottom:100,alignItems:"center",display:"flex"},children:[e(p,{variant:"outlined",size:"small",onClick:()=>{q(!1),N()},color:"secondary",sx:{padding:"10px 20px",marginRight:"10px"},children:"Connect now"}),e(p,{size:"small",onClick:ae,disabled:g,children:"Stay in old version"})]})]})}),o(k,{item:!0,md:6,sm:12,container:!0,justifyContent:"center",alignContent:"center",direction:"column",sx:{margin:"20px 0"},children:[e(c,{style:{fontSize:27,fontWeight:600,paddingLeft:15},children:"New in 3.0"}),o(Q,{size:"large",children:[L("More free styling options","Imagine what you can do now"),L("Conversion analytics (coming soon)","Privacy focused conversion analytics"),L("Now available on any platform","Try out on WordPress, Shopify, Wix and more"),L("Manage multiple sites with one account","Great for agencies & businesses with multiple sites"),L("Content Delivery Network (CDN)","Lightning fast around the world \u{1F680}"),L("And much more!")]})]})]}),e(Vt,{open:m,onClose:()=>h(!1),onConfirm:N})]})}function Jt(t){switch(t){case"initializing":return"Initializing...";case"skipping":return"Skipping...";case"migrating":return"Migrating data..."}}function A(i){var a=i,{children:t,paperStyle:n}=a,r=_e(a,["children","paperStyle"]);return e("div",{style:{margin:"20px 0"},children:e(me,R(_({sx:_({"& > *":{marginTop:"20px !important",marginBottom:"20px !important"},"& > *:first-child":{marginTop:"10px !important",marginBottom:"20px !important"}},n),type:"wrapper"},r),{children:t}))})}const Xt="_analytics_1650v_1";var Qt={analytics:Xt};function Zt(){const{siteInfo:t,startSession:n,sessionStarting:r}=C();return o(U,{children:[o(A,{children:[e(c,{type:"header",color:"primary",children:"Manage your Buttonizer instance"}),e(c,{type:"content",color:"primary",children:"Welcome to your Buttonizer for WordPress dashboard. Here are a few quick-tools to manage your Buttonizer."}),e(p,{variant:"outlined",onClick:n,endIcon:r&&e(X,{size:20,style:{marginLeft:8}}),disabled:r,children:"Edit buttons"}),e(p,{style:{marginLeft:10},color:"secondary",href:H(`/sites/${t.id}`),target:"_blank",type:"link",children:"Open site settings"})]}),o(A,{className:Qt.analytics,children:[o(rt,{value:0,children:[e(ze,{value:0,icon:e(Y,{size:"small",label:"Coming soon"}),iconPosition:"end",label:"Analytics",size:"small",disabled:!0}),e(ze,{value:1,icon:e(Y,{size:"small",label:"Coming soon"}),iconPosition:"end",label:"Conversions",size:"small",disabled:!0})]}),o(c,{type:"content",color:"primary",component:"div",children:["Buttonizer is your converison companion. We will monitor conversions made via Buttonizer for you and give you an easy-to-understand metrics. ",e("br",{}),e("b",{children:"This feature will soon be available"}),"."]}),e(p,{variant:"outlined",startIcon:e(ot,{}),disabled:!0,style:{margin:"10px 0"},children:"Open analytics"})]})]})}const en=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function tn({open:t,onClose:n=()=>{}}){var g;const{setActionLock:r}=C(),[i,a]=s.exports.useState(!1),l=()=>{i||n()},d=()=>{i||(a(!0),B("/disconnect").then(({data:y})=>{r("setup"),n()}).catch(()=>a(!1)))};return o(te,{open:t,onClose:l,TransitionComponent:en,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ne,{id:"alert-dialog-title",children:"Are you sure you want to disconnect?"}),o(re,{children:[o(W,{id:"alert-dialog-description",children:["You will disconnect your Buttonizer instance from your site"," ",e("b",{children:(g=buttonizer_admin==null?void 0:buttonizer_admin.site)==null?void 0:g.domain}),". You will be able to sign in with another account."]}),e(W,{id:"alert-dialog-description-p2",style:{marginTop:15},children:"Are you sure you want to disconnect?"})]}),o(oe,{children:[e(p,{disabled:i,onClick:l,children:"Cancel"}),e(p,{disabled:i,color:"secondary",onClick:d,autoFocus:!0,children:"Disconnect"})]})]})}function nn(){const[t,n]=s.exports.useState(!1);return o(U,{children:[o(A,{children:[e(c,{type:"header",color:"primary",children:"Disconnect Buttonizer"}),e(c,{variant:"body1",color:"primary",children:"Did you create a new instance or do you want to sign in with a different account? Disconnect Buttonizer from your WordPress site."}),e(p,{variant:"outlined",onClick:()=>n(!0),children:"Disconnect"})]}),e(tn,{open:t,onClose:()=>n(!1)})]})}const rn="_table_13k7q_1";var xe={table:rn};function on(){const{parseAccountData:t,isPremium:n,accountData:r,siteInfo:i,planInfo:a}=C(),[l,d]=s.exports.useState(!1),[g,y]=s.exports.useState(!1),m=()=>{l||(d(!0),B("/sync").then(({data:f})=>{t(f.data),y(!0),setTimeout(()=>{y(!1)},5e3)}).catch(()=>{}).then(()=>d(!1)))},h=()=>n?e(Y,{label:"PRO",color:"secondary"}):e(Y,{label:"FREE"});return o(A,{children:[o(k,{container:!0,children:[e(k,{item:!0,md:6,children:o("table",{className:xe.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(c,{variant:"body1",color:"primary",style:{fontWeight:600},children:"Site information:"})})}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Account name:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:r.name})})]}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Site ID:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:i.id})})]}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Timezone:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:i.timezone})})]})]})}),e(k,{item:!0,md:6,children:o("table",{className:xe.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(c,{variant:"body1",color:"primary",style:{fontWeight:600},children:"License information:"})})}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Plan:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:a.name})})]}),a.hasPlan&&o(U,{children:[o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Subscription status:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:a.cancelled?"Cancelled":"Active"})})]}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"License status:"})}),e("td",{children:h()})]})]})]})})]}),e(c,{variant:"body2",color:"primary",children:"Did you change a button or account information in the Buttonizer dashboard and do not see the changes in the Buttonizer for WordPress plugin?"}),e(c,{variant:"body2",color:"primary",children:"Click the sync button below to retrieve the data from the Buttonizer dashboard."}),o(k,{container:!0,justifyContent:"space-between",children:[e(p,{variant:"outlined",onClick:m,disabled:l||g,endIcon:l&&e(X,{size:20,style:{marginLeft:8}})||g&&e(ye,{}),children:"Sync with dashboard"}),e(p,{color:"secondary",endIcon:e(Z,{}),href:H(`/sites/${i.id}`),target:"_blank",type:"link",children:"View more site info"})]})]})}const an=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function sn({open:t,onClose:n=()=>{}}){const{setHasMigrated:r,setLegacyBackupDeleted:i}=C(),[a,l]=s.exports.useState(!1),d=()=>{a||n()};return o(te,{open:t,onClose:d,TransitionComponent:an,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ne,{id:"alert-dialog-title",children:"Happy with the upgrade?"}),e(re,{children:e(W,{id:"alert-dialog-description",children:"Are you satiesfied with the 3.0 update? If so then you can remove the old Buttonizer data to clean up unused data in your database."})}),o(oe,{children:[e(p,{disabled:a,onClick:d,children:"Cancel"}),e(p,{disabled:a,color:"secondary",onClick:()=>{a||(l(!0),B("/delete_legacy_backup").then(()=>{i(!0),r(!1),n()}).catch(()=>l(!1)))},autoFocus:!0,children:"Confirm"})]})]})}const ln=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function cn({open:t,onClose:n=()=>{}}){const[r,i]=s.exports.useState(!1),a=()=>{r||n()},l=()=>{r||(i(!0),B("/revert_legacy").then(()=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>i(!1)))};return r&&t?o(it,{open:t,sx:{background:"#f0f0f1"},children:[e(at,{styles:{body:{overflow:"hidden"}}}),e(ie,{text:"Reverting..."})]}):o(te,{open:t,onClose:a,TransitionComponent:ln,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ne,{id:"alert-dialog-title",children:"Go back Buttonizer version 2.x"}),e(re,{children:o(W,{id:"alert-dialog-description",children:["Don't like the changes in the 3.0 update? Did you perhaps encounter any issues or have any feedback? Please let us know so that we may improve it in the future."," ",e(O,{color:"secondary",href:"mailto:contact@buttonizer.pro",children:"contact@buttonizer.pro"})]})}),o(oe,{children:[e(p,{disabled:r,onClick:a,children:"Cancel"}),e(p,{disabled:r,color:"secondary",onClick:l,autoFocus:!0,children:"I am sure"})]})]})}function dn(){const[t,n]=s.exports.useState(!1),[r,i]=s.exports.useState(!1);return o(U,{children:[o(A,{children:[e(c,{type:"header",color:"primary",children:"Remove unused 2.x data"}),e(c,{variant:"body1",color:"primary",children:"Remove the old Buttonizer data in your database."}),e(p,{variant:"outlined",onClick:()=>n(!0),children:"Remove 2.x data"}),e(c,{type:"header",color:"primary",children:"Go back to Buttonizer version 2.x"}),e(c,{variant:"body1",color:"primary",children:"Don't like the changes in the new version?"}),e(p,{variant:"outlined",onClick:()=>i(!0),children:"Return to 2.x"})]}),e(sn,{open:t,onClose:()=>n(!1)}),e(cn,{open:r,onClose:()=>i(!1)})]})}const un="_listItem_8c466_1",pn="_selectContainer_8c466_5";var Se={listItem:un,selectContainer:pn};function hn(t,n){const r=[];return t||(t=[]),n.forEach(i=>{(t.indexOf(i.id)!==-1||i.id==="administrator")&&r.push(i)}),r}function mn({additionalPermissions:t,setAdditionalPermissions:n,saving:r=!1}){const i=window.buttonizer_admin.available_roles,[a,l]=s.exports.useState(hn(t,i)),[d,g]=s.exports.useState(!1),y=m=>{const h=[];m.forEach(f=>{f.id!=="administrator"&&h.push(f.id)}),n(h)};return o(G,{disableGutters:!0,className:Se.listItem,children:[e(F,{children:e(st,{})}),e(E,{primary:"Permissions",secondary:"You can grant more roles to access the Buttonizer settings who are not an administrator."}),e("div",{className:Se.selectContainer,children:e(lt,{multiple:!0,size:"small",disableCloseOnSelect:!0,disableClearable:!0,options:i.filter(m=>m.id!=="guest"),filterSelectedOptions:!0,getOptionLabel:m=>m.name,value:a,style:{marginTop:10},fullWidth:!0,onOpen:()=>g(!0),onClose:()=>{g(!1),y(a)},loading:r,onChange:(m,h)=>{h.length!=0&&(l(h),d||y(h))},renderTags:(m,h)=>m.map((f,b)=>e(Y,R(_({label:f.name},h({index:b})),{disabled:f.id==="administrator"}))),noOptionsText:"Role not found",renderInput:m=>e(ct,R(_({},m),{variant:"outlined",label:"Select roles",placeholder:"Select one or more items",disabled:r,InputProps:R(_({},m.InputProps),{"data-testid":"pagerule:autocomplete-input"}),helperText:e(O,{href:"https://community.buttonizer.pro/knowledgebase/507",target:"_blank",children:"Need help? Learn how to use Permissions."})}))})})]})}function gn(){const[t,n]=s.exports.useState(window.buttonizer_admin.settings),[r,i]=s.exports.useState(!1),[a,l]=s.exports.useState(!1),[d,g]=s.exports.useState(window.buttonizer_admin.settings.adminTopBarButtonEnabled),[y,m]=s.exports.useState(window.buttonizer_admin.settings.canSendErrors),[h,f]=s.exports.useState(window.buttonizer_admin.settings.accessRoles),b=()=>{a||(l(!0),B("/settings",{data:{admin_top_bar_show_button:d,can_send_errors:y,additional_permissions:h}}).then(()=>{}).catch(()=>{}).then(()=>{n({adminTopBarButtonEnabled:d,canSendErrors:y,accessRoles:h}),i(!1),l(!1)}))};return s.exports.useEffect(()=>{i(t.adminTopBarButtonEnabled!==d||t.canSendErrors!==y||t.accessRoles!==h)},[d,y,h]),o(A,{children:[e(c,{type:"header",color:"primary",children:"Preferences"}),o(Q,{disablePadding:!0,dense:!0,children:[o(G,{disableGutters:!0,children:[e(F,{children:e(dt,{})}),e(E,{primary:"Show admin top bar",secondary:"Hide Buttonizer in the admin top bar by disabling this setting.",onClick:()=>{a||g(!d)}}),e(Ce,{edge:"end",color:"primary",checked:d,onChange:P=>g(P.target.checked),disabled:a})]}),o(G,{disableGutters:!0,children:[e(F,{children:e(ut,{})}),e(E,{primary:"Automatic error logging and crash reporting",secondary:"Enable automatic error logging and crash reporting in order to help us solve issues within Buttonizer! All data is anonymized automatically.",onClick:()=>{a||m(!y)}}),e(Ce,{edge:"end",color:"primary",checked:y,onChange:P=>m(P.target.checked),disabled:a})]}),e(mn,{saving:a,additionalPermissions:h,setAdditionalPermissions:f}),e(p,{variant:"contained",onClick:b,disabled:!r||a,endIcon:a&&e(X,{size:20,style:{marginLeft:8}}),style:{marginTop:15},children:"Save changes"})]})]})}function yn(){const{setLegacyBackupDeleted:t}=C();return o(Le,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:()=>{t(!1)},children:e(De,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[e(Ee,{children:"You have deleted your old data."}),"Have fun with the new version of Buttonizer! :)"]})}function fn(){const{hasMigrated:t,legacyBackupDeleted:n}=C();return o(U,{children:[e(gn,{}),e(on,{}),e(nn,{}),t&&window.buttonizer_admin.isAdmin==="1"&&e(dn,{}),n&&e(yn,{})]})}const bn="_avatar_yq9q0_1",vn="_listItem_yq9q0_5",wn="_secondaryInfo_yq9q0_9";var de={avatar:bn,listItem:vn,secondaryInfo:wn};let ue=null,D=null;function _n(){const t=V(),{enqueueSnackbar:n,closeSnackbar:r}=ge(),{parseAccountData:i,setConnectionSuccessfull:a,setActionLock:l}=C(),[d,g]=s.exports.useState(!1),[y,m]=s.exports.useState(!1),[h,f]=s.exports.useState(!1),b=buttonizer_admin.site,P=()=>{if(d&&D){D.focus();return}g(!0),m(!1);const x=H(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent(b.name)}&domain=${encodeURIComponent(b.domain)}&email=${encodeURIComponent(b.user.email)}&first_name=${encodeURIComponent(b.user.firstName)}&last_name=${encodeURIComponent(b.user.lastName)}`);D=window.open(x,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`);try{D.focus()}catch{n("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:S=>[e(p,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(p,{onClick:()=>r(S),children:"Close"})]})}ue=setInterval(()=>{if(!D){clearInterval(ue);return}D.closed&&(clearInterval(ue),D=null,g(!1))})};if(s.exports.useEffect(()=>{const x=w=>{!w.isTrusted||w.origin!==H("")||w.data.messageType==="connect-info"&&(D.close(),f(!0),B("/connect",{siteId:w.data.id,authorization:w.data.authorization}).then(({data:S})=>{l("no-lock"),i(S.data),a(!0),t("/")}).catch(()=>{f(!1),m(!0)}))};return window.addEventListener("message",x),function(){window.removeEventListener("message",x)}},[]),h)return e(ie,{text:"Connecting..."});const z=(x,w)=>o(G,{className:de.listItem,children:[e(Ae,{children:e(Me,{className:de.avatar,children:e(ye,{})})}),e(E,{secondary:w,secondaryTypographyProps:{className:de.secondaryInfo},primary:x})]});return e(Fe,{children:o(k,{container:!0,style:{height:"100%"},direction:"row",children:[e(k,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:o("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(c,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer has been installed,"}),e(c,{style:{fontSize:25},children:"you are ready to make some buttons!"}),o("div",{style:{marginTop:30,maxWidth:300},children:[e(p,{variant:"contained",size:"large",onClick:P,color:"secondary",endIcon:e(Z,{}),sx:{padding:"15px 30px"},children:"Go to your dashboard"}),e(c,{style:{fontSize:15,marginTop:20,marginBottom:60},children:"Go to your dashboard to create, manage and edit your buttons."})]})]})}),o(k,{container:!0,justifyContent:"center",alignContent:"center",direction:"column",item:!0,md:6,sm:12,sx:{margin:"20px 0"},children:[e(c,{style:{fontSize:27,fontWeight:600},children:"This is Buttonizer"}),o(Q,{size:"large",children:[z("WhatsApp Button"),z("Facebook messenger"),z("Social media sharing"),z("Navigate with URL"),z("Open pop up"),z("And many more options!")]})]})]})})}const kn="_helpContainer_jsvok_1",zn="_cardButton_jsvok_5",Cn="_helpContainerText_jsvok_33";var J={helpContainer:kn,cardButton:zn,helpContainerText:Cn};function xn(){const t=({imgSrc:n,href:r,title:i,description:a,button:l="Learn more"})=>e(pt,{children:e(ht,{href:r,type:"link",target:"_blank",className:J.cardButton,children:o(mt,{className:J.cardContent,children:[e("img",{src:n,alt:"Knowledge base",draggable:!1}),e(c,{variant:"h5",children:i}),e(c,{className:J.helpContainerText,color:"textSecondary",component:"div",children:a}),e(p,{endIcon:e(gt,{}),color:"secondary",children:l})]})})});return o("div",{children:[o(A,{children:[e(c,{color:"primary",type:"header",children:"Need some help?"}),e(c,{type:"content",color:"primary",children:"Do you need some help? We can help you with everything! Check out our Buttonizer Community, knowledge base or we can help you with our support."})]}),o("div",{className:J.helpContainer,children:[e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/knowledge-base.svg`,title:"Knowledge base",description:"Learn how to use our application like a pro",href:"https://community.buttonizer.pro/knowledgebase"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/community.svg`,title:"Forums",description:"Give and Get help from your peers and our team",href:"https://community.buttonizer.pro/"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/tickets.svg`,title:"Tickets",description:"Need support that requires privacy? Submit a private ticket",href:"https://community.buttonizer.pro/tickets"})]})]})}function Sn(){return o(A,{children:[e(c,{type:"header",color:"primary",children:"Oh no! Page not found :("}),o(c,{type:"body1",color:"primary",children:["Sorry about that. If we linked to something wrong in our plugin, please let us know by giving us feedback"," ",e(O,{href:"https://community.buttonizer.pro/",target:"_blank",color:"secondary",children:"on our Buttonizer Community!"})]}),e(p,{component:yt,to:"/",variant:"outlined",type:"link",children:"Back to overview"})]})}const Tn={blogs:"wp/v2/posts?_fields[]=title&_fields[]=id",pages:"wp/v2/pages?_fields[]=title&_fields[]=id",categories:"wp/v2/categories?_fields[]=name&_fields[]=id"};function Bn(t,n){if(t==="roles"){n(window.buttonizer_admin.available_roles);return}return pe({url:`${buttonizer_admin.api}${Tn[t]}&per_page=100`,method:"GET",headers:{"X-WP-Nonce":buttonizer_admin.nonce}}).then(({data:r})=>{n(r.map(({id:i,title:a,name:l=null})=>{var d;return{id:i,name:(d=a==null?void 0:a.rendered)!=null?d:l}}))}).catch(()=>{})}const Pn="_iframe_13azj_1";var $n={iframe:Pn};const Te=(t,n,r,i={})=>{t.contentWindow.postMessage({eventType:"buttonizer",messageType:r,message:i},n)};function Be(){const t=V(),n=s.exports.useRef(),{cachedEditorSession:r,setCachedEditorSession:i,sessionStarting:a,startSession:l}=C();return s.exports.useEffect(()=>{r===null&&!a&&l()},[r]),s.exports.useEffect(()=>{const d=({data:g,origin:y})=>{const{eventType:m,messageType:h,message:f}=g;m==="buttonizer"&&(h==="connection"&&f==="ready"&&Te(n.current,y,"platform","wordpress"),h==="close_editor"&&t("/"),h==="request_data"&&Bn(f,b=>{Te(n.current,y,`reply_${f}`,b)}))};return window.addEventListener("message",d,!1),()=>{window.removeEventListener("message",d),i(null)}},[]),!r||a?e(ie,{text:"Starting editor session..."}):e("iframe",{src:Nt(r),className:$n.iframe,ref:n,referrerPolicy:"origin"})}function Ln(){const{actionLock:t}=C(),{enqueueSnackbar:n,closeSnackbar:r}=ge();return s.exports.useEffect(()=>{pe.interceptors.response.use(i=>i,i=>{let a=`Oops, something went wrong. Error status ${i.response.status} (${i.response.statusText}). Your webserver might be unable to handle this request, there's an issue with your WordPress instance or you have insufficient permissions to execute this request.`,l=!0,d=1207;return i.response.data&&(i.response.data.code==="buttonizer_api_server_error"?d=1213:l=!1,a=`${i.response.data.message} (Error code: ${i.response.data.code})`),n(a,{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:null},action:g=>[l&&e(p,{href:`https://community.buttonizer.pro/knowledgebase/${d}`,target:"_blank",color:"secondary",children:"More information"}),e(p,{onClick:()=>r(g),children:"Close"})]}),Promise.reject(i)})},[]),t==="editor"?e(Be,{}):t==="migration"?e(Kt,{}):t==="setup"?e(_n,{}):e(ft,{children:o(M,{path:"/",element:e(Et,{}),children:[e(M,{path:"/",element:e(bt,{to:"/overview",replace:!0})}),e(M,{path:"/overview",element:e(Zt,{})}),e(M,{path:"/settings",element:e(fn,{})}),e(M,{path:"/support",element:e(xn,{})}),e(M,{path:"/editor",element:e(Be,{})}),e(M,{path:"*",element:e(Sn,{})})]})})}const In="https://84c09e1dec414d9aa9a7663511fb3027@tracker.buttonizer.pro/7",Dn={}.VITE_APP_VERSION;vt({dsn:In,integrations:[new wt],release:Dn,environment:"development",tracesSampleRate:1,beforeSend:t=>{var n;return(n=buttonizer_admin==null?void 0:buttonizer_admin.settings)!=null&&n.canSendErrors?t:null}});_t.createRoot(document.getElementById("root")).render(e(kt,{injectFirst:!0,children:e($e,{theme:Ne,children:e(xt,{children:e(Ln,{})})})}));
 
 
1
+ var We=Object.defineProperty,He=Object.defineProperties;var Ue=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var be=(t,n,r)=>n in t?We(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,_=(t,n)=>{for(var r in n||(n={}))ve.call(n,r)&&be(t,r,n[r]);if(K)for(var r of K(n))we.call(n,r)&&be(t,r,n[r]);return t},R=(t,n)=>He(t,Ue(n));var _e=(t,n)=>{var r={};for(var i in t)ve.call(t,i)&&n.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&K)for(var i of K(t))n.indexOf(i)<0&&we.call(t,i)&&(r[i]=t[i]);return r};import{c as Pe,a as ke,b as pe,R as he,u as V,r as s,j as e,E as qe,d as o,T as $e,S as je,H as Ge,A as Le,I as Ie,e as De,f as Ee,g as Ye,P as me,G as k,h as c,B as p,i as Ve,k as Ke,C as X,l as Je,L as Q,m as se,n as F,o as Xe,p as E,q as Z,s as Qe,t as O,v as Ze,O as et,F as U,w as tt,x as ee,D as te,y as ne,z as re,J as W,K as oe,M as ge,N as nt,Q as G,U as Me,V as Ae,W as ye,X as rt,Y as ze,Z as Y,_ as ot,$ as it,a0 as at,a1 as st,a2 as lt,a3 as ct,a4 as dt,a5 as Ce,a6 as ut,a7 as pt,a8 as ht,a9 as mt,aa as gt,ab as yt,ac as ft,ad as A,ae as bt,af as vt,ag as wt,ah as _t,ai as kt}from"./vendor.257c8694.js";const zt=function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerpolicy&&(l.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?l.credentials="include":a.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}};zt();let v=Pe({palette:{primary:{main:"#2D7789",contrastText:"#FFFFFF"},secondary:{main:"#f08419",contrastText:"#FFFFFF"},white:{main:"#FFFFFF",contrastText:"#2D7789"},black:{main:"#111111",contrastText:"#2D7789"}},typography:{fontFamily:["BlinkMacSystemFont","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue","sans-serif"].join(",")},breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536,navigation:1090}}});v=Pe(v,{components:{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:v.palette.secondary.main,backgroundColor:ke(v.palette.secondary.main,.08),"&:hover":{backgroundColor:ke(v.palette.secondary.main,.12)},"& .MuiListItemIcon-root":{color:v.palette.secondary.main}}}}},MuiLink:{styleOverrides:{root:{textDecoration:"none","&:hover":{textDecoration:"underline"}}}},MuiButton:{styleOverrides:{root:{borderRadius:50,padding:"8px 18px"}},variants:[{props:{type:"link"},style:({ownerState:t})=>_({},t.variant==="contained"?{color:v.palette[t.color].contrastText,"&:focus":{outline:"unset",boxShadow:"unset",color:v.palette[t.color].contrastText},"&:hover":{color:v.palette[t.color].contrastText}}:{color:v.palette[t.color].main,"&:focus":{outline:"unset",boxShadow:"unset",color:v.palette[t.color].main},"&:hover":{color:v.palette[t.color].main}})},{props:{type:"link-small"},style:{padding:"5px 5px",textTransform:"none",minWidth:35,color:v.palette.primary.main,"&:focus":{outline:"unset",boxShadow:"unset",color:v.palette.primary.main},"&:hover":{color:v.palette.primary.main}}}]},MuiPaper:{styleOverrides:{root:{borderRadius:10,position:"relative"}},variants:[{props:{type:"wrapper"},style:{padding:"15px 30px"}}]},MuiTypography:{variants:[{props:{type:"header"},style:{fontSize:"1rem",fontWeight:600}},{props:{type:"content"},style:{fontSize:"1em"}}]},MuiTab:{variants:[{props:{size:"small"},style:{textTransform:"unset",minHeight:42}}]},MuiList:{variants:[{props:{size:"large"},style:{"& .MuiListItem-root":{padding:"5px 16px"},"& .MuiAvatar-root":{width:30,height:30},"& .MuiTypography-root":{fontSize:"1.2rem"}}}]}}});var Ne=v;function B(t,n={},r="POST"){return pe({url:`${buttonizer_admin.api}buttonizer${t}?nonce=${buttonizer_admin.nonce}`,method:r,data:n,headers:{"X-WP-Nonce":buttonizer_admin.nonce}})}const Re=he.createContext(),Ct=t=>{const n=V(),[r,i]=s.exports.useState("no-lock"),[a,l]=s.exports.useState(!1),[d,m]=s.exports.useState(!1),[y,g]=s.exports.useState(!1),[h,f]=s.exports.useState({}),[b,P]=s.exports.useState({}),[z,x]=s.exports.useState({}),[w,S]=s.exports.useState(!1);s.exports.useState(null);const[q,$]=s.exports.useState(null),N=u=>{f({name:u==null?void 0:u.name,id:u==null?void 0:u.uid}),P({id:u==null?void 0:u.site_id,timezone:u==null?void 0:u.site_timezone,isPremium:u==null?void 0:u.site_licensed}),x({name:u==null?void 0:u.plan_name,id:u==null?void 0:u.plan_id,hasPlan:(u==null?void 0:u.plan_id)!==null,cancelled:u==null?void 0:u.plan_cancelled})},ae=()=>{w||(q!==null&&n("/editor"),S(!0),B("/editor_start_session").then(({data:u})=>{$(u),n("/editor")}).catch(()=>{}).then(()=>S(!1)))};s.exports.useEffect(()=>{i(window.buttonizer_admin.actionLock),l(!!window.buttonizer_admin.hasMigrated),N(window.buttonizer_admin.account)},[]);const L={actionLock:r,hasMigrated:a,legacyBackupDeleted:d,connectionSuccesfull:y,isPremium:b.isPremium,accountData:h,siteInfo:b,planInfo:z,sessionStarting:w,cachedEditorSession:q},T={setActionLock:i,setHasMigrated:l,setLegacyBackupDeleted:m,parseAccountData:N,setConnectionSuccessfull:g,setCachedEditorSession:$,startSession:ae};return e(Re.Provider,_({value:_(_({},L),T)},t))},C=()=>{const t=he.useContext(Re);if(t===void 0)throw new Error("useApp must be used within a AppProvider");return t};function xt({children:t}){return e(he.StrictMode,{children:e(qe,{fallback:o("p",{children:["We're sorry! Our dashboard has crashed, we have been notified about the error. Please refresh the page"," ",e("a",{href:"./admin.php?page=Buttonizer",children:"or start from the beginning"}),"."]}),showDialog:!0,children:e($e,{theme:Ne,children:e(je,{maxSnack:3,children:e(Ge,{children:e(Ct,{children:t})})})})})})}const St="_title_ld712_1",Tt="_logo_ld712_9",Bt="_navLinks_ld712_15";var le={title:St,logo:Tt,navLinks:Bt};function Pt(){const{connectionSuccesfull:t,setConnectionSuccessfull:n}=C(),r=()=>{n(!1)};return t?o(Le,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:r,children:e(De,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[e(Ee,{children:"Your Buttonizer account has been connected. Happy conversion!"}),"Buttonizer should now be visible on your WordPress website."]}):null}function $t(){const{startSession:t,sessionStarting:n}=C();let r=V(),i=Ye();const[a,l]=s.exports.useState(!1),d=s.exports.useRef();return o("div",{style:{marginBottom:40},children:[e(me,{type:"wrapper",children:o(k,{container:!0,children:[o(k,{item:!0,container:!0,style:{alignItems:"center"},navigation:!0,children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",className:le.logo,draggable:!1}),e(c,{className:le.title,color:"primary",children:"Buttonizer for WordPress"})]}),o(k,{item:!0,container:!0,justifyContent:"space-between",navigation:"auto",className:le.navLinks,children:[e(p,{onClick:()=>{r("/overview")},color:i.pathname==="/overview"?"secondary":"primary",children:"Home"}),e(p,{onClick:()=>{r("/settings")},color:i.pathname==="/settings"?"secondary":"primary",children:"Settings"}),e(p,{onClick:()=>{l(!0)},ref:d,endIcon:a?e(Ve,{}):e(Ke,{}),color:i.pathname==="/support"?"secondary":"primary",children:"More actions"}),e(p,{variant:"contained",onClick:t,endIcon:n&&e(X,{size:20,style:{marginLeft:8}}),disabled:n,children:"Edit buttons"})]})]})}),e(Pt,{}),e(Je,{open:a&&d.current,anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},onClose:()=>{l(!1)},onClick:()=>l(!1),children:o(Q,{children:[o(se,{onClick:()=>{r("/support")},selected:i.pathname==="/support",children:[e(F,{children:e(Xe,{})}),e(E,{primary:"Support"})]}),o(se,{onClick:()=>{window.open("https://app.buttonizer.io/")},children:[e(F,{children:e(Z,{})}),e(E,{primary:"Open Buttonizer dashboard"})]}),o(se,{onClick:()=>{window.open("https://app.buttonizer.io/account")},children:[e(F,{children:e(Qe,{})}),e(E,{primary:"Account Settings"})]})]})})]})}const Lt="_footer_svg59_1";var It={footer:Lt};function Dt(){return o("div",{className:It.footer,children:["Need some assistance? Get free support via our"," ",e(O,{href:"https://community.buttonizer.pro",color:"secondary",children:"Buttonizer Community"}),"."]})}function Et(){return o(Ze,{style:{maxWidth:1100},children:[o("div",{style:{padding:"50px 0 0",height:"100%"},children:[e($t,{}),e(et,{})]}),e(Dt,{})]})}const Mt="https://app.buttonizer.io",At="https://editor.buttonizer.io/site/";function H(t="/"){return Mt+t}function Nt(t){return`${At}${t.redirect_id}#auth-token=${t.token}`}function ie({text:t="Loading..."}){return o("div",{className:"buzzy-animation",children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/icon-animated.svg`})," ",e("span",{children:t})]})}const Rt="_avatar_1ciu2_5",Ft="_listItem_1ciu2_9",Ot="_secondaryInfo_1ciu2_13",Wt="_knowledgebase_1ciu2_17",Ht="_knowledgebaseText_1ciu2_24";var j={"migratePage-container":"_migratePage-container_1ciu2_1",avatar:Rt,listItem:Ft,secondaryInfo:Ot,knowledgebase:Wt,knowledgebaseText:Ht};const Ut="_buttonizerPaper_131bh_1";var qt={buttonizerPaper:Ut};function Fe({children:t,containerProps:n}){return e(U,{children:o(tt,R(_({className:"migratePage-container",style:{marginTop:50,maxWidth:1130}},n),{children:[e("div",{style:{alignItems:"center",justifyContent:"center",display:"flex",marginBottom:30},children:e("img",{src:`${buttonizer_admin.assetsPath}/images/logo.png`,alt:"buttonizerlogo",style:{height:70}})}),e(me,{className:qt.buttonizerPaper,sx:{"&::before":{background:`url(${buttonizer_admin.assetsPath}/images/waves.svg)`}},children:t})]}))})}const jt="_code_1iwn6_1";var Gt={code:jt};const Yt=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function Vt({open:t,onClose:n=()=>{},onConfirm:r=()=>{}}){const i=s.exports.useRef(),a=()=>{i.current.focus(),i.current.select(),navigator.clipboard&&navigator.clipboard.writeText(i.current.value)};return o(te,{open:t,onClose:close,TransitionComponent:Yt,"aria-labelledby":"migrate-title","aria-describedby":"migrate-description",children:[e(ne,{id:"migrate-title",children:"Before you migrate"}),o(re,{children:[o(W,{id:"migrate-description",children:["It seems that you're currently using a deprecated custom JavaScript feature of Buttonizer which is not supported on Buttonizer 3.0 in favour of the advanced"," ",e(O,{href:"https://community.buttonizer.pro/knowledgebase/435",target:"_blank",color:"secondary",children:"Buttonizer JavaScript API"}),"."]}),o(W,{style:{margin:"15px 0"},children:["Please copy all the code from the block below and add it to a"," ",e(O,{href:"https://community.buttonizer.pro/knowledgebase/1011",target:"_blank",color:"secondary",children:"Headers Footers"})," ","plugin of your choice. Your click actions will stay working as they are now."]}),e("textarea",{className:Gt.code,onClick:a,ref:i,readOnly:!0,children:buttonizer_admin.beforeMigrate})]}),o(oe,{children:[e(p,{onClick:n,children:"Cancel"}),e(p,{color:"secondary",onClick:()=>r(!0),autoFocus:!0,children:"I am ready"})]})]})}let ce=null,I=null;function Kt(){const t=V(),{enqueueSnackbar:n,closeSnackbar:r}=ge(),{setActionLock:i,parseAccountData:a,setConnectionSuccessfull:l,setHasMigrated:d}=C(),[m,y]=s.exports.useState(!1),[g,h]=s.exports.useState(!1),[f,b]=s.exports.useState(!1),[P,z]=s.exports.useState(!1),[x,w]=s.exports.useState(null),[S,q]=s.exports.useState(!0),$=buttonizer_admin.site,N=(T=!1)=>{if((buttonizer_admin==null?void 0:buttonizer_admin.beforeMigrate)!==null&&T!==!0){h(!0);return}if(m&&I){I.focus();return}y(!0),z(!1);const u=H(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent($.name)}&domain=${encodeURIComponent($.domain)}&email=${encodeURIComponent($.user.email)}&first_name=${encodeURIComponent($.user.firstName)}&last_name=${encodeURIComponent($.user.lastName)}`);I=window.open(u,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`),ce=setInterval(()=>{if(!I){clearInterval(ce);return}I.closed&&(clearInterval(ce),I=null,y(!1))});try{I.focus()}catch{n("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:Oe=>[e(p,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(p,{onClick:()=>r(Oe),children:"Close"})]})}},ae=()=>{f||(b(!0),w("skipping"),B("/migrate",{skip:!0}).then(({data:T})=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>{z(!0),b(!1)}))};if(s.exports.useEffect(()=>{const T=u=>{!u.isTrusted||u.origin!==H("")||u.data.messageType==="connect-info"&&(I.close(),w("connecting"),B("/migrate",{siteId:u.data.id,authorization:u.data.authorization,shouldMigrate:S}).then(({data:fe})=>{i("no-lock"),a(fe.data),l(!0),d(!0),t("/")}).catch(()=>{w(null),z(!0)}))};return window.addEventListener("message",T),function(){window.removeEventListener("message",T)}},[S]),x!==null)return e(ie,{text:Jt(x)});const L=(T,u)=>o(G,{className:j.listItem,children:[e(Me,{children:e(Ae,{className:j.avatar,children:e(ye,{})})}),e(E,{secondary:u,secondaryTypographyProps:{className:j.secondaryInfo},primary:T})]});return o(Fe,{children:[o(p,{href:"https://community.buttonizer.pro/knowledgebase/1122-standalone-vs-wordpress",target:"_blank",type:"link-small",className:j.knowledgebase,children:[e(nt,{}),e("span",{className:j.knowledgebaseText,children:"Learn more about Buttonizer Standalone"})]}),o(k,{container:!0,style:{height:"100%"},direction:"row",children:[e(k,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:o("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(c,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer just got an upgrade!"}),e(c,{style:{fontSize:"1.2rem",maxWidth:"fit-content",marginTop:10},component:"div",children:"Easier to manage, faster and more features."}),e("div",{style:{marginTop:30,maxWidth:300},children:o(p,{variant:"contained",onClick:()=>{q(!0),N()},color:"secondary",size:"small",sx:{padding:"15px 30px"},children:["Start migrating",e(Z,{style:{marginLeft:15}})]})}),e(c,{style:{marginTop:20,fontSize:"0.875rem",maxWidth:"fit-content"},component:"div",children:"Already using Buttonizer Standalone? Connect without migrating your buttons."}),o("div",{style:{marginTop:20,marginBottom:100,alignItems:"center",display:"flex"},children:[e(p,{variant:"outlined",size:"small",onClick:()=>{q(!1),N()},color:"secondary",sx:{padding:"10px 20px",marginRight:"10px"},children:"Connect now"}),e(p,{size:"small",onClick:ae,disabled:m,children:"Stay in old version"})]})]})}),o(k,{item:!0,md:6,sm:12,container:!0,justifyContent:"center",alignContent:"center",direction:"column",sx:{margin:"20px 0"},children:[e(c,{style:{fontSize:27,fontWeight:600,paddingLeft:15},children:"New in 3.0"}),o(Q,{size:"large",children:[L("More free styling options","Imagine what you can do now"),L("Conversion analytics (coming soon)","Privacy focused conversion analytics"),L("Now available on any platform","Try out on WordPress, Shopify, Wix and more"),L("Manage multiple sites with one account","Great for agencies & businesses with multiple sites"),L("Content Delivery Network (CDN)","Lightning fast around the world \u{1F680}"),L("And much more!")]})]})]}),e(Vt,{open:g,onClose:()=>h(!1),onConfirm:N})]})}function Jt(t){switch(t){case"initializing":return"Initializing...";case"skipping":return"Skipping...";case"migrating":return"Migrating data..."}}function M(i){var a=i,{children:t,paperStyle:n}=a,r=_e(a,["children","paperStyle"]);return e("div",{style:{margin:"20px 0"},children:e(me,R(_({sx:_({"& > *":{marginTop:"20px !important",marginBottom:"20px !important"},"& > *:first-child":{marginTop:"10px !important",marginBottom:"20px !important"}},n),type:"wrapper"},r),{children:t}))})}const Xt="_analytics_1650v_1";var Qt={analytics:Xt};function Zt(){const{siteInfo:t,startSession:n,sessionStarting:r}=C();return o(U,{children:[o(M,{children:[e(c,{type:"header",color:"primary",children:"Manage your Buttonizer instance"}),e(c,{type:"content",color:"primary",children:"Welcome to your Buttonizer for WordPress dashboard. Here are a few quick-tools to manage your Buttonizer."}),e(p,{variant:"outlined",onClick:n,endIcon:r&&e(X,{size:20,style:{marginLeft:8}}),disabled:r,children:"Edit buttons"}),e(p,{style:{marginLeft:10},color:"secondary",href:H(`/sites/${t.id}`),target:"_blank",type:"link",children:"Open site settings"})]}),o(M,{className:Qt.analytics,children:[o(rt,{value:0,children:[e(ze,{value:0,icon:e(Y,{size:"small",label:"Coming soon"}),iconPosition:"end",label:"Analytics",size:"small",disabled:!0}),e(ze,{value:1,icon:e(Y,{size:"small",label:"Coming soon"}),iconPosition:"end",label:"Conversions",size:"small",disabled:!0})]}),o(c,{type:"content",color:"primary",component:"div",children:["Buttonizer is your converison companion. We will monitor conversions made via Buttonizer for you and give you an easy-to-understand metrics. ",e("br",{}),e("b",{children:"This feature will soon be available"}),"."]}),e(p,{variant:"outlined",startIcon:e(ot,{}),disabled:!0,style:{margin:"10px 0"},children:"Open analytics"})]})]})}const en=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function tn({open:t,onClose:n=()=>{}}){var m;const{setActionLock:r}=C(),[i,a]=s.exports.useState(!1),l=()=>{i||n()},d=()=>{i||(a(!0),B("/disconnect").then(({data:y})=>{r("setup"),n()}).catch(()=>a(!1)))};return o(te,{open:t,onClose:l,TransitionComponent:en,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ne,{id:"alert-dialog-title",children:"Are you sure you want to disconnect?"}),o(re,{children:[o(W,{id:"alert-dialog-description",children:["You will disconnect your Buttonizer instance from your site"," ",e("b",{children:(m=buttonizer_admin==null?void 0:buttonizer_admin.site)==null?void 0:m.domain}),". You will be able to sign in with another account."]}),e(W,{id:"alert-dialog-description-p2",style:{marginTop:15},children:"Are you sure you want to disconnect?"})]}),o(oe,{children:[e(p,{disabled:i,onClick:l,children:"Cancel"}),e(p,{disabled:i,color:"secondary",onClick:d,autoFocus:!0,children:"Disconnect"})]})]})}function nn(){const[t,n]=s.exports.useState(!1);return o(U,{children:[o(M,{children:[e(c,{type:"header",color:"primary",children:"Disconnect Buttonizer"}),e(c,{variant:"body1",color:"primary",children:"Did you create a new instance or do you want to sign in with a different account? Disconnect Buttonizer from your WordPress site."}),e(p,{variant:"outlined",onClick:()=>n(!0),children:"Disconnect"})]}),e(tn,{open:t,onClose:()=>n(!1)})]})}const rn="_table_13k7q_1";var xe={table:rn};function on(){const{parseAccountData:t,isPremium:n,accountData:r,siteInfo:i,planInfo:a}=C(),[l,d]=s.exports.useState(!1),[m,y]=s.exports.useState(!1),g=()=>{l||(d(!0),B("/sync").then(({data:f})=>{t(f.data),y(!0),setTimeout(()=>{y(!1)},5e3)}).catch(()=>{}).then(()=>d(!1)))},h=()=>n?e(Y,{label:"PRO",color:"secondary"}):e(Y,{label:"FREE"});return o(M,{children:[o(k,{container:!0,children:[e(k,{item:!0,md:6,children:o("table",{className:xe.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(c,{variant:"body1",color:"primary",style:{fontWeight:600},children:"Site information:"})})}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Account name:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:r.name})})]}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Site ID:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:i.id})})]}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Timezone:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:i.timezone})})]})]})}),e(k,{item:!0,md:6,children:o("table",{className:xe.table,children:[e("tr",{colspan:"2",children:e("th",{children:e(c,{variant:"body1",color:"primary",style:{fontWeight:600},children:"License information:"})})}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Plan:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:a.name})})]}),a.hasPlan&&o(U,{children:[o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"Subscription status:"})}),e("td",{children:e(c,{variant:"body2",color:"primary",children:a.cancelled?"Cancelled":"Active"})})]}),o("tr",{children:[e("td",{children:e(c,{variant:"body2",color:"primary",children:"License status:"})}),e("td",{children:h()})]})]})]})})]}),e(c,{variant:"body2",color:"primary",children:"Did you change a button or account information in the Buttonizer dashboard and do not see the changes in the Buttonizer for WordPress plugin?"}),e(c,{variant:"body2",color:"primary",children:"Click the sync button below to retrieve the data from the Buttonizer dashboard."}),o(k,{container:!0,justifyContent:"space-between",children:[e(p,{variant:"outlined",onClick:g,disabled:l||m,endIcon:l&&e(X,{size:20,style:{marginLeft:8}})||m&&e(ye,{}),children:"Sync with dashboard"}),e(p,{color:"secondary",endIcon:e(Z,{}),href:H(`/sites/${i.id}`),target:"_blank",type:"link",children:"View more site info"})]})]})}const an=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function sn({open:t,onClose:n=()=>{}}){const{setHasMigrated:r,setLegacyBackupDeleted:i}=C(),[a,l]=s.exports.useState(!1),d=()=>{a||n()};return o(te,{open:t,onClose:d,TransitionComponent:an,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ne,{id:"alert-dialog-title",children:"Happy with the upgrade?"}),e(re,{children:e(W,{id:"alert-dialog-description",children:"Are you satiesfied with the 3.0 update? If so then you can remove the old Buttonizer data to clean up unused data in your database."})}),o(oe,{children:[e(p,{disabled:a,onClick:d,children:"Cancel"}),e(p,{disabled:a,color:"secondary",onClick:()=>{a||(l(!0),B("/delete_legacy_backup").then(()=>{i(!0),r(!1),n()}).catch(()=>l(!1)))},autoFocus:!0,children:"Confirm"})]})]})}const ln=s.exports.forwardRef(function(n,r){return e(ee,_({direction:"up",ref:r},n))});function cn({open:t,onClose:n=()=>{}}){const[r,i]=s.exports.useState(!1),a=()=>{r||n()},l=()=>{r||(i(!0),B("/revert_legacy").then(()=>{document.location.href=`${buttonizer_admin.admin}?page=Buttonizer`}).catch(()=>i(!1)))};return r&&t?o(it,{open:t,sx:{background:"#f0f0f1"},children:[e(at,{styles:{body:{overflow:"hidden"}}}),e(ie,{text:"Reverting..."})]}):o(te,{open:t,onClose:a,TransitionComponent:ln,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[e(ne,{id:"alert-dialog-title",children:"Go back Buttonizer version 2.x"}),e(re,{children:o(W,{id:"alert-dialog-description",children:["Don't like the changes in the 3.0 update? Did you perhaps encounter any issues or have any feedback? Please let us know so that we may improve it in the future."," ",e(O,{color:"secondary",href:"mailto:contact@buttonizer.pro",children:"contact@buttonizer.pro"})]})}),o(oe,{children:[e(p,{disabled:r,onClick:a,children:"Cancel"}),e(p,{disabled:r,color:"secondary",onClick:l,autoFocus:!0,children:"I am sure"})]})]})}function dn(){const[t,n]=s.exports.useState(!1),[r,i]=s.exports.useState(!1);return o(U,{children:[o(M,{children:[e(c,{type:"header",color:"primary",children:"Remove unused 2.x data"}),e(c,{variant:"body1",color:"primary",children:"Remove the old Buttonizer data in your database."}),e(p,{variant:"outlined",onClick:()=>n(!0),children:"Remove 2.x data"}),e(c,{type:"header",color:"primary",children:"Go back to Buttonizer version 2.x"}),e(c,{variant:"body1",color:"primary",children:"Don't like the changes in the new version?"}),e(p,{variant:"outlined",onClick:()=>i(!0),children:"Return to 2.x"})]}),e(sn,{open:t,onClose:()=>n(!1)}),e(cn,{open:r,onClose:()=>i(!1)})]})}const un="_listItem_8c466_1",pn="_selectContainer_8c466_5";var Se={listItem:un,selectContainer:pn};function hn(t,n){const r=[];return t||(t=[]),n.forEach(i=>{(t.indexOf(i.id)!==-1||i.id==="administrator")&&r.push(i)}),r}function mn({additionalPermissions:t,setAdditionalPermissions:n,saving:r=!1}){const i=window.buttonizer_admin.available_roles,[a,l]=s.exports.useState(hn(t,i)),[d,m]=s.exports.useState(!1),y=g=>{const h=[];g.forEach(f=>{f.id!=="administrator"&&h.push(f.id)}),n(h)};return o(G,{disableGutters:!0,className:Se.listItem,children:[e(F,{children:e(st,{})}),e(E,{primary:"Permissions",secondary:"You can grant more roles to access the Buttonizer settings who are not an administrator."}),e("div",{className:Se.selectContainer,children:e(lt,{multiple:!0,size:"small",disableCloseOnSelect:!0,disableClearable:!0,options:i.filter(g=>g.id!=="guest"),filterSelectedOptions:!0,getOptionLabel:g=>g.name,value:a,style:{marginTop:10},fullWidth:!0,onOpen:()=>m(!0),onClose:()=>{m(!1),y(a)},loading:r,onChange:(g,h)=>{h.length!=0&&(l(h),d||y(h))},renderTags:(g,h)=>g.map((f,b)=>e(Y,R(_({label:f.name},h({index:b})),{disabled:f.id==="administrator"}))),noOptionsText:"Role not found",renderInput:g=>e(ct,R(_({},g),{variant:"outlined",label:"Select roles",placeholder:"Select one or more items",disabled:r,InputProps:R(_({},g.InputProps),{"data-testid":"pagerule:autocomplete-input"}),helperText:e(O,{href:"https://community.buttonizer.pro/knowledgebase/507",target:"_blank",children:"Need help? Learn how to use Permissions."})}))})})]})}function gn(){const[t,n]=s.exports.useState(window.buttonizer_admin.settings),[r,i]=s.exports.useState(!1),[a,l]=s.exports.useState(!1),[d,m]=s.exports.useState(window.buttonizer_admin.settings.adminTopBarButtonEnabled),[y,g]=s.exports.useState(window.buttonizer_admin.settings.canSendErrors),[h,f]=s.exports.useState(window.buttonizer_admin.settings.accessRoles),b=()=>{a||(l(!0),B("/settings",{data:{admin_top_bar_show_button:d,can_send_errors:y,additional_permissions:h}}).then(()=>{}).catch(()=>{}).then(()=>{n({adminTopBarButtonEnabled:d,canSendErrors:y,accessRoles:h}),i(!1),l(!1)}))};return s.exports.useEffect(()=>{i(t.adminTopBarButtonEnabled!==d||t.canSendErrors!==y||t.accessRoles!==h)},[d,y,h]),o(M,{children:[e(c,{type:"header",color:"primary",children:"Preferences"}),o(Q,{disablePadding:!0,dense:!0,children:[o(G,{disableGutters:!0,children:[e(F,{children:e(dt,{})}),e(E,{primary:"Show admin top bar",secondary:"Hide Buttonizer in the admin top bar by disabling this setting.",onClick:()=>{a||m(!d)}}),e(Ce,{edge:"end",color:"primary",checked:d,onChange:P=>m(P.target.checked),disabled:a})]}),o(G,{disableGutters:!0,children:[e(F,{children:e(ut,{})}),e(E,{primary:"Automatic error logging and crash reporting",secondary:"Enable automatic error logging and crash reporting in order to help us solve issues within Buttonizer! All data is anonymized automatically.",onClick:()=>{a||g(!y)}}),e(Ce,{edge:"end",color:"primary",checked:y,onChange:P=>g(P.target.checked),disabled:a})]}),e(mn,{saving:a,additionalPermissions:h,setAdditionalPermissions:f}),e(p,{variant:"contained",onClick:b,disabled:!r||a,endIcon:a&&e(X,{size:20,style:{marginLeft:8}}),style:{marginTop:15},children:"Save changes"})]})]})}function yn(){const{setLegacyBackupDeleted:t}=C();return o(Le,{severity:"success",variant:"outlined",action:e(Ie,{"aria-label":"close",color:"inherit",size:"small",onClick:()=>{t(!1)},children:e(De,{fontSize:"inherit"})}),style:{marginTop:15,background:"#edf7ed"},children:[e(Ee,{children:"You have deleted your old data."}),"Have fun with the new version of Buttonizer! :)"]})}function fn(){const{hasMigrated:t,legacyBackupDeleted:n}=C();return o(U,{children:[e(gn,{}),e(on,{}),e(nn,{}),t&&window.buttonizer_admin.isAdmin==="1"&&e(dn,{}),n&&e(yn,{})]})}const bn="_avatar_yq9q0_1",vn="_listItem_yq9q0_5",wn="_secondaryInfo_yq9q0_9";var de={avatar:bn,listItem:vn,secondaryInfo:wn};let ue=null,D=null;function _n(){const t=V(),{enqueueSnackbar:n,closeSnackbar:r}=ge(),{parseAccountData:i,setConnectionSuccessfull:a,setActionLock:l}=C(),[d,m]=s.exports.useState(!1),[y,g]=s.exports.useState(!1),[h,f]=s.exports.useState(!1),b=buttonizer_admin.site,P=()=>{if(d&&D){D.focus();return}m(!0),g(!1);const x=H(`/apps/onboard?app_origin=wordpress&site_name=${encodeURIComponent(b.name)}&domain=${encodeURIComponent(b.domain)}&email=${encodeURIComponent(b.user.email)}&first_name=${encodeURIComponent(b.user.firstName)}&last_name=${encodeURIComponent(b.user.lastName)}`);D=window.open(x,"connectPopup",`width=500,height=580,top=${window.innerHeight/2-580/2},left=${window.innerWidth/2-500/2},status=no,scrollbars=yes,resizable=no`);try{D.focus()}catch{n("Could not open authorization popup. Your browser might have blocked it. Please add this site to your exception list.",{anchorOrigin:{vertical:"bottom",horizontal:"center",autoHideDuration:1e4},action:S=>[e(p,{href:"https://community.buttonizer.pro/knowledgebase/1208",target:"_blank",color:"secondary",children:"More information"}),e(p,{onClick:()=>r(S),children:"Close"})]})}ue=setInterval(()=>{if(!D){clearInterval(ue);return}D.closed&&(clearInterval(ue),D=null,m(!1))})};if(s.exports.useEffect(()=>{const x=w=>{!w.isTrusted||w.origin!==H("")||w.data.messageType==="connect-info"&&(D.close(),f(!0),B("/connect",{siteId:w.data.id,authorization:w.data.authorization}).then(({data:S})=>{l("no-lock"),i(S.data),a(!0),t("/")}).catch(()=>{f(!1),g(!0)}))};return window.addEventListener("message",x),function(){window.removeEventListener("message",x)}},[]),h)return e(ie,{text:"Connecting..."});const z=(x,w)=>o(G,{className:de.listItem,children:[e(Me,{children:e(Ae,{className:de.avatar,children:e(ye,{})})}),e(E,{secondary:w,secondaryTypographyProps:{className:de.secondaryInfo},primary:x})]});return e(Fe,{children:o(k,{container:!0,style:{height:"100%"},direction:"row",children:[e(k,{item:!0,container:!0,justifyContent:"center",direction:"column",alignContent:"center",md:6,sm:12,sx:{margin:"20px 0"},children:o("div",{children:[e("img",{src:`${buttonizer_admin.assetsPath}/images/buttonizer-logo.png`,alt:"buttonizerlogo",style:{height:50}}),e(c,{style:{fontSize:27,fontWeight:600,marginTop:30},children:"Buttonizer has been installed,"}),e(c,{style:{fontSize:25},children:"you are ready to make some buttons!"}),o("div",{style:{marginTop:30,maxWidth:300},children:[e(p,{variant:"contained",size:"large",onClick:P,color:"secondary",endIcon:e(Z,{}),sx:{padding:"15px 30px"},children:"Go to your dashboard"}),e(c,{style:{fontSize:15,marginTop:20,marginBottom:60},children:"Go to your dashboard to create, manage and edit your buttons."})]})]})}),o(k,{container:!0,justifyContent:"center",alignContent:"center",direction:"column",item:!0,md:6,sm:12,sx:{margin:"20px 0"},children:[e(c,{style:{fontSize:27,fontWeight:600},children:"This is Buttonizer"}),o(Q,{size:"large",children:[z("WhatsApp Button"),z("Facebook messenger"),z("Social media sharing"),z("Navigate with URL"),z("Open pop up"),z("And many more options!")]})]})]})})}const kn="_helpContainer_jsvok_1",zn="_cardButton_jsvok_5",Cn="_helpContainerText_jsvok_33";var J={helpContainer:kn,cardButton:zn,helpContainerText:Cn};function xn(){const t=({imgSrc:n,href:r,title:i,description:a,button:l="Learn more"})=>e(pt,{children:e(ht,{href:r,type:"link",target:"_blank",className:J.cardButton,children:o(mt,{className:J.cardContent,children:[e("img",{src:n,alt:"Knowledge base",draggable:!1}),e(c,{variant:"h5",children:i}),e(c,{className:J.helpContainerText,color:"textSecondary",component:"div",children:a}),e(p,{endIcon:e(gt,{}),color:"secondary",children:l})]})})});return o("div",{children:[o(M,{children:[e(c,{color:"primary",type:"header",children:"Need some help?"}),e(c,{type:"content",color:"primary",children:"Do you need some help? We can help you with everything! Check out our Buttonizer Community, knowledge base or we can help you with our support."})]}),o("div",{className:J.helpContainer,children:[e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/knowledge-base.svg`,title:"Knowledge base",description:"Learn how to use our application like a pro",href:"https://community.buttonizer.pro/knowledgebase"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/community.svg`,title:"Forums",description:"Give and Get help from your peers and our team",href:"https://community.buttonizer.pro/"}),e(t,{imgSrc:`${buttonizer_admin.assetsPath}/images/support/tickets.svg`,title:"Tickets",description:"Need support that requires privacy? Submit a private ticket",href:"https://community.buttonizer.pro/tickets"})]})]})}function Sn(){return o(M,{children:[e(c,{type:"header",color:"primary",children:"Oh no! Page not found :("}),o(c,{type:"body1",color:"primary",children:["Sorry about that. If we linked to something wrong in our plugin, please let us know by giving us feedback"," ",e(O,{href:"https://community.buttonizer.pro/",target:"_blank",color:"secondary",children:"on our Buttonizer Community!"})]}),e(p,{component:yt,to:"/",variant:"outlined",type:"link",children:"Back to overview"})]})}const Tn={blogs:"wp/v2/posts?_fields[]=title&_fields[]=id",pages:"wp/v2/pages?_fields[]=title&_fields[]=id",categories:"wp/v2/categories?_fields[]=name&_fields[]=id"};function Bn(t,n){if(t==="roles"){n(window.buttonizer_admin.available_roles);return}return pe({url:`${buttonizer_admin.api}${Tn[t]}&per_page=100`,method:"GET",headers:{"X-WP-Nonce":buttonizer_admin.nonce}}).then(({data:r})=>{n(r.map(({id:i,title:a,name:l=null})=>{var d;return{id:i,name:(d=a==null?void 0:a.rendered)!=null?d:l}}))}).catch(()=>{})}const Pn="_iframe_13azj_1";var $n={iframe:Pn};const Te=(t,n,r,i={})=>{t.contentWindow.postMessage({eventType:"buttonizer",messageType:r,message:i},n)};function Be(){const t=V(),n=s.exports.useRef(),{cachedEditorSession:r,setCachedEditorSession:i,sessionStarting:a,startSession:l}=C();return s.exports.useEffect(()=>{r===null&&!a&&l()},[r]),s.exports.useEffect(()=>{const d=({data:m,origin:y})=>{const{eventType:g,messageType:h,message:f}=m;g==="buttonizer"&&(h==="connection"&&f==="ready"&&Te(n.current,y,"platform","wordpress"),h==="close_editor"&&t("/"),h==="request_data"&&Bn(f,b=>{Te(n.current,y,`reply_${f}`,b)}))};return window.addEventListener("message",d,!1),()=>{window.removeEventListener("message",d),i(null)}},[]),!r||a?e(ie,{text:"Starting editor session..."}):e("iframe",{src:Nt(r),className:$n.iframe,ref:n,referrerPolicy:"origin"})}function Ln(){const{actionLock:t}=C(),{enqueueSnackbar:n,closeSnackbar:r}=ge();return s.exports.useEffect(()=>{pe.interceptors.response.use(i=>i,i=>{let a=`Oops, something went wrong. Error status ${i.response.status} (${i.response.statusText}). Your webserver might be unable to handle this request, there's an issue with your WordPress instance or you have insufficient permissions to execute this request.`,l=!0,d=1207,m=null;return i.response.data&&(i.response.data.code==="buttonizer_api_server_error"?d=1213:l=!1,i.response.data.data&&i.response.data.data.message!==""&&(m=i.response.data.data.message),a=`${i.response.data.message} (Error code: ${i.response.data.code})`),n(a,{anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:null,action:y=>[l&&e(p,{href:`https://community.buttonizer.pro/knowledgebase/${d}`,target:"_blank",color:"secondary",children:"More information"}),m!==null&&e(p,{color:"secondary",onClick:()=>alert(`The response message we received was:
2
+
3
+ ${m}`),children:"Debug"}),e(p,{onClick:()=>r(y),children:"Close"})]}),Promise.reject(i)})},[]),t==="editor"?e(Be,{}):t==="migration"?e(Kt,{}):t==="setup"?e(_n,{}):e(ft,{children:o(A,{path:"/",element:e(Et,{}),children:[e(A,{path:"/",element:e(bt,{to:"/overview",replace:!0})}),e(A,{path:"/overview",element:e(Zt,{})}),e(A,{path:"/settings",element:e(fn,{})}),e(A,{path:"/support",element:e(xn,{})}),e(A,{path:"/editor",element:e(Be,{})}),e(A,{path:"*",element:e(Sn,{})})]})})}const In="https://84c09e1dec414d9aa9a7663511fb3027@tracker.buttonizer.pro/7",Dn={}.VITE_APP_VERSION;vt({dsn:In,integrations:[new wt],release:Dn,environment:"development",tracesSampleRate:1,beforeSend:t=>{var n;return(n=buttonizer_admin==null?void 0:buttonizer_admin.settings)!=null&&n.canSendErrors?t:null}});_t.createRoot(document.getElementById("root")).render(e(kt,{injectFirst:!0,children:e($e,{theme:Ne,children:e(xt,{children:e(Ln,{})})})}));
assets/app/index.html CHANGED
@@ -5,7 +5,7 @@
5
  <link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Vite App</title>
8
- <script type="module" crossorigin src="/index.f7d191e3.js"></script>
9
  <link rel="modulepreload" href="/vendor.257c8694.js">
10
  <link rel="stylesheet" href="/index.1667de10.css">
11
  </head>
5
  <link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Vite App</title>
8
+ <script type="module" crossorigin src="/index.be77aa6d.js"></script>
9
  <link rel="modulepreload" href="/vendor.257c8694.js">
10
  <link rel="stylesheet" href="/index.1667de10.css">
11
  </head>
assets/app/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "index.html": {
3
- "file": "index.f7d191e3.js",
4
  "src": "index.html",
5
  "isEntry": true,
6
  "imports": [
1
  {
2
  "index.html": {
3
+ "file": "index.be77aa6d.js",
4
  "src": "index.html",
5
  "isEntry": true,
6
  "imports": [
buttonizer.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Buttonizer - Smart Floating Action Button
4
  * Plugin URI: https://buttonizer.io
5
  * Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
6
- * Version: 3.0.0
7
  * Author: Buttonizer
8
  * Author URI: https://buttonizer.pro
9
  * License: GPLv3
@@ -24,7 +24,7 @@
24
  */
25
 
26
  // Define current Buttonizer version
27
- define('BUTTONIZER_VERSION', '3.0.0');
28
  define('BUTTONIZER_PLUGIN_FILE', __FILE__);
29
 
30
  // Get environment vars
3
  * Plugin Name: Buttonizer - Smart Floating Action Button
4
  * Plugin URI: https://buttonizer.io
5
  * Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
6
+ * Version: 3.0.2
7
  * Author: Buttonizer
8
  * Author URI: https://buttonizer.pro
9
  * License: GPLv3
24
  */
25
 
26
  // Define current Buttonizer version
27
+ define('BUTTONIZER_VERSION', '3.0.2');
28
  define('BUTTONIZER_PLUGIN_FILE', __FILE__);
29
 
30
  // Get environment vars
readme.txt CHANGED
@@ -4,7 +4,7 @@ Buy plugin: https://buttonizer.io
4
  Tags: Conversion, action button, call, marketing, Social Sharing
5
  Requires at least: 4.7
6
  Tested up to: 6.0
7
- Stable tag: 3.0.1
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -193,6 +193,18 @@ Languages can have a different direction of writing and reading? While languages
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  = 3.0.1 =
197
  Release date: June 30, 2022
198
 
4
  Tags: Conversion, action button, call, marketing, Social Sharing
5
  Requires at least: 4.7
6
  Tested up to: 6.0
7
+ Stable tag: 3.0.2
8
  Requires PHP: 7.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
193
 
194
  == Changelog ==
195
 
196
+ = 3.0.2 =
197
+ Release date: June 30, 2022
198
+
199
+ **Changelog:**
200
+ - Few PHP 7.0 compatibility fixed
201
+ - Fixed some warnings in specific situations
202
+ - Added debug button for error notifications
203
+ - Better request error handling
204
+ - Updated support link in menu
205
+
206
+ If you experience bugs, problems or you just have some feedback, let us know on our [Buttonizer community](https://community.buttonizer.pro/)!
207
+
208
  = 3.0.1 =
209
  Release date: June 30, 2022
210